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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b6780b7c90e46c15 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: Character Type? Date: 1999/01/28 Message-ID: <78pmds$32r$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 437737833 References: <78lfbq$l16$1@ligarius.ultra.net> <36AF1CB3.BC7741B4@pgh.net> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Jan 28 12:50:06 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-28T00:00:00+00:00 List-Id: In article <36AF1CB3.BC7741B4@pgh.net>, ghristwd@pgh.net wrote: > Well, I'm pretty new with Ada, but the obvious problem, I > think, is that '10' is not a character, it is a string. That's confusingly wrong. Strings in Ada are delimited with the character " The character ' is used to delimit character literals. The sequence of characters '10' is not anything at all, it is simply invalid, as is easily seen from the grammar rules in the RM. Now in general of course, you might be right, that if you see '10' it could be that the programmer intended a string, and indeed GNAT makes this guess: 1. procedure j is 2. x : character := '10'; | >>> strings are delimited by double quote character 3. begin 4. null; 5. end; However, in the original program, it clearly was NOT intended to be a string, in fact from the original program I certainly have no idea what the programmer had in mind, it was clearly very muddled thinking, so it is certainly not surprising that the compiler could not magically suggest what the programmer had in mind in this particular case :-) -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own