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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!pyrnj!mirror!gabriel!inmet!stuart From: stuart@inmet.UUCP Newsgroups: comp.lang.ada Subject: Re: variant records Message-ID: <4800005@inmet> Date: Wed, 5-Nov-86 11:35:00 EST Article-I.D.: inmet.4800005 Posted: Wed Nov 5 11:35:00 1986 Date-Received: Mon, 10-Nov-86 22:05:27 EST References: <2886@rsch.WISC.EDU> Nf-ID: #R:rsch.WISC.EDU:-288600:inmet:4800005:000:715 Nf-From: inmet.UUCP!stuart Nov 5 11:35:00 1986 List-Id: Objects created with an allocator are always constrained. If explicit constraints are not supplied, the object is constrained by the default discriminant values (LRM 4.8(5)). The easiest solution would be to declare the type "node" without discriminants: type node; type node_ptr is access node; type node is record next : node_ptr; xrec : rec; -- will not be constrained end record; If you want save space by allocating exact sized constrained objects, "node" can be declared with discriminates. However, calls on "new" must include a constraint, and the free list would have to be an array of free lists, one for each possible discriminant value.