command-line arguments

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

command-line arguments

Post by Otto »

Is there a function which returns the command-line arguments specified when the program was launched.

text.exe ABC

prg

Local cTest :=""
cTest:=command()

Regards
Otto
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: command-line arguments

Post by Enrico Maria Giordano »

This is a sample:

Code: Select all

FUNCTION MAIN( cPar1, cPar2, cPar3 )

    LOCAL i

    ? cPar1, cPar2, cPar3
    ?

    FOR i = 0 TO HB_ARGC()
        ? HB_ARGV( i )
    NEXT

    ?

    RETURN NIL
EMG
Frank Demont
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Post by Frank Demont »

Code: Select all

#include "FiveWin.Ch"
FUNCTION MAIN(...)
*************
LOCAL Arr := Hb_Aparams()
AEVAL(Arr,{|j|msginfo(j)})
RETURN
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Thank you.
Otto
Post Reply