VO conversion - PTR issue
Posted: Wed Nov 01, 2017 9:16 pm
I'm testing our converted VO application. It is using VO dialect, and I am on v1.03.
Here is an example method:
METHOD AgtStmtHdr(iPage, nPageCnt, dVdate, lFinal)
.
.
.
.
IF iPage != 0
.
.
ELSE
.
.
ENDIF
iPage++
.
.
.
.
RETURN
A calling method look something like this:
METHOD Execute()
LOCAL page as INT
.
.
.
page := 0
SELF:AgtStmtHdr(@page,@nPageCnt,dVdate,lFinal)
.
.
.
RETURN
When I run it, it would crashed on line, "IF iPage != 0". The error is "Value does not fall within the expected range". In VO iPage (inside AgtStmtHdr) is 0, but while debugging in X#, I see a big number like 19745096 (PTR), but if I expand it, I see something like 0x01a781c for the "value".
My focus is to fix issue with iPage. The same fix would apply to nPageCnt.
I resolved one small class with same issue by creating a protected variable for the page and use it, instead of passing it as a parameter.
Anyone run into similar issue and what is the best way to correct it? Is there a way to correct the codes inside AgtSmtHdr method? I'm trying to minimize the amount of changes as much as possible.
Thanks,
Boonnam
Here is an example method:
METHOD AgtStmtHdr(iPage, nPageCnt, dVdate, lFinal)
.
.
.
.
IF iPage != 0
.
.
ELSE
.
.
ENDIF
iPage++
.
.
.
.
RETURN
A calling method look something like this:
METHOD Execute()
LOCAL page as INT
.
.
.
page := 0
SELF:AgtStmtHdr(@page,@nPageCnt,dVdate,lFinal)
.
.
.
RETURN
When I run it, it would crashed on line, "IF iPage != 0". The error is "Value does not fall within the expected range". In VO iPage (inside AgtStmtHdr) is 0, but while debugging in X#, I see a big number like 19745096 (PTR), but if I expand it, I see something like 0x01a781c for the "value".
My focus is to fix issue with iPage. The same fix would apply to nPageCnt.
I resolved one small class with same issue by creating a protected variable for the page and use it, instead of passing it as a parameter.
Anyone run into similar issue and what is the best way to correct it? Is there a way to correct the codes inside AgtSmtHdr method? I'm trying to minimize the amount of changes as much as possible.
Thanks,
Boonnam