Changes

Locomotive BASIC

991 bytes added, 11:46, 14 March 2019
/* Functions */
run
</pre>
==== <code><big>TESTR (<xoffset>,<yoffset>)</big></code> ====: ''BASIC 1.0 & 1.1'': '''FUNCTION''': Moves the graphics cursor by the amount specified in the <x> and <y offset>s relative to its current position, and reports the value of the ink at the new location.
: Moves the graphics cursor by x and y relative to its current position and returns the value of ink at that position.'''Associated keywords''': MOVE, MOVER, TEST, XPOS, YPOS
: '''Example''':<pre>10 MODE 0:FOR x=1 TO 15:LOCATE 1,x20 PEN x:PRINT STRING$(10,143);:NEXT30 MOVE 200,400:PEN 140 FOR n=1 TO 23:LOCATE 12,n50 PRINT "pen";TESTR(0,-16):NEXTrun</pre>==== <code><big>TIME</big></code> ====: Returns time ''BASIC 1.0 & 1.1'': '''FUNCTION''': Reports the elapsed time since the computer was last switched -on or reset, (excluding periods when reading or writing to disc).: One Each second of real time is equal to the returned value = TIME/300.
: '''Associated keyword''': AFTER, EVERY, WEND, WHILE
 
: '''Example''':
<pre>
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
</pre>
==== <code>UNT (add)</code> ====
205
edits