^I

Access data as integer

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
^I(expression)

Arguments

expression

An expression to access as integer. (a or n)

Discussion

^I is a casting function that accesses data as an integer data type.

^I does not convert expression to an integer value; the data itself remains unchanged. Only the data type is changed for the reference. (If you need to convert an expression to an integer value, use the %INTEGER function.)

Note

Any time you cast a data area as an integer, if the high-order bit is set, you will end up with a negative number.

Examples

The following example retrieves the character terminating the READS statement as an alpha character and passes the character as an i1 value to the subroutine sub.

record 
    rec         ,a80
    size        ,i2
    trm         ,a1
proc 
    reads(TTCHN, rec)
    xcall rstat(size, trm)
    xcall sub(rec, size, ^i(trm))
    .
    . 
    . 
end