Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!munnari.oz.au!samsung!know!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!john From: john@aplcen.apl.jhu.edu (John Hayes) Newsgroups: comp.lang.forth Subject: Re: Compiling without : Message-ID: <6533@aplcen.apl.jhu.edu> Date: 12 Sep 90 13:39:18 GMT Organization: Johns Hopkins University / Applied Physics Laboratory Lines: 27 Andrew Scott writes on START: > I like the word - I've used a similar construct many times before. I have > one question, though. It's not stated in your description and example, but > it is implied that ; cannot be used to end a code fragment started with > START: . You created ;sim in your example: > > > : ;sim postpone exit postpone [ ; immediate > > Am I correct in drawing this conclusion? There are two reasons why ; cannot be used with START:. First, ; expects a compile-time argument, a sys, to be present. This sys is provided by : (colon). People who do syntax checking in their compilers use this to pass a "magic cookie" from : to ; so that ; can check that it is paired with a :. START: could be specified to deliver this "magic cookie". Since the size of a sys is implementation defined, the sys would have to be beneath the execution token on the stack: START: ( --- sys w ) A second reason that ; cannot be used with : is that ; "makes the most recent dictionary entry findable". Since START: doen't make a header, ; unsmudges an earlier header. This is probably harmless, but it is kludgy. John R. Hayes john@aplcen.apl.jhu.edu Applied Physics Laboratory Johns Hopkins University