Overview



kForth is a computer program that may be used in various ways:

  1. It may be used as a calculator.
  2. It may be used to run computer programs written in the Forth language.
  3. It may be embedded into another computer program to give that program the ability to understand and run Forth programs.

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 for 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 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. Interactive use is one of the main 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:


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 own 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.