POV-Ray : Newsgroups : povray.general : cannot recognize defined object / help, please : Re: cannot recognize defined object / help, please Server Time
29 Jul 2024 16:23:46 EDT (-0400)
  Re: cannot recognize defined object / help, please  
From: Robert Baer
Date: 8 Jan 2011 16:35:00
Message: <web.4d28d75596c55a40e40a58410@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 07.01.2011 11:52, schrieb Jim Holsenback:
> > On 01/07/2011 03:14 AM, Robert Baer wrote:
> >>    Now i have an #if..#end problem that is bugging me:
> >
> >>                      // MATCHED #if..#end recognized to here..
> >
> > yep ... looked ok to me too (hard to tell messy sytle)
> >
> >>                      // but not to here..
> >> // get "Parse Error: End of file reached but #end expected."
> >> sky_sphere {pigment {rgb<0.859,0.910,0.831>}}
> >> *** END FILE ***
> >
> > maybe some thing in the include file is miss-matched ... dunno if the
> > parser looks at the include as a seperate entity or considers it as part
> > of the entire scene file when resolving conditional blocks ... /think/
> > it's the former
>
> No, the parser doesn't systematically check whether the #if and other
> blocks of an #include file are fully matched.
>
> An exception is when the parser encounters an #end for a loop it is
> currently processing; in that case the #while or #for must reside in the
> same file as the terminating #end.

  Thanks loads for the patience; learning as i go.
  The business about "subroutines" is something a bit different than in other
languages; quite different than even the 2 ways available in BASIC.
  The above info on #if..#end became pertinent WRT POVray "subroutines".
  Let's see if i can say this correctly.
  Start in .POV and an object is named.
  The program "looks" to see if it is / has been defined in .POV and if not,
scans the .INC files.
  If found in <workingname>.INC then the contents get copied (acts as if one had
a very long file) and then run.
  In my case, the .INC file had an un-matched #if..#end so when the program
continued (effectively "went back" to the .POV file) it did not find a matching
#end and so complained about finding an EOF.

  Now, i think that the program actually does all of the work as it scans thru
all of the pertinent files, and saves the results in some ?hidden? temp area
until done (error or not).
  Then, if error, the appropriate line(s) and file name are used for the message
file - and all results are then scratched / released / erased.
  If no error, one gets all if the neat picture(s), etc.


Post a reply to this message

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