[Next] [Up] [Previous]

The TVAL Statement

The TVAL statement
(T, TYPE_VALUE)

This statement declares variables that contain the type, but not the dimensions, of a value. Although such variables do not contain dimension information, they still are not an ordinal type, as they are required to indicate the length specification of the type, and to be able to refer to user-defined types.

A constant of type TVAL is created with the syntax %T(...) where the parentheses contain a type declaration in the form in which it would appear within parentheses in a function header or as an associated type. Thus, if V is of type TVAL,

       IF V &EQ %T(INTEGER) 25,30

is a legal statement. The form for a user-defined type would be

%T(&"typename")`, as might be expected.

Note that, in addition to the associated type of a variable, other attributes of a variable can be given in parentheses following the statement keyword of a type declaration statement: for example, instead of

       REAL X
       GLOBAL X
       STATIC X

it is possible to say

       REAL (GLOBAL,STATIC) X

and the attributes apply to all variables in the statement.


[Next] [Up] [Previous]