Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

How to read command line options Find similar branches


ProfiUgl   (2001-12-19 15:24) [0]

Good day to MASTER!
Maybe someone will tell me how to read the parameters of the program on the command line. For example, I run my application: MyProg.exe -kneed to bite -to



Юрий Федоров   (2001-12-19 15:25) [1]

ParamStr, ParamCount



ProfiUgl   (2001-12-19 15:40) [2]

Thanks understood!



oomneeq   (2001-12-19 15:45) [3]

But this is the coolest of all! :)

FindCmdLineSwitch

unit
Sysutils

type TSysCharSet = set of Char; function FindCmdLineSwitch (const Switch: string; SwitchChars: TSysCharSet; IgnoreCase: Boolean): Boolean;
Description


Returns true if a string has been specified.
(Eg, "-" and "/" are common) IgnoreCase parameterized whether or not the case-sensitive or case-insensitive search is performed.

example

var s: string; sc: TSysCharSet; s: = "help"; sc: = ["/", "-", "|"]; // executed as: AppName.exe / help if FindCmdLineSwitch (s, sc, False) then ShowMessage ("Application called with HELP parameter! ");
A source:
http://delphi.about.com/library/rtl/blrtlFindCmdLineSwitch.htm



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.56 MB
Time: 0.049 c
14-22377
sudiv
2001-11-08 10:54
2002.01.08
C ++?


1-22004
KhLexa
2001-12-17 17:57
2002.01.08
Glitches


14-22349
Ivan Shikhalev
2001-11-06 21:48
2002.01.08
to Anatoly Podgoretsky


1-22085
ProfiUgl
2001-12-19 15:24
2002.01.08
How to read command line options


1-22132
Leviathan
2001-12-19 19:38
2002.01.08
Hide shape





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish