Bitwise not Topic is solved

Discuss the future of the AutoHotkey language
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Bitwise not  Topic is solved

31 Jan 2015, 20:44

[Update by Lexikos: v2.0-a083 changes bitwise-not to always treat the number as 64-bit.]
Bitwise-not (~): This inverts each bit of its operand. If the operand is a floating point value, it is truncated to an integer prior to the calculation. If the operand is between 0 and 4294967295 (0xffffffff), it will be treated as an unsigned 32-bit value. Otherwise, it is treated as a signed 64-bit value. For example, ~0xf0f evaluates to 0xfffff0f0 (4294963440).
I think that starting V2 Bitwise not should always treat the operand as a signed 64 bit value.
Last edited by lexikos on 19 Jun 2020, 19:41, edited 1 time in total.
Reason: update
Recommends AHK Studio
lexikos
Posts: 9599
Joined: 30 Sep 2013, 04:07
Contact:

Re: Bitwise not

31 Jan 2015, 21:04

Why?
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Bitwise not

31 Jan 2015, 21:20

I expected bitwise not to do exactly that in V1 already since I think that AHK Integers are mostly treated as 64 bit integers.
To me it would be easier to understand, or rather it seems more consistent.
Recommends AHK Studio

Return to “AutoHotkey Development”

Who is online

Users browsing this forum: No registered users and 30 guests