FP_v
Full Description
swirl
Syntax
  define external float function FP_v value stream numeric string


Purpose

Used to initialize floating point values by converting a character string representing a floating point number into a float value. If the string does not represent a floating point number, the float value for NaN (not a number) is returned. FP_v converts the case-insensitive representations of the following strings into their floating point value counterparts:

  • Infinity
  • Inf
  • +Inf
  • -Infinity
  • -Inf
  • NaN

The following code demonstrates how to use FP_v to initialize the stream my-float using any digit that matches the specified pattern:

  ...
  find white-space (digit+("."digit*)?)=>found-float
  local float my-float
  set my-float to FP_v found-float

Copyright © OmniMark Technologies Corporation, 1988-1998.