Intermec PX4i Fingerprint Developer's Guide (old) - Page 40
Structuring Your Program
View all Intermec PX4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 40 highlights
Chapter 2 - Understanding Fingerprint Syntax 10 B%=0 20 WHILE B%89 30 INPUT "Want to exit? Press Y=Yes or N=No",A$ 40 B%=ASC(A$) 50 WEND 60 PRINT "The answer is Yes" 70 PRINT "You will exit the program" 80 END RUN Structuring Your Program Use the structure below as a guideline for building your Fingerprint programs. 1 Program Information • Use REM to comment out items such as program type, version, release date, and byline. 2 Initiation Determines how the printer works and branches to subroutines as needed. • References to subroutines: ON BREAK GOSUB, ON COMSET GOSUB, ON ERROR GOSUB, ON KEY GOSUB, or other commands as necessary. • Printer setup: SETUP, OPTIMIZE ON/OFF, LTS& ON/OFF, CUT ON/OFF, FORMAT DATE$, FORMAT TIME$, NAME DATE$, NAME WEEKDAY$, SYSVAR, or other commands as necessary. • Character set and map tables: NASC, NASCD, MAP. • Enabling keyboard: KEY ON, KEYBEEP, KEYBMAP$. • Initial LED setting: LED ON/OFF. • Open "console:" for output: OPEN. • Assign string variables for each display line: PRINT#. • Select current directory: CHDIR. • Select standard I/O channel: SETSTDIO. • Open communication channels: OPEN. • Open files: OPEN. • Define arrays: DIM. 3 Main Loop Executes the program and keeps it running in a loop. • Reception of input data: INPUT, INPUT#, INPUT$, LINE INPUT#. • Printing routine: FORMFEED, PRINTFEED, CUT. • Looping instructions: GOTO. 4 Subroutines • Break subroutines: BREAK ON/OFF, BREAK. • Background communication subroutines: COM ERROR ON, COM ERROR OFF, COMSET, COMSET ON, COMSET OFF, COMBUF$, COMSTAT. 24 Intermec Fingerprint Developer's Guide