POV-Ray : Newsgroups : povray.newusers : Arrays with default value... : Re: Arrays with default value... Server Time
29 Jul 2024 06:26:44 EDT (-0400)
  Re: Arrays with default value...  
From: Trevor G Quayle
Date: 4 May 2006 22:33:25
Message: <445ab975$1@news.povray.org>
"danyolgiax" <d.o### [at] gmailcom> wrote in message 
news:web.445a5ff0bea7939358dbbb6b0@news.povray.org...
> Is this the only way to set a default value?
>
> #declare numBuildings=12;
> #declare contatore=0;
> #declare noRender=array[numBuildings];
>
> #while (contatore<numBuildings)
>
>    #declare noRender[contatore]=1;
>    #declare contatore=contatore+1;
>
> #end
>

or

#declare noRender=array[numBuildings] {1,1,1,1,1,1,1,1,1,1,1,1};

This is good for small arrays, but can be tedious for large arrays.

-tgq


Post a reply to this message

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