🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.forth
Article #286

Re: Need standards

#286
From: Calvin Sambrook
Date: Fri, 14 Mar 1986 10:43
23 lines
1583 bytes
In article <625@bentley.UUCP> kwh@bentley.UUCP writes:
>My experience is that _indirect_ recursion is forbidden because a
>word must be defined before it can be used; direct recursion works
>because when you define a word, its name goes into the dictionary
>immediately and hence becomes usable even within its own body.
>I don't know about the official story on recursion in forth, but
>I'd guess your "current version" is, as you said, "not very good".

If your forth allows it you can get around this by defining one of the
	words as a dummy ie. : firstword ;

The name is now in the dictionary so you can use it in the definition
	of another word ie. : secondword firstword ;

If you now edit the first word it can reference the second
	ie. : firstword secondword ;

A quick redefine will then sort out the dictionary and hey presto recursion.

As I said, your forth may prevent you doing this, mine allows it.
I'm not sure what the standard(s) say about it.
--
calvin
Technical Details
Message-ID: <740@arran.tcom.stc.co.uk>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!stc!calvin
References: <2917@sunybcs.UUCP> <625@bentley.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!stc!calvin
From: calvin@stc.co.uk (Calvin Sambrook)
Newsgroups: net.lang.forth
Subject: Re: Need standards
Message-ID: <740@arran.tcom.stc.co.uk>
Date: Fri, 14-Mar-86 05:43:28 EST
Article-I.D.: arran.740
Posted: Fri Mar 14 05:43:28 1986
Date-Received: Sun, 16-Mar-86 09:43:34 EST
References: <2917@sunybcs.UUCP> <625@bentley.UUCP>
Reply-To: calvin@stc.UUCP (Calvin Sambrook)
Organization: STC Telecoms, London N11 1HB.
Lines: 23