4-339
Detailed Explanation of Functions
4MELFA-BASIC IV
Val
[Function]
Converts the value in the string into a numerical value.
[Format]
[Reference Program]
1 M1=Val("15")
2 M2=Val("&B1111")
3 M3=Val("&HF")
[Explanation]
(1) Converts the given character string expression string into a numerical value.
(2) Binary (&B), decimal, and hexadecimal (&H) notations can be used for the string.
(3) In the example above, M1, M2 and M3 evaluate to the same value (15).
[Reference]
,
<Numeric Variable>=Val(<Character String Expression>)