comp.lang.ada
 help / color / mirror / Atom feed
From: sjw <simon.j.wright@mac.com>
Subject: Re: Using a string as a binary operator
Date: Wed, 15 Oct 2008 12:32:34 -0700 (PDT)
Date: 2008-10-15T12:32:34-07:00	[thread overview]
Message-ID: <330f9f8a-0045-40dc-b67a-881362dc0487@i76g2000hsf.googlegroups.com> (raw)
In-Reply-To: 8d9b43fa-05a1-4024-bbd3-ddf276478748@40g2000prx.googlegroups.com

On Oct 15, 4:22 pm, Adam Beneschan <a...@irvine.com> wrote:

>     Available_Operators : constant Operator_Desc_Array :=
>         ((new string' ("+"), Plus'access),
>          (new string' ("-"), Minus'access), .......);
>
> Then you can search the array for an element whose Name.all matches
> the operator string, and then call the Operation function of the
> element.

Or you could use the Containers library - looks like a Map from string
to access-to-function



  parent reply	other threads:[~2008-10-15 19:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 15:35 Using a string as a binary operator Joe
2008-10-14 17:05 ` Dmitry A. Kazakov
2008-10-14 18:51 ` Jeffrey R. Carter
2008-10-15 15:22   ` Adam Beneschan
2008-10-15 17:23     ` Jeffrey R. Carter
2008-10-15 19:32     ` sjw [this message]
2008-10-16  8:14     ` Dmitry A. Kazakov
2008-10-14 22:01 ` george.priv
2008-10-15  3:51 ` Gene
2008-10-15  5:45 ` anon
2008-10-15 12:18   ` Joe
2008-10-15 13:43     ` John McCormick
replies disabled

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