Xref: utzoo comp.sys.atari.st:33742 comp.sys.atari.st.tech:1081 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!cica!news.cs.indiana.edu!msi.umn.edu!cs.umn.edu!simvax.labmed.umn.edu!davidli From: davidli@simvax.labmed.umn.edu Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech Subject: Re: command line arguments Message-ID: <1991Jan6.181238.1@simvax.labmed.umn.edu> Date: 6 Jan 91 18:12:38 GMT References: <16531@cs.utexas.edu> Sender: news@cs.umn.edu (News administrator) Organization: Flying Taoist Graphics Lines: 22 Nntp-Posting-Host: simvax.labmed.umn.edu 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