TAL Reference Manual
Standard Functions
TAL Reference Manual—526371-001
14-8
Example of $ALPHA Function
Example of $ALPHA Function
In this example, $ALPHA tests for an alphabetic character in a STRING argument:
STRING some_char; !Declare variable
IF $ALPHA (some_char) THEN ... ; !Test for alphabetic
! character
$AXADR Function
The $AXADR function is described in Section 15, Privileged Procedures.
$BITLENGTH Function
The $BITLENGTH function returns the length, in bits, of a variable.
variable
is the identifier of a simple variable, array element, pointer, structure, or structure
data item.
Usage Considerations
$BITLENGTH returns the length, in bits, of a single occurrence of a simple variable,
array element, structure, structure data item, or item to which a pointer points.
The length of a structure or substructure occurrence is the sum of the lengths of all
items contained in the structure or substructure. Complete the structure before you use
$BITLENGTH to obtain the length of any of the items in the structure.
To compute the total number of bits in an entire array or substructure, multiply the
value returned by $BITLENGTH by the value returned by $OCCURS. To compute the
total number of bits in a structure, first round up the value returned by $BITLENGTH to
the word boundary and then multiply the rounded value by the value returned by
$OCCURS.
You can use $BITLENGTH in LITERAL expressions and global initializations, because
it always returns a constant value.
$BITLENGTH (
variable )
VST1403.vsd