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

Shift Operator in Build 1001

Unread post by Martin Meyer »

Hello Thomas,

thank you very much for providing service build 1001!

Updating my code to it I found that the shift operator behaves differently now. I suppose it is not intended:

Code: Select all

clauses     run() :-         N = 4 * 8,         hasDomain(unsigned64, U64),         U64 = 1 << N,         stdIo::write(U64).
In the new build it outputs 0, but in build 1000 it had output a nonzero number. It seems the calculation is done now in the unsigned numbers rather than in unsigned64.
Regards Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1254
Joined: 28 Feb 2000 0:01

Re: Shift Operator in Build 1001

Unread post by Thomas Linder Puls »

I did solve this problem, but the solution has mistakenly been reverted. I have solved it again.

As a workaround use:

Code: Select all

U64 = hasDomain(unsigned64, 1) << N,
Regards Thomas Linder Puls
Post Reply