CVS difference for ais/ai-00295.txt

Differences between 1.4 and version 1.5
Log of other versions for file ais/ai-00295.txt

--- ais/ai-00295.txt	2002/10/01 03:08:54	1.4
+++ ais/ai-00295.txt	2003/01/03 00:01:36	1.5
@@ -988,3 +988,68 @@
 
 ****************************************************************
 
+From: Erhard Ploedereder
+Date: Sunday, October 10, 2002, 11:46 AM
+
+
+Ignore this, unless AI-275 or AI-295 are on your plate.
+
+Here are fixed-up versions of program examples in the two AIs, which
+I compiled at the meeting.
+
+Erhard
+-----------------------------
+
+
+[See !appendix of AI-00275 for Test275. - Editor]
+
+procedure test295 is
+  procedure Foo is
+
+     generic
+         type T is private;
+         Val1, Val2 : T;
+         type Ref is access all T;
+         Ptr : in out Ref;
+     package G is
+     end G;
+
+     package body G is
+         type A is array (Boolean) of aliased T;
+         X : A := (others => Val1);
+     begin
+         Ptr := X (False)'Access;
+         X := (others => Val2);
+     end G;
+
+     type Rec (Is_Big : Boolean := True) is
+         record
+             case Is_Big is
+                 when False =>
+                     null;
+                 when True =>
+                     Big_Field : String (1 .. 100);
+             end case;
+         end record;
+
+     type Ref is access all Rec;
+     Ptr : Ref(Is_Big => True);
+
+     package I is new G (T => Rec,
+                         Val1 => (Is_Big => True,
+                                  Big_Field => (others => 'B')),
+                         Val2 => (Is_Big => False),
+                         Ref => Ref,
+                         Ptr => Ptr);
+
+
+   begin
+     -- at this point, Ptr.all.Is_Big = False
+     null;
+   end Foo;
+begin
+   null;
+end test295;
+
+****************************************************************
+

Questions? Ask the ACAA Technical Agent