POV-Ray : Newsgroups : povray.general : indexing array give parse error (repost because I forget to add the subject= : Re: indexing array give parse error (repost because I forget to add the sub= Server Time
29 Jul 2024 04:23:46 EDT (-0400)
  Re: indexing array give parse error (repost because I forget to add the sub=  
From: stevenvh
Date: 15 Jan 2013 13:05:00
Message: <web.50f59946d8963828209de68b0@news.povray.org>
"stevenvh" <nomail@nomail> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > stevenvh <nomail@nomail> wrote:
> > >    MyTable[0][i] = i + 1
> >
> > You have to #declare that.
> >
> > (Also, you are not incrementing 'i' anywhere.)
> >
> > --
> >                                                           - Warp
>
> Thanks for the reply. The increment got lost in copying the code (I removed a
> lot  of code to get to the core of the problem). I have #declared MyTable, even
> with initialization values (first line of the code), and i is declared as
> #local, which should be as good as #declare. Changing it to #declare doesn't
> solve the problem, anyway.

I thought the problem was in the array since the cursor was placed at the
position of the second index, but even with the code below I get the error. The
error points to the first i in the "i = i + 1" statement.


**** Code **********************************

#macro Init_Table()
  #declare i = 0;
  #while (i < 6)
   i = i + 1
  #end
#end

Init_Table()


Post a reply to this message

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