>This is almost 20 year old memory cells trying to activate here, but I
>thought Forth was generally implemented by "compilation" into a non-standard
>pCode which was then run interpretively by a stack oriented run time engine.
That's one way of doing it, but the most traditional (and still most
popular, at least from what I see) way of doing it is to compile
straight to threaded machine code.
Note that even though threaded code is usually most commonly associated
with Forth and other "non-traditional" languages, the technique
is applicable to old-line languages as well. For example, Fortran IV
compilers on the PDP-11 could optionally compile to threaded machine code,
usually producing smaller object code as a result.
>Thus, I would have said it was a stack oriented language. But I guess it
>depends on if you're looking at the language itself or how it is normally
>executed?
To me, at least, threaded means "you call a subroutine for everything".
For instance, if you want to add two numbers, you push them onto a
(or the) stack and call the add routine. It's the extreme opositte
of "inline" code, to the point where you can think that you're working
on a "virtual" machine that doesn't have the limitations of your
"real" machine (probably why you've confused Forth with p-Code type
intermediate representations - after all, conceptually they aren't that
different!)
--
Tim Shoppa Email: shoppa_at_trailing-edge.com
Trailing Edge Technology WWW: http://www.trailing-edge.com/
7328 Bradley Blvd Voice: 301-767-5917
Bethesda, MD, USA 20817 Fax: 301-767-5927
Received on Tue Feb 29 2000 - 21:41:35 GMT