POV-Ray : Newsgroups : povray.pov4.discussion.general : Parse Strings : Re: Parse Strings Server Time
20 May 2024 01:43:18 EDT (-0400)
  Re: Parse Strings  
From: Charles C
Date: 26 Oct 2007 15:27:09
Message: <47223f8d@news.povray.org>
Warp wrote:
> Charles C <"nospam a nospam.com"> wrote:
>>    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.
> 
>   I wouldn't say that's the best possible usage for an eval() function...

I don't understand your meaning.  I'd guess that somebody might say that 
fishing is not the best possible use of fishing line but if somebody 
actually said that I'd say it begs the question what they thought would 
be a better use.  Anyway, I think Ben was suggesting a general ability 
to parse strings, not specifically evaluate an expression.  I was giving 
an example where I wanted to use the same data in two disparate ways and 
found a clumsy way to avoid cut/pasting.  I think it would be great if 
strings could be treated almost as if they were include files in memory, 
with their own name-space locality etc.  You couldn't  #include 
StringIdentifier because then you'd be including a file by that name, 
but #parse works for me...
Charles


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.