[comp.sys.atari.st.tech] command line arguments

davidli@simvax.labmed.umn.edu (01/07/91)

In article <16531@cs.utexas.edu>, psurge@cs.utexas.edu (Troy Carpenter) writes:
> How does one get a program in either of these languages to use arguments passed
> from the command line.

Personal Pascal 2 has special subprograms (called CMD_ARGS and CMD_GETARG())
to perform this function.  They were also available in Personal Pascal 1.

usage is describe on page 6-198 of the PP 2 manual and 6-94 of the PP 1
manual.  Basically:

Cmd_Args is an integer function which returns the number of arguments in the
TOS command line buffer.

Cmd_GetArg( i, request) is a procedure which assigns the requested command line
argument to the argument ('request' is a string variable, 'i' is an integer.

As for Modula-2, it would depend upon WHICH Modula-2 compiler you were using
and the nature of the libraries included with the compiler.

-- 

David Paschall-Zimbel		davidli@simvax.labmed.umn.edu