%UNSIGNED

Return the unsigned binary value of a numeric expression

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
value = %UNSIGNED(expression)

Return value

value

The unsigned binary value of expression. (n)

Arguments

expression

A numeric expression. (n)

Discussion

%UNSIGNED returns an unsigned value for the specified expression. For noninteger variables, the routine operates the same as %ABS. Literals are treated as integers. Negative 4‑byte integers on 32‑bit machines are returned as positive i8 variables. Negative i8 integers always generate an “Arithmetic operand exceeds maximum size” error ($ERR_BIGNUM).

Examples

In the following example, jvar is set to 254.

record
    ivar        ,i1     ,-2
    jvar        ,i4
proc
    jvar = %unsigned(ivar)
    .
    .
    .