Terrapin Resources
System Commands

DATE     TIME     RESTART

Here are two commands that get their information from your computer. You can use this information in programs that you write.


DATE


DATE reports the date in a list of four numbers:

[day month year dayofweek]

For example, on December 17, 2024, at 9:17 AM, it reports:

DATE
Result: [17 12 2024 3]

It is the 17th day of the 12th month of the year 2024.

The last number in the list is the day of the week.
1 is Sunday
2 is Monday
3 is Tuesday
4 is Wednesday
5 is Thursday
6 is Friday
7 is Saturday

» Things to Try

You could use various commands to convert to information reported by DATE to the day in words.

How you use the result of DATE to write out Tuesday, December 17, 2024?

You will likely need a list of the days of the week, a list of the months, and ITEM (see the Taking Things Apart section).


TIME


TIME reports a list of three numbers that represent the time the command was given.

TIME
Result: [9 23 52]

The first number is the hour. It uses a 24-hour clock, so it is 9 AM. The hour would be reported as 21 if it were 9 PM.

The second number is the minutes, and the third number is for seconds.

» Things to Try

Try typing TIME several times and notice the change in seconds.

For a challenge, can you create an analog clock (with hands) for the current time?

Or imagine a new type of clock that shows the time.


RESTART


Although RESTART isn’t a system command (it won’t restart your computer!), it is a way to restart Logo.

If you type RESTART, Logo will put everything back to normal as if you had just loaded it. It doesn’t save your work, so be sure you have done that before you restart Logo. Logo will aks you to confirm the restart with a Yes / No dialog box.

This can be handy if you do something and aren’t sure why Logo is acting the way it is. Typing RESTART is the same as logging out of Logo and then logging back in.

It is not recommended to include this command in a program!

» Things to Try Try using RESTART to see how it works. Be sure to save your work before you do it.