Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!aunro!ukma!rex!samsung!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sei.cmu.edu!ford From: ford@sei.cmu.edu (Gary Ford) Newsgroups: comp.sys.mac.hypercard Subject: Another pseudo-case statement in HyperTalk Message-ID: <26625@as0c.sei.cmu.edu> Date: 6 Jun 91 19:06:50 GMT Sender: netnews@sei.cmu.edu Lines: 31 For certain kinds of case constructs, such as using single keystrokes to invoke a variety of actions, this script can be used: on keyDown key if "a" <= key and key <= "z" then do "Key" & key else pass keyDown end if end keyDown on Keya -- do "a" actions end Keya on Keyb -- do "b" actions end Keyb ... on Keyz -- do "z" actions end Keyz I can't comment on the relative speed of this versus the long "if-then- else if-else if- ... -end if" constructs previously suggested. Gary Ford Software Engineering Institute Carnegie Mellon University