Programming instructions
100
Intermec Fingerprint 6.13 – Programmer's Guide
This example shows how the date and time is set in the immediate
mode (not required if the printer has an RTC). The date and time
formats are set and a table of the names of months is created.
Finally, a number of date and time parameters are read and printed
to the standard OUT channel after being provided with some
explanatory text:
DATE$ = "980609" (Setting the date)
TIME$ = "080000" (Setting the time)
10 FORMAT DATE$ "MMM/DD/YYYY"
20 FORMAT TIME$ "hh.mm pp"
30 NAME DATE$ 1, "Jan":NAME DATE$ 2, "Feb"
40 NAME DATE$ 3, "Mar":NAME DATE$ 4, "Apr"
50 NAME DATE$ 5, "May":NAME DATE$ 6, "Jun"
60 NAME DATE$ 7, "Jul":NAME DATE$ 8, "Aug"
70 NAME DATE$ 9, "Sep":NAME DATE$ 10, "Oct"
80 NAME DATE$ 11, "Nov":NAME DATE$ 12, "Dec"
90 A%=WEEKDAY(DATE$)
100 PRINT WEEKDAY$(DATE$)+" "+ DATE$("F")+" "
+TIME$("F")
110 PRINT "Date:",DATE$("F")
120 PRINT "Time:",TIME$("F")
130 PRINT "Weekday:", WEEKDAY$(DATE$)
140 PRINT "Week No.:",WEEKNUMBER (DATE$)
150 PRINT "Day No.:", DATEDIFF ("950101",DATE$)
160 PRINT "Run time:", TICKS\6000;" minutes"
170 IF A%<6 THEN PRINT "This is ";WEEKDAY$(DATE$);
". Go to work!"
180 IF A%>5 THEN PRINT "This is ";WEEKDAY$(DATE$);
". Stay home!"
RUN
Yields e.g.:
Friday Jun/09/1998 08.00 am
Date: Jun/09/1998
Time: 08.00 am
Weekday: Friday
Week No.: 23
Day No.: 159
Run time: 1 minutes
This is Friday. Go to work!
This example shows how the TICKS function is used to delay the
execution for a specified period of time:
10 INPUT "Enter delay in sec's: ", A%
20 B%=TICKS+(A%*100)
30 GOSUB 1000
40 END
1000 SOUND 440,50 (Start signal)
1010 IF B%<=TICKS THEN SOUND 880,100 ELSE GOTO 1010
1020 RETURN
RUN
9. DATA HANDLING, cont'd.
3. Date and Time, cont'd.