108
CipherLab BASIC Programming Part I
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.
Example
ON DAY_OF_WEEK GOSUB 100, 200, 300, 400, 500, 600, 700
...
100
PRINT “Today is Monday.”
RETURN
200
PRINT “Today is Tuesday.”
RETURN
300
PRINT “Today is Wednesday.”
RETURN
TIME$
Purpose To set or to get the current time.
Syntax TIME$ = X$
Y$ = TIME$
Remarks TIME$ = X$, to set the current time.
“X$” is a string variable in the form of “hhmmss”.
Y$ = TIME$, to get the current time, in the form of “hhmmss”.
“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 TIME$. User is obliged to check the
format and contents.
Example
TIME$ = “112500”
CurrentTime$ = TIME$
PRINT CurrentTime$
' set the system time to 11:25:00
' assign the current to CurrentTime$
' CurrentTime$ = “112500”