[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1 Display Output


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Elementary Display I/O

ANS-Forth defines the following primitives words for input and output:

KEY ( --- char )

waits for a character typed on the keyboard and returns that character. ‘KEY’ doesn’t return on non-character input events like function keys pressed. See ‘EKEY’ for a more complete keyboard query. [core]

KEY? ( --- flag )

returns true if a key is available for reading using ‘KEY’, false if no key is available. Eventually pressed function keys are not detected but discarded. [facility]

EMIT ( char --- )

displays the character at the current cursor position. The effect of control characters depends on the system. [core]

On UNIX systems ‘EMIT’-ting the code decimal 10, line feed, has the effect of both carriage return and line feed.

TYPE ( c-addr u --- )

displays the string of u characters starting at c-addr. [core]

AT-XY ( u1 u2 --- )

positions the cursor to column u1, row u2. [facility]


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Highlighting

pfe


[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated on November 5, 2024 using texi2html 5.0.

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ < ] Back Previous section in reading order 1.2.2
[ Up ] Up Up section 1.2
[ > ] Forward Next section in reading order 1.2.4
[ >> ] FastForward Next chapter 2
[Top] Top Cover (top) of document  
[Contents] Contents Table of contents  
[Index] Index Index  
[ ? ] About About (help)  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:


This document was generated on November 5, 2024 using texi2html 5.0.