hello,
If you multiply two unsigned shorts together, you'll get an unsigned short, or, 
if the number is to big, it'll overflow; you'll want to use an int.
Hope that helps somewhat,

Thanks,
Tyler Littlefield
email: [EMAIL PROTECTED]
web: tysdomain-com
Visit for quality software and web design.
skype: st8amnd2005

  ----- Original Message ----- 
  From: Pedro Izecksohn 
  To: [email protected] 
  Sent: Saturday, November 22, 2008 10:14 PM
  Subject: [c-prog] Re: integer promotions


  --- "Tyler Littlefield" wrote:
  > and you want... what exactly?

  I did not express myself well.

  Let me reformulate my question:

  --- "Paul Herring" wrote:
  > Here you're multiplying two shorts.

  What is the type of result of a multiplication of two unsigned short
  integers?

  In other words:

  Being:

  unsigned short int a, b;
  T result;
  //...
  result = (a*b);

  What should be the type T?

  When running my previous code the result is:
  Why fffffffffffe0001 != fffe0001 ?

  Is this result a compiler's bug?



   

[Non-text portions of this message have been removed]

Reply via email to