#declare TestBugNumber=0; /* TestBugNumber 0) malloc error on array declaration with a float<1 for dimension_size 1) malloc error for very wrong syntax error 1.1) "correct" error ("expected 'object or directive'") for syntax error 1.2) "correct" error ("expected 'object or directive'") for same syntax error + subscript error 2) acces to subscript -1 */ #switch (TestBugNumber) #case(0) #declare dumbarray=array[.99] // use any float less than 1 (this includes 0) /* # <----ERROR Parse Error: Attempt to malloc zero size block (File: ..\..\source\tokenize.cpp Line: 3717). Returned from renderer with error status */ #break #case(1) #declare dumbarray=array[1]; #declare dumbarray=array[0]=14; /* #declare dumbarray=array[1]; #declare dumbarray=array[0]= <----ERROR Parse Error: Attempt to malloc zero size block (File: ..\..\source\tokenize.cpp Line: 3717). */ #break #case(1.1) #declare dumbarray=array[1]=14; /* #case(1.1) #declare dumbarray=array[1]= <----ERROR Parse Error: Expected 'object or directive', = found instead */ #break #case(1.2) #declare dumbarray=array[1]; #declare dumbarray=array[1]=14; /* #declare dumbarray=array[1]; #declare dumbarray=array[1]= <----ERROR Parse Error: Expected 'object or directive', = found instead */ #break #case(2) #declare dumbarray=array[1]; #declare dumbarray[-1]=5410013305002; // FIY, this is the barcode of a bottle of sparkling water #debug "\nOooo,I could declare dumbarray[-1]." #if (dumbarray[-1]=5410013305002) #debug "\nI can even access it." #end #if (dumbarray[0]=5410013305002) #debug "\nThere is something very wrong here : dumbarray[0] should be uninitialized... But it is equal to dumbarray[-1]." #end #declare dumbarray[0]=4000581014320; // and this is the barcode of glasses-cleaning-tissues #debug "\nI just declared dumbarray[0] to some other value." #if (dumbarray[0]=4000581014320) #debug "\n...it worked." #end #if (dumbarray[-1]=4000581014320) #debug "\ndumbarray[-1] changed to that new value too." #end #debug "\nI wonder if I can declare dumbarray[-2] now that I have [-1] working" #declare dumbarray[-2]=5410013305002; // at least this does (not) work as expected /* Oooo,I could declare dumbarray[-1]. I can even access it. There is something very wrong here : dumbarray[0] should be uninitialized... But it is equal to dumbarray[-1]. I just declared dumbarray[0] to some other value. ...it worked. dumbarray[-1] changed to that new value too. I wonder if I can declare dumbarray[-2] now that I have [-1] working File: D:\POV\Bugs exploration\Array malloc.pov Line: 86 #debug "I wonder if I can declare dumbarray[-2] now that I have [-1] working" #declare dumbarray[-2] <----ERROR Parse Error: Negative subscript */ #break #end