Mike,

I'm just curious - what version of CodeWarrior (assuming that's what you
use) are you running?  I am seeing some very strange things happen in CW
7 with calculations.  Most noteably, I'm having to typecast numbers
(#defines and actual values) used in calculations.  I'm not sure if it's
some setting or something, but I've got some very weird stuff happening
here.

DeAnna

-----Original Message-----
From: Mike McCollister [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 8:59 AM
To: Palm Developer Forum
Subject: RE: Why does mod crash my palm?


Strange, but it seem to be working now.  All of my
variables in my original code were either UInt16 or
Int16 so there was no 32-bit issues.

I guess that this is a non-issue now.

Thanks everyone for your help and comments.

Mike McCollister

--- Shoeb <[EMAIL PROTECTED]> wrote:
> I ran the code on my emulator & it worked. Can it be
> because u r not
> initializing the variables ?
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]]On
> Behalf Of
> Srinivas
> Sent: Tuesday, June 05, 2001 2:16 AM
> To: Palm Developer Forum
> Subject: Re: Why does mod crash my palm?
> 
> 
> hi,
>   Make i and bigVal as UInt32 and try it out.
> 
> srini
> 
> --- Mike McCollister <[EMAIL PROTECTED]>
> wrote:
> > Here is a strange thing that crashes my Palm:
> >
> > #define NUM_THINGS 12
> > UInt16  bigVal;
> >
> > void fn(void)
> > {
> >    Int16 i;
> >
> >    // stuff done here to calculate i
> >
> >    bigVal = i % NUM_THINGS;  // crashes here
> >
> >    // however this works but only if i is not too
> > big
> >    bigVal = i;
> >    if(i >= NUM_THINGS)
> >       bigVal = i - NUM_THINGS;
> >
> >    // stuff done here
> > }
> >
> > Any ideas on why?
> >
> > Thanks,
> >
> > Mike McCollister
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> -
> > only $35
> > a year!  http://personal.mail.yahoo.com/
> >
> > --
> > For information on using the Palm Developer
> Forums,
> > or to unsubscribe, please see
> http://www.palmos.com/dev/tech/support/forums/
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail -
> only $35
> a year!  http://personal.mail.yahoo.com/
> 
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe,
> please see
> http://www.palmos.com/dev/tech/support/forums/
> 
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to