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,68c11ba628510a3a X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Conrolled types at library level only? Date: 1996/08/28 Message-ID: #1/1 X-Deja-AN: 176957636 references: <32221600.69CD@interserf.net> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-08-28T00:00:00+00:00 List-Id: iDavid Hunter asks "I've got a generic package that defines a controlled type. When I try to instantiate the package in a procedure, GNAT (3.04a) tells me that conrolled types can only be defined at library level. Sure enough, I can instantiate the generic in a package but not in a procedure. Is this rule part of the Ada95 definition or a particular weakness of GNAT?" When GNAT outputs a message like this, it is telling you that your program is illegal, and why it is illegal, and it is absolutely right, the source of your problem is that "controlled types can only be defined at library level"!