FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour command-line arguments
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
command-line arguments
Posted: Sun Feb 18, 2007 07: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

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: command-line arguments
Posted: Sun Feb 18, 2007 08:44 AM
This is a sample:

FUNCTION MAIN( cPar1, cPar2, cPar3 )

    LOCAL i

    ? cPar1, cPar2, cPar3
    ?

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

    ?

    RETURN NIL


EMG
Posts: 142
Joined: Sun Oct 09, 2005 10:59 AM
command-line arguments
Posted: Sun Feb 18, 2007 09:00 AM
#include "FiveWin.Ch"
FUNCTION MAIN(...)
*************
LOCAL Arr := Hb_Aparams()
AEVAL(Arr,{|j|msginfo(j)})
RETURN
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
command-line arguments
Posted: Sun Feb 18, 2007 09:06 AM

Thank you.
Otto

Continue the discussion