Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #16734
| From | Arnold Doray <invalid@invalid.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Headless child words |
| Date | 2012-10-26 13:38 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <k6e3oh$lao$1@dont-email.me> (permalink) |
| References | <86861510938435@frunobulax.edu> |
On Thu, 25 Oct 2012 20:49:49 +0200, Marcel Hendrix wrote:
You'd probably want to use quotations. In Mini it's:
: foo { x } [: x ;] ;
ok
44 foo
ok
.S
<1> com.terraweather.mini.XT@25cd0888 ok
execute .S
.S
<1> 44 ok
I don't think there is a cleaner way to do it in ANS.
Here's an ugly hack:
: create-name ( -- xt )
s" create :anon ' :anon" evaluate ;
: foo create-name >R , R> does> @ ;
44 foo execute .S
44 ok
Cheers
Arnold
Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar | Unroll thread
Headless child words mhx@iae.nl (Marcel Hendrix) - 2012-10-25 20:49 +0200 Headless child words JennyB <jennybrien@googlemail.com> - 2012-10-25 21:49 -0700 Re: Headless child words Arnold Doray <invalid@invalid.com> - 2012-10-26 13:38 +0000
csiph-web