comp.lang.ada
 help / color / mirror / Atom feed
* record question
@ 2001-10-26 13:13 Alfred Hilscher
  2001-10-26 13:33 ` Petter Fryklund
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alfred Hilscher @ 2001-10-26 13:13 UTC (permalink / raw)


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;



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-10-26 23:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 13:13 record question Alfred Hilscher
2001-10-26 13:33 ` Petter Fryklund
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

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