Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numerical versus logical
Message
De
05/02/2002 09:00:21
 
 
À
04/02/2002 21:50:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00615128
Message ID:
00615416
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform