From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 6 Feb 93 23:24:29 GMT From: darwin.sura.net!sgiblab!news.cs.indiana.edu!arizona.edu!east.pima.edu!rha rwood@gatech.edu Subject: Re: Help with Meridian compiler, please Message-ID: <1993Feb6.162429.1@east.pima.edu> List-Id: In article <1993Feb4.144224.7460@goya.uu.es>, aalvarez@dit.upm.es (Angel Alvarez) writes: > The following simple program fails to compile with the PC Meridian compiler > (both 286 and 386): > > procedure w is > a: NATURAL range 0..1:=0; > begin > null; > end w; Never quite saw this one before! The hint is in the actual error message generated (which often is helpful to include when posting to such a wide audience): "illegal base in numeric literal". Understanding the source of the error is not trivial! First, you must remember from LRM 2.10/3 that "sharp characters (#) of a based literal can be replaced by colons (:)...". The compiler "thinks" you are about to supply a based literal as the endpoint of the range, perhaps something like 16#FFF#, only you've "chosen" to substitute colons like 16:FFF: . The lexer probably doesn't look FIRST for the entire syntactic construct for a based literal before deciding that it really IS what you intended. Next time I'm on the phone with them, I'll pass this along! ----- Ray Harwood |Data Basix |Adjunct Faculty, East Campus, Voice: (602)721-1988 |PO Box 18324 | Pima Community College FAX: (602)721-7240 |Tucson, AZ 85731 |Instructor in Ada and Pascal CompuServe: 76645,1370|AppleLink: DATA.BASIX|Internet: rharwood@east.pima.edu