[ < ] | [ > ] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [Contents] | [Index] | [ ? ] |
The main feature of cmz directive is to use code conditionnaly for a given
select flag. For example when the double precision is selected
(see Double precision) the use of the conditionnal
double
flag may be required in case there is a different subroutine
name for different types. If, for example, the user use the subroutine
smysub
for simple precision and dmysub
for double
precision the following code is an example of what could appear in the
user code:
+IF,double call dmysub(eta); +ELSE call smysub(eta); +ENDIF
For a complete reference on cmz directives see the appendix Cmz directives reference.
[ < ] | [ > ] | [Contents] | [Index] | [ ? ] |
In cmz the KEEP and DECK have their cmz directives preprocessed as part of the source files extraction. And the +KEEP and +DECK directives are automatically set when creating the KEEP or DECK. With make, files with these directives has to be created within the files that are to be preprocessed by the cmz directives preprocessor.
To be processed by make, a file that contains cmz directives
should have a file suffix corresponding
with the language of the resulting file and with the normal file suffix of
that language. More precisely ‘cm’ should be added before the normal
file suffix and after the ‘.’. Therefore if the resulting file language
is associated with a suffix ‘.suf’, the file with cmz directives
should have a ‘.cmsuf’ suffix. The tradition is to have
a different suffix for main files and include files.
To add directories searched for cmfiles (files with cmz directives)
they should be added to the CMFDIRS
makefile variable, separated
by ‘:’.
Rules for preprocessing of the files are defined in the file Makefile.miniker for the file types described in table 3.2:
language | file type | cmfile suffix | suffix | language |
---|---|---|---|---|
fortran | main/deck | .cmf | .f | ftn |
fortran preprocessed | main/deck | .cmF | .F | f77 |
fortran preprocessed | include/keep | .cminc | .inc | f77 |
mortran | main/deck | .cmmtn | .mtn | mtn |
mortran | include/keep | .cmmti | .mti | mtn |
table 3.2: Association between file language, file type, file suffixes and language identifier in cmz directives. A main file is called a deck in cmz and an include file is called a keep.
[Contents] | [Index] | [ ? ] |
This document was generated on a sunny day using texi2any.