02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter —Program Instructions<br />

OPEN, cont.<br />

Network connections<br />

Special syntax can be used for the expression to open the Net1<br />

device. The syntax used is:<br />

OPEN "net1:[:port][,]" AS #<br />

The parameter is an IP adresss, alternatively a DNS name. The<br />

default port number is 9100, allowed values range from 0 to 65535.<br />

The timeout is expressed in ticks, range 10-6000, default about 4500<br />

(45 seconds). Only one Net1 connection can be opened at a time. Once<br />

the device is open, information can be sent or received according to the<br />

corresponding protocol.<br />

Examples Open and write to a file:<br />

10 OPEN "TEST.TXT" FOR OUTPUT AS 1<br />

20 PRINT#1:"AAAA"<br />

30 PRINT#1,"1234"<br />

40 CLOSE 1;<br />

Open the file and print it line by line:<br />

10 OPEN "TEST.TXT" FOR INPUT AS #2<br />

20 INPUT#2:A$<br />

30 INPUT#2,B$<br />

40 CLOSE#2;<br />

50 PRINT A$<br />

60 PRINT B$<br />

RUN<br />

You can allow sequential output to the printer’s display using the OPEN<br />

statement this way. The method is the same as for files:<br />

10 OPEN "console:" FOR OUTPUT AS #1<br />

20 PRINT#1:PRINT#1<br />

30 PRINT#1, "GONE TO LUNCH"<br />

40 PRINT#1, "BACK SOON";<br />

RUN<br />

The text will appear on the printer’s display as:<br />

GONE TO LUNCH<br />

BACK SOON<br />

Open the file "PRICELIST" for random access with the reference number<br />

#8 and a record length of 254 bytes:<br />

10 OPEN "PRICELIST" AS #8 LEN=254<br />

1 0 <strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong>

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

Saved successfully!

Ooh no, something went wrong!