From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4e180de737833224 X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Ada Java question => clarification Date: 1997/03/01 Message-ID: <5f8e28$oj7@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 222253779 References: <33167E7E.4351@fn3.freenet.tlh.fl.us> <33174046.4A25@fn3.freenet.tlh.fl.us> Organization: Comp Sci, University of Melbourne Newsgroups: comp.lang.ada Date: 1997-03-01T00:00:00+00:00 List-Id: Kendal Van Dyke writes: >Brad Balfour wrote: > > [Tucker Taft wrote:] >> >do any of the following: >> > 1) use the full name "java.awt.event" instead of "event"; >> > 2) drop the use of "event" in "event.UP" and say simply "UP"; >> > 3) add a "use" clause for "java.awt" which will make the package >> > names "event", "component", "color", and "graphics" directly visible. >> >> However, once you follow #1, you will get the following error for each >> case choice: >> >> WHEN java.awt.event.UP => return true; >> keydown.ada: Error: line 30 col 27 LRM:3.8.1(8) & 5.4(5), The expression >> in the discrete choice must be static > >Ok, after changing the case statement to an if statement, I STILL had to >use the full name (java.awt.event.[up, down, left, right, etc]) in order >for it to work right, even with the with and use clauses for >java.awt.event . Don't know if that's a big deal or not....just extra >typing for me at the least! That's because you adopted solution 1 above. If you want less typing, use solution 2 or 3. -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.