You are exceeding the capacity of an "Int16". A 16-bit signed integer will only support -32,768 to 32,767. You could either go to CW8's debug settings and under 68K processor click 4-byte ints(make sure to redefine p as int p, not Int16 p) which will give you (2^32) / 2 positive and negative or simply go to a larger integer data type like Int32.
Anyone know of a reference (I didnt see in API/companion/targeting palm) that lists all the basic palm os data types with their limits? The "targeting palm" document has the integer data types but doesn't list the official palm names perse like "Int32". I also checked things like limits.h and climits, and really didn't see what I was looking for. I suppose this might be common sense, but a complete accepted list, including other(not just integer) data types might be useful. Thanks. Keith M ----- Original Message ----- From: "Sebastian from Berlin/Germany" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 2:43 AM Subject: calculation goes wrong ... > > Hey, > > if i run the following code: > > Int16 count[6]; > char counterlabel[40]; > Int16 p, all,allcards; > > count[1]=2000; > p=(100*count[1]); > StrPrintF (counterlabel,"Box 1 - %d cards (%d %%) - %d", > count[1],p,count[1]); > > i get a counterlabel = "Box 1 - 2000 cards (3392 %) - 2000" > > Why the hell 3392??? I thought about 200000 ... > > > Thank you > Greets > Sebastian > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/