Terminal control/Preserve screen: Difference between revisions

No edit summary
Line 185:
 
This task does not admit sample output, but you can demonstrate this solution for yourself using the chrome browser: control-shift-J then copy and paste the above into the command line, and hit enter.
 
=={{header|Julia}}==
{{trans|C}}
<lang julia>const ESC = "\u001B" # escape code
 
print("$ESC[?1049h$ESC[H")
print("\n\nNow using an alternate screen buffer. Returning after count of: ")
foreach(x -> (sleep(1); print(" $x")), 5:-1:0)
print("$ESC[?1049l\n\n\n")
 
</lang>
 
=={{header|Kotlin}}==
4,102

edits