Command line parameters with VAX C?
Chris Schanzle
chris at sunset.ncsl.nist.gov
Fri Jan 5 03:33:50 AEST 1990
minow at mountn.dec.com (Martin Minow) writes:
>Here's a simple way to define C executables as foreign commands with
>a minimum of typing:
[ugly procedure that I don't fully understand thanks to my ignorance on vms.]
>Martin Minow
>minow at thundr.enet.dec.com
Recently I had to write a program that was 100% portable on Unix,
Puke-Dos, and of course, VMS. Obviously, I ran into the brain-damaged
run command in VMS also. I was hoping someone would post more
information, rather than a procedure with little explanation.
My solution was simple: compile it somewhere you expect it to stay
put and do a $dir command to get the full device and directory name
to build the following command (symbol?):
$ prog :== $<device>:[<directory>]program.exe
[the "$" before <device> is required. ".exe" suffix is optional.]
Now when you type "prog" vms will run "program" with any arguments you
give on the command line as argv[argc] parameters. Chuck this
(single) line into your login.com file and don't worry about it any
longer. No no fuss, no muss, and no ".com" files.
__________
"I'm gonna need a beer Chris Schanzle, Computer Scientist
to put these flames out..." Natnl Inst of Stds & Technology
chris at sunset.ncsl.nist.gov
More information about the Comp.lang.c
mailing list