|mathematical function parser/compiler firstname.lastname@example.org (Jens Dreger) (1998-05-04)|
|Re: mathematical function parser/compiler email@example.com (Robert Bernecky) (1998-05-07)|
|Re: mathematical function parser/compiler firstname.lastname@example.org (Joerg Schoen) (1998-05-07)|
|Re: mathematical function parser/compiler email@example.com (Ram Bhamidipaty) (1998-05-12)|
|From:||Robert Bernecky <firstname.lastname@example.org>|
|Date:||7 May 1998 16:53:26 -0400|
Jens Dreger wrote:
> I'm looking for a c/c++ function, that takes some string like
> at runtime (!) and returns a function that evaluates this
> expression when called within the program. This sounds like a
> common problem, so I assume it has already been solved, but I
> couldn't find anything like that.
You might try calling a J interpreter DLL if you're in windoze (not sure
how their linux version works). J is an offshoot of APL
that has some very nice array handling facilities in it.
In J, you could write something along the lines of:
f=. 1 % 1+ y. ^2 NB. y. is the argument
f 10 20 40...
and execute foo on a whole array (not necessarily just a vector)
Look at http://www.jsoftware.com
Return to the
Search the comp.compilers archives again.