Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!aplcen!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: FPC applications for the PC Message-ID: <396.UUL1.3#5129@willett.UUCP> Date: 2 Feb 90 23:51:51 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 27 Date: 02-01-90 (22:31) Number: 1734 (Echo) To: ROY RICE Refer#: 1733 From: BILL MCCARTHY Read: NO Subj: IMPLEMENTATION OF 'X' Status: PUBLIC MESSAGE The 'x' handling in F-PC 3.50 is located in KERNEL2.SEQ. The 'x' sequence is tested in %NUMBER which eventually gets control when a word cannot be found in the search order. If the 1st and 3rd character of the word are 's then this code word branches to the high level word %'NUM which converts the 2nd character to a double. BTW, it seems strange that %'NUM is state smart. During compilation it converts the character in TIB. Interpreting, it works with the counted string sent to %'NUM. Consequently, if you are running with CAPS ON, 'a' will give different results when interpreting (65) and compiling (97). A possible fix (insensitive to CAPS): : MY'NUM1 ( a1 -- d1 f1 ) DROP TIB >IN @ 3 - + C@ 0 TRUE DPL ON ; ' MY'NUM1 IS 'NUM or sensitive to CAPS: : MY'NUM2 ( a1 -- d1 f1 ) 2+ C@ 0 TRUE DPL ON ; ' MY'NUM2 IS 'NUM ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'