Re: calculation goes wrong ...

2002-10-10 Thread Ben Combee
>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 >

Re: calculation goes wrong ...

2002-10-10 Thread Keith Monahan
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

RE: calculation goes wrong ...

2002-10-10 Thread Agus Silas
orum Objet : Re: calculation goes wrong ... Once you fix the Int16 issue, I think (I am pretty sure) you will still need to change your %d formatter to %ld to get the complete 32 bit value to format correctly. I ran in to this problem when using the %x formatter without the 'l' modifie

Re: calculation goes wrong ...

2002-10-10 Thread Brad Figler
Once you fix the Int16 issue, I think (I am pretty sure) you will still need to change your %d formatter to %ld to get the complete 32 bit value to format correctly. I ran in to this problem when using the %x formatter without the 'l' modifier. Brad "Sebastian from Berlin/Germany" <[EMAIL PROTE

Re: calculation goes wrong ...

2002-10-10 Thread Henk Jonas
Hi Sebastian, isn't p a bit too small to hold your 20? 16 bit -> 65364 (I did know the exact value in my ZX Spectrum times) if you treat it as unsigned. Henk (from Berlin too) Sebastian from Berlin/Germany wrote: > > Hey, > > if i run the following code: > > Int16 count[6]; > char coun

Re: calculation goes wrong ...

2002-10-09 Thread kcorey
On Thu, 2002-10-10 at 07:43, Sebastian from Berlin/Germany wrote: > > 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,coun