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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,820de86ed0dafb8a X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Help Me Please :) Date: 2000/03/01 Message-ID: <89i6bi$u4p$1@nnrp1.deja.com>#1/1 X-Deja-AN: 591605371 References: <38BC4EAF.209AE20C@port.ac.uk> X-Http-Proxy: 1.0 x35.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Mar 01 04:29:40 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-03-01T00:00:00+00:00 List-Id: In article <38BC4EAF.209AE20C@port.ac.uk>, Will Mann 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.