Vlad,
Not sure I understood you. If you suggest to touch oValid object methods, I can't do it, unfortunately, since it's not my object (it belongs to another application, which is my colleague's).
My desire to stop do while loop without execution other code. BTW, this loop calls some other programs, which also have do while oValid.lContinue in them:
e.g. (pseudo-code)
lnI=0
do while oValid.lContinue and Not end of first array (array of all DBCs)
lnI=m.lnI+1
.........
Open DBC for possible changes
lnK=0
do while oValid.lContinue and lnK<Number of tables in DBC
lnK=lnK+1
...
Check open table, free disk space, etc.
=Modify_structure
=Modify_indexes
enddo
enddo
Thanks in advance.
>Hi!
>
>What about returning to the calleer program? In other words, you have following:
>
>
>* Caller.PRG
>...
>DO MyLongProcess
>...
>
>
>
>* MyLongProcess.PRG
>do while oValid.lContinue
> User pressed ESC here, so oValid.lContinue=.f.
> lots of other code
>enddo
>
>
>
>* SomeEvent.PRG
>
>
>...
>
>return to &lcProcName
>
>
>I guess this will stop the long process immediately, though you will require to do the cleanup in the caller PRG instead of at th end of MyLongProcess PRG.
>
>HTH.
>
>>do while oValid.lContinue
>> User pressed ESC here, so oValid.lContinue=.f.
>> lots of other code
>>enddo
>>
>>I don't want to execute lots of other code, I want to stop loop immediatelly, after oValid.lContinue=.f.
>>
>>In other words, do while checks its condition only in the next pass, it doesn't check its condition inside the loop, which is my desire.
If it's not broken, fix it until it is.
My Blog