POV-Ray : Newsgroups : povray.general : Has string handling been changed or improved? : Has string handling been changed or improved? Server Time
29 Jul 2024 22:32:15 EDT (-0400)
  Has string handling been changed or improved?  
From: Kenneth
Date: 10 May 2010 09:15:00
Message: <web.4be8062462ab6784ae92d9930@news.povray.org>
Wondering about something, having to do with strings and how they are handled by
an #if block.

In v.3.6.1c, trying to do this doesn't work:

#declare my_string = "abc" // with semi-colon or without
#if(my_string = "abc")
....do something
#else
#end

It produces a fatal error at the #if line, "Expected 'numeric expression',
string identifier found instead"

Some recent code posted by Edouard (his "DF3 Proximity Testbed")--meant for use
with one of the 3.7 betas, I *think*--makes use of this kind of construct, which
apparently does work now. (I'm just guessing; I only attempted to run part of
his code in 3.6.1, which produced the same error. Silly to do, I know; but I
like to experiment!)

So a question, just out of curiosity: *Has* string handling been improved since
3.6.1, to successfully process this kind of thing? I haven't yet been able to
find any info about it, when doing a search of the newsgroups.

Ken


Post a reply to this message

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