Command line parameters with VAX C?

Martin Minow minow at mountn.dec.com
Fri Jan 5 06:18:56 AEST 1990


In article <2457 at durer.cme.nbs.gov> chris at sunset.ncsl.nist.gov
(Chris Schanzle) justifiably complains that my "define a foreign command"
procedure is ugly and un-understandable.  Too true.  Just trust me. (:-)
>
>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.]
>
Permit me to elaborate slightly.  f$environment("DEFAULT") is a sort of
getenv() in the command language.  DEFAULT is the current device:[directory]
string and the single quotes control variable name evaluation.  My command file
is useful for one-off compilations.  As Chris notes, executables that stay
around should be stored in a consistent place and defined using a one-liner
in your login.com file.  In my case, I have a subdirectory [.bin] and a private
logical BIN: that points to it.  My login.com file then merely says:
	$ grep :== $bin:grep.exe
(I would recommend always including the .exe because of the way logical
name translation works on VMS).

I've directed followups to comp.sys.vms so we stop boring the C folk
with this trivia.

Martin
minow at thundr.enet.dec.com



More information about the Comp.lang.c mailing list