FP_d
Full Description
swirl
Syntax
  define external stream function FP_d
     (value float x, value counter DecimalPlaces optional)


Purpose

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.

Copyright © OmniMark Technologies Corporation, 1988-1998.