From: Peter Brooks <peter.h.m.brooks@gmail.com>
Subject: Variant record limitation - what's a better solution?
Date: Wed, 3 Jul 2013 00:52:12 -0700 (PDT)
Date: 2013-07-03T00:52:12-07:00 [thread overview]
Message-ID: <0606a658-9816-4611-84dd-4f999bf6018e@googlegroups.com> (raw)
I see that I can't do what I'd like to with a variant record. What should I be doing?
Here's an example:
type
my_object(X : size_type) is
record
name : string(1..80);
case X is
when small => Y : small_type; -- line 20
when medium => Y : medium_type; -- line 21
when large => Y: large_type; -- line 22
end case;
end record;
The errors are:
line 21 'Y' conflicts with declaration at line 20
line 22 'Y' conflicts with declaration at line 21
I was hoping to have a different type depending on the case, but this doesn't seem allowed. What would achieve this?
next reply other threads:[~2013-07-03 7:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 7:52 Peter Brooks [this message]
2013-07-03 8:11 ` Variant record limitation - what's a better solution? Georg Bauhaus
2013-07-03 9:39 ` Peter Brooks
2013-07-03 16:23 ` Jeffrey Carter
2013-07-03 18:35 ` Shark8
2013-07-03 19:26 ` Adam Beneschan
2013-07-09 11:48 ` Peter Brooks
2013-07-09 15:11 ` Adam Beneschan
2013-07-10 1:11 ` Peter Brooks
2013-07-03 20:55 ` Per Sandberg
2013-07-09 6:38 ` Peter Brooks
2013-07-09 7:49 ` Simon Wright
2013-07-09 8:22 ` Georg Bauhaus
2013-07-09 14:12 ` Eryndlia Mavourneen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox