Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!decwrl!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Bill's DOES Message-ID: <9008101355.AA03188@ucbvax.Berkeley.EDU> Date: 10 Aug 90 01:02:38 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 33 > I'm curious, would someone mind posting a quick run-down of the > alternate syntax for Does> to which Mitch alluded? By way of introduction, this alternate syntax is often called "Bill's DOES", because it was proposed by Bill Ragsdale, and it is a pun on which was the old name for what is now CREATE ... DOES> The basic idea is that the "action clause" is defined *before* the defining word. The following discussion does not use Ragsdale's names (because I am away from my library right now and can't look it us), but does capture the spirit. Instead of : CONSTANT CREATE , DOES> @ ; You would write (:) @ ; : CONSTANT CREATE , . Another nice property is that the syntax lends itself easily to multiple- code-field words (defining words whose children have more than one action, i.e. objects). START-ACTIONS (:) @ EXECUTE ; (:) ! ; END-ACTIONS : DEFER CREATE 0 ,