-----Original Message-----
From: cctalk-bounces at
classiccmp.org
[mailto:cctalk-bounces at
classiccmp.org] On Behalf Of David Riley
Sent: 06 November 2011 19:23
To: General Discussion: On-Topic and Off-Topic Posts
Subject: Re: Things I should have learned in school
On Nov 6, 2011, at 2:15 PM, <arcarlini at iee.org> wrote:
David Riley [fraveydank at
gmail.com] wrote:
I never really dealt with Fortran in university,
and if I
had, it probably would have been in a Unix context. Anyone
have some pointers to me on how to process command-line
switches in VMS from Fortran (I'm specifically tinkering with
f77, but I suppose f90 should do; it's a matter of environment)?
You don't make it clear whether you are running this as a foreign
command or whether you have created a command definition and are
running your program as a CLI command. Since the latter requires
enough work that you would have seen the docs at
http://h71000.www7.hp.com/doc/84final/4493/4493pro_contents.html
I guess that you are doing the former.
Actually, this is pretty much exactly what I was looking for.
Not sure why I wasn't seeing it before, but that should do
the trick. I guess, coming from UNIX, I wasn't as clear on
the distinction between an executable and a command, so it
looks like I need to build a command (or possibly, while I'm
getting up to speed, just take my arguments interactively,
which is a whole lot easier).
Doing your own command is fairly easy. All the nuts and bolts are
descibed here:
Start by deciding what parameters and qualifiers you want.
The write your CLD file (see the above manual for the syntax: don't be
put
off by the apparent complexity, if you want something simple, the
language
is simple too).
If your command file is FOO.CLD you can now do
$ SET COMMAND FOO.CLD
and your command will be accessible as a DCL commad
(until you log out, if you want it forever you get to do
a slightly more complicated dance - once).
Now you write your command and parse with CLI$PRESENT and
CLI$GET_VALUE.
Jump to page CDU-48 and read that through. It's an example in
BASIC but it sounds like what you want to do. My (albeit rusty)
recollection is that BASIC and FORTRAN calling conventions are
quite similar, so there's a decent chance that the example does
what you want. You should also look in SYS$EXAMPLES (just search
for CLI$ in there and see if there are any FORTRAN examples).
Antonio
arcarlini at