Why does this work?

BlitzMax Forums/BlitzMax Programming/Why does this work?

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.

Perhaps it MAVs, perhaps not. But your data will for nearly sure be bogus, because you have to know why you do such trash in your code, not Windows.
Which means: don't write on references you haven't initialized or be aware that you are doing something highly critical (and stupid)

Windows will throw a MAV if you try to access / modify data that does not exist (after file load) or which you aren't allowed to access (kernel memory and protected memory, as well as trying to access your apps code in memory which is forbidden as well)

As mentioned above: Use debug mode, this will show you all errors.
And step back from using Ptr within BM. They exist, but they are not the prefFered nor the stable way of using BM. References are similar to pointers, but they are type safe and managed and thus will never lead to problems like the one were are actually talking about here.
Thats something thats more or less a C++ hacker problem (hacker because one thats programs this way in C++ can't be seen as a programmer even on noobish level)