Autor Beitrag
Lucky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 84

XP
Delphi 7
BeitragVerfasst: Di 24.07.07 08:30 
hallo,
viel wäre einer von euch so nett u. würde mir folgende quellcode-zeilen erklären. ich bitte euch darum möchte ja was dazulernen u. somit net einfach nur den code kopieren...
thanks schon mal im voraus...

tpapername = array [0..63] of char;
-> ist klar

tpapernamearray = array [0..high(word) div sizeof(tpapername)] of tpapername;
-> versteh ich net ganz...wird hier irgendwas durch die größe von dem darüberigen array
geteilt??

ppapernamearray = ^tpapernamearray;
-> ist ein Zeiger auf das darübere array oder?
Lossy eX
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1048
Erhaltene Danke: 4



BeitragVerfasst: Di 24.07.07 08:45 
ausblenden Delphi-Quelltext
1:
2:
type
  tpapername = array [0..63] of char;

Ist klar. Ein array of char mit 64 Einträgen.

ausblenden Delphi-Quelltext
1:
2:
type
  tpapernamearray = array [0..high(word) div sizeof(tpapername)] of tpapername;

Das ist ein Array of tpapername. Allerdings wird die Größe "berechnet" (Der kompiler kennt das aber alles). Insgesammt soll tpapernamearray 65536 Chars groß sein. Aber je nachdem wie groß tpapername ist muss tpapernamearray etwas kleiner sein. Derwegen wird als Größe high(word) div sizeof(tpapername) angegeben. Das entspricht 65536 div 64. Und das ist in dem Fall 1024.

Wenn tpapername zum Beispiel von 0..127 gehen würde, dann würde tpapernamearray nur 512 Einträge enthalten.

ausblenden Delphi-Quelltext
1:
2:
type
  ppapernamearray = ^tpapernamearray;

Ja. Das ist ein Pointer darauf.

_________________
Nur die Menschheit ist arrogant genug, um zu glauben sie sei die einzige intelligente Lebensform im All. Wo nicht mal das nachhaltig bewiesen wurde.
Lucky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 84

XP
Delphi 7
BeitragVerfasst: Di 24.07.07 08:48 
ok thanks vielen dank :flehan:
Lucky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 84

XP
Delphi 7
BeitragVerfasst: Di 24.07.07 08:53 
nochmal eine kleine frage wäre zu kurz für ein neues thema

wenn ich bei uses winspool mit angebe, steht das "winspool" für den
Windowsspool-verlauf?

thanks
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 25.07.07 21:40 
Jup. WinSpool steht für die Unit, die alle (von der VCL implementierten*) Funktionen zum Ansprechen des Windows-Druck-Spoolers enthält.

*equivalent zu unvollständig ... Ist aber ne andere Geschichte.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.