Can anyone explain why in the following piece of code, the message statement ("my my-int function DOES NOT behave as I'd expect") is executed?
Code:
def var v-char as char no-undo.
def var v-int as int no-undo.
function my-int returns int (input v-char as char):
def var v-int as int no-undo.
v-int = int(v-char) no-error.
if error-status:error then
return error.
else
return v-int.
end function. /* my-int */
/* using Progress' function */
v-char = "a".
v-int = int(v-char) no-error.
if error-status:error then
message "progress' int function behaves as I'd expect" view-as alert-box.
/* using my function - why doesn't it behave the same??? */
v-char = "a".
v-int = my-int(v-char) no-error.
if error-status:error then
message "my my-int function behaves as I'd expect" view-as alert-box.
else
message "my my-int function DOES NOT behave as I'd expect" view-as alert-box.