Re: Unsigned Long Native Type
Posted: Sat Jun 18, 2016 11:27 am
what do you mean by that? without an assignment operator everthing just gets casted to integer (in most cases i think) so the (a-1) in the if does not respect the type of a.Keya wrote:ps. Purebasic is able to automatically handle conversion between signed/unsigned BYTE (.a/.b) and WORD (.w/.u), no casting required, so if it can already do such seamless conversions with 8 and 16bit i dont understand why the same approach cant be extended to 32bit![]()
Code: Select all
a.a = 0
b.b = 0
Select 3
Case 1
a-1
b-1
Debug a ; 255
Debug b ; -1
Case 2
Debug a-1 ; -1
Debug b-1 ; -1
Case 3
If (a-1)=255 And (b-1)=-1
Debug "x"
Else
Debug "got here"
EndIf
EndSelect