^VARIANT

Return the value of an internal compiler variable

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
^VARIANT

Discussion

^VARIANT returns the value of an internal compiler variable set by the variant compiler option (/VARIANT on OpenVMS and -qvariant on all other systems).

The value set by the variant compiler option must be a positive number. For example, if you compile your program with the following commands, ^VARIANT returns a value of 2:

dbl -qvariant=2 filename (on Windows and UNIX)

dbl filename /variant=2 (on OpenVMS)

If the variant compiler option is not present, ^VARIANT returns a value of 0.

Examples

This example determines whether or not code is compiled based on the value specified on the command line.

.if ^variant .eq. 2
    .         ;This code will be compiled
    . 
    .
.else
    .         ;This code will not be compiled
    . 
    .
.endc