Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!pawl17.pawl.rpi.edu!fargo From: fargo@pawl.rpi.edu (Ethan M. Young) Newsgroups: comp.lang.pascal Subject: Re: Programming ... Pascal Keywords: Pascal, Parameters Message-ID: <772@rpi.edu> Date: 27 Feb 89 17:25:32 GMT References: <495@chief.UUCP> Sender: usenet@rpi.edu Organization: Rensselaer Polytechnic Institute, Troy, NY Lines: 27 In article <495@chief.UUCP> start@chief.UUCP (CompuInvest BBS system ) writes: > >How does one set up a program to read in parameters from the command line? > >Ex. : > >Shell> pascal.prg -param1 -param2 > ^^^^^^ ^^^^^^ > |||||| |||||| >How does one accomplish this in standard (ISO) Pascal, if it is even >possible? Or, if turbo Pascal will accomlish this, how? > In Turbo Pascal (at least 3.0), there are two variables called ParamCount and ParamStr. ParamCount is of type integer and contains the number of blank- separated parameters on the command line. ParamStr is an ARRAY of strings, each string being the appropriate parameter, starting at index 1 (It may be 0) If I remember correctly, standard Pascal has no method on reading in the com- mand line parameters. It is completely implementation specific. Thank you and happy hunting! Internet: fargo@pawl.rpi.edu ____ [> SB <] fargo@{paraguay|uruguay}.acm.rpi.edu /__ -=>??<=- Bitnet (??): usergac0@rpitsmts.bitnet / ARGO : 3000 years of regression from the year 4990