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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: nospam@thanks.com.au (Don Harrison) Subject: Re: Can't export object of private type Date: 1999/03/01 Message-ID: #1/1 X-Deja-AN: 449704293 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev7 References: <7b6eq4$1tm0@news3.newsguy.com> Organization: CSC Australia, Sydney Reply-To: nospam@thanks.com.au Newsgroups: comp.lang.ada Date: 1999-03-01T00:00:00+00:00 List-Id: Sam Mize wrote: :Don Harrison wrote: :a lot, with the following side issue at the end: : :> :I just love the way Ada compilers fill in .all for me. :> :> Can you give an example? : :Sure. If the access value denotes a record value, you don't have :to put ".all" to access the record's fields: : : F := Access_Value.all.Field; : F := Access_Value.Field; : :This requires different syntax in C ("@" and "." versus "->", IIRC). Doesn't sound nice. :) :In a case like this, it's unlikely you are making a mistake, so Ada :assumes you want the implicit ".all". I guess I was aware of implicit dereferencing. What I didn't appreciate was the value of combining it with formal access-parameters. :On the other hand, mis-using a pointer to a scalar is a common :error, so Ada doesn't infer any de-references -- you have to do :them manually. Wasn't aware of this restriction - makes sense. -- Don (Harrison). donh at syd.csa.com.au