@BRL - request: String indexing boundary checks

BlitzMax Forums/BlitzMax Programming/@BRL - request: String indexing boundary checks

Erm the -4 and -8 access is not only important to the C code but to many BM programmers as well.
I'm sorry, but could you please post some code showing this usage? Maybe you're talking about this:
Strict
Framework brl.blitz

Global Obj:TType = New TType
Local Pointer:Byte Ptr

Pointer = Byte Ptr Obj - 4 'access the object's reference counter

Local IntPtr Ptr = Int Ptr Pointer
WriteStdout "Object has " + ( IntPtr [ 0 ] & $7FFFFFFF ) + " reference(s)~n"

Pointer = Byte Ptr Obj - 8 'access the object's class

IntPtr = Int Ptr Pointer
WriteStdout "The class struct of the object's class is located at memory address " + IntPtr [ 0 ] + "~n"

Type TType
EndType
However the boundaries I request won't effect that code at all. The code above is indexing pointers, but I just want to have boundaries when indexing strings (and also only in debug mode).

P.S.: The code you posted above is not valid BMX-code, since you're trying to write to strings, however, once created, a string cannot be changed any more.