User`s guide

76
CipherLab BASIC Compiler
User's Guide
Commands for triggering the HOUR_SHARP event, the MINUTE_SHARP event, and the
TIMER event: OFF HOUR_SHARP, OFF MINUTE_SHARP, OFF TIMER, ON
HOUR_SHARP GOSUB..., ON MINUTE_SHARP GOSUB..., ON TIMER GOSUB...
Up to five timers can be set by the ON TIMER... GOSUB... command for the "TIMER Event
Trigger".
Note: The system time variable TIMER is maintained by CPU timers and has nothing to
do with this calendar chip. Accuracy of this time variable depends on the CPU clock
and is not suitable for precise time manipulation. Besides, it is reset to 0 upon
powering up (as a cold start).
DATE$
Purpose
To set or to get the current date.
Syntax
DATE$ = X$
Y$ = DATE$
Remarks
DATE$ = X$, to set the current date.
"X$" is a string variable in the form of "yyyymmdd".
Y$ = DATE$, to get the current date, in the form of "yyyymmdd".
"Y$" is a string variable to be assigned to the result.
The BASIC Compiler and its Run-time Engines do not check the format and
contents of the string to be assigned to DATE$. The user is obliged to check the
format and contents.
Example
DATE$ = "20000103"
Today$ = DATE$
PRINT Today$
' set the system date to 2000/01/03
' assign the current date to Today$
' Today$ = "20000103"
See Also
DAY_OF_WEEK, TIME$
DAY_OF_WEEK
Purpose
To get the day of the week.
Syntax
A% = DAY_OF_WEEK
Remarks
"A%" is an integer variable to be assigned to the result.
A value of 1 to 7 represents Monday to Sunday respectively.