I generally use GForth or pForth on "Freenix"
systems (mostly Linux on ARM and PowerPC) and I am too lazy to
properly check my programs for standardization. Sorry.
The programs here are pretty banal, but I find it
helpful having other people's code to look at when I learn a
new language. So...
- linked_list.fs
- Just a three line programming excercise, a standard
double linked list in Forth.
- xor.fs
- XOR STDIN with the contents of a file. If STDIN contains
more data than the file, the file pointer is looped as many
times as necessary.
- forthref
- A program for consulting the standard. I wrote it to help
myself learn Forth.
forthref '!'
will simply start lynx with the definition of the word
! as the current page. You will also need dpansdict. Remember to edit the word
dictfilename so forthref finds the
dpansdict-file.
- execmarkup
- Generating HTML by writing documents that are executable
and are run on on the webserver with no security. Also rather
bad code. But it was fun.
- mergesort.fs
- A mergesort implemention adapted to the linked list
implementation above. Compare is vectored, so it is easy to
adapt to strings, ints, floats or other data types. Contains
test harness usable as example.
Disclaimer
This page consists mainly of programs I have written simply
to get things done. The quality of both documentation, if any,
and code varies extremely. Most of the material on this site
carries a modified BSD
license where applicaple.
Last update 2004-02-01.
Steinar Knutsen