The #forth website


home

about #forth

about forth

tutorials

forth code

articles

useful links

feedback

     Tutorials

pForth Tutorial
A straight-forward and basic tutorial

Forth Primer
A fairly understandable tutorial which quickly gets into getting input, data structures, and other useful things to know.

Forth books

"Starting Forth" and "Thinking Forth" by Leo Brodie are some of the best Forth books
Lucky us, Chapter 11 and Chapter 12 of Starting Forth are available online

Systems Guide to figForth
Excellent guide, might be the best online book for Forth

The Forth Programmer's Handbook
If the link doesn't work, download swiftforth and you'll find handbook.pdf in the zipfile.

Programming tips
  • Keep your words small, 1 or 2 lines of code
  • Don't pass more than 3 parameters by stack to words
  • Avoid variables at all cost
  • Don't juggle more than 3 items on the stack
  • If you have trouble with any of the above remember: REFACTOR your code!

Factoring your code is making your words small. There is virtually no overhead on making many small words in Forth, so make as many as you want to help you make your program understandable!

A lot of beginners complain about juggling items on the stack. Remember, the stack isn't the primary feature of forth. The stack doesn't exist, all that exists is passing data to your words ;)

Chuck Moore gives similar tips in his presentations that have been written down (and in some of the videos) at Ultratechnology.

Top 10 List: Ways to Simplify Programming
Mildly interestnig