General information
Category:
Coding, syntax & commands
I use numeric return codes from functions quite a bit and it helps with debugging and testing. This is very helpful for complex functions that have many exit points.
I use values > 0 for true and the value may be different to indicate which case the function returned a true value. The same for return codes that I interpret as .f. I have a couple of logging functions that I can turn on at design time or at runtime to show parameters passed and return codes to verify that the function is executing the way that I thought it would.
If MYFUNCTION(parameterlist...) > 0
*!* returned .t.
else
*!* returned .f.
endif
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only