forlang.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Command-Line-Argument Procedures
                                             Up Contents Index Back
─────Command-Line-Argument Procedures───────────────────────────────────────
 
     The NARGS function returns the total number of command-line
     arguments, including the command. The GETARG subroutine
     returns the nth command-line argument (where the command
     itself is argument number zero).
 
     Syntax: numargs = NARGS ( )
             CALL GETARG (n, buffer, status)
 
     NARGS returns an INTEGER*4 value.
 
     The GETARG subroutine takes three arguments. The first, of
     INTEGER*2 type, specifies the position of the desired argument.
 
     The buffer argument is a CHARACTER variable that returns the
     desired command-line argument. If the argument is shorter than
     buffer, GETARG pads buffer on the right with blanks. If the
     argument is longer than buffer, GETARG truncates the argument.
 
     The status argument is an INTEGER*2 type that returns a
     status value on completion. If there were no errors, status
     returns the number of characters in the command-line argument
     before truncation or blank-padding. If an error occurs, status
     is set to -1.
                                    -♦-