| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Line Parameters! |
> indenterfy it for example: program.exe /f /s how do i get the /f and > /s and goto a part of my program that will use them... Well, For Starters, In The DOS Unit, There Is A Function Called ParamStr... Now, If Your Program Does Something If The Parameter Is '/DoSomething' (eg Program.Exe /DoSomething) Then You Would Use Paramstr(1) to get the first parameter, and if it equals '/DoSomething' then you do something... eg Program UseParams; Uses Dos; Var S:String; Begin S:=Paramstr(1); If S='/DoSomething' Then Call_a_procedure_or_function_etc; End. Other Nifty Little things can be done, like paramstr(0) is the full path and filename of the program executed... and, another function will tell you how many parameter ther are, this is NumParams... If You Need More Help then you can look in the SWAG stuff. Cya. Robert. --- FMail/386 1.02* Origin: Power BBS - +61-2-858-4114 - Files/Games/Mail (3:711/953) SEEN-BY: 633/267 270 @PATH: 711/953 410 808 50/99 635/544 727 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.