Next: Single-key input, Previous: String words, Up: Other I/O [Contents][Index]
If you are outputting to a terminal, you may want to control the positioning of the cursor:
at-xy
( x y – ) unknown “at-xy”
In order to know where to position the cursor, it is often helpful to know the size of the screen:
form
( ) unknown “form”
And sometimes you want to use:
page
( – ) unknown “page”
Note that on non-terminals you should use 12 emit
, not
page
, to get a form feed.
The following words are used to create (semantic) colorful output:
default-color
( – ) gforth-1.0 “default-color”
use system-default color
error-color
( – ) gforth-1.0 “error-color”
error color: red
warning-color
( – ) gforth-1.0 “warning-color”
color for warnings: blue/yellow on black terminals
info-color
( – ) gforth-1.0 “info-color”
color for info: green/cyan on black terminals
success-color
( – ) gforth-1.0 “success-color”
color for success: green
attr!
( attr – ) gforth-1.0 “attr!”
apply attribute to terminal (i.e. set color)
doc-color-execute
Depending on wether you prefer bright or dark background the foreground colors-theme can be changed by:
doc-white-colors doc-black-colors
Next: Single-key input, Previous: String words, Up: Other I/O [Contents][Index]