Page 1 of 1

New to Forth?

PostPosted: Fri Feb 15, 2013 7:52 am
by timpart
The classic introduction to Forth has generously been made available online http://www.forth.com/starting-forth/

There are many variants of Forth. The American standard draft is available at http://www.forth.org/literature.html There is much more useful information at this site.

Forth is a stack based language. Functions (known as words) take their inputs from a data stack do their processing and put the results back onto the stack. Words can be spelt with any printable character so for instance the word "+" (without the quotes) adds the top two entries on the data stack together and puts result back on the stack.

There is also a return stack to store return addresses when going into functions. There may be other specialist stacks as well.

Tim

Re: New to Forth?

PostPosted: Sat Feb 16, 2013 4:06 am
by ed2k
is there place illustrate the most basic words. it is really hard to remember the minimal set and its meaning.

Re: New to Forth?

PostPosted: Sat Feb 16, 2013 4:41 pm
by timpart
Chapter 5 of http://www.mpeforth.com/arena/ProgramForth.pdf has a good glossary. Searching on Forth glossary on the web tends to bring up ones for specific vendors' products.

I recommend that people who haven't done Forth before read Starting Forth, as the language differs a lot from Algol-like languages, like C.

Re: New to Forth?

PostPosted: Thu Oct 03, 2013 6:18 pm
by svartalf
timpart wrote:I recommend that people who haven't done Forth before read Starting Forth, as the language differs a lot from Algol-like languages, like C.


And for those wondering how one can lay hands on this excellent introduction to Forth...

http://thinking-forth.sourceforge.net/ :D

You can thank Forth enthusiasts all over, including Bernd Pasysan who manages that project.