* *
*
* * News
 • Daily news
 • Archived news

Columns
 • WildCard
 • Qbasic Articles
 • QB Comic!

Learning center
 • QB Books
 • Qbasic Lessons!
 • Qbasic FAQ
 • Newbies Section
 • Qbasic Tutorials

* *
*
*
*
*  
.TIMER Statements Programming Example.

  QuickSCREEN      Details     Example      Contents      Index
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
TIMER Statements Programming Example
The following example displays the time of day on line 1, and updates
the display once every three seconds:
 
'*** Programming example: TIMER statement ***
'To stop the program, press any key
'
TIMER ON
ON TIMER(3) GOSUB Display
DO WHILE INKEY$ = "" : LOOP
END
 
Display:
    Oldrow = CSRLIN       'Save current row.
    Oldcol = POS(0)       'Save current column.
    LOCATE 1,1 : PRINT TIME$;
    LOCATE Oldrow,Oldcol   'Restore row & column.
RETURN
 
* * ** * * * *