Discussions related to Visual Prolog
Martin Meyer
VIP Member
Posts: 356
Joined: 14 Nov 2002 0:01

Bit operators in 32bit-mode

Post by Martin Meyer »

Hello Thomas,

please have a look a this in 64bit- vs. 32bit-mode (in VIP build 1112):

Code: Select all

class predicates     oldStyle : (unsigned64 X) -> unsigned64 Mask. clauses     oldStyle(X) = bit::bitNot(bit::bitRight(X, 1)).   class predicates     newStyle : (unsigned64 X) -> unsigned64 Mask. clauses     newStyle(X) = ~~(X >> 1).   clauses     run() :-         hasDomain(unsigned64, X),         X = 0,         stdIO::write(toBoolean(oldStyle(X) = newStyle(X))).
It outputs true in 64bit-mode but false 32bit-mode.
Regards Martin