^A

Access data as alpha

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
^A(expression)

Arguments

expression

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

Discussion

^A accesses data as an alpha data type.

^A is useful when using decimal data in file I/O statements. ^A doesn’t convert expression to an alpha value; the data remains unchanged. Only the data type is changed for the reference.

For example, the following fields are each four bytes long:

dec     ,d4,    5
int     ,i4,    1819242310

If dec is used with ^A in the following DISPLAY statement:

display(TTCHN, ^a(dec))

the following characters are displayed:

0005

Accessing an integer field as alpha is not very useful; however, the following example illustrates the result when each integer byte happens to represent an ASCII character. If int is used with ^A in the following DISPLAY statement (on a little‑endian machine):

display(TTCHN, ^a(int))

the following characters, which represent the ASCII values of the data, are displayed:

Fool

Use %STRING to display integer values, or decimal values that can be negative.

Examples

reads(TTCHN, ^a(age))
writes(TTCHN, "Total Price: " + ^a(price + tax))