Sujet : Re: exercise in double number arithmetic
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 15. Jul 2024, 15:00:40
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Jul15.160040@mips.complang.tuwien.ac.at>
References : 1 2 3
User-Agent : xrn 10.11
Krishna Myneni <
krishna.myneni@ccreweb.org> writes:
There's a reason why RECURSE (or equivalent) is preferable to having the
name of the word in the output of SEE in Forth. This is because it is
possible to have an earlier definition with the same name and to call it
from within the definition e.g.
>
: binom ... ;
>
: binom ... binom ... ;
Yes, in Gforth SEE produces the same output for
: foo ;
: foo foo ;
see foo
and for
: foo recursive foo ;
see foo
Gforth's SEE also does not tell you that BAR is shadowed in the
following example:
: bar 1 . ;
: foo bar ;
: bar 2 . ;
see foo
Nor does Gforth's SEE tell you that a word it calls is in a wordlist
that is not in a search order.
Sometimes I think about giving some indication of such issues, but up
to now these ideas are pretty low on my todo list, because these
things cause little pain.
If you want to see the source code, use LOCATE (in the development
version).
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/ EuroForth 2024: https://euro.theforth.net