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,12283be683f6446b X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: GNAT Stream Read processing problem Date: 1999/01/06 Message-ID: <76uv4j$njr$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 429286555 References: <76tsgd$s0o1@svlss.lmms.lmco.com> 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: Wed Jan 06 06:16:51 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-06T00:00:00+00:00 List-Id: In article <76tsgd$s0o1@svlss.lmms.lmco.com>, "Bruce Detter" wrote: > When I compile this no matter what type is specified for > the Read attribute and the data element to be read into, > I get the following errors three times: > ... expected type "Standard.Integer" > ... found type "Standard.Long_Integer" > > and it points me to the second parameter of each 'Read. > Can someone suggest what it is I'm doing wrong. Surely if you use -gnatv to point out the EXACT location of the error: 30. Long_Integer'Read(S, Data(ndx).elements); | >>> expected type "Standard.integer" >>> found type "Standard.long_integer" that should be enough of a clue, it is VERY specifically telling you that the subscript of Data must be of type Standard.integer, and you are using long_integer. While you are learning Ada 95, use -gnatv as a matter of course to tell exactly where the error message is being posted. GNAT goes to great pains to try to post the error in exactly the most helpful place, take advantage of this! Robert Dewar Ada Core Technologies -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own