I am using Powerbuilder 12.5. The problem is that I send null into a function but inside the function, the parameter variable contains a number like 12 or 16.
This problem shows up when all 3 of these are true:
I can make the problem go away if I first save the value inside a variable. For example:
ll_dormant = tab_2.tabpage_comp_info.dw_webcomp_info.object.dormant[i]
of_testingnullarg( ll_dormant )
I use if statements and the isNull() and messageBox() functions to test the value before I call the function. Then, inside the function I do the same to test the value of the parameter. When I am passing a non-null value of course I do not see a difference between passed argument and the function's parameter. But when the control holds a null that it read from my database table, then the parameter is not null. Unfortunately, it holds a very believable number for my application and is consistently the same number. I think a pointer on the call stack must be a couple bytes off. Just a theory. I don't know why it doesn't happen when I run inside the IDE.
I am passing by value. The datawindow says the type of dormant is long. My function's parameter type is also long.
Any ideas? Can others reproduce this?