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,c1071f2bf741de0 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: [Q]: Unchecked conversion Date: 1996/11/10 Message-ID: #1/1 X-Deja-AN: 195722782 references: <01bbcf21$4b32a020$829d6482@joy.ericsson.se> organization: New York University newsgroups: comp.lang.ada Date: 1996-11-10T00:00:00+00:00 List-Id: Jonas asks about conversion of unconstrained array types. First, the solution with address clauses is of course for CONSTRAINED array types (since all objects are constrained), and you could perfectly well use unchecked conversion, or, as I suggested unchecked conversion of pointers (since there is no need to copy the data) and if all array types are constrained, then that should be portable. Note that the solution with address clauses is definitely wrong for Ada 83 (i.e. erroneous). The effect is implementation dependent in Ada 95. In practice it will probably work, but I still think that unchecked conversions of poitners to constrained array subtypes is a much cleaner approach. The use of address clauses in this way is really an *ab*use!