VAL()

VAL(S)

RETURNS THE NUMBER CORRESPONDING TO THE STRING S

  • Type: Function
  • Parameter: 1
  • Group: Strings

ACTION

The function VAL(S) returns the value corresponding to the string expression S, after the evaluation of S.

VAL(N) performs the inverse fonction of STR$(V).

SYNTAX: Result=VAL(S)

  • S = string expression to be converted into a number.

USE

  • The function VAL() is used to convert a string in a number for example to use it in a calculation.

ERROR

  • If S is not a correct string expression.
  • If S does not represent a number after its evaluation.

EXAMPLE

print val("1234")

print "1234"

SEE ALSO

STR$()