Hi all Get link Facebook X Pinterest Email Other Apps - May 04, 2018 Hi all,if I have an integer num set to 0, then "not num" should return 1, right?Delphi returns -1Is this correct? Get link Facebook X Pinterest Email Other Apps Comments Uwe RaabeMay 4, 2018 at 10:00 AMWhat about: Result := 1 - num?ReplyDeleteRepliesReplyJohn KouraklisMay 4, 2018 at 10:03 AMUwe Raabe Yes that was my next thought. Thanks :-)ReplyDeleteRepliesReplyDavid HeffernanMay 4, 2018 at 11:10 AMThat not is a bitwise operation. Pascal overloads the operators. So not can be bitwise or boolean depending on the context. A bit confusing.The operator you look for is probably xor. That's the bit flipper.ReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
What about: Result := 1 - num?
ReplyDeleteUwe Raabe Yes that was my next thought. Thanks :-)
ReplyDeleteThat not is a bitwise operation. Pascal overloads the operators. So not can be bitwise or boolean depending on the context. A bit confusing.
ReplyDeleteThe operator you look for is probably xor. That's the bit flipper.