How to resolve the algorithm Terminal control/Preserve screen step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Terminal control/Preserve screen step by step in the Phix programming language

Table of Contents

Problem Statement

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.

Let's start with the solution: