Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 26.11.09 11:36 
Moin Forum,

wie initialisert man eigentlich eine Variable vom Typ Variant?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
var xxx :Variant;
begin
  xxx := ???;
end;

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Gammatester
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 328
Erhaltene Danke: 101



BeitragVerfasst: Do 26.11.09 11:48 
user profile iconjjturbo hat folgendes geschrieben Zum zitierten Posting springen:
Moin Forum,

wie initialisert man eigentlich eine Variable vom Typ Variant?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
var xxx :Variant;
begin
  xxx := ???;
end;

Wo ist das Problem? xxx := 42; funktioniert doch.
thepaine91
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Do 26.11.09 11:50 
Letzendlich ist es egal.
Wobei ich folgende möglichkeiten wählen würde.
Kommt aber auch immer darauf an wie du sie letzendlich verwenden möchtest.

xxx := 0;
xxx := '';
etc.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 26.11.09 11:59 
vielleicht kann ich dich fürs Varianten-Kapitel im Wikibook begeistern?

lg elundril

P.S.: Is sogar von einem der kompetentesten Programmierer auf der Welt verfasst worde, von mir. :rofl:

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
thepaine91
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Do 26.11.09 12:11 
Eigenlob stinkt. :D
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 26.11.09 12:17 
Hatte es schon so gemacht: xxx := 0;
Hatte die Befürchtung, daß das evtl. nicht reicht

danke für die Antworten!

Gruß Oliver

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...