value()

Examples


The value() function returns a numeric value containing the first set of numeric value encountered in a specified string.

Syntax

value(string)

Parameters

string – The string expression or string field you wish to evaluate.

Return value

Initially, a variable currency value is returned. If necessary, the value is converted to the appropriate storage type based upon the storage type of the field or variable the value is set to. If a string contains no numeric sequence, a value of 0 will be returned.

Comments

Only the first numeric sequence in the string will be converted. For example, the string “Jones78Smith8” will be converted to 78.

If the string value contains a numeric sequence with the system-defined decimal separator, the return value may be rounded, depending on the storage type the value is returned to. If returned to an integer or long integer, the return value will be rounded up or down as appropriate. The return value won’t be rounded if it is returned to a currency or varaible currency storage type.


Documentation Feedback