ARG
Arguments for Thoroughbred Basic Startup
This string function returns the individual argument specified from the operating system command that was issued to start this Thoroughbred Basic task.
Syntax
Section titled “Syntax”ARG (numeric-value [,ERR=line-ref|,ERC=error-code])numeric-value- is a positive integer, zero-based, specifying which positional parameter this function is to return.
line-ref- is the program line number or label to branch to if an error is produced by this function.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”If numeric-value exceeds the number of parameters minus one, an ERR=17 results.
Examples
Section titled “Examples”If you start Thoroughbred Basic with the following command:
./basic T5 data IPLWINthen the ARGC variable will have a value of 4. To see what you entered you can execute the following Thoroughbred Basic statement:
00010 FOR X = 0 TO ARGC - 1 ; PRINT ARG(X) ; NEXT XThis statement will print:
./BasicT5dataIPLWINSee also
Section titled “See also”ARGC system variable
From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF