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;

Comments

  1. Ahem. Trunc(dvalue). Or round, so you make it explicit how the conversion is being performed.

    ReplyDelete
  2. That 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.

    ReplyDelete
  3. Some people might think that functions with Double work twice better ... ;)

    ReplyDelete

Post a Comment