Question

I started to learn Forth a couple of days ago starting with the book Starting Forth. After coding my first programs I was wondering if there is something like the Java API or comprehensive manual of all already implemented methods.

Can you recommend me a Forth / Gforth API?

Was it helpful?

Solution 2

There is not a single source defining/describing Forth words (methods) because different implementations of Forth have different sets of implemented words. Not only do different Forth implementations include different words, but the behavior of the words may be different across the different implementations. Several Forth standards have been specified including FIG Forth, Forth-79, Forth-83, and ANSI Forth (1994). You can find a copy of the ANSI Forth specification at http://lars.nocrew.org/dpans/dpans.htm.

Gforth is a specific Forth implementation and is compatible with the ANS Forth standard. You can find more information including a manual with a glossary of defined words at http://www.gnu.org/software/gforth/.

OTHER TIPS

You can find a wordlist of a gforth-installation under doc/gforth/Word-Index.html Some of the predefinied words have also examples.

As @Matthew said, words and their behaviour vary across different implementations. For Gforth I'd suggest the user manual. At least that's way I learned Forth along with the brilliant Starting Forth. ANS Forth specification may come in handy too.

Also if you're not happy with current implementations, believe me, it's not that difficult to write your own Forth :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top