Skip to content

Applications

Wolf Wejgaard edited this page Feb 22, 2018 · 18 revisions

Share TclForth applications as a package to load into an existing tcl run time system. TclForth itself provides an example. Add your source files to the source directory and adapt the load file tfmain.tcl

For distribution include the source in starpacks.

Source Files

Usually a starpack contains every part of the application including the source files. In TclForth the source files are handled externally, as they also serve as system documentation. And let us update the TclForth system without the hassle of unpacking and repacking the starpacks.

File Description
compiler.tcl Converts Forth definitions to Tcl procedures
forth.fth Defines the standard Forth words
tk.fth A Forth interface to Tk
console.fth The Forth console
tfmain.tcl The load file for TclForth

Chess Game

The TclForth source includes the file chess.fth. A little game meant to teach the basic chess moves. And to illustrate the features of TclForth.

Start the game with the File-menu command "Load .fth".

Clone this wiki locally