--- gforth/kernel/args.fs 1999/03/23 20:24:23 1.5 +++ gforth/kernel/args.fs 1999/11/08 22:01:10 1.6 @@ -21,7 +21,7 @@ : cstring>sstring ( cstring -- addr n ) \ gforth cstring-to-sstring -1 0 scan 0 swap 1+ /string ; : arg ( n -- addr count ) \ gforth - \g Return the string for the @var{n}th command-line argument. + \g Return the string for the @i{n}th command-line argument. cells argv @ + @ cstring>sstring ; : #! ( -- ) \ gforth hash-bang \g An alias for @code{\} @@ -29,12 +29,14 @@ Create pathstring 2 cells allot \ string Create pathdirs 2 cells allot \ dir string array, pointer and count + Variable argv ( -- addr ) \ gforth -\g VARIABLE: A pointer to a vector of pointers to the command-line +\g @code{Variable} -- a pointer to a vector of pointers to the command-line \g arguments (including the command-name). Each argument is \g represented as a C-style string. + Variable argc ( -- addr ) \ gforth -\g VARIABLE: The number of command-line arguments (including the command name). +\g @code{Variable} -- the number of command-line arguments (including the command name). 0 Value script? ( -- flag )