kForth is a computer program that may be used in various ways:
kForth, in its simplest mode of use, can evaluate arithmetic expressions typed in by the user. Expressions are entered in a manner similar to that used for RPN (reverse Polish notation) calculators, such as Hewlett-Packard scientific calculators. Both integer and floating point calculations may be performed. Trigonometric and transcendental functions are provided. In addition, logic and bit operations may be performed, and the number base may be changed, i.e. numbers may be entered and displayed in hexadecimal (base 16) for example.
kForth is an implementation of the Forth programming language and
environment. The user may write Forth programs with an ordinary
text editor, load these program files from kForth, and run them.
kForth, like other implementations of Forth, provides an interactive
environment, allowing the user to examine or define variables and
execute or define individual words. There are many advantages
in using a Forth environment for writing and testing computer
programs. kForth provides a significant subset of the
ANS specification
for the Forth language. It also provides some extensions and
"non-standard" features which its authors have found to be useful.
Experienced Forth users should consult the
Technical Information section of the
User's Guide for specific information
on the differences between kForth and standard ANS Forth.
Some notable features of kForth are:
OPEN, CLOSE, LSEEK, READ, WRITE,
and
IOCTL
permit communication with device drivers
under Linux.
In addition to being as a stand-alone computing environment,
the kForth program was also written so that it may be easily
embedded into another program. Advanced programmers, typically
programming in the C and C++ languages, can use the kForth
source code to make their programs user extensible.
In fact kForth was originally developed to allow users of
XYPLOT for Linux to
customize and add their own functions to the program. They
can do this without modifying the XYPLOT program itself. Instead,
they write separate Forth programs
and load these files from XYPLOT.