Terminal control/Preserve screen: Difference between revisions

Added BBC BASIC
m (→‎{{header|REXX}}: changed a comment. -- ~~~~)
(Added BBC BASIC)
Line 1:
{{task|Terminal control}}[[Terminal Control::task| ]]
The task is to clear the screen, output something on the display, and then restore the screen to the preserved state that it was in before the task was carried out. There is no requirement to change the font or kerning in this task, however character decorations and attributes are expected to be preserved. If the implementer decides to change the font or kerning during the display of the temporary screen, then these settings need to be restored prior to exit.
 
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
The screen is saved as a bitmap:
<lang bbcbasic> PRINT "This is the original screen"
OSCLI "GSAVE """ + @tmp$ + "bbcsave"""
WAIT 200
CLS
PRINT "This is the new screen, following a CLS"
WAIT 200
OSCLI "DISPLAY """ + @tmp$ + "bbcsave"""</lang>
 
=={{header|C}}==