back to Command Reference
[All Models]
Converts a numeric character string to a numeric value.
VAL ( string )
└─┬──┘
String expression
A = VAL("345")
string: String expression
A = VAL("123A456"), A = 123).10 INPUT "VALUE1", A$
20 INPUT "VALUE2", B$
30 C$ = A$ + B$
40 C = VAL(A$) + VAL(B$)
50 PRINT C$, C
Performs string addition and numeric addition of two input strings.