qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
.timersx
:nTIMER 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