Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numerical versus logical
Message
From
05/02/2002 07:56:46
 
 
To
04/02/2002 17:46:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615128
Message ID:
00615364
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform