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-Thread: 103376,22ab316b1096e177 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Tasks, Entries, and Variables of a Class-wide type Date: Mon, 01 Nov 2010 13:49:08 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <7e77bb8f-17b6-4d51-9946-ea825f726682@f33g2000yqh.googlegroups.com> <3dcee4c7-9753-41a1-8181-6e7e363bfbe8@t13g2000yqm.googlegroups.com> <958760a1-b26b-4641-be4c-b742c2e0e836@u10g2000yqk.googlegroups.com> NNTP-Posting-Host: 9b6cd415474547731b57863265549bf0 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 24a61c408a6ed3cec390fd08b292c0b6 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <958760a1-b26b-4641-be4c-b742c2e0e836@u10g2000yqk.googlegroups.com> X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=24a61c408a6ed3cec390fd08b292c0b6 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news1.google.com comp.lang.ada:15127 Date: 2010-11-01T13:49:08-07:00 List-Id: On 11/01/2010 12:28 PM, Shark8 wrote: > > Ah, you mean something like a Variant-record? Or am I misunderstanding > you? > > Type Object_Type is ( ps_Interger, ps_Character, ps_Name [etc] ); > Type PostScript_Object( Type_Discriminant : Object_Type ) is Record > Case Type_Discriminant is > When ps_Interger => Integer_Value : Integer; > When ps_Character => Character_Value : Character; > When ps_Name => String_Value: String; -- Not allowed, > unconstrained type > end case; > end record; Unbounded_String would be suitable, though. And you want a default on the discriminant, so that you can declare an unconstrained object, pass it as the actual to an out-mode parameter, and allow it to be assigned to with a different discriminant. -- Jeff Carter "Why don't you bore a hole in yourself and let the sap run out?" Horse Feathers 49