Visual RPG 9.0 Language Reference  

%FLOAT Function - (Convert to Floating Format)

%FLOAT built-in function converts the value of the numeric expression to float format.

%FLOAT (NumericExpression)

Parts

NumericExpression 

Required.  The numeric expression to convert.  

Remarks

This built-in function may only be used in expressions. 

Example

BEGSR Float_Ex
 DclFld Name(A)         Type(*PACKED) Len(1,0)
 DclFld Name(B)         Type(*PACKED) Len(1,0)
 DclFld Name(Result)    Type(*PACKED) Len(6,5)

 A = 1
 B = 3

 Result = %Float (A / B)
 MsgBox Result

 // The value of "Result" is now 0.33333
ENDSR

See Also

Built-in Function Overview