17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VAL<br />

Chapter 2 Program Instructions<br />

Field of Application Function returning the numeric representation of a string expression.<br />

Syntax VAL()<br />

is the string expression from which the numeric representation<br />

will be returned.<br />

Remarks VAL is the complementary function for STR$.<br />

VAL ignores space characters from the argument string to determine the<br />

result.<br />

If the first character in the string expression is anything else but a digit, a plus<br />

sign, or a minus sign, the VAL function returns the value 0.<br />

Example In this example, the values of the string variables A$ and B$ are read and<br />

assigned to the numeric variables A% and B%:<br />

10 A$="123, MAIN STREET"<br />

20 A%=VAL(A$)<br />

30 B$="PHONE 123456"<br />

40 B%=VAL(B$)<br />

50 PRINT A$<br />

60 PRINT A%<br />

70 PRINT B$<br />

80<br />

RUN<br />

PRINT B%<br />

123, MAIN STREET<br />

123<br />

PHONE 123456<br />

0<br />

yields:<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 238

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!