REFRESH

By default, the screen is updated every time BBC BASIC displays text or graphics. There are instances when may you wish to temporarily suspend this behaviour, for example to reduce flicker when an animation is being displayed.

*REFRESH ONThe default behaviour is to update the screen as soon as graphics or text is displayed. This can result in flickery animation.
*REFRESH OFFBy disabling the automatic update and explicitly calling *REFRESH, smooth animation is possible.

A typical render loop for animated graphics may look like this:

10 *REFRESH OFF
20 exited=FALSE
30 REPEAT
40   ...
50   ...
60   ...
70   *REFRESH
80 UNTIL exited
90 *REFRESH ON

When an error is unhandled or otherwise reported, automatic refresh is switched back on so that the error message can be seen.

Syntax

*REFRESH [ON|OFF]

See Also