Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: 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 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