STR

Synopsis

HELP:   String representation of an floating point number
TYPE:   OBJECT
SYNTAX: STR(CHRSET=NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL,SEPARATOR=SYSTEM/PERIOD/COMMA/APOSTROPHE,GROUPSEPARATOR/MARKER=num/NON/OFF/SYSTEM/PERIOD/COMMA/SPACE/APOSTROPHE,VALUE='str',ALLOWTRUNC)

Description

Reads a string representation of an real number. The result is an FL5-internal neutral real number representation which can be converted to any of the supported target real number representations by a corresponding write converter.

The string must be in decimal (base 10) format.

The CHRSET parameter must match the character set of the string. If no character set is specified, the system's default character set is assumed. All character sets supported by the character conversion module can be used, including multi-byte charsets.

If the string has some leading or trailing whitespace characters, they are ignored.

The SEPARATOR parameter specifies the character that separates integral and fractional portions of the number (i.e. period or comma). If not specified, the read numbers are expected to be in the locale-dependent default number format (e.g. environment variable LC_NUMERIC on Linux).

The VALUE parameter, defines a default float in local char set and decimal base and period as floating point separator. An empty string will be replaced by default value and don't result in an error anymore.

Arguments