[Info-vax] Architecture specific code in VMS Fortran
John Reagan
johnrreagan at earthlink.net
Sun Oct 2 11:50:24 EDT 2011
"Marc Van Dyck" <marc.gr.vandyck at invalid.skynet.be> wrote in message
news:mn.10717dbae7d793fa.104627 at invalid.skynet.be...
> I'm not coding in Fortran. But the language I'm using, Pascal,
> doesn't support - as far as I know - that kind of thing either.
Yes it does. Trust me, I implemented it. I'll guess V5.6 or V5.7 but I'd
have to double check release notes.
Look at the %IF conditional compilation directive and the %ARCH_NAME lexical
function (it returns a string of "VAX", "Alpha", or "IA64"). It is in the
help file "$ HELP PASCAL Directives IF" and "$ HELP PASCAL Directives
ARCH_NAME" as well as the current online docs.
So you'll get something like:
%IF %ARCH_NAME = "Alpha"
%THEN
-something for alpha-
%ELIF %ARCH_NAME = "IA64"
%THEN
-something for Itanium-
%ELIF %ARCH_NAME = "VAX"
%THEN
-something for VAX-
%ELSE
%ERROR("Call ambulance for JF");
%ENDIF
and unlike C, the %IF/%ELIF/%ELSE/%ENDIF directives do not have to start on
column 1. It is a token-based system, not a line based system.
I don't remember right off hand if the last official VAX compiler included
these (I think the last VAX Pascal release was V5.8 in 2000). The compiler
frontend is common source, but the last official release might have predated
some of the work. I did have unoffical VAX compilers all the way to V6.0 or
V6.1 that I used to give away to those who asked. This is only important if
you have true common Pascal code running on all 4, er, I mean 3
architectures ;) You can always ask the current engineering team if you
need the VAX version.
As for the original Fortran question, I don't think so. I did a quick scan
of some old notes/documentation but didn't find anything.
John
More information about the Info-vax
mailing list