All input and output words (KEY EXPECT EMIT TYPE etc.) are vectorized in the people-FORTH, ie when called, the code field address of the associated command is taken from a table and executed. It is included in the system table wine named DISPLAY, which provides for the output to the screen terminal.
This method of vectorization offers significant benefits:
A new table is created with the word OUTPUT: . The definition can output with (((view:)) look). OUTPUT: Expected to issue a list of words, with must, be completed.
Beipsiel:
Output:> PRINTER pemit pcr ptype pdel PPAG pat pat? ;
For a new table named > PRINTER is created. With a later call to PRINTER > is the address of this table in the Uservariable OUTPUT written. From now leads EMIT from a PEMIT, a PTYPE TYPE etc.
The order of words after OUTPUT: userEMIT userCR userType userdel Userpage userAT userAT? must necessarily be met. Accordingly, the input-vectorization is handled.
The state-FORTH has a number of constants which serve to improve readability:
The input of numbers is made in the interpretive mode via the keyboard, and basic input words are defined with number numbers and related words. For the issue of numbers again is the lack of typing of FORTH observed - for a specific data format (integer, unsigned, double) is appropriate in each case the operator to select.
MS-DOS
In FORTH you will always designate a storage area, incorporated into the characters and strings. To do this you usually use a small, 80-character memory area called PAD. This note pad - so the German translation of pad used - no fixed memory area and is both the FORTH system and the programmers.
Then I liked you with the text input buffer TIB another important Speicherberelch imagine that ensures the reasonable use of the connected devices. Because the text input via the keyboard vorsichgeht relatively slow, the characters are collected here only in a free space, the buffer TIB, and then processed.