17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INPUT$<br />

Chapter 2 Program Instructions<br />

Field of Application Function returning a string of data, limited in regard of number of<br />

characters, from the standard IN channel, or optionally from an<br />

OPENed file or device.<br />

Syntax INPUT$([,])<br />

1 2<br />

1<br />

2<br />

is the number of characters to be read.<br />

optionally specifies a file or device using the number assigned<br />

to it when it was OPENed.<br />

Remarks If no file or device is specified, the input will come from the standard I/O<br />

channel (default "uart1:", see SETSTDIO statement). Otherwise, it will come<br />

from the specified file or device. The execution will be held until the specified<br />

number of characters has been received from the keyboard console, file or<br />

communication channel. If a file does not contain the specified number of<br />

characters, the execution will be resumed as soon as all available characters<br />

in the file have been received.<br />

The maximum number of characters that can be returned using an INPUT$<br />

statement is 65,536 characters.<br />

Examples This example reads a sequence of 25 characters from the printer's built-in<br />

keyboard and assigns them to a string variable named Z$:<br />

. . . . .<br />

. . . . .<br />

1000 OPEN "CONSOLE:" FOR INPUT AS #1<br />

1010 Z$=INPUT$(25,1)<br />

. . . . .<br />

. . . . .<br />

In this example, 10 characters are read from the standard IN channel and<br />

assigned to a variable.<br />

10 A$=INPUT$(10)<br />

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

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

Saved successfully!

Ooh no, something went wrong!