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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1c7098170d1fe6a5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-13 07:43:46 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: Heterogenous_Array_Test: please explain error Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Wed, 13 Jun 2001 10:42:54 EDT Organization: http://www.newsranger.com Date: Wed, 13 Jun 2001 14:42:54 GMT Xref: archiver1.google.com comp.lang.ada:8656 Date: 2001-06-13T14:42:54+00:00 List-Id: In article , Lutz Donnerhacke says... > >* Ted Dennison wrote: >>"Child_Component". If you want to access that component, you have to tell the >>compiler that the type is really "Child" (which it will verify at runtime just >>to be sure). I think something like the following will work, though I haven't >>compiled it: >> >>Child'(Item(2).all).Child_Component := 22; > >Does this work on a copy of Child initialized with Item(2).all? > >I thought typecasts match the pattern "Typ(Expression)" not >"Typ'(Expression)", but i may fail. The form without the tick is a conversion, and constraint checks (along with any other appropriate checks) will be performed. The form with the tick (a "qualified expression") is more like a clarification, or a hint to the compiler which might have otherwise been confused about what type is being used. For that reason, I'm not sure it will work here. You might need to remove the tick and try the conversion. Note that this is a simple explanation, not a fully accurate one. To get that, you'd need to consult the LRM. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com