Viva Clipper !

HB_ArgV

Advertisements

HB_ArgV

Retrieves the value of a command line argument

Syntax

      HB_ArgV( [<nPos>] ) --> cArgValue

Arguments

<nPos> : ordinal position of the command line argument to inspect

Returns

This function returns diffetrent values as character strings depending on [<nPos>] :

         Value         Return
         -----         -------
         NIL           Full file specification ( path + file name and estension of .exe file )
         zero          Same as NIL
         1             First argument in the command line
         2             Second argument in the command line
         ...
         >HB_ArgC()    Null String

Description

HB_ArgV() is used to retrieve the contents of command line arguments passed to an Harbour application when it is started. To ordinal position NIL or zero has a special meaning: it retrieves the full file specification of Harbour application (excecutable).

Example

      // If command line is :  C:\temp>test.exe p1 p2

        ? HB_ArgV()     // C:\temp\test.exe
        ? HB_ArgV( 0)   // C:\temp\test.exe
        ? HB_ArgV( 1 )  // p1
        ? HB_ArgV( 2 )  // p2
        ? HB_ArgV( 3 )  // ( Null String )

Seealso

HB_ArgC(), HB_ArgCheck(), HB_ArgString(), HB_ArgShift(), PCount(),HB_PValue(), HB_AParams()

Advertisements

Advertisements