POV-Ray : Newsgroups : povray.beta-test : Delayed syntax checking : Re: Delayed syntax checking Server Time
2 Nov 2024 15:23:57 EDT (-0400)
  Re: Delayed syntax checking  
From: Nathan Kopp
Date: 27 Oct 2001 18:41:05
Message: <3bdb3801$1@news.povray.org>
"Mike Williams" <mik### [at] nospamplease> wrote...
>
[clip]
> declare P = function {y}
> #declare Z=2;
> #declare X=1;
> #debug "OK so far\n"
[clip]

> 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").

Actually, it doesn't need a "#"!  This is a very old backwards-compatibility
"feature".  Interestingly enough, if you terminate the function declare with
a semicolon, it will solve the problem.

However, there does appear to be a bug somewhere, because, unless you use
the semicolon or the "#", POV will somehow ignore the first token following
the line "#declare X=1;" unless that token is a directive other than
#declare.  (For example, you can replace the #debug line with "#if(0) #end"
or even "#include "colors.inc"".)

-Nathan


Post a reply to this message

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