Time; To - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

TIME
TIME
10 CLS:REM clock
20 INPUT "hour";hour
30 INPUT "minute";minute
40 INPUT "second";second
50 CLS:datum=INT(TIME/300)
60 WHILE hour<13
70 WHILE minute <60
80 WHILE tick<60
90 tick=(INT(TIME/300)-datum)+second
100 LOCATE 1,1
110 PRINT USING
"##
";hour,minute,tick
120 WEND
130 tick=0:second=0:minute=minute+1
140 GOTO 50
150 WEND
160 minute=0:hour=hour+1
170 WEND
180 hour=1
190 GOTO 60
run
FUNCTION: Reports the elapsed time since the computer was last switched-on or
reset, (excluding periods when reading or writing to disc).
Each second of real time is equal to the returned value:
T I ME / 3
e e.
Associated keywords:
AFT ER, EVE R Y, WEN D, W H I LE
TO
(See FOR)
Complete List of Keywords
Chapter 3 Page 85

Advertisement

Table of Contents
loading

Table of Contents