POV-Ray : Newsgroups : povray.beta-test : Delayed syntax checking : Delayed syntax checking Server Time
2 Nov 2024 15:23:57 EDT (-0400)
  Delayed syntax checking  
From: Mike Williams
Date: 26 Oct 2001 00:27:15
Message: <AM3LOAABMO27EwFh@econym.demon.co.uk>
Consider this scene file

//-------------
light_source {<-100,200,-100> colour rgb 1}
camera { location  <0, 3, -4> look_at <0, 0, 0>}
declare P = function {y}
#declare Z=2;
#declare X=1;
#debug "OK so far\n"

box{1,-1 pigment {rgb 1}}
 
isosurface {
  function { P(x,y,z) }
        max_gradient 2
        contained_by{sphere{0,2}}
        pigment {rgb 1}
}
//-------------

I reckon it ought to be thrown out because there's no "#" on the first
#declare, but it renders. (I've put the isosurface there just to show
that the function P() is actually working "correctly").

Now try commenting out the #debug. The scene is now rejected, but the
reported error is 
    Parse Error: Expected 'object or directive', { found instead
reported against the box!

In this case, it's not too hard to spot the problem because it's only a
few lines away. In the complex scene that I discovered this behaviour it
was a very long way away. It was ages before I thought of looking at the
previous page of my scene to find out what was wrong with my box object.

POV 3.5b6, W98se, AMD K6-2 500, 128 Mb

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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