Specifies whether character constant expressions are allowed wherever typeless constants may be used.
This language extension might be needed when you are porting programs from other platforms.
.-noctyplss-----------------. >>- -q--+-ctyplss--+--------------+-+-------------------------->< | .-noarg-. | '-=--+-arg---+-'
@PROCESS:
@PROCESS CTYPLSS[([NO]ARG)]| NOCTYPLSS
-qnoctyplss
With -qctyplss, character constant expressions are treated as if they were Hollerith constants and thus can be used in logical and arithmetic expressions.
Example 1: In the following example, the compiler option -qctyplss allows the use of a character constant expression.
@PROCESS CTYPLSS
INTEGER I,J
INTEGER, PARAMETER :: K(1) = (/97/)
CHARACTER, PARAMETER :: C(1) = (/'A'/)
I = 4HABCD ! Hollerith constant
J = 'ABCD' ! I and J have the same bit representation
! These calls are to routines in other languages.
CALL SUB(%VAL('A')) ! Equivalent to CALL SUB(97)
CALL SUB(%VAL(1HA)) ! Equivalent to CALL SUB(1627389952)
! These statements are not allowed because of the constant-array
! restriction.
! I = C // C
! I = C(1)
! I = CHAR(K(1))
END
@PROCESS CTYPLSS(ARG)
INTEGER :: J
J = 3HIBM
! These calls are to routines in other languages.
CALL SUB(J)
CALL SUB(3HIBM) ! The Hollerith constant is passed as if
! it were an integer actual argument