Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Going out of the unfinished program
Message
From
08/02/2001 11:07:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00473739
Message ID:
00474006
Views:
29
>Hi everybody,
>
>We have this situations. On the record level we cal a function, which has the same name, as a table+"Tr" at the end. Say, PropMstrTr.
>
>The syntax of this function is like this:
>
>lparameters pcField
>=Test1(parms)
>=Test2(parms)
>=Test3(parms)
>=Test4(parms)
>etc.
>return .t.
>
>If Test1 fails, it invokes another function (general), which logs info into LogTable, etc.
>
>Validation could be run in batch mode, or can run interactively using a form.
>The problem is, after Test1 fails, we want to return to a Form and don't run other tests. Do you know, how can we make it happen?
>
>My original suggestion was to use this syntax:
>Test1() and Test2() and etc. , but as I understand, in batch mode we want to perform all tests and log all errors. So, this idea would not work.
>
>The program itself should not care about modes, etc., IOW, code in the program should remain.

An ingenious idea from YAG and folks at Flash, that I found in ComCodebook:
<pre>lReturnStatus=.f.
do case
   case not test(1)
   case not test(2)
   case not CallOfThirdFn()
   ...
   otherwise
      lReturnStatus=.t.
endcase
return lReturnStatus
I simply love this.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform