04-25-2023, 04:16 PM
Honestly, I wouldn't want to see it implemented as a double-bit type just for the havoc that it could put on already existing code.
IF m.TYPE AND 1 THEN 'It's one byte
...
ELSEIF m.TYPE AND 2 THEN 'It's two bytes
...
ELSEIF... 'check the other types
You'll see a lot of code written in the above syntax, and a Type 3 type would fall into both categories, throwing that existing code off. Instead, I'd rather stick to the documentation that has existed for mem's syntax since the swap from SDL to GL, and honor the "Note: If a future integer, float or other type doesn't have a size that is 1,2,4,8,16,32,64,128 or 256 it won't have a size-bit set."
I'd give it a TYPE value of 0 for size (undefined by our existing syntax rules), but then mem.ELEMENTSIZE could still easily define it as being 3 bytes in size. Such a change then shouldn't break anything that exists now, I wouldn't think, and if it did, it would probably be the smallest of changes needed to update the user's code so that the end of their code doesn't end in ELSE .... 'It's a float (or whatever other else logic that have which didn't take in a 0 value return as a possibility for size).
IF m.TYPE AND 1 THEN 'It's one byte
...
ELSEIF m.TYPE AND 2 THEN 'It's two bytes
...
ELSEIF... 'check the other types
You'll see a lot of code written in the above syntax, and a Type 3 type would fall into both categories, throwing that existing code off. Instead, I'd rather stick to the documentation that has existed for mem's syntax since the swap from SDL to GL, and honor the "Note: If a future integer, float or other type doesn't have a size that is 1,2,4,8,16,32,64,128 or 256 it won't have a size-bit set."
I'd give it a TYPE value of 0 for size (undefined by our existing syntax rules), but then mem.ELEMENTSIZE could still easily define it as being 3 bytes in size. Such a change then shouldn't break anything that exists now, I wouldn't think, and if it did, it would probably be the smallest of changes needed to update the user's code so that the end of their code doesn't end in ELSE .... 'It's a float (or whatever other else logic that have which didn't take in a 0 value return as a possibility for size).