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-7-bit X-Google-Thread: 103376,2dae9e735b6ea318 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-26 06:32:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news.tele.dk!small.news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!newsfeed1.telenordia.se!algonet!uab.ericsson.se!erix.ericsson.se!newstoo.ericsson.se!not-for-mail From: "Petter Fryklund" Newsgroups: comp.lang.ada Subject: Re: record question Date: Fri, 26 Oct 2001 15:33:46 +0200 Organization: ericsson Message-ID: <9rbne9$sa7$1@newstoo.ericsson.se> References: <3BD9618C.D154FE0C@icn.siemens.de> NNTP-Posting-Host: 172.17.76.206 X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Xref: archiver1.google.com comp.lang.ada:15234 Date: 2001-10-26T15:33:46+02:00 List-Id: I'd try this: y := (i => 99); I bet someone else is going to tell why your code is not allowed, but I don't know. Alfred Hilscher wrote in message <3BD9618C.D154FE0C@icn.siemens.de>... >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;