POV-Ray : Newsgroups : povray.beta-test : Array assignment crash : Array assignment crash Server Time
4 Nov 2024 13:00:56 EST (-0500)
  Array assignment crash  
From: Slime
Date: 16 Oct 2001 11:39:23
Message: <3bcc54ab$1@news.povray.org>
The following scene causes POV-Ray to crash because of an array assignment
(read the comments):

#declare pointarray = array[5] {<0,0>,<0,1>,<2,1>,<3,0>,<2,.5>};

#local dim = dimension_size(pointarray,1);

// if the last point in the array isn't the same as the first point...
#if (pointarray[dim-1].u != pointarray[0].u & pointarray[dim-1].v !=
pointarray[0].v)

 //... then add a point to the array that's identical to the first point.
 #local correctarray = array[dim+1];
 #local copying = 0;
 #while (copying < dim)
  #local correctarray[copying] = pointarray[copying];
  #local copying = copying + 1;
 #end
 #local correctarray[dim] = pointarray[0];

 // The following line causes POV-Ray to crash (semi-colon or no
semi-colon).
 // It should overwrite the old array with the newly created, correct
 // array, which has a dimension one size bigger.
 #local pointarray = correctarray;

 #local dim = dim+1;
#end

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

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