Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!ut-sally!utah-cs!carr From: carr@utah-cs.UUCP Newsgroups: comp.lang.forth Subject: variation on CREATE Message-ID: <4446@utah-cs.UUCP> Date: Thu, 2-Apr-87 20:55:06 EST Article-I.D.: utah-cs.4446 Posted: Thu Apr 2 20:55:06 1987 Date-Received: Sat, 4-Apr-87 18:17:55 EST Distribution: na Organization: Utah PASS Project Lines: 26 Keywords: defining words, create In Forth-83, is there, or how can I build, a variation of CREATE, which, instead of taking it input from the input stream: create will take a counted string from the stack: create ( addr -- ) ??? What I want to do is make a defining word :: test ( ... ) ; which will do one of two defining actions depending on whether or not the token following the :: is already defined. It is straightforward to make :: create a counted string of the token following it in PAD, then use FIND to determine if that word is already defined. If it is then some arbitrary action will be taken. If it isn't, then I want to define it. That's where I get stuck. If I had a variation of CREATE that used the counted string I'd be in business. Any ideas?? Thanks, Harold