Does StrIToA handle an Int32?
Have you tried setting a breakpoint and looking at the array?
Don't pass NULL in your alert, use " " (quotes with a space or nothing).
----- Original Message -----
From: "David Leland" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 9:28 AM
Subject: Re: Strange behavior with static arrays in CW7
> Okay. Here's the code. What I meant by "do something" was whenever I try
> to access the values of the array.
>
>
> 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.
>
> Is this weird or what?
>
> Dave
>
> Steve Mann <[EMAIL PROTECTED]> wrote in message
news:47781@palm-dev-forum...
> >
> > >However, when I try to do something with these array values, I don't
get
> the
> > >values listed in the array but instead get different values.
> >
> > This is a pretty vague statement. Unless you show us the code where
> > you are trying to "do something", I don't think anyone can be of much
> > help.
> >
> > Regards,
> > Steve Mann
> > --
> > -------------------------------------------
> > Creative Digital Publishing Inc.
> > 1315 Palm Street, San Luis Obispo, CA 93401-3117
> > -------------------------------------------
> > 805.784.9461 805.784.9462 (fax)
> > [EMAIL PROTECTED] http://www.cdpubs.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/