Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!PRIME-A.TEES-POLY.AC.UK!NER034 From: NER034@PRIME-A.TEES-POLY.AC.UK Newsgroups: comp.lang.forth Subject: Key and EKey Message-ID: <9106020322.AA27114@ucbvax.Berkeley.EDU> Date: 30 May 91 17:40:56 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: NER034%PRIME-A.TEES-POLY.AC.UK@SCFVM.GSFC.NASA.GOV Distribution: world Organization: The Internet Lines: 30 Mitch Bradley writes: > My current thinking is that EKEY could be eliminated, and KEY should > be defined to return a *number*, not a character. > There should be a constant (or perhaps an environment query) for > MAX-CHARACTER . If the number returned by KEY is less than MAX-CHARACTER# , > then it is a character in the implementation-defined character set. If the > number is outside that range, it represents an event (function key, whatever) > in an implementation-defined event space. The crucial point is that the > set of valid characters is well-defined subset of the set of events, and > it is possible for a program to test whether or not the thing returned > by KEY is or is not a character. Presumably, a standard program would > discard non-character events, or pass them to a system-specific event > handler routine. Mitch, This sounds like such a good idea that there is simply no chance of getting it past the TC ! Peter Knaggs +-----------------------------+-----------------------------------------------+ ! School of Comp. & Maths., ! Janet: NER034 @ uk.ac.tees-poly ! ! Teesside Polytechnic, ! Bitnet: NER034 % tp.ac.uk @ UKACRL ! ! Middlesbrough, ! Internet: NER034 % tp.ac.uk @ cunyvm.cuny.edu ! ! Cleveland, England. TS1 3BA ! Uucp: NER034 % tpoly.ac.uk @ ukc.uucp ! !-----------------------------+-----------------------------------------------! ! It is not enough to do the right thing; one must also do it the right way. ! +-----------------------------------------------------------------------------+