TAL Reference Manual

Standard Functions
TAL Reference Manual526371-001
14-41
$TYPE Function
$TYPE Function
The $TYPE function returns a value that indicates the data type of a variable.
variable
is the identifier of a simple variable, array, simple pointer, structure, structure data
item, or structure pointer.
Usage Considerations
$TYPE returns an INT value that has a meaning as follows:
For a structure pointer, $TYPE returns the value 8, regardless of whether the structure
pointer points to a structure or to a substructure.
You can use $TYPE in LITERAL expressions and global initializations, because
$TYPE always returns a constant value.
Example of $TYPE Function
In this example, $TYPE returns the data type of a REAL(64) variable:
REAL(64) var1; !Declare variables
INT type1;
type1 := $TYPE (var1); !Return 6 for REAL(64)
$UDBL Function
The $UDBL function returns an INT(32) value from an unsigned INT expression.
Value Meaning Value Meaning
0 Undefined 5 REAL
1 STRING 6 REAL (64)
2INT 7Substructure
3INT (32)8Structure
4FIXED9UNSIGNED
$TYPE
(
variable
)
VST1443.vsd
$UDBL
( )
int-expression
VST1444.vsd