rtos


(rtos number [ mode [ precision ] ] )

This function converts the given number into a string, based on mode and precision required.

Arguments

number  (integer or double)  the value to be converted into its string representation
mode  (optional) (integer)  specifies the representation mode :
   1 scientific
   2 decimal
   3 engineering
   4 architectural
   5 fractional
precision  (optional) (integer)  the number of required decimal places (0...15)

Return

string, the resulting string representation of the numeric value

Example

(rtos (/ 1.0 3) 2 15)  "0.333333333333333"

Remarks

with mode provided as NIL (or omitted), LUNITS sysvar is used;
with precision provided as NIL (or omitted), LUPREC sysvar is used;
note : DIMZIN and UNITMODE also affect the conversion



©  Bricsys NV. All rights reserved.