1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | rem PrintTimestamp2.bas
rem
rem last revision on 05 Feb 2003
rem
rem works only with newer models (>= 3.02q)
rem Keep in mind that the PRINT command can send only a
rem restricted number of characters at once (100 chars).
rem Timestamp + CR + LF = 20 chars
Customer_ID_Macro:
write " Print Timestamp 2 "
END
Reset_Macro:
CONST MASTER_MODE = 0002
CONST ASCII_MODE = 0000
&CODE3 = ASCII_MODE
END
print_timestamp:
// format: MM/DD/YY HH:MM:SS
if &MONTH < 10 then
print "0"
endif
print &MONTH + "/"
if &DATE < 10 then
print "0"
endif
print &DATE + "/"
if &YEAR < 10 then
print "0"
endif
print &YEAR + CHR(TAB)
if &HOURS < 10 then
print "0"
endif
print &HOURS + ":"
if &MINUTES < 10 then
print "0"
endif
print &MINUTES + ":"
if &SECONDS < 10 then
print "0"
endif
print &SECONDS + CHR(TAB)
return
print_my_data:
// now print your data
// print ...
// print 'end of line'
print CHR(CR) + CHR(LF)
return
F1_Button_Macro:
&CODE3 = MASTER_MODE
gosub print_timestamp
gosub print_my_data
&CODE3 = ASCII_MODE
END
|
Download PrintTimestamp2.bas
(1.1 KB , Aug. 26, 2008)