Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!uhura.cc.rochester.edu!ur-valhalla!chan From: chan@valhalla.ee.rochester.edu Newsgroups: comp.lang.pascal Subject: Re: Programming ... Pascal Message-ID: <1856@valhalla.ee.rochester.edu> Date: 28 Feb 89 20:23:39 GMT Sender: usenet@valhalla.ee.rochester.edu Reply-To: chan@ee.rochester.edu (Daniel Chan) Distribution: usa Organization: URochester Department of Electrical Engineering Lines: 47 To: abcscnuk@csuna.csun.edu In-Reply-To: <1719@csuna.csun.edu> References: <495@chief.UUCP> !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? !> !>I am using a Pascal compiler for my Amiga (Metacomco's MCC Pascal V2). !> !> Any help, of course would be appreciated! !> !> !>Thanks, !> !>Robert Cooper ! !Hmmmm... I seem to remember such a similar query just a month ago... ! !As far as I know, there is no standard way of doing so. There is !still some hope, because many implementations of pascal will have !ways to access the command line. ! !Here are some implementations that I know of that allow access to the !command line parameters: ! !(VM/CMS) !PASCAL/VS If I recall, R0 is used to point to the unparsed command ! line string. You had to write some assembly code to ! be able to gain access to it. There was also a ! way to gain access to the parsed arguments (though they ! were limited to 8 characters). ! If I am right, PARMS is a function with no argument in VSPASCAL that will return command line arguments in the form of a string. If you want to know more, I can look up the detail for you. -dan.