Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numerical versus logical
Message
From
05/02/2002 09:00:21
 
 
To
04/02/2002 21:50:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615128
Message ID:
00615416
Views:
19
>Robert,
>
>One would think that a failure from a UDF would trigger an Error Routine based on a defined error number... therefore I would return a logical >after< the Error is triggered... seems to me a UDF which returns a 'value' by default would return, for instance, a '0' if the process failed for some logical reason (like trying to deduct an order item from an inventory when there is nothing in the inventory)... etc...
>
>M2cents....
>
>Ric

Many low-level functions use 0 as successful & non-zero as failure, with different non-zero values for each error.

This view inverts the way you look at the return value, rather than returning success/failure as .T./.F., what is being returned is an error code, where 0 means "no error".
Len Speed
Previous
Reply
Map
View

Click here to load this message in the networking platform