xHarbour Reference Documentation > Function Reference |
Checks if an internal switch is set on the command line.
HB_ArgCheck( <cSwitch> ) --> lExists
The function returns .T. (true) when the xHarbour application is started with <cSwitch> set on the command line, otherwise .F. (false) is returned.
An xHarbour application can be started with regular and internal command line switches, or arguments. Internal switches are prefixed with two slashes, while regular switches are not prefixed. HB_ArgCheck() tests only the existence of prefixed switches.
Note: use function HB_ArgString() to retrieve the value of an internal command line switch.
See also: | HB_ArgC(), HB_ArgV(), HB_ArgString(), PCount(), PValue() |
Category: | Debug functions , Environment functions , xHarbour extensions |
Source: | vm\cmdarg.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example tests for the existence of the command line switch TEST. // The result is only true, when the program is started as follows // (the command line switch is case insensitive): // // c:\xhb\test.exe //TEST // c:\xhb\test.exe //test PROCEDURE Main( ... ) ? HB_ArgCheck( "TEST" ) RETURN
http://www.xHarbour.com