Thunderstone Software Document Search, Retrieval, and Management
Search:
Vortex Manual
 

strtonum - convert string to number

 

SYNOPSIS

<strtonum $str>


DESCRIPTION
The strtonum function converts each of its string arguments to a numeric (double) value. The strings may be any text quantity that NPM (Metamorph's Numeric Pattern Matcher) can parse.


DIAGNOSTICS
strtonum returns the double numeric value of each of its string arguments, or 0 if unparseable.


EXAMPLE

  <$txt = "one thousand nine hundred ninety eight"
          "four score and seven years ago"
          "1/3"   "3.14"   "one hundred percent"
          "two thousandths"
          "nine and a half">
  <strtonum $txt>
  <LOOP $ret> $ret </LOOP>

The output would be:

1998 87 0.333333 3.14 1 0.002 9.5


CAVEATS
The strtonum function was added in version 2.1.876800000 19971014.


SEE ALSO
sum


Copyright © Thunderstone Software     Last updated: Mon Feb 18 10:28:15 EST 2013
 
Home   ::   Products   ::   Solutions   ::   How to Buy   ::   Support   ::   Contact Us   ::   News   ::   About
Copyright © 2013 Thunderstone Software LLC. All rights reserved.