[Tutor] Changing what you've already printed
alan.gauld at freenet.co.uk
Thu Jun 23 01:04:08 CEST 2005
> Is it possible (and easy) to change something you've already printed
> rather than print again?
How easy depends on where you are printing.
Using curses in a character based terminal its easy,
just define the window within the screen that you want to change.
Similarly any GUI toolkit will likewise be easy.
But if you are uising a teletype interface you are reduced
to using backspace characters and it gets messy, even with a
cursor addressable screen (such as a 3270 or ANSI terminal)
it still gets very hard to keep track of exactly what to
erase and when.
> For example, if I'm making a little noughts and crosses
> game and I print the board:
I'd use curses for this. Or better still a GUI.
> I've programs do this on the command line in Linux, so
> I assume it must be possible.
Curses comes as standard on linux...
More information about the Tutor