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: 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 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)