🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.forth
Article #164

Re: redefine "+" ??

#164
From: David Angier
Date: Thu, 14 Feb 1985 16:09
12 lines
1200 bytes
For interpretive infix use of '+' you could use WORD to get
the next number from the input stream and then use NUMBER to
push the number on the stack, then add them together using the
old version of '+'.
Since you can check whether you are compiling or not you can
make this safe, also you could make it use WORD to get the
next word then NUMBER and finally LITERAL to compile it in
RPN, afterwards use COMPILE + to put the old + in.
I don't think it is worth it, but it can be done.  I once
saw a Pascal compiler that was writeen in Forth (UGH).

			Dave (Maths @ University of Warwick,UK)
Technical Details
Message-ID: <379@snow.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!zehntel!hplabs!hao!seismo!mcvax!ukc!qtlon!flame!ubu!snow!dpa
References: <2480@tekig.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC830713); site snow.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!zehntel!hplabs!hao!seismo!mcvax!ukc!qtlon!flame!ubu!snow!dpa
From: dpa@snow.UUCP (David Angier)
Newsgroups: net.lang.forth
Subject: Re: redefine "+" ??
Message-ID: <379@snow.UUCP>
Date: Thu, 14-Feb-85 11:09:31 EST
Article-I.D.: snow.379
Posted: Thu Feb 14 11:09:31 1985
Date-Received: Tue, 19-Feb-85 06:38:53 EST
References: <2480@tekig.UUCP>
Organization: Computer Science Department, Warwick University, UK
Lines: 12