Hi,
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, ..., ...) {
// check the value of ROWS (2)
// do a bunch of stuff
// check the value of ROWS (3)
}
As you can see, I examine the value of number_of_rows in 4 different places.
On the 3.5 color debug ROM, the value:
1. before the call to my_func is 11 (which is what it should be)
2. at the beginning of my_func it is still 11
3. at the end of my_func it is still 11
4. after the call it is -258
Since the value is correct during my_func, it does what it should.
The next time the same code is executed, the value:
1. before the call to my_func is 11 (which is what it should be)
2. at the beginning of my_func it is -258
3. at the end of my_func it is still -258
4. after the call it is magically back to 11!!
Since the value is wrong during my_func, it yields incorrect results.
I do not get any error or warning messages from POSE while this is going on.
Now -258 is xFEFE, and I know that the Debug ROM fills certain areas of
memory with xFEFE in certain instances. I tried looking for information
about this on the Development Zone and eScribe, but couldn't find anything.
(By the way, is there a collected list of things the Debug ROMs do
differently somewhere? This would be a great reference to have!)
Everything works correctly on the Release ROMs.
So, is this a problem in the Debug ROM? Or is there something I need to be
doing differently in my code?
Thanks,
Tom
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/