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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38b27bed88e97415 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-20 07:20:27 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: papand0pul0@yahoo.com (Papandopulo) Newsgroups: comp.lang.ada Subject: Re: Question: Combination of Access and Constraining Date: 20 Feb 2003 07:20:27 -0800 Organization: http://groups.google.com/ Message-ID: <1d13e1b4.0302200720.9666350@posting.google.com> References: <1d13e1b4.0302200006.70207b86@posting.google.com> <9d795v0h3qa2922u8vodfhpfvprpre6ak2@4ax.com> NNTP-Posting-Host: 65.58.224.127 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1045754427 5415 127.0.0.1 (20 Feb 2003 15:20:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 20 Feb 2003 15:20:27 GMT Xref: archiver1.google.com comp.lang.ada:34278 Date: 2003-02-20T15:20:27+00:00 List-Id: > Pointers are inherently bad. Why not: If they are ingerently bad why they are in the language ? > function Fn (Arg : Tp) return Natural; I have to use access type here. Since this is simplified example. I have function accepting several such array arguments each of which is optional (null). > But this is another type! Probably you meant a subtype: > > subtype TpCon is Tp(1..1); Nope, now it says: warning: aliased object has explicit bounds. > >So where I am going wrong here ? > > You are mixing types and subtypes. If you want just to put a > constraint on a type, declare a constrained subtype. Gives warnings as I said before: variable with constrained subtype can't be aliased (any idea why?). Thanx, George.