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.55 MB
Time: 0.025 c
14:22370
Zergg
2001-11-08 16:30
2002.01.08
About static DLL loading from CBuilder


14:22375
Nemeis
2001-11-07 14:08
2002.01.08
And again about Lamer;)


3:21993
Кнопка
2001-12-07 09:23
2002.01.08
Search in database (Very urgent !!!)


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


1:22013
Curious
2001-12-17 12:53
2002.01.08
Run exe from current program.





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 Spanish 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