POV-Ray : Newsgroups : povray.general : Warn About Naming Conflicts? : Re: Warn About Naming Conflicts? Server Time
31 Jul 2024 16:28:00 EDT (-0400)
  Re: Warn About Naming Conflicts?  
From: Warp
Date: 6 Dec 2006 06:30:47
Message: <4576a9e7@news.povray.org>
Ben Chambers <ben### [at] pacificwebguycom> wrote:
> Warp wrote:
> > #declare Index = 0;
> > #while(Index < 10000)
> >   #declare TheObject = sphere { <Index, 0, 0>, 1 pigment { rgb 1 } };
> >   ... (do something with TheObject) ...
> >   #declare Index = Index+1;
> > #end
> > 
> >   How many warnings do you get?
> > 

> #local index = 0;
> #while (index < 10000)
>    #local TheObject = sphere { <index, 0, 0>, 1 pigment {rgb 1} };
>    ... (do something with TheObject) ...
>    #local index = index+1;
> #end

> No warnings at all :)

  The problem is that my version is completely valid and there's nothing
wrong with it, and there's no reason why someone wouldn't write code like
that. Issuing ten thousand warnings on it makes no sense.

-- 
                                                          - Warp


Post a reply to this message

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