| www.retrosoftware.co.uk http://www.retrosoftware.co.uk/forum/ |
|
| clock display using basic http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=671 |
Page 1 of 1 |
| Author: | PaulA [ Wed Sep 07, 2011 2:23 pm ] |
| Post subject: | clock display using basic |
Many years ago I saw a program that had a display of the current time/date that updated itself every second. I couldn't understand how the code worked, but I do remember there was no assembler involved. I have the code for the BBC's own VTR clock, which is just a repeat until loop that finishes whenever 1 second passes. Given its common to have a countdown timer etc in some games, what alternative code exists out there ? Google is being stupid as per normal. |
|
| Author: | tautology [ Wed Sep 07, 2011 2:49 pm ] |
| Post subject: | Re: clock display using basic |
There's the TIME pseudo variable which is updated every 100th of a second, so to do a seconds clock you can just do: Code: TIME=0:REPEAT:REPEAT UNTIL TIME MOD 100=0:PRINT TIME DIV 100:UNTIL 0 Which'll give you a counter that updates each second. |
|
| Page 1 of 1 | All times are UTC [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|