From: Darkwing <nelsonchandler@gmail.com>
Subject: Re: Question: dynamic rename?
Date: Sat, 3 Sep 2011 20:11:30 -0700 (PDT)
Date: 2011-09-03T20:11:30-07:00 [thread overview]
Message-ID: <7a54d9f8-17be-4b50-be87-e84ccb4b2ce3@l4g2000vbz.googlegroups.com> (raw)
In-Reply-To: 4E622A11.5030403@obry.net
On Sep 3, 6:22 am, Pascal Obry <pas...@obry.net> wrote:
> Le 03/09/2011 14:27, ytomino a écrit :
>
>
> Or using a case expression in Ada 2012:
>
> Signal : Signal_Type :=
> (case Configuration is
> when One => Signal_One,
> when Two => Signal_Two);
You can really do that in Ada 2012? (I've never used 2012, just 95).
That's pretty cool. Any word on when 2012 will be finalized?
> function signal_ref return access signal_type is
> begin
> case configuration is
> when one => return signal_one'Access;
> when two => return signal_two'Access;
> end case;
> end signal_ref;
This is what I'll have to use. Well, actually just the value since I'm
only reading and not writing. Also, I don't think I have have access
to the 'access because the variables in question aren't aliased (I
don't believe they are aliasable either).
next prev parent reply other threads:[~2011-09-04 3:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-03 2:28 Question: dynamic rename? Darkwing
2011-09-03 8:03 ` Dmitry A. Kazakov
2011-09-03 10:04 ` Simon Wright
2011-09-03 10:47 ` Dmitry A. Kazakov
2011-09-03 12:27 ` ytomino
2011-09-03 13:22 ` Pascal Obry
2011-09-04 3:11 ` Darkwing [this message]
2011-09-04 8:43 ` Pascal Obry
2011-09-07 16:35 ` Anh Vo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox