VAL

f = VAL (s)

Returns the numeric value of string s. If s cannot be converted to a number, VAL will return 0. VAL does not evaluate the string.

Example

print val("123")        ' Output: 123
print val("123e2")      ' Output: 12300
print val("0xFF")       ' Output: 255

print val("123*2")      ' Output: 123
print val("123abcd")    ' Output: 0
print val("seven")      ' Output: 0
String
If there is insufficient information on this page and you wish learn more about VAL, please send an email to smallbasic@gmail.com. You can help to improve information about VAL by submitting a pull request, click View Source for details. Note, an offline language reference text file is also available - see the Download section.