Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numerical versus logical
Message
De
05/02/2002 07:56:46
 
 
À
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:
00615364
Vues:
20
Hi Robert

>I would like to know where do you stand on using logical versus numerical variables .

Within VFP I don't think it really matters one way or the other. I like to use logical values for return because you can then include them in IF conditions...
IF Myfunc()
  *** Do something
ELSE
  *** Something else
ENDIF
However, as you as you say, it is sometimes nice to be able to return more detailed values and I have used -1 (Error), 0 (False) and 1 (True) successfully too. When you start looking outside VFP you will realize that most servers do not implement Logical values as VFP does, and you are forced to use numeric values anyway.

So I really odn't think it matters one way or the other. Use whatever suits your personal needs and style.
----
Regards
Andy Kramek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform