From: "Thomas Ward" <[EMAIL PROTECTED]>
> I have a variable:
> Int16 number_of_rows;
> which I use like this:
> number_of_rows = TblGetNumberOfRows(my_table);
> // check the value of ROWS (1)
> my_func(..., ..., number_of_rows, ..., ...);
> // check the value of ROWS (4)
> to call this function:
> static void my_func (..., ..., Int16 rows, ..., ...) {
Since you declare rows in my_func (Int16 rows), any changes you make to it
are local to the function. If you want to change the value of rows inside
the function, pass in a pointer (Int16 *rows).
How are you checking the value of rows? Are you testing the value of "rows"
or "number_of_rows"? Are you using the debugger in CodeWarrior? If so, you
have to turn off all optimizations or you can't count on it reporting the
correct value of any variables.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/