What do you mean by "57600 returns 0, 38400 returns 4096" etc. ? You aren't
really indexing into this array using those values e.g:
doSomethingWith(baudRate[57600]);
Are you?
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
"David Leland" <[EMAIL PROTECTED]> wrote in message
news:47767@palm-dev-forum...
>
> I have an array defined as follows:
>
> static UInt16 baudRate[] = {
> 115200,
> 57600,
> 38400,
> 28800,
> 19200,
> 14400,
> 9600,
> 4800,
> 2400,
> 1200,
> 600,
> 300
> };
>
> 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. 57600
returns
> 0, 38400 returns 4096, 28800 returns 0, 19200 returns 44152, 14400 returns
> 0, 9600 returns 127, 4800 returns -5177343, 2400 returns 291908, 600
returns
> 250446, 300 returns 259140 and 115200 and 1200 both return a number that
is
> either greater than or less than the value that can be stored in a UInt16.
>
> When I look at the array in debug, it has the correct values but if I try
to
> do anything with it (i.e. write the values to a list), the values are
always
> wrong.
>
> I know that this same problem was reported by someone else back in Nov.
2000
> (using g++) and no one came up with an answer. Well, this just has me
> stumped and I would sure appreciate it someone could tell me what was
going
> on, or at least where to go to find out the answer.
>
> Dave
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/