comp.lang.ada
 help / color / mirror / Atom feed
From: darwin.sura.net!sgiblab!news.cs.indiana.edu!arizona.edu!east.pima.edu!rha
Subject: Re: Help with Meridian compiler, please
Date: 6 Feb 93 23:24:29 GMT	[thread overview]
Message-ID: <1993Feb6.162429.1@east.pima.edu> (raw)

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

             reply	other threads:[~1993-02-06 23:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-02-06 23:24 darwin.sura.net!sgiblab!news.cs.indiana.edu!arizona.edu!east.pima.edu!rha [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-02-05 17:04 Help with Meridian compiler, please cis.ohio-state.edu!news.sei.cmu.edu!firth
1993-02-05 15:38 Robert I. Eachus
1993-02-04 14:42 Angel Alvarez
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox