[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Bitwise not operator.



I've done some further tests and the following fragment :-

  $a = hex("FFFFFF00");
  printf "%X %X\n", $a, ~$a;

  $a = 0xFFFFFF00;
  printf "%X %X\n", $a, ~$a;

returns 

  FFFFFF00 FF          ! Correct
  FFFFFF00 7FFFFFFF    ! Wrong

So I at least have a workaround with hex() to use,
even if 0xffffff00 does not work as a C programmer 
might expect it to!

(This is macPerl 5.0.7 now)

End of story.

--------------------------------------------------------------------------------
Roger Hill                                        aka roger@aeg-post.demon.co.uk

Call this a sig....:-?