STOF

STOF is a CAOS command which converts between strings and floats.

Usage
Syntax: STOF str (string)

Returns the integer made from converting str. str is in the format  where   may be any length. The number following  is the exponent. In the event of an error 0.0 is returned.

If a string of the above format begins str but something is attached to the end, the string is truncated at the end of the well-formatted portion.

The following case-insensitive special values are also accepted: "nan", " inf". These correspond to the obvious special float values.

This command is exactly equivalent to C's  function.

Examples
OUTV STOF "      -12.34e+5" -1234000.000000 OUTV STOF "-INF" -inf OUTV STOF "xyz" 0.000000