New to Forth?

Moderator: timpart

New to Forth?

Postby timpart » Fri Feb 15, 2013 7:52 am

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
timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Re: New to Forth?

Postby ed2k » Sat Feb 16, 2013 4:06 am

is there place illustrate the most basic words. it is really hard to remember the minimal set and its meaning.
ed2k
 
Posts: 113
Joined: Mon Dec 17, 2012 3:27 am

Re: New to Forth?

Postby timpart » Sat Feb 16, 2013 4:41 pm

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.
timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Re: New to Forth?

Postby svartalf » Thu Oct 03, 2013 6:18 pm

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.
svartalf
 
Posts: 50
Joined: Thu Oct 03, 2013 4:06 pm


Return to Forth

Who is online

Users browsing this forum: No registered users and 0 guests