%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
xcall subroutine(%DECIMAL(orig_arg))

Return value

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

Arguments

subroutine

The name of the routine calling %DECIMAL.

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 PASSIMPL warning).

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 testit
    parm1,   n
proc
    xcall sub1(%decimal(parm1))
    xreturn
end
 
subroutine sub1
    in req    myDec, d2
    endparams
proc
    writes(15,%string(mydec))
    xreturn
end