Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #10681
| Date | 2012-03-31 21:14 -1000 |
|---|---|
| From | "Elizabeth D. Rather" <erather@forth.com> |
| Organization | FORTH, Inc. |
| Newsgroups | comp.lang.forth |
| Subject | Re: Why the difference ("BL WORD")? |
| References | <slrnjnfjl5.c22.zbigniew2011REMOVE@Tichy.myhome.org> |
| Message-ID | <h8-dnVaR2OnuneXSnZ2dnUVZ_sCdnZ2d@supernews.com> (permalink) |
On 3/31/12 4:37 PM, Zbiggy wrote: > Noticed, that not every Forth accepts direct use of "BL WORD", I mean: > > #v+ > : test ( -- ) bl word count type ; ok > test abc abc ok > > bl word abc count type abc ok > #v- > > Both ways of "printing the next word taken from input stream" seem equally > valid, but some Forth-variants don't like that latter, "interactive one". > Why? As Marcel points out, traditional Forths use WORD to parse the input stream for the text interpreter. It places the found string in a buffer (which traditionally is at or near HERE). Therefore, when you type your sequence of words, the interpreter will place each in turn in the *same* buffer. For an application needing to have a private space, PARSE will work much better for you, since it works with the string without moving it to a system buffer. But, as you see, when you use WORD in a definition everything is fine. Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ==================================================
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why the difference ("BL WORD")? Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-04-01 03:37 +0100
Re: Why the difference? mhx@iae.nl (Marcel Hendrix) - 2012-04-01 08:40 +0200
Re: Why the difference ("BL WORD")? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-31 21:14 -1000
Re: Why the difference ("BL WORD")? Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-04-01 12:39 +0100
Re: Why the difference ("BL WORD")? BruceMcF <agila61@netscape.net> - 2012-04-01 09:39 -0700
Re: Why the difference ("BL WORD")? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-04-01 11:53 +0100
Re: Why the difference ("BL WORD")? Coos Haak <chforth@hccnet.nl> - 2012-04-02 00:37 +0200
Re: Why the difference ("BL WORD")? BruceMcF <agila61@netscape.net> - 2012-03-31 19:37 -0700
csiph-web