comp.lang.ada
 help / color / mirror / Atom feed
From: "Petter Fryklund" <qsbpefr@esavionics.se>
Subject: Re: record question
Date: Fri, 26 Oct 2001 15:33:46 +0200
Date: 2001-10-26T15:33:46+02:00	[thread overview]
Message-ID: <9rbne9$sa7$1@newstoo.ericsson.se> (raw)
In-Reply-To: 3BD9618C.D154FE0C@icn.siemens.de

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;





  reply	other threads:[~2001-10-26 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-26 13:13 record question Alfred Hilscher
2001-10-26 13:33 ` Petter Fryklund [this message]
2001-10-26 14:59   ` Ted Dennison
2001-10-26 13:42 ` Claude SIMON
2001-10-26 15:01   ` Ted Dennison
2001-10-26 15:50     ` Claude SIMON
2001-10-26 21:22 ` Richard Pinkall-Pollei
2001-10-26 23:54 ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox