Val (Function)

Converts the number of a character string notation into a numeric value.

Val(<Character String>)

Parameters
<Character String>
The Character String to be converted to a numeric value (character string).

Return Value
Returns the value of the double-precision type number.
The content of the value is the converted numeric value.

Description
The number specified by the <Character String> is converted into a numeric value.
Specify an integer type notation of +, -, 0 to 9 for the head in <Character String>, or a character constant or a character variable for the character string in real number notation.
When a character that cannot be converted to a numeric value has been mixed in the character string specified for <Character String>, the characters up to that character will be converted to numeric values.
When there is no +, -, 0 to 9 at the head of the <Character String> the value returned will be 0.
There is the reverse function str$ in relation to Val where the numeric value is converted to a character string.

Example
    A#=10
    B#=20
    C#=Val(Str$(A#)+Str$(B#))+10
The result is as follows:
C#=1030