• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: int and short int on intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: int and short int on intel


  • Subject: Re: int and short int on intel
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 11 Jan 2007 19:17:34 -0700


On Jan 11, 2007, at 7:12 PM, Jonathan Fewtrell wrote:

The problem I am having is that, on intel machines, if scale exceeds a certain value (which I think is 32k), scale1 or scale2 is set to a different value. It appears that either FF FF or 00 01 gets substituted for the first two bytes. It seems to be something to do with 2 byte and 4 byte ints.

I get a compiler warning that there is more than one method called - scale (apart from the ones in JF1 and JF2). The other is in NSDecimalNumber and is a short int. I assume this is leading to the problem, but I don't see why.

The maximum number that can fit into a short int is 2^15-1, or 32767. So you're probably overrunning a buffer with that short int.


Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >int and short int on intel (From: Jonathan Fewtrell <email@hidden>)

  • Prev by Date: int and short int on intel
  • Next by Date: Re: int and short int on intel
  • Previous by thread: int and short int on intel
  • Next by thread: Re: int and short int on intel
  • Index(es):
    • Date
    • Thread