POV-Ray : Newsgroups : povray.beta-test : beta 32 - buglist : Re: beta 32 - buglist Server Time
5 Oct 2024 18:26:11 EDT (-0400)
  Re: beta 32 - buglist  
From: Tim Attwood
Date: 9 Apr 2009 06:39:46
Message: <49ddd072@news.povray.org>
> Why that? What's wrong with
> 
> #local MyBlob = blob {
>  #local i = 0;
>  #while (i < 10)
>    sphere { VRand(Rnd)*10, rand(Rnd) ... }
>    #local i = i + 1;
>  #end
> }
Sure, nothing wrong that way, #local MyBlob
sets a pointer to a blob object. Maybe declares
should expect some identifier, object, or value 
as the following token, and raise a warning or 
error if the next token is a control structure.

Here's a good example that will actually crash
because of not checking for this.

#while (c=0)
  #local c = #end c+1;

This parses fine, and crashes because of it.
The #while attempts to evaluate the pointer c,
but the pointer c doesn't point to anything yet.


Post a reply to this message

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