Autor Beitrag
Goolix
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 83



BeitragVerfasst: Mi 03.08.05 08:30 
hallo, ich habe leider einen befehl bzw den namen der deklarierung vergessen... könnte mir wer helfen?
ausblenden Delphi-Quelltext
1:
2:
3:
hallo.n:=123;
hallo.i:=220;
hallo.s:='Flo';


könnte mir wohl nochmal wer sagen wie dieser hallo.X - Variablen zu erzeugen sind und wie sie heißen?

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt.
Moderiert von user profile iconGausi: Topic aus Sonstiges verschoben am Mi 03.08.2005 um 09:51
Jailbird
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 127

Windows XP Pro SP2
Delphi 7 Professional
BeitragVerfasst: Mi 03.08.05 08:40 
du meinst wohl records

ausblenden Delphi-Quelltext
1:
2:
3:
4:
THalloWelt = record
  hallo: integer;
  welt: String
end;


Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt.
MisterBum
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 107



BeitragVerfasst: Mi 03.08.05 08:40 
Sehr unverständlich geschrieben, aber ich versuchs mal:
So spricht man z.B. Variablen (hier x) an, die in einer Unit Hallo deklariert wurden als globale Variablen.
Hallo = Unit
hinter . = z.B. Variable
:= = Zuweisung
123 = Wert

Hoffe habe dir geholfen.

Gruß MisterBum
Goolix Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 83



BeitragVerfasst: Mi 03.08.05 08:44 
user profile iconMisterBum hat folgendes geschrieben:
Sehr unverständlich geschrieben, aber ich versuchs mal:
So spricht man z.B. Variablen (hier x) an, die in einer Unit Hallo deklariert wurden als globale Variablen.
Hallo = Unit
hinter . = z.B. Variable
:= = Zuweisung
123 = Wert

Hoffe habe dir geholfen.

Gruß MisterBum


hmm.. das wusste ich noch garnicht^^... ich meinte aber die records...

thx
arj
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 378

Win XP/Vista, Debian, (K)Ubuntu
Delphi 5 Prof, Delphi 7 Prof, C# (#Develop, VS 2005), Java (Eclipse), C++, QT, PHP, Python
BeitragVerfasst: Mi 03.08.05 08:46 
Neben den zwei Möglichkeiten oben gibt es noch die Möglichkeit dass Hallo eine Instanz einer Klasse ist.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
THallo = class
public
n : Integer;
i : Integer;
s : String;
end;

var 
  hallo : THallo;

begin
  hallo := THallo.Create;
  hallo.n := 123;
  [...]
end;


Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt.