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

Click here to load this message in the networking platform