t3x.org / t3x / t3x-manual / 325.html
 
T3X - A Minimum Procedural Language
Version 8.1.5, Online Edition
Copyright(C) 1996-2004
Nils M Holm
 
Previous:
3.2.4 CVALIST
TOC | Index | Back Next:
3.2.6 GETENV

3.2.5 GETARG

T.GETARG(n, buffer, size) ! Num,Str,Num => Num

Retrieve the 'n'th command line argument and store its first 'size'-1 characters in 'buffer'. If the length K of the the requested argument is less than 'size'-1, copy only K characters. In either case, append a NUL character to the argument string extracted.

The first argument is accessed using 'n'=1.

GETARG returns the number of characters copied. A return code of -1 indicates that a non-existing argument has been requested ('n' is too big or less than 1).

See also: GETENV

Previous:
3.2.4 CVALIST
TOC | Index | Back Next:
3.2.6 GETENV