POV-Ray : Newsgroups : povray.general : #declare blah =3D -1; // bug avoidance (avoids "incomplete function or s= : #declare blah =3D -1; // bug avoidance (avoids "incomplete function or s= Server Time
31 Jul 2024 22:14:09 EDT (-0400)
  #declare blah =3D -1; // bug avoidance (avoids "incomplete function or s=  
From: Charles C
Date: 5 Aug 2006 16:20:01
Message: <web.44d4fc8241d0ca913869c6770@news.povray.org>
I've got a project I'm working on which uses a lot of splines.   I'm passing
splines to macros in some cases, and in other cases passing a counter
variable to a macro which in turn deals with splines.   Every once in a
while for either of these two situations I get the message "Parse Error:
Identifier expected, incomplete function call or spline call found
instead."   Well, so far the offending lines have looked good to me and in
fact do work:   Somehow I figured out that if I add a line a few lines up
like -

#declare blah = 1; // bug avoidance

- then it'll parse just fine.  I.e. the offending lines do their job.  This
"bug avoidance" line can be inside the same macro as the offending line, or
outside - it doesn't seem to matter.  If I see the problem again I'll often
just scroll up to where I most likely already have #declare blah = 1; and
change it to #declare blah = -1; or comment it out again, or add another
similar line.  It IS repeatable as long as the code doesn't change.

Longer #while loops containing likely offenders do seem to increase the
chances of getting the error.  The problem also compounds itself when there
are two separate macro calls next to each other which both have a tendancy
to "offend."   The "bug avoidance" line which fixes one macro call might
break the one next to it.  It looks like the trick here is to put a
bug-avoidance line in between the macro calls.

Anyway, I know this is all a bad way to deal with it; I want to know the
real cause.  I've found some macro calls which I had mistakenly left a
comma after the last parameter, but this hasn't been the case for the
problematic ones. However, I wouldn't be surprised if it were something
like this which Pov-Ray tolerates ....sometimes.


Does this sound familiar to anybody or should I start trying to create a
reasonably sized example?

Thanks for any tips.

Charles


Post a reply to this message

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