🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8557

Re: Argv[0] in TURBO PASCAL

#8557
From: Pierre Darmon
Date: Mon, 27 Oct 1986 00:05
23 lines
1684 bytes
In article <1134@tekigm2.UUCP> timothym@tekigm2.UUCP (Timothy D Margeson) writes:
>About Turbo Pascal command lines.... YOU CAN GET AT THEM EASILY IN 3.01A.
>
>
>The function is PARAMCOUNT and PARAMSTR(). 
>
>PARAMCOUNT returns the number of arguments, PARAMSTR() with an integer index
>returns the passed parameter. You can even pass dummy variables when compiling
>to memory by using the P option from the option menu.
>
>I don't know right off if PARAMSTR(0) works, I've never had occasion to use it.
>I have used PARAMSTR(X) where X>0 and X<10 and it works fine.
>

I just tried it with Turbo 3.01A on an PC AT DOS 3.1. ParamStr(0) returns an
empty string. Too bad. However I tried up to 40 arguments and used Paramstr(40)
and got them all. So I believe it's safe to assume that you can go up to     
whatever is needed, limited by the 127 char size of the command line
-- 

Pierre Darmon, IBM Thomas J. Watson Research Center.                        
.....seismo!philabs!polaris!darmon.
darmon.yktvmz.ibm@csnet-relay  
Technical Details
Message-ID: <766@polaris.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!mit-eddie!think!rutgers!sri-spam!sri-unix!hplabs!pyramid!prls!philabs!polaris!darmon
References: <623@A60.UUCP> <2444@gitpyr.gatech.EDU> <1134@tekigm2.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!mit-eddie!think!rutgers!sri-spam!sri-unix!hplabs!pyramid!prls!philabs!polaris!darmon
From: darmon@polaris.UUCP (Pierre Darmon)
Newsgroups: net.micro.pc
Subject: Re: Argv[0] in TURBO PASCAL
Message-ID: <766@polaris.UUCP>
Date: Sun, 26-Oct-86 19:05:02 EST
Article-I.D.: polaris.766
Posted: Sun Oct 26 19:05:02 1986
Date-Received: Tue, 28-Oct-86 06:46:12 EST
References: <623@A60.UUCP> <2444@gitpyr.gatech.EDU> <1134@tekigm2.UUCP>
Reply-To: darmon@polaris.UUCP (Pierre Darmon)
Organization: IBM Research, Yorktown Heights, N.Y.
Lines: 23