comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Question: dynamic rename?
Date: Sat, 03 Sep 2011 11:04:05 +0100
Date: 2011-09-03T11:04:05+01:00	[thread overview]
Message-ID: <m2fwkedjsa.fsf@pushface.org> (raw)
In-Reply-To: 1120rpf8n3otq.1r0ysnixm1bwt.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Fri, 2 Sep 2011 19:28:38 -0700 (PDT), Darkwing wrote:
>
>> Is there an Ada elegant way to do something like the following:
>> 
>> signal : signal_type renames =>
>> case configuration is
>>  when one => signal_one;
>>  when two => signal_two;
>> end case;
>
> Nested subprogram taking signal as an argument.

I thought that, but what if signal_one, signal_two were variables and
you needed an lvalue? I think you'd need to return an access value. Must
depend very much on context.



  reply	other threads:[~2011-09-03 10:04 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 [this message]
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
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