|
|||||
function | FP_d |
Related Syntax | Other Library Functions |
Library: Floating Point
Include: omfloat.xin |
Returns: Opaque
A character representation of a float value. |
define external stream function FP_d (value float x, value counter DecimalPlaces optional)
Converts and formats a floating point number into a character representation. The "d" parameter determines the number of decimal places that will be rounded up and shown. If DecimalPlaces is omitted, its value is set to 15.
The following demonstrates how to use FP_d
to produce a character representation of the speed of light:
define external stream function FP_d (value float x, value counter DecimalPlaces) process local float LightSpeed set LightSpeed to FP_v "2.997924580E08" FP_d (LightSpeed, 10 ) output "This this the speed of light in metres per second: " || FP_d (LightSpeed, 10 ) || "%n"
This code produces the following result: This is the speed of light in meters per second: 299792458.0000000000.
Related Syntax FP_s |
Other Library Functions FP_abs FP_acos FP_add FP_asin FP_atan FP_atan2 FP_ceil FP_cos FP_cosh FP_d FP_div FP_eq FP_exp FP_floor FP_ge FP_gt FP_hypot FP_isnan FP_isneg FP_ispos FP_iszero FP_j0 FP_j1 FP_jn FP_le FP_log FP_log10 FP_lt FP_mod FP_mul FP_ne FP_nearest FP_neg FP_pow FP_s FP_sin FP_sinh FP_sqrt FP_sub FP_tan FP_tanh FP_trunc FP_v FP_y0 FP_y1 FP_yn |
---- |