Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone know for sure?
Message
From
27/07/2001 01:35:21
 
 
To
27/07/2001 01:28:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00536211
Message ID:
00536216
Views:
10
>>...if VFP is guaranteed to execute clauses left-to-right so constructs like
if requery('MyView')=1 AND reccount('MyView')>0
>>...
>>endif
will work "as expected"?
>
>Yep. This is called short-circuiting, and it's a feature that you can count on. (You can't in VB and many other languages).

Yeah, I know, that's why I asked for VFP. Can you point to some MS documentation that explicitly states this?

...not trying to cast aspersions, I believe you and IME I've never seen it work any other way.

As a general rule I always use an alternate construct like
IF REQUERY("MyView") = 1
  IF RECCOUNT("MyView") > 0
    ...

  ENDIF

ENDIF
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform