VARTYPE() |
|
|
The VARTYPE() function returns a value indicating the data type associated with a variable.
Format
VARTYPE(variable)
where
QM stores data internally in a type variant manner. The actual data type associated with a variable may change as new data is stored. The VARTYPE() function allows a program to determine the internal data type being used. It returns one of the following values. The symbolic names shown are defined in the SYSCOM KEYS.H include record.
Example
IF VARTYPE(FVAR) = VT$FILE.REF THEN CLOSE(FVAR) END
This program fragment tests whether FVAR references an open file and, if so, closes the file. The same effect could have been achieved using the FL$OPEN mode of the FILEINFO() function. |