> 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/

Reply via email to