Command line parameters with VAX C?

Don Allingham dona at ncr-fc.FtCollins.NCR.com
Wed Jan 3 08:20:55 AEST 1990


On 2 Jan 90 18:56:18 GMT,
LC.YRS at forsythe.stanford.edu (Richard Stanton) said:

Richard> Using C on my PC, I can pass command line parameters to programs via
Richard> the simple:

Richard> progname [parameter list]

Richard> On a VAX, I type cc [progname] to compile, link [progname...] to
Richard> link, and "run progname" to run a program. How do I pass command
Richard> line parameters (file names etc) to a program under this system? If
Richard> I type

Richard> run progname parmlist

Richard> I get a message complaining that RUN is being given too many
Richard> parameters. HELP RUN is not too informative.

Richard> Thanks

Richard> Richard Stanton

Richard> pstanton at gsb-what.stanford.edu


VMS does things a little different than the UNIX/PC world.  Basically,
you need to define a symbol.  For the program foo.exe, you would have
to do:

	foo :== $disk:[directory]foo.exe

The $ is required.  disk is the disk name, directory is the VMS
directory path.  Command line arguments will now be understood.  Note
that in VMSland, this definition lasts only for the current login
session, so you would want to put the definition in your login.com
file, or have your system administrator enter it in one of the start
up files.

(No, I am not a VMS guru.  VMS is a necessary evil in my UNIX world.)

--
Don Allingham           
NCR Microelectronics 			ncr-fc!bach!dona at ccncsu.colostate.edu 
Ft. Collins, CO.        		...!ncr-sd!ncr-fc!bach!dona



More information about the Comp.lang.c mailing list