Original Author Paul Laughton, 2011
Page 132
De Re BASIC!
DO % Loop until SMS received
PAUSE 5000 % Sleep of 5 seconds
SMS.RCV.NEXT m$ % Try to get a new message
UNTIL m$ <> "@" % "@" indicates no new message
PRINT m$ % Print the new message
UNTIL 0 % Loop forever
Time and Timers
Time and TimeZone Commands
The TimeZone commands allow you to manage the timezone used by the Time command and the
TIME(...) function. They do not affect the no-parameter TIME() function. They affect only your BASIC!
program, not any other time-related operation on your device.
See also the time functions CLOCK() and TIME().
Time {<time_nexp>,} Year$, Month$, Day$, Hour$, Minute$, Second$, WeekDay, isDST
Returns the current (default) or specified date, time, weekday, and Daylight Saving Time flag in the
variables.
You can use the optional first parameter (<time_nexp>) to specify what time to return in the variables. It
is a numeric expression number of milliseconds from 12:00:00 AM, January 1, 1970, UTC, as returned by
the TIME() functions. It may be negative, indicating a time before that date.
The day/date and time are returned as two-digit numeric strings with a leading zero when needed,
except Year$ which is four characters.
The WeekDay is a number from 1 to 7, where 1 means Sunday. You can use it to index an array of day
names in your language of choice.
The isDST flag is
1 if the current or specified time is in Daylight Saving Time in the current timezone
0 if the time is not in Daylight Saving Time (is Standard Time)
-1 if the system can't tell if the time is in DST
The current timezone is your local timezone unless you change it with the TimeZone commands.
All of the return variables are optional. That is, you can omit any of them, but if you want to return only
some of them, you need to retain their position by including commas for the omitted return variables.
For example:
t = TIME(2001, 2, 3, 4, 5, 6)
Time t, Y$, M$, D$ % sets only the year, month, and day
Time t, Y$, M$, D$,,,, W % adds the day of the week (7, Saturday)
To do the same with the current time, leave out both the first parameter and its comma: