FTH Forth Scripting

Get FTH Forth Scripting at SourceForge.net. Fast, secure and Free Open Source software downloads

About FTH

Fth is a BSD licensed free software package which includes the interpreter fth and the extension library libfth. You can use Fth as a command line interpreter like Awk, Perl, or Ruby, you can write Forth scripts, use the repl for interactive input or you can link libfth into an application using Fth as extension language.

Fth's core language is Ficl, Forth-inspired command language, written by John Sadler . The manipulated Ficl source is included in Fth's source tree. The original Ficl source is slightly modified because of Fth' special needs. The interactive Fth interpreter supports tcsh-like comman-line editing with the Tecla library.

Fth has the following ANS Forth labels:

Label Value Label Value
core yes core-ext yes
/counted-string 1024 /hold 1024
/pad 1024 address-unit-bits 8
floored no max-char 0xFF
max-n 0x7FFFFFFF max-u 0xFFFFFFFF
stack-cells 1024 return-stack-cells 1024
double no double-ext no
max-d 0x7FFFFFFFFFFFFFFF max-ud 0xFFFFFFFFFFFFFFFF
exception yes exception-ext yes
locals yes locals-ext yes
#locals 2048 memory-alloc yes
tools yes tools-ext no
file yes file-ext yes
floating yes floating-ext yes
floating-stack 0 max-float Infinity
search-order yes search-order-ext yes
wordlists 32

Fth' double word set doesn't eat two stack entries and the so called double word numbers are actually ficl2Integers. An extra float stack doesn't exist.

The Fth library contains object type extensions, for example arrays, hashs, strings, regexp and others. A garbage collector handles the memory management of object types.

You can get the latest fth-1.3.2.tar.bz2 from http://sourceforge.net/projects/fth/ . If you prefer anonymous CVS, you can check out the sources with:

% mkdir ~/src
% cd ~/src
% cvs -z3 -d:pserver:anonymous@fth.cvs.sourceforge.net:/cvsroot/fth co -P fth

The directory ~/src/fth contains the source tree; update it with:

% cd ~/src/fth
% cvs update -dP

The -d option creates and the -P option prunes empyt directories. One can write CVS options to ~/.cvsrc:

% cat ~/.cvsrc
update -dP

The commands above are reduced to:

% cd ~/src/fth
% cvs update

Happy Forthing!

Web Hosting by SourceForge DNS Hosting by ZoneEdit Forth Programming Language Information

Email: Michael Scholz
SIP: *011-49-621-483-4621
Phone: +1-920-965-6373
Last modified: 14-Apr-2012 06:24PM CEST