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.

INKEY$<br />

Chapter 2 Program Instructions<br />

Field of Application Function reading the first character in the receive buffer of the standard<br />

IN channel.<br />

Syntax INKEY$<br />

Remarks For information on standard I/O channels, see SETSTDIO statement. By<br />

default, "uart1:" is the standard I/O channel.<br />

As opposed to the INPUT statement, INKEY$ does not interrupt the program<br />

flow to wait for input data, unless a loop is created by means of a GOTO<br />

statement, see line 20 in the example below.<br />

INKEY$ is useful when the host computer is unable to end the input data with<br />

a “Carriage Return” (CR; ASCII 13 dec.)), but must use some other character,<br />

e.g. “End of Text” (ETX; ASCII 3 dec.). Then a routine, which interprets the<br />

substitute character as a carriage return, can be created.<br />

Example In this example, none of the characters received on the std. IN channel will<br />

be printed on the screen of your terminal until a # character (ASCII 35<br />

decimal) is encountered.<br />

10 A$ = INKEY$<br />

20 IF A$ = "" GOTO 10<br />

30 IF A$ = CHR$(35) THEN PRINT B$<br />

40 IF A$ = CHR$(35) THEN END<br />

50 B$ = B$ + A$<br />

60<br />

RUN<br />

GOTO 10<br />

Type a number of characters on your terminal's keyboard. They will not be<br />

printed on the screen until you type a # character. Then all the characters will<br />

appear simultaneously, except for the #-sign.<br />

Note the loop between line 10 and 20, which makes the program wait for you<br />

to activate a key.<br />

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

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

Saved successfully!

Ooh no, something went wrong!