I said I wouldn't return to this subject, but I cannot help myself. Let me make my final fevered pitch for .ub and .uw...
1. First, there's something missing, an equivalent of the standard .BYTE structure but then for unsigned characters (yes, I know, I can easily build one myself, but that's not the point here).
Code: Select all
x.b = 247
*a = @x
Debug *a\b
;
y.a = 247
*a = @x
Debug *a\b
2. Now if .a stands for 'ascii' then one would assume something like this should work...
Code: Select all
; not looking as nice (though it doesn't work anyway as there's no .ASCII struct :-))
;
*a.BYTE
a.b = 1
*a = @a
Debug *a\b
;
*b.ASCII
b.a = 2
*b = @b
Debug *b\a
Not that it works but it's only to illustrate

I think the *b.ASCII is rather misleading, as it has nothing to do with ASCII but only with unsigned bytes. But, if .a stands for 'Ascii' then it would make sense to call the build in structure .ASCII... brrr.
3. Looking better. (Sorry, couldn't help myself

)
Code: Select all
; looking better
;
*a.BYTE
a.b = 1
*a = @a
Debug *a\b
;
*b.UBYTE
b.ub = 2
*b = @b
Debug *b\ub
In this proposed syntax it is much clearer what is intended. It's readable. Please compare that with the syntax above under 2.
I know it's up to the devs to decide on this and that I'll probably have to live with it

but still, before 4.40 goes final, this may be the right time to suggest such a change before its too late. I admit it's not essential, it just looks a lot better...
<Edit 1>
Nco2k just added his own wish here
http://www.purebasic.fr/english/viewtopic.php?t=38657 which I think also illustrates the confusion this naming scheme may cause.
<Edit 2>
My final comment: I abosulutely *love* access to unsigned bytes! And I guess for many of the users that has little to nothing to do with the fact that Ascii characters fit in an unsigned byte...