POV-Ray : Newsgroups : povray.advanced-users : Array irritation. : Re: Array irritation. Server Time
29 Jul 2024 22:24:04 EDT (-0400)
  Re: Array irritation.  
From: David Wilkinson
Date: 17 Oct 2000 15:36:33
Message: <giapusk6m2qkq24ifm65osleibsse19b70@4ax.com>
On Tue, 17 Oct 2000 12:36:23 -0700, "ian mcdonald" <ian### [at] hotmailcom>
wrote:

>Hello,
>
>I am attempting to learn the use of Arrrays for positioning of objects.
>It works, a little.
>
>I have a [3][10] array. I wish to use all data therein by counting down with
>while loops. I wish for the loop to first use all 10 values from 3, then all
>ten from 2 and lastly all 10 from 1.
>
>I can't make code to do this. I am now very irritated.
>
>The data in the array is controlled by two while loops that surround all of
>this; this part works.
>
>It seems that no computer/programming language of any sort works as I think
>it should, I can't do as I wish with arrays, loops or etc.. Everything is
>too dependant.
>
>My main problem is creation of data in a loop, storage of this data, and
>retrieval for usage outside the loops the data was generated with.
>
>I'm not sure my sourcecode will help any, but I'll post it if needed.
>
>Suggestions?
>
>ian
>

#declare A1=array[3][10]
   {
      {"1","s","t"," "," ","A","r","r","a","y"}
      {"2","n","d"," "," ","A","r","r","a","y"}
      {"3","r","d"," "," ","A","r","r","a","y"}
    }                  

#declare Rowcount = 2;
#declare Colcount = 0;

#while (Rowcount>-1)
  #debug "\n"
   #while (Colcount<10)
      #debug concat(A1[Rowcount][Colcount])
      #declare Colcount=Colcount+1;
   #end
   #debug "\n"
   #declare Colcount=0;    
  #declare Rowcount = Rowcount-1;
#end
----------------------
dav### [at] hamiltonitecom
http://hamiltonite.com/


Post a reply to this message

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