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
Code samples using VAL
002 numeric variables.bas
003 conditional branching.bas
2048.bas
2048.bas
3d_palmx.bas
3dtictac.bas
3dttt.bas
3dttt.bas
7gables.bas
Balleta 2-11-15.bas
biorythms.bas
block.bas
bowling7.bas
btn 21.bas
calc.bas
Calendar.bas
calendar.bas
cgi_counter.bas
chart.bas
Charts.bas
checkers.bas
checkers.bas
chess.bas
chess.bas
color chart.bas
conrec-sb-v01.bas
coordplot.bas
counter.bas
crgb.bas
String
ASC
BCS
BIN
CBS
CHOP
CHR
DISCLOSE
ENCLOSE
FORMAT
HEX
INSTR
JOIN
LCASE
LEFT
LEFTOF
LEFTOFLAST
LOWER
LTRIM
MID
OCT
REPLACE
RIGHT
RIGHTOF
RIGHTOFLAST
RINSTR
RTRIM
SINPUT
SPACE
SPC
SPLIT
SPRINT
SQUEEZE
STR
STRING
TRANSLATE
TRIM
UCASE
UPPER
VAL
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.