var
var
dValue: double;
iErr: integer;
begin
if (dValue and $4)=$4 then --> get a error "Operator not applicable to this operand type" when i Compile it ??????????
Home := True
else
Home := False;
end;
dValue: double;
iErr: integer;
begin
if (dValue and $4)=$4 then --> get a error "Operator not applicable to this operand type" when i Compile it ??????????
Home := True
else
Home := False;
end;
Ahem. Trunc(dvalue). Or round, so you make it explicit how the conversion is being performed.
ReplyDeleteThat code looks properly whack to me. Is that double really a double? If so, why not an integer. The bitwise operation you're doing makes no sense to me on a floating-point type.
ReplyDeleteSome people might think that functions with Double work twice better ... ;)
ReplyDelete