VMS Help FORTRAN, /DESIGN, PLACEHOLDERS *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Controls whether the compiler accepts DEC Language-Sensitive Editor placeholders (in well-defined contexts) as valid program syntax. Compaq Fortran 77 recognizes five types of placeholders defined by LSE: {required-placeholder} {required-list-placeholder}... [optional-placeholder] [optional-list-placeholder]... «pseudocode-placeholder» An alternative syntax which uses 7-bit ASCII character set delimiters for a pseudocode placeholder is also accepted by Compaq Fortran 77: <<pseudocode-placeholder>> There is no list form of pseudocode placeholder. A placeholder must be terminated before the end of the line, and the closing delimiter must correspond to the opening delimiter. For example, the following placeholder is invalid: [invalid-delimiter} Any text can appear inside a delimiter except for the closing delimiter. There is no ability to "quote" a closing delimiter in order to allow its inclusion as text. Nesting of delimiters is not supported. If you also specify the /ANALYSIS_DATA qualifier, information about placeholders and their use is included in the SCA analysis data file. If placeholder analysis is performed on a compilation unit that contains placeholders in valid contexts, the compiler does not generate an object file. An object file is generated, however, if no placeholders are found in the compilation unit undergoing placeholder analysis. If LSE placeholders are present in the source file and you do not specify the /DESIGN=PLACEHOLDER qualifier, the compiler treats the placeholders as invalid syntax and generates an error message. Allowed Contexts for Placeholders: A placeholder can be used to replace either an entire Fortran statement or a part of a statement. As a replacement for an entire statement, there are no restrictions on where a placeholder can appear. Otherwise, as a replacement for a portion of a statement, a placeholder is generally treated as an undeclared identifier whose implicit type is INTEGER. This implicit typing is unaffected by the IMPLICIT or IMPLICIT NONE statements, but is affected by the /[NO]I4 command qualifier or the OPTIONS statement qualifier. Each occurrence of a placeholder is considered as a unique instance and is unaffected by earlier uses of a syntactically identical placeholder. For example, in the following code sequence, each occurrence of "[abc]" is considered to be a never-before-seen identifier: INTEGER [abc] REAL [abc] The implicit typing of placeholders as INTEGER allows them to be used in most reasonable contexts, but if they are used in contexts where an integer identifier would not be allowed, semantic error messages are generated. For example, the following statement is invalid because of the type mismatch: CHAR__VAR = CHAR__VAR // [placeholder] Like any other undeclared variable, placeholders are considered scalars and cannot be used in a context that requires the variable to be declared as an array. Given the above restrictions, placeholders can appear in the following contexts: o As a variable name in a type specification, AUTOMATIC, COMMON, DATA, DIMENSION, EQUIVALENCE, POINTER, RECORD, SAVE, STATIC, or VOLATILE statement, and CPAR$ CONTEXT_SHARED or CPAR$ PRIVATE directives. o As the symbolic name in an EXTERNAL or PARAMETER statement. o As an integer expression. o As the target of an assignment statement. o As the name of subroutine in a CALL statement. o As the name of a function in a function reference. o As an integer variable in an ASSIGN or assigned GOTO statement. o As the control variable in a DO statement or implied DO list in an I/O statement. o As the lock variable in a CPAR$ LOCKON or CPAR$ LOCKOFF directive (the placeholder is treated as LOGICAL*4 in these contexts only). o As an integer variable in an I/O statement other than the unit or format specifier. Placeholders are not allowed in the following contexts: o As the symbolic name in a BLOCK DATA, ENTRY, FUNCTION, INTRINSIC, PROCEDURE, or PROGRAM statement. o As formal (dummy) argument names in an ENTRY, FUNCTION, or PROCEDURE statement. o As the name of a common block. o As a structure name. o In a NAMELIST statement, either as the group name or as one of the variables to be included in the group. o As the unit or format specifier in an I/O statement.
|