Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NOT vs ELSE
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00157136
Message ID:
00157174
Views:
19
>It does bring to mind the following, but I'm not totally sure that it would still apply. This is from something I read sometime ago. In constructing an IF < lexpr1> OR < lexpr2 >, it's a good idea to place the condition that evaluates to .T. (if known) the greater amount of times first. This is because, the second condition only is evaluated when the first is .F. Placing the lesser condition first will require a greater number of comparisons of both expressions.
>
>Like I said, this was sometime ago, so I don't know (and haven't tested) if it still applies. I believe, however, that it probably does.

Yes... it still works that way... also, with AND expressions, once a .f. is hit, it stops evaluating the expression... this is why you can do...

if vartype(oObject) = "O" and oObject.Property = whatever

If the first half is .f., and it DID try to eval the next expression, you would get an Object Not found.

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform