Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numerical versus logical
Message
From
05/02/2002 11:47:01
 
 
To
04/02/2002 17:46:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615128
Message ID:
00615548
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
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
Map
View

Click here to load this message in the networking platform