UPDATE:
FYI: This works:
boolean lb_valid
string ls_column
lb_valid = IsNull (adw_object)
IF (NOT (lb_valid)) THEN RETURN // <--- the lb_valid value is FALSE at this point, as it should be.
lb_valid = IsValid (adw_object)
IF (NOT (lb_valid)) THEN RETURN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PowerBuilder 2019R3, b2703
Windows 10, 64 bit platform
This bit of ancient code is failing because the return value of the ISNULL function is TRUE instead of FALSE, as it shoudl be.
Note that PowerBuilder's IDE in debug mode recognizes that the object is NULL. I hovered the mouse over the variable before taking the screen shot.
Is there something I can do to correct this?
Thanks!
Failure to test for ISNULL before testing for ISVALID can lead to an application abend.
The PFC has worked well for decades. But then again, the inline ISNULL worked for decades as well; but in my case in at least one example it no longer works. See the image for proof. I am in the process of replacing in-line code with separate ISNULL and ISVALID checks as I run into issues and as I see instances where inline code exists.
Maybe I should start going through my version of the PFC..... it won't hurt and might prevent failures in the future. But being utterly swamped, I'll probably just leave everything alone and fix it only if the abend occurs elsewhere. :/