Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single exit-point
Message
 
To
03/04/2002 10:18:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00640316
Message ID:
00640360
Views:
21
>Thanks; I find this an interesting alternative, but in many cases (it seems to me) the steps can NOT be coded into a single expression that returns .T. or .F. For instance, I do a SELECT - SQL, and want to check that exactly one record was found (_tally = 0).

Ok, my code assumes, that you either have an expression directly in the CASE or that you put each step in a separate function or method. If you want to have use other return values than .T.|.F., you can also do that:
DO CASE
   CASE (DoFirstStep() = 0)
      llSuccess = .F.
   CASE (x <> y)
      llSuccess = .F.
   CASE NOT THIS.DoThirdStep()
      llSuccess = .F.
   OTHERWISE
      llSuccess = .T.
ENDCASE

*-- Clean up

RETURN llSuccess
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Previous
Reply
Map
View

Click here to load this message in the networking platform