Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #12219
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Subject | Re: OOP packages |
| Newsgroups | comp.lang.forth |
| Message-ID | <65929518988435@frunobulax.edu> (permalink) |
| Date | 2012-05-17 08:11 +0200 |
| References | <4fb307e2$0$295$14726298@news.sunsite.dk> |
| Organization | Wanadoo |
Doug Hoffman <glidedog@gmail.com> wrote Re: OOP packages > On 5/15/12 2:37 PM, Marcel Hendrix wrote: >> Doug Hoffman<glidedog@gmail.com> writes Re: OOP packages [..] > try replacing the one DEFER word with a value, then change the two other > definitions affected (changes in UPPER CASE): > 0 VALUE allotocate > : makeobj ( class -- o) pre-obj allotocate EXECUTE post-obj ; > : make ( xt -- o) TO allotocate ' >body state @ > if postpone literal postpone makeobj else makeobj then ; > This then compiled and ran fine for me on my version of iForth, no > extraneous stack items. Actually, only one change is necessary: iForth's compiled IS is written as [IS], like this: : make ( xt -- o) [is] allotocate ' >body state @ if postpone literal postpone makeobj else makeobj then ; The problem with the extra stack items was my test: it was based on insufficient understanding of your code. I should not have pasted the output of your posting verbatim. \ Original (wrong) test dict> var value x x .s init: \ ok cr x p: 5 \ ok \ New test dict> var value x x .s init: \ ok cr x p: \ 5 ok Sorry about that. Conclusion: This OOP package works on all major Forths with only a single cosmetic (is DEFER standard already?) change. -marcel
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OOP packages hwfwguy@gmail.com - 2012-05-08 09:31 -0700
Re: OOP packages "Elizabeth D. Rather" <erather@forth.com> - 2012-05-08 09:10 -1000
Re: OOP packages stephenXXX@mpeforth.com (Stephen Pelc) - 2012-05-08 20:17 +0000
Re: OOP packages hwfwguy@gmail.com - 2012-05-08 18:26 -0700
Re: OOP packages anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-09 11:34 +0000
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-09 08:00 -0400
Re: OOP packages Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-09 19:49 +0200
Re: OOP packages anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-10 11:39 +0000
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-10 12:48 -0400
Re: OOP packages Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-10 02:26 -0700
Re: OOP packages BruceMcF <agila61@netscape.net> - 2012-05-08 12:39 -0700
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-08 15:56 -0400
Re: OOP packages hwfwguy@gmail.com - 2012-05-10 17:04 -0700
Re: OOP packages Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-11 02:02 -0700
Re: OOP packages Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-15 10:32 +0000
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-15 08:35 -0400
Re: OOP packages mhx@iae.nl (Marcel Hendrix) - 2012-05-15 20:37 +0200
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-15 15:22 -0400
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-15 21:50 -0400
Re: OOP packages mhx@iae.nl (Marcel Hendrix) - 2012-05-17 08:11 +0200
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-17 08:55 -0400
Re: OOP packages Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-05-22 08:39 +0100
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-22 07:02 -0400
Re: OOP packages Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-05-22 13:14 +0100
Re: OOP packages Coos Haak <chforth@hccnet.nl> - 2012-05-22 18:11 +0200
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-22 14:23 -0400
Re: OOP packages Coos Haak <chforth@hccnet.nl> - 2012-05-23 19:47 +0200
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-23 14:58 -0400
Re: OOP packages Doug Hoffman <glidedog@gmail.com> - 2012-05-31 07:43 -0400
Re: OOP packages "Peter Knaggs" <pjk@bcs.org.uk> - 2012-05-17 19:31 +0100
Re: OOP packages Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-17 21:59 -0700
Re: OOP packages digital.wilderness@googlemail.com - 2012-05-18 01:51 -0700
csiph-web