Contents | < Browse | Browse >
6E. built-in system variables
-----------------------------
Following global variables are always available in your program,
they're called system variables.
arg As discussed above, contains a pointer to a zero-terminated
string, containing the command-line arguments. Don't use this
variable if you wish to use ReadArgs() instead.
stdout Contains a file-handle to the standard output (and input).
If your program was started from the workbench, so no
shell-output is available, WriteF() will open a
CON: window for you and put its file handle here.
stdin file-handle of standard input
conout This is where that file handle is kept, and the console
window will be automatically closed upon exit of your
program. (see 9A , WriteF(), on how to use these two variables
properly).
execbase, These four variables are always provided with their
dosbase, correct values.
gfxbase,
intuitionbase
stdrast Pointer to standard rastport in use with your program,
or NIL. The built-in graphics functions like Line()
make use of this variable.
wbmessage Contains a ptr to a message you got if you started
from wb, else NIL. May be used as a boolean to detect
if you started from workbench, or even check any
arguments that were shift-selected with your icon.
See WbArgs.e in the Src/Args dir how to
make good use of wbmessage.