Autor Beitrag
Salvador
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Fr 06.06.03 10:14 
Hallo,
Wie kann ich meinem Programm parameter zuweisen? also wenn es zB mit "Project1.exe -h" gestartet wird dass ich dass irgendwa beliebiges bestimmen kann...
mfg
Salvador
Pascal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 155

Win 98, Win XP
Delphi 2005, Delphi 5
BeitragVerfasst: Fr 06.06.03 11:07 
if paramstr(1)='/Hallo' then showmessage('Hallo');
MaxiTB
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 679

Win2000, WinXp, Workbench ;-)
D7 Ent, VS2003 Arch.
BeitragVerfasst: Fr 06.06.03 11:22 
Vielleicht auch noch wichtig ParamCount - liefert die Anzahl der Parameter.

_________________
Euer Mäxchen
Wer früher stirbt, ist länger tot.
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Sa 07.06.03 21:05 
parmstr(0) = programm verzeichnis + name
paramstr = parmerter count

_________________
MFG
Michael Springwald, "kann kein englisch...."
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: So 08.06.03 08:33 
wobei ein parameter IMO immer ein zusammenhängender text ist, der bis zum nächsten leerzeichen geht...
w3seek
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 64

Win XP; Win 2k; Suse 9.0
D5 Std, D6 Personal
BeitragVerfasst: So 08.06.03 09:07 
Parameter sind die einzelnen woertder die durch leerzeichen getrennt wurden. einzige ausnahme ist wenn der text in anfuehrungszeichen steht, dann wird der ganze begriff in anfuehrungszeichen als 1 parameter behandelt.