
231
Syntax:
INPUT #filenumber,variable[,variable...]
Parameter:
filenumber
A numeric expression which returns a value from 1 to 16.
variable
A numeric or string variable.
Description:
INPUT
#
reads data from a device I/O file (a communications device file or bar
code device file) specified by
filenumber
and assigns it to
variable
.
•
filenumber
is a number assigned to the device I/O file when it was opened.
• Reading data from a communications device file:
An
INPUT
#
statement reads data fields separated by CR codes or commas (,)
and assigns them to
variable
.
If more than one
variable
is specified in an
INPUT
#
statement, the program
waits until all of the specified
variable
s receive data.
If an
INPUT
#
statement reads data longer than the allowable string length, it
ignores only the overflowed data and completes execution, causing no run-time
error.
• Reading data from a bar code device file:
An
INPUT
#
statement reads the scanned data into the 1st
variable
.
If more than one variable is specified in an
INPUT
#
statement, the program
ignores the 2nd and the following
variable
s.
If an
INPUT
#
statement reads data longer than the allowable string length, it
ignores only the overflowed data and completes execution, causing no run-time
error.
File I/O statement
INPUT #
Reads data from a device I/O file into specified variables.
TIP
If
the maximum number of digits has been omitted in the read code spec-
ifications of the
OPEN
"BAR:"
statement (except for the universal prod-
uct codes), then the
INPUT
#
statement can read bar codes of up to 99
digits. To read bar codes exceeding 40 digits, you should define a suffi-
cient string variable length beforehand.
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...