From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6085ae1d74309e83 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b15g2000yqd.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: reference to a name variable Date: Thu, 23 Jul 2009 13:02:25 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2c3059c2-e454-4746-9abe-ae9a12867169@b15g2000yqd.googlegroups.com> References: <9129a8e6-1aba-430c-bfbc-3154026697b8@i18g2000pro.googlegroups.com> NNTP-Posting-Host: 77.198.58.215 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1248379346 20034 127.0.0.1 (23 Jul 2009 20:02:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 23 Jul 2009 20:02:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b15g2000yqd.googlegroups.com; posting-host=77.198.58.215; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7294 Date: 2009-07-23T13:02:25-07:00 List-Id: Hello Pablo, What you are looking for seems to be a kind of metaprogramming, something like handling the code as if it was data (Lisp back once again in the Ada world ?) I do not know any built-in of this kind in Ada, so I will suggest to design the application so that variables which would have to be accessible this way, would be registered in a list of string <-> access associations (just an example implementation, and standard Ada containers would be well suited here). You may also think about a kind of simple interpreter for your input and create an interpretation function in the application. If the input language is as simple as a set of string interpreted as requests for some value, you may have a function taking a string as argument and returning either a reference to an object an explicitely typed value. If you need this kind of access for introspection, then perhaps access to debug informations would be nice. This is all providing I've undertood what you want (if not, I apologize) Why do you need this explicitely ? Most of time, solving something requires to solve an initial requirement not to solve a derivative problem which is temporaly supposed to be a solution (that's the reason of the latter question). Best wishes for your project