Neh,
I see what the problem was,
I was just dreaming.
Some other code look the same but did a shr 3.
Like so:
Bla := (vComponentsRemaining * 10 + vComponentsCompressed * 2) shr 3;
Then I pointed mouse cursor at Bla.
And the debugger hint showed something.
I forgot it was already divided by 8 ! HA !
So when I tried to figure out if it was working I was again dividing it by
8
in my head/calculator.
Which was ofcourse wrong. Hehe ! Funny debugging mistake ! ;) :)
It seemed a bit unlikely that it was always precisely div 8 and no
remainder, but apperently so far no remainders hihihi.
Bye,
Skybuck.
"Skybuck Flying" <BloodyShame@[EMAIL PROTECTED]
> wrote in message
news:8b170$48178a39$541983fa$5512@[EMAIL PROTECTED]
> Oh it didn't make any sense anyway since the calculation couldn't
possibly
> be interpreted as a boolean value so that tipped me off.
>
> Something else must be happening.
>
> Euhm maybe I am just dreaming.
>
> Ok back to inspection.
>
> (This example works just fine)
>
> program Project1;
>
> {$APPTYPE CONSOLE}
>
> uses
> SysUtils;
>
> var
> vComponentsRemaining : longword;
> vComponentsCompressed : longword;
> begin
> try
> vComponentsRemaining := 10;
> vComponentsCompressed := 11;
>
> if (vComponentsRemaining * 10 + vComponentsCompressed * 2) and 7 > 0
then
> // mod 8
> begin
> writeln('add one more byte.');
> end;
>
> if (vComponentsRemaining * 10 + vComponentsCompressed * 2) mod 8 > 0
then
> // mod 8
> begin
> writeln('add one more byte.');
> end;
>
> { TODO -oUser -cConsole Main : Insert code here }
> except
> on E:Exception do
> Writeln(E.Classname, ': ', E.Message);
> end;
> readln;
> end.
>
> Bye,
> Skybuck.
>


|