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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1096a7986b560ad6 X-Google-Attributes: gid103376,public From: johnherro@aol.com (John Herro) Subject: Re: In Exception ? Date: 1998/04/07 Message-ID: <1998040713020801.JAA18110@ladder01.news.aol.com>#1/1 X-Deja-AN: 341690779 References: <6g660e$khm$1@news.mhv.net> X-Admin: news@aol.com Organization: AOL http://www.aol.com Newsgroups: comp.lang.ada Date: 1998-04-07T00:00:00+00:00 List-Id: pvanbell@mhv.net wrote: > Or else use an enumeration variable that is > set to either EXCEPTION or NORMAL: ... > Type Calling_Source_Type is (Exception, Normal); I bet it won't compile! For the same reason that none of these will compile: type Direction is (Forward, Reverse, Left, Right); type Tape_Command is (Play, Record, Stop, Fast_Forward, Rewind, Pause); type Chemical Element is (H, He, Li, Be, ...); -- Fails at Indium. type State is (AL, AK, AZ, AR, ...); -- Fails at Indiana and Oregon. Those darn reserved words bite you when you least expect it! On the other hand, I once saw a Fortran program that used IF for a variable name! (Fortran has keywords but no reserved words.) To make readability even worse, although the variable name implies integer, the variable was actually floating point! (It was the Intermediate Frequency in a radio.) I guess Ada's reserved words aren't so bad after all! In any event, the advice given is fine; just make a slight change to the spelling of "Exception." - John Herro Download the shareware AdaTutor program at http://members.aol.com/AdaTutor