%DECIMAL

Convert integer or implied-decimal to decimal

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
result = %DECIMAL(orig_arg)

Return value

result

The decimal equivalent of the converted integer or implied-decimal. (d)

Arguments

orig_arg

The integer or implied-decimal value that is to be converted to a decimal value. (i or d.)

Discussion

[Available in Synergy/DE 10.3.3d or higher]

%DECIMAL enables you to pass an integer (i) or an implied-decimal (d.) to an IN decimal (d) argument (and thus avoid a PASSIMPLwarning). The primary usage is

xcall subroutine(%DECIMAL(orig_arg))

Examples

main
record
    myid,    d10.5,	300.23
    myint,   int,       400
proc
    open(15,o,'tt:')
    xcall sub1(%decimal(200.12))
    xcall sub1(%decimal(myid))
    xcall sub1(%decimal(myint))
endmain

subroutine tstit
    parm1,   n
proc
    xcall sub1(%decimal(parm1))
    xreturn
end

subroutine sub1
    in req    myDec, d2
    endparams
proc
    writes(15,%string(mydec))
    xreturn
end