Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #44216
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: props to gforth |
| Date | 2015-12-12 16:12 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2015Dec12.171209@mips.complang.tuwien.ac.at> (permalink) |
| References | <6b67408b-0b5c-487f-85c0-eca187bc2812@googlegroups.com> <2015Dec11.231603@mips.complang.tuwien.ac.at> <n4ftmo$u1f$1@dont-email.me> |
Bernd Paysan <bernd.paysan@gmx.de> writes:
>Anton Ertl wrote:
>>>: hier-print ( list-addr -- ) recursive
>>> dup comp-name ." ==> " dup comp-print cr
>>> ['] hier-print do-each
>>>;
>>
>> Ok, so I'm not the only one who passes the xt of the current word to
>> some other word.
>
>In the current development version, you can also use ['] recurse to do that.
>RECURSE there is an alias to the latest definition. We don't go so far that
>POSTPONE RECURSE postpones the current definition; that would be a bug IMHO.
Definitely. The following standard program would no longer work:
: my-recurse postpone recurse ; immediate
: fib dup 1 > if dup 1- my-recurse swap 2 - my-recurse + then ;
5 fib .
['] RECURSE is ambiguous, so the behaviour of the current
implementation of RECURSE for ['] RECURSE is as standard as any;
however, given that we made ['] IF give an xt for the compilation
semantics of IF, we should do that for RECURSE, too. The current
behaviour is cute, but probably contrary to the expectations of most
programmers (at least those that are most likely to try ticking
RECURSE).
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2015: http://www.rigwit.co.uk/EuroForth2015/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
props to gforth beeflo <beeflobill@gmail.com> - 2015-12-11 12:58 -0800
Re: props to gforth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-11 22:16 +0000
Re: props to gforth beeflo <beeflobill@gmail.com> - 2015-12-11 14:50 -0800
Re: props to gforth Paul Rubin <no.email@nospam.invalid> - 2015-12-11 15:23 -0800
Re: props to gforth Bernd Paysan <bernd.paysan@gmx.de> - 2015-12-12 02:38 +0100
Re: props to gforth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-12 16:12 +0000
Re: props to gforth Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-13 11:37 +0000
Re: props to gforth Bernd Paysan <bernd.paysan@gmx.de> - 2015-12-13 22:20 +0100
Re: props to gforth hughaguilar96@gmail.com - 2015-12-14 19:47 -0800
Re: props to gforth beeflo <beeflobill@gmail.com> - 2015-12-16 15:50 -0800
csiph-web