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_50 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,499373c5a06cccc1,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-15 14:51:31 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: ganesh.ramasivan@gdcanada.com (Ganesh Ramasivan) Newsgroups: comp.lang.ada Subject: Variant records.. Date: 15 Feb 2004 14:51:30 -0800 Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 209.47.1.92 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1076885491 27460 127.0.0.1 (15 Feb 2004 22:51:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 15 Feb 2004 22:51:31 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:5586 Date: 2004-02-15T14:51:30-08:00 List-Id: In the following example, how would i forbid the user of data type Foo from specifying the following: John : Foo(Vehicle => MAN, Power => AUTOMATIC); ie. is there a way to restrict the user from specifying certain types as variants? Thanks for your input. Ganesh Example: procedure Variant is type Vehicle_Type is (CAR, LEGS, BIKE, PLANE); type Vehicle_Power is (MANUAL, AUTOMATIC); type Foo(Vehicle : Vehicle_Type; Power: Vehicle_Power) is record case Vehicle is when CAR => null; when LEGS => null; when BIKE => null; when PLANE => null; when others => null; end case; end record; Audi : Foo(Vehicle => CAR, Power => MANUAL); begin null; end Variant;