Terminal control/Cursor movement

From Rosetta Code
Revision as of 22:58, 7 July 2011 by rosettacode>Markhobley (initial draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Terminal control/Cursor movement is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

The task is to demonstrate how to achieve movement of the terminal cursor:

  • Demonstrate how to move the cursor one position to the left
  • Demonstrate how to move the cursor one position to the right
  • Demonstrate how to move the cursor up one line (without affecting its horizontal position)
  • Demonstrate how to move the cursor down one line (without affecting its horizontal position)
  • Demonstrate how to move the cursor to the beginning of the line
  • Demonstrate how to move the cursor to the end of the line
  • Demonstrate how to move the cursor to the top left corner of the screen
  • Demonstrate how to move the cursor to the bottom right corner of the screen

For the purpose of this task, it is not permitted to overwrite any characters or attributes on any part of the screen (so outputting a space is not a suitable solution to achieve a movement to the right).