Pointer to Part of an Array

BlitzMax Forums/BlitzMax Beginners Area/Pointer to Part of an Array

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

BM arrays are objects not continous int / float blocks.

Are you sure? That's not been my experience. Object Arrays are just an array of pointers, yes, but int and float arrays appear to be a block of contiguous memory. Granted you have to point inside the array ( Array[0] or Array[0,0] ) but the data does appear to be contiguous.

Proof of Concept:

Global IntArray:Int[,]=New Int[101,101]

Local B:Byte Ptr=Varptr(IntArray[50,50])
Print IntArray[50,53]
B[12]=2
Print IntArray[50,53]