comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Help Me Please :)
Date: 2000/03/01
Date: 2000-03-01T00:00:00+00:00	[thread overview]
Message-ID: <89i6bi$u4p$1@nnrp1.deja.com> (raw)
In-Reply-To: 38BC4EAF.209AE20C@port.ac.uk

In article <38BC4EAF.209AE20C@port.ac.uk>,
  Will Mann <csm90231@port.ac.uk> wrote:
> Can some one help me with my Ada.. my lecturer has given me
code that
> doesn't work... the compiler says that it can't handle
"A".."Z" the
> error message is :
>
>  Inappropriate operands for "DOT_DOT" operation, continuing

Well here is how you might be able to find that out for
yourself. Obviously the compiler does not like the operands
for your .. expression, so look up in your Ada book the rules
for .. and you will find that discrete types are required.
Now look up discrete types, and you will find that they
include integer and enumeration types, including particular
character types. Clearly you are trying for the latter here,
so go look up what character literals should look like, and
you will find that they use single quotes, so you should
have written

   'a' .. 'z'

I think you might have had an easier type finding the error
for yourself with GNAT:

g.adb:3:17: expected a discrete type
g.adb:3:17: found a string type

In general I think the error messages from GNAT are likely to
be clearer for a beginner (or anyone else for that matter),
since huge effort has gone into making the messages clear.
You might consider getting hold of a copy of GNAT (which is
available for free download -- go to the ftp directories
at cs.nyu.edu, directory /pub/gnat).

At the very least, if you get another message you don't
understand, you can try and see what GNAT says :-)

Robert Dewar
Ada Core Technologies


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-03-01  0:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-29  0:00 Help Me Please :) Will Mann
2000-03-01  0:00 ` Robert Dewar [this message]
2000-03-03  0:00   ` Florian Weimer
2000-03-03  0:00     ` tmoran
2000-03-04  0:00       ` Richard D Riehle
2000-03-05  0:00         ` Steve Arnold
2000-03-17  0:00         ` Robert A Duff
2000-03-18  0:00           ` Richard D Riehle
2000-03-18  0:00           ` James S. Rogers
2000-03-19  0:00             ` Robert A Duff
2000-03-20  0:00               ` Brian Rogoff
2000-03-20  0:00                 ` Tucker Taft
2000-03-20  0:00           ` Florian Weimer
2000-03-22  0:00           ` Mats Weber
2000-03-27  0:00             ` Robert A Duff
2000-03-27  0:00               ` Hyman Rosen
2000-03-28  0:00               ` Robert Dewar
2000-03-30  0:00                 ` Mats Weber
2000-04-06  0:00                   ` Exceptions (was: " Wes Groleau
2000-04-07  0:00                     ` Mats Weber
2000-03-28  0:00               ` reason67
2000-03-28  0:00                 ` Robert Dewar
2000-03-29  0:00                   ` Simon Wright
2000-03-29  0:00                   ` reason67
2000-04-06  0:00                   ` Simon Pilgrim
2000-04-07  0:00                     ` Robert Dewar
2000-04-10  0:00                       ` r_c_chapman
2000-03-29  0:00               ` Richard D Riehle
2000-03-29  0:00                 ` Robert Dewar
2000-03-31  0:00                   ` Richard D Riehle
2000-03-31  0:00                     ` Jean-Pierre Rosen
2000-03-31  0:00                       ` Pascal Obry
2000-03-30  0:00                 ` Mats Weber
2000-03-31  0:00                   ` Richard D Riehle
2000-04-06  0:00                 ` Wes Groleau
2000-03-30  0:00               ` Mats Weber
2000-03-30  0:00               ` Tucker Taft
     [not found]     ` <2000Mar3.183321.69279@ludens>
2000-03-03  0:00       ` Larry Kilgallen
2000-03-04  0:00       ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2000-02-29  0:00 Will Mann
2000-02-29  0:00 ` Stanley R. Allen
2000-02-29  0:00   ` Al Johnston
2000-03-01  0:00     ` Robert Dewar
2000-03-01  0:00       ` Al Johnston
2000-03-01  0:00     ` Stanley R. Allen
2000-03-01  0:00     ` tmoran
2000-03-01  0:00       ` Al Johnston
2000-03-02  0:00       ` Aidan Skinner
2000-03-01  0:00     ` Robert Dewar
2000-03-01  0:00 ` James Bean
2000-03-01  0:00 ` tmoran
     [not found] <df481109.0106140310.5d923746@posting.google.com>
     [not found] ` <9gb1uu$87u7o$1@ID-52877.news.dfncis.de>
2001-06-19  2:59   ` help me please! Ken Garlington
2001-06-16 10:20     ` C.D.Damron
2001-06-20  6:06     ` John Keeney
replies disabled

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