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,7f2ce8bda9cae4ab,start X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!nntp-server.pubsub.com!border1.nntp.ash.giganews.com!nntp.giganews.com!newsread.com!newsstand.newsread.com!POSTED.monger.newsread.com!not-for-mail Newsgroups: comp.lang.ada Subject: "Must instantiate controlled types at library level." Why? From: "Peter C. Chapin" Organization: Kelsey Mountain Software Message-ID: User-Agent: Xnews/5.04.25 Date: Tue, 11 May 2004 23:04:41 GMT NNTP-Posting-Host: 216.114.169.197 X-Complaints-To: Abuse Role , We Care X-Trace: monger.newsread.com 1084316681 216.114.169.197 (Tue, 11 May 2004 19:04:41 EDT) NNTP-Posting-Date: Tue, 11 May 2004 19:04:41 EDT Xref: controlnews3.google.com comp.lang.ada:458 Date: 2004-05-11T23:04:41+00:00 List-Id: Hello! I have a generic package that contains a controlled type. When I attempt to instantiate that package in the declarative part of a procedure, GNAT (v3.15p) tells me that I must instantiate controlled types at "library level" (or something like that). I worked around this by creating a helper package in which I did the instantiation and then used that helper package in my procedure. However, this experience leads me to wonder why there is this restriction on controlled types. I'm relatively new to Ada so I apologize if this seems like a basic question. Thanks in advance! Peter