#include <forth.h>
Inheritance diagram for ForthIo:

The forth VM uses this object to request character input and output. Here is an example implementation of this class using the C standard library...
#include <conio.h> class StdForthIo : public ForthIo { public: inline StdForthIo() { NewLine[0]=2; NewLine[1]=13; NewLine[2]=10; } virtual void ConsoleOut(CHAR* text,UCELL textLength) { while(textLength--) putch(*text++); } virtual CELL ConsoleIn() { return getch(); } };
Definition at line 107 of file forth.h.
Public Member Functions | |
| virtual void | ConsoleOut (const CHAR *text, UCELL textLength)=0 |
| virtual CELL | ConsoleIn ()=0 |
Public Attributes | |
| CHAR | NewLine [4] |
|
||||||||||||
|
Display a text string on the console. This is called by the forth words
Implemented in StdForthIo. |
|
|
Get a single character from the console input. This is called by the forth word
Implemented in StdForthIo. |
|
|
A counted string representing the system's line terminating sequence. This is used by the forth word
|
1.4.4