'''American National Standards Institute''' see: http://www.ansi.org/. Does standardization of all sorts of things. One example that many programmers will have encountered is the [ASCII] character set, which was a huge improvement over the vast number of different manufacturer encodings in use beforehand (of which only [IBM]'s [EBCDIC] has survived in any meaningful way). Also significant because, "ANSI escape codes are used to control text formatting and other output options on text terminals" [http://en.wikipedia.org/wiki/ANSI_escape_code]. Terminal emulators for [Linux] have support for ANSI escape codes built in. [AM] (6 may 2014) The other day someone asked about controlling the output on screen, so that the last line would be rewritten with new results. Here is a simple solution which works with these ANSI escape codes. Unfortunately you only get the proper effect on Linux terminals and other ANSI-enabled terminals. The code is, however, dead simple: * Move the cursor to the right position (\escape[[10;0f) * Clear everything at this position and below (\escape[[J) * Write the new output ====== # showcomp.tcl -- # Small program to illustrate the use of ANSI sequences # while {1} { puts -nonewline "\x1b\[10;1f\x1b\[J" puts "Result: [clock seconds] - [expr {rand()}]" puts "Computing ..." after 1000 } ====== <> Glossary