Blitzarrays
Archives Forums/Blitz3D Bug Reports/Blitzarrays| 
 | ||
| I love them: Data 0,0,0,0 Data 0,0,0,4 Data 0,0,0,8 Data 0,0,0,12 Data 0,0,0,16 Local a[4] Read a For count=0 To 4 Print a[count] Next WaitKey or try Local a[10] Print Str(a) End :) | 
| 
 | ||
| How is that a bug? | 
| 
 | ||
| It's a bug because the array is misused but Blitz3D doesn't catch the error. Data 5 Local a[0] Read a ; wrong, but compiler doesn't notice a = 5 ; similar error does get caught | 
| 
 | ||
| Data 0,0,0,0 Data 0,0,0,4 Data 0,0,0,8 Data 0,0,0,12 Data 0,0,0,16 Local a[4] Read a For count=0 To 4 Print a[count] Next WaitKey This gives me very strange numbers (but no error): 9961472 35788945 1 31 29426952 The big numbers are different each time, except the "1" and "31", they stay the same. Local a[10] Print Str(a) End This gives me MAV on the "Print Str(a)" line (v1.98). | 
| 
 | ||
| i think the Data-thing just reads any memory. got an 1 and a 31, too. Str() normally ignores type-converting errors for: t.mytype=New mytype t\lol=3 t\haha$="cool" Print str(t);Prints [3,"cool"] |