[Info-vax] Architecture specific code in VMS Fortran
Marc Van Dyck
marc.gr.vandyck at invalid.skynet.be
Sat Oct 1 19:53:37 EDT 2011
Steven Schweda brought next idea :
> On Oct 1, 11:56 am, Tom Wade <nos... at tomwade.eu> wrote:
>
>> I've checked out the HP Fortran manuals for compiler directives in code that
>> can select based on the architecture (VAX/Alpha/IA64). It seems the CDEC$
>> IF DEFINED stuff is the way to go, but although it describes how to define
>> and test variables, I can't see a list of predefined variables such as the
>> current architecture. I want to do something like
>>
>> CDEC$ IF DEFINED (VAX)
>>
>> <code to be compiled only if on VAX>
>> CDEC$ ENDIF
>>
>> Any small examples ?
>
>
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.
So what I have done is put the architecture-specific code in
different files, and pick the file I need at build time. This
is easily done with conditional instructions embedded in my
MMS files. If you don't have MMS (it's not cheap), there is
the freeware MMK that does the same thing.
--
Marc Van Dyck
More information about the Info-vax
mailing list