Jump to content

Even or odd: Difference between revisions

m
Line 2,702:
Binary.Add take any numeric type, but value from newer versions can trait as unsigned with range of 0 to 0xFFFFFFFF (so if the number is out of this range, a cut made).
 
Print binary.and(0xFFFFFFF+10, 0XF)=9 // 0xFFFFFFFF is type Currency and return 4294967295, number 10 is type double so the final number for addition is type double.
 
Print binary.and(0xFFFFFFF&+10, 0XF)=9 // 0xFFFFFFFF& is type long and return -1, number 10 is type double so the final number for addition is type double.
 
Print binary.and(0x7FFFFFFF&*16&+10&, 0xF)=15 // 0x7FFFFFFF&*16& cant fit in long so it is type of double 34359738352 (this performed automatic). But if we give this Long A=0x7FFFFFFF&*16& we get an overflow error, because A is a Long, and 34359738352 can't fit.
 
So Mod if a perfect choice, using it with Decimals (character @ indicate a Decimal type or literal).
404

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.