Are there any compiler options that might affect arrays? Dave Richard Burmeister <[EMAIL PROTECTED]> wrote in message news:47893@palm-dev-forum... > > > From: David Leland > > > > static Int32 baudRateTable[] = > > {115200,57600,38400,28800,19200,14400,9600,4800,2400,1200,600,300}; > > Char* string; > > Int16 index; > > > > index = 1; > > string = MemPtrNew(20); > > StrIToA(string, baudRateTable[index]); > > FrmCustomAlert(DebugAlert, string, NULL, NULL); // (DebugAlert > > is simply an > > alert with only "^1" in it.) > > MemPtrFree(string) > > > > If index is 1, DebugAlert displays a 0. If it's 2, 4096 is > > displayed. etc. > > > > I ran your code and it works as I expected: > > index display > ===== ======= > 0 115200 > 1 57600 > 2 38400 > 3 28800 > etc. > > You must have mangled something else in your project. > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
- Re: Strange behavior with static arrays in CW7 Jeff Collins
- RE: Strange behavior with static arrays in CW7 Richard Burmeister
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 Steve Mann
- Re: Strange behavior with static arrays in CW7 Richard M. Hartman
- Re: Strange behavior with static arrays in CW7 David Leland
- RE: Strange behavior with static arrays in CW7 Richard Burmeister
- Re: Strange behavior with static arrays in CW7 Dave Lippincott
- RE: Strange behavior with static arrays in CW7 Richard Burmeister
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 Keith Rollin
- Re: Strange behavior with static arrays in CW7 Ben Combee
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 David Leland
- Re: Strange behavior with static arrays in CW7 Craig Torell
- Re: Strange behavior with static arrays in CW7 Marshall Clow
- RE: Strange behavior with static arrays in CW7 Richard Burmeister
- Re: Strange behavior with static arrays in CW7 Richard M. Hartman
