|
|
> Nicolas Alvarez wrote:
>>
>> Name some. Maybe we don't need an eval()-like function, what we need
>> is other features so that we never ever need to use eval.
>
> In my case I was using POV-Ray as a graphing calculator and wanted the
> resultant image to show both the text and graphic form of the function.
> I wanted to only have to enter a function in SDL once, so I used a
> string, and figured out the include-file-method as a workaround to
> convert that string to something plot-able. I asked on the newsgroups
> if there was a better way... wishing.
> Charles
#declare F = function { x*2 };
#declare Ftext = f.toString(); // <-- that's probably the feature you need
Or a way to convert a string to a function; note that's still not an
eval(), as it would be limited to only mathematical expressions.
Post a reply to this message
|
|