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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd5431b81b9708ee X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-26 11:07:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Deference question Date: 26 Feb 2003 14:06:27 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <1d13e1b4.0302260734.7b26fece@posting.google.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1046287221 27894 128.183.235.92 (26 Feb 2003 19:20:21 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 26 Feb 2003 19:20:21 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:34620 Date: 2003-02-26T19:20:21+00:00 List-Id: papand0pul0@yahoo.com (Papandopulo) writes: > Maybe simple question, but I am just starting with Ada. > > I try to read an array from file using streams: > > declare > type X_Value is mod 2**8; > type X_Buffer is array (Positive range <>) of X_Value; > type X_Buffer_Access is access all X_Buffer; > type X_Buffer_Sz is new X_Buffer (1 .. Positive(Q_Bytes)); > type X_Buffer_Sz_Access is access all X_Buffer_Sz; > Buff : X_Buffer_Sz_Access; > begin > Buff := new X_Buffer_Sz; > X_Buffer_Sz'Read (X_Stream, Buff'all); > end; > > But gnat tells me: > attribute designator expected > on the dereference (Buff'all) You want Buff.all, not Buff'all. the ' means the following identifier is an "attribute", like 'Read. But you want a dereference, which is .all -- -- Stephe