Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!linus!philabs!ttidca!quad1!bohica!mcws!p2.f863.n102.z1.fidonet.org!Harry.Myhre From: Harry.Myhre@p2.f863.n102.z1.fidonet.org (Harry Myhre) Newsgroups: comp.sys.mac.hypercard Subject: Why no 'case' statement in Hypertalk? Suggestions? Message-ID: <413.28532433@mcws.fidonet.org> Date: 7 Jun 91 03:33:49 GMT Sender: ufgate@mcws.fidonet.org (newsout1.26) Organization: FidoNet node 1:102/863.2 - Glassell Park, Los Angeles CA Lines: 40 Earl Williams writes in a message to All on 05 Jun 91 EW> Is there really no 'case' statement in Hypertalk, or am I missing EW> its equivalent? You're right, HyperTalk doesn't have a case statement. You could have coded your if statement: on keyDown key if key = 'a' then do this else if key = 'b' then do that else if key = 'c' then do the other end if end if end if end keyDown like this instead: on keyDown key if key = 'a' then do this else if key = 'b' then do that else if key = 'c' then do the other end if end keyDown Either way you do it, it's uglier than a nice case statement. And harder to read and understand what's going on. -- : Harry Myhre - via FidoNet node 1:102/851 (818)352-2993 : ARPA/INTERNET: Harry.Myhre@p2.f863.n102.z1.fidonet.org : UUCP: ...!{elroy,elroy!bohica}!mcws!863.2!Harry.Myhre : Compu$erve: >internet:Harry.Myhre@p2.f863.n102.z1.fidonet.org