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-Language: ENGLISH,ASCII X-Google-Thread: 103376,2dae9e735b6ea318 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-26 06:41:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!oleane.net!oleane!setranews.setra.fr!not-for-mail From: Claude SIMON Newsgroups: comp.lang.ada Subject: Re: record question Date: Fri, 26 Oct 2001 15:42:28 +0200 Organization: SETRA - CTOA Message-ID: <3BD96844.699A15BC@setra.fr> References: <3BD9618C.D154FE0C@icn.siemens.de> NNTP-Posting-Host: calamar.setra.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: setranews.setra.fr 1004103599 5685 161.48.101.33 (26 Oct 2001 13:39:59 GMT) X-Complaints-To: usenet@setranews.setra.fr NNTP-Posting-Date: 26 Oct 2001 13:39:59 GMT X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: fr Xref: archiver1.google.com comp.lang.ada:15237 Date: 2001-10-26T13:39:59+00:00 List-Id: I think y := (i => 99); is better : (99) is an integer expression, not an array nor a record aggregate. The same problem arise when you want to pass an array of one element, you must write (1=> X). Claude Simon Alfred Hilscher a �crit : > Hi, > > assume that I have a record like the one below. I can assign aggregates > in the case that I have subcomponents, but how do I assign if I don't > have? > > procedure RT is > type x (i : Integer := 0) is > record > case i is > when 0 => null; > when 1..10 => s : STRING (1..10); > when others => null; > end case; > end record; > > y : x; > begin > y := (1, "ABC "); -- this is OK > > y := (99); -- but, how do that ? > > y.i := 99; -- do not work either, so how assign a value different to > 1..10 ? > end RT;