Request: CTYPE and CARRAY

BlitzMax Forums/BlitzMax Programming/Request: CTYPE and CARRAY


This is where varptr comes in which is mainly for communication with C/ASM and not for BM internally as it bypasses the GC.


Not sure what you are stating here? This argument has nothing to do with the GC. varptr provides a memory reference to an instance of a variable, and has little to do with the GC. Arcadenut is absolutely write, and an excellent example of where this applies only to bmax, and not about interfacing to external modules.

Let me state again. For an array based object type, blitz max stores them as an array of pointers.
Type vert3
  Field x:Double
  Field y:Double
  Field z:Double
End Type

Local verts:vert3[100]


"An array is a collection of similar elements stored in adjacent memory locations". This is not an array of vert3s. If you do not understand what an array of pointers is, what an array of struct's is, and how they differ in implementation, you will not understand why this is such an important feature.

Let me try to clarify for you, that this is not a major language feature, per se, as bmax syntactically already has a 'structured type'. "Type" fulfills this need.
This is a compiler and runtime implementation detail, so the impact on all of you coders should be very minimal from a language point of view, but major for those that need it.

I feel this argument is closed. I was only trying to help those who lack the technical expertise to understand what the implementation details were. Mark has already responded and decided to look into this, as he too understands this issue.

Cheers,

Stu