number()

Read(2925) Label: string, convert, number,

Description:

Convert a string to a real number.

Syntax:

number (stringExp,format) 

Note:

The function parses string stringExp as a numeric value in the format of fmt. The value of stringExp must be a numeric string.

Parameter:

stringExp

A string expression, the result of which is a numeric value

format

A format string; can be absent

Return value:

A 32-bit integer, 64-bit integer, or 64-bit floating-point number

Example:

number("123")

123

number("123f")

123.0

number("123.45")

123.45

number("123.456d")

123.456

number("$1,100.05","$#,###.##")

1100.05

Related function:

float()

int()

long()

decimal()

string()