Deutsch   English   Français   Italiano  
<f8f93d61d204bdbb566e420c8cf53ee0@www.novabbs.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: VALUE and TO implementation
Date: Sun, 4 Aug 2024 09:38:00 +0000
Organization: novaBBS
Message-ID: <f8f93d61d204bdbb566e420c8cf53ee0@www.novabbs.com>
References: <a1aab44ee3b1b56c2f54f2606e98d040@www.novabbs.com> <v8b04c$137lg$1@dont-email.me> <nnd$6e668a8e$712b1a09@1b1e479e823969fb> <v8cuur$1go8k$1@dont-email.me> <2af79ef5abcec71a1d42a461b6bc56b8@www.novabbs.com> <v8dntr$1lcff$1@dont-email.me> <2024Jul31.193344@mips.complang.tuwien.ac.at> <v8ekea$1po8g$1@dont-email.me> <2024Aug1.120730@mips.complang.tuwien.ac.at> <v8in5k$2pq99$1@dont-email.me> <ecc2ee176b98033763c1fb2143cb9935@www.novabbs.com> <v8ler0$3fja7$1@dont-email.me> <4b8297b5787264614edcb6180ef3e1b6@www.novabbs.com> <v8mea6$3fja7$2@dont-email.me> <23a44aa0445a30c0fc782819f48463f9@www.novabbs.com> <87zfpsyaq8.fsf@nightsong.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="1416829"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="t0bSWFIQDvYvkkhDiPIIv6byulC6WbSEwXWMJpxc4k0";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$0IP080lUWtN.ddLhaSGSFu9L6uuYHe2LjITsSO0G8/3LWBQQhyfum
X-Rslight-Posting-User: 59549e76d0c3560fb37b97f0b9407a8c14054f24
Bytes: 2126
Lines: 17

On Sun, 4 Aug 2024 8:05:03 +0000, Paul Rubin wrote:

> [..] I've sometimes thought of a version
> of VALUE that makes two separate words, for reading and writing the
> value:
>
> 17 XVALUE foo
>
> creates two words, "?foo" and "!foo".  ?foo pushes the value from foo
> (initially 17) onto the stack.  !foo moves TOS to foo.

That would work too, but apart from messing up Forth's unspoken
formatting guidelines, the scheme becomes impractical when you want to
propel additional messages like +TO, -TO, 'OF (returns address of),
0TO or CLEAR, SIZEOF and /OF . In practice, the latter two are used
very infrequently.

-marcel