0 Replies Latest reply on Oct 15, 2010 9:52 AM by userc_40597

    How to get good signed result?

      int hdata,hdataprev;
      char factor = 0x03
      if(hdata > (hdataprev + (int)factor)){
      do A
      do B
      if hdata is like 0xFF0A and hdataprev like 0xFF00 , then everything is OK - code A is executed
      when hdata is 0x00AA and hdataprev like above(0xFF00) then code B is executed instead of code A (Positive 0x00AA is greater than negative 0xFF00).
      Isn't it?