Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!ENG.SUN.COM!Mitch.Bradley From: Mitch.Bradley@ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Re: ZEN 15A Message-ID: <9105240412.AA06337@ucbvax.Berkeley.EDU> Date: 24 May 91 02:13:46 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch.Bradley%ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 58 > I could understand if [ AT-XY ] just ignored Y, but he doesn't test in > which column you are! Good point. Based on that, I agree that DROP SPACES is a bad definition of AT-XY . > > CHAR ^ CONSTANT _portuguese_name_of_the_accent_ > > > WORD? Maybe. But I would expect that CONSTANT > returns an error (nothing on the stack) or define the following word. > That's not happening. The interpreter tries to execute (or interpret as > a number) the word that follows CONSTANT. Strange... You're right. It's probably WORD . When interpreting from a text file, the parsing function of the interpreter (WORD) is *supposed* to ignore non-printable characters, because many popular text file formats use various control characters as "white space" (e.g. tab, formfeed, linefeed, return, word processor formatting characters). CHAR is trying to parse a "visible" word, and it is skipping the Portugese character as "white space", picking up the word "CONSTANT" as the argument of CHAR . Then the interpreter tries to interpret the word "_portugese_name...". One might argue that it would be better to skip just control characters, rather than all non-printing characters. That is certainly how I would implement it. However, I would also argue that the question in moot in the context of a standard program without environmental dependencies. > Search for "127"? Why? "127 AND" is often used after KEY to remove junk like parity bits and shift bits. This technique, although quite common, is bogus, because throwing away high bits doesn't necessarily result in a meaningful 7-bit ASCII character. Instead it may for example transform a code that means the "F7" function key into the letter "T", a behavior for which I can think of no justification. Anyway, I don't think this is what is happening in your case; I bet the "skip" portion of WORD is looking for characters outside the range of codes 33 to 126 . However, I wouldn't be surprised to find "KEY 127 AND" in the definition of EXPECT ; that phrase in an earlier version of Zen. The correct phrase should be something like this: 126 constant max-graphic \ Value depends on system character set ... key dup bl max-graphic between if ( char ) else then Mitch.Bradley@Eng.Sun.COM