Chapter 15. Function Reference
386
Syntax:
VAL(stringexpression)
Parameter:
stringexpression
A string expression which represents a decimal number.
Description:
VAL
converts the string specified by
stringexpression
into a numeric value.
• If
stringexpression
is nonnumeric,
VAL
returns the value 0.
PRINT VAL("ABC")
• If
stringexpression
contains a nonnumeric in midstream,
VAL
converts the
string until it reaches the first character that cannot be interpreted as a numeric.
PRINT VAL("1.2E-3ABC")
• The
STR$
function has the opposite capability to
VAL
.
Reference:
VALue
String function
VAL
Converts a string into a numeric value.
Functions:
ASC
and
STR$
0
1.200000000E-03
Summary of Contents for BHT-BASIC 100 SERIES
Page 1: ......
Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...