Anonymous user
Terminal control/Preserve screen: Difference between revisions
→{{header|REXX}}: elided the use of the second CLS command, added/changed comments and indentations, changed the wording in the REXX section header.
mNo edit summary |
(→{{header|REXX}}: elided the use of the second CLS command, added/changed comments and indentations, changed the wording in the REXX section header.) |
||
Line 219:
=={{header|REXX}}==
This version <u>only</u> works with PC/REXX and Personal REXX.
<lang rexx>/*REXX pgm saves the screen contents, clear it, write +++, restore orig.*/▼
The '''CLS''' (DOS) command is used to clear the terminal screen.
parse value scrsize() with sd sw . /*determine how big the screen is*/▼
▲<lang rexx>/*REXX
parse value cursor(1,1) with r_ c_ /*find where the cursor is also. */▼
/*──── screen, writes a half screen of ~~~ lines, and then
@line.original=scrread(original,1,sw)▼
▲parse value cursor(1,1) with
'CLS' /*start with a clean slate. */▼
do original=1 for sd
'CLS'
do sd % 2 /*write a line of ~~~ for half of scr. */
say '~~~' /*writes ~~~ starting at top of screen.*/
/*
do restore=1 for sd /*restore original screen from @line. */
This REXX program makes use of '''SCRSIZE''' REXX program (or BIF) which is used to determine the screen size of the terminal (console). ▼
call scrWrite restore,1, @line.restore /*write to terminal the original lines.*/
<br>The '''SCRSIZE.REX''' REXX program is included here ──► [[SCRSIZE.REX]].<br>▼
end /*restore*/ /* [↑] writes (restores) SD lines. */
call cursor curRow, curCol /*restore the original cursor position.*/</lang>
▲This REXX program makes use of '''
▲
=={{header|Scala}}==
|