Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #36202
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? |
| Date | 2015-02-01 16:13 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2015Feb1.171340@mips.complang.tuwien.ac.at> (permalink) |
| References | <6c04408e-ec35-4a54-b066-e25ee55f4f07@googlegroups.com> <9f92684b-cc26-4019-bece-e905a2d78b59@googlegroups.com> <2015Jan30.172753@mips.complang.tuwien.ac.at> <d5338be4-3d07-4771-a66c-0209b78eded6@googlegroups.com> |
lehs <skydda.barnen@gmail.com> writes:
>Den fredag 30 januari 2015 kl. 17:31:16 UTC+1 skrev Anton Ertl:
>> Next: make it work for the nested case:
>>=20
>> { 9 8 { 7 6 5 } + 4 } *
>>=20
>> should give 5184.
...
>I didn't notice your answer, but you are right about the nestling. It needs=
> local variables or an extra stack.
It's possible to do it without extra stack, by storing the old value
of SSP on the data stack. Implementing this is left as an exercise
for the reader.
>: } STATE @
> IF POSTPONE RBR
> '
> POSTPONE LITERAL
> POSTPONE EXC
> ELSE RBR ' EXC
> THEN
>; IMMEDIATE
...
>No! I don't think that the Forth-compiler includes a can of worms.
Using STATE is a pretty good indication that the can is open. You may
not have noticed the worms yet, but they are there.
- 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 2014: http://www.euroforth.org/ef14/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? the_gavino_himself <visphatesjava@gmail.com> - 2015-01-22 19:34 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? foxaudioresearch@gmail.com - 2015-01-22 20:08 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Mark Wills <markwills1970@gmail.com> - 2015-01-23 02:00 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Coos Haak <chforth@hccnet.nl> - 2015-01-23 14:07 +0100
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? "WJ" <w_a_x_man@yahoo.com> - 2015-01-24 01:43 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? beeflo <beeflobill@gmail.com> - 2015-01-29 08:22 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? "Elizabeth D. Rather" <erather@forth.com> - 2015-01-29 11:35 -1000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-30 16:20 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-30 21:48 +0100
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? the_gavino_himself <visphatesjava@gmail.com> - 2015-01-23 13:09 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? empty-buffers <empty.buffersYOU-DONT-WANT-THIS@gmail.NEITHER-THIS.com> - 2015-01-29 00:38 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Coos Haak <chforth@hccnet.nl> - 2015-01-29 02:49 +0100
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? "Elizabeth D. Rather" <erather@forth.com> - 2015-01-28 16:34 -1000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? the_gavino_himself <visphatesjava@gmail.com> - 2015-01-29 16:04 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2015-01-30 08:46 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? skydda.barnen@gmail.com - 2015-01-30 02:39 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? "Alex McDonald" <blog@rivadpm.com> - 2015-01-30 11:32 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-01-30 04:08 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-01-30 08:38 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Coos Haak <chforth@hccnet.nl> - 2015-01-30 22:01 +0100
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-01-30 22:16 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Coos Haak <chforth@hccnet.nl> - 2015-02-01 00:23 +0100
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-02-01 00:35 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Coos Haak <chforth@hccnet.nl> - 2015-02-01 14:20 +0100
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-02-01 07:42 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-02-01 17:24 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-02-01 09:58 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-02-02 00:46 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? "Elizabeth D. Rather" <erather@forth.com> - 2015-02-01 08:59 -1000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-02-01 12:06 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? hughaguilar96@gmail.com - 2015-02-08 18:43 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? Ron Aaron <rambamist@gmail.com> - 2015-02-09 08:36 +0200
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-30 16:27 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-02-01 01:24 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-02-01 16:13 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? lehs <skydda.barnen@gmail.com> - 2015-02-01 10:54 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth use loop to make something similar? hughaguilar96@gmail.com - 2015-02-08 18:07 -0800
Re: lisp can sum a list of numbers with 2 parens and a +, can forth useloop to make something similar? "WJ" <w_a_x_man@yahoo.com> - 2015-02-09 08:55 +0000
Re: lisp can sum a list of numbers with 2 parens and a +, can forth useloop to make something similar? Doug Hoffman <glidedog@gmail.com> - 2015-02-09 08:00 -0500
Re: lisp can sum a list of numbers with 2 parens and a +, can forth useloop to make something similar? Unknown <dog@gmail.com> - 2015-02-11 09:19 +0000
csiph-web