>> 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).

I am definitely NOT trying to change it's value. That is the problem, that
the value is changing but it should not be.

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

I am checking "number_of_rows" outside the function, and "rows" inside the
function. I check it this way:

StrPrintF(string_variable, "%d", rows);
FrmCustomAlert(my_alert, string_variable, " ", " ");

Tom


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