command-line arguments

command-line arguments

Postby Otto » Sun Feb 18, 2007 7:00 am

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
Otto
 
Posts: 6340
Joined: Fri Oct 07, 2005 7:07 pm

Re: command-line arguments

Postby Enrico Maria Giordano » Sun Feb 18, 2007 8:44 am

This is a sample:

Code: Select all  Expand view  RUN
FUNCTION MAIN( cPar1, cPar2, cPar3 )

    LOCAL i

    ? cPar1, cPar2, cPar3
    ?

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

    ?

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Frank Demont » Sun Feb 18, 2007 9:00 am

Code: Select all  Expand view  RUN
#include "FiveWin.Ch"
FUNCTION MAIN(...)
*************
LOCAL Arr := Hb_Aparams()
AEVAL(Arr,{|j|msginfo(j)})
RETURN
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Otto » Sun Feb 18, 2007 9:06 am

Thank you.
Otto
User avatar
Otto
 
Posts: 6340
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Antonio Linares and 35 guests