On Sat, 23 May 2009, Vailton Renato wrote:
Hi,
> Here I use something like this:
> lExit := .F.
> for each x in stringORarray
> switch x
> case 'a'
> lExit := .T.
> exit // but we need exit from "for each", not only from switch
> end
> if lExit
> exit;
> end
> next
The same is for many other constructions, f.e.:
l := 10
while f1( l )
l *= 10
for i := 1 to 100
if f2(i)
exit // but I want to exit from WHILE not only from FOR
endif
next
enddo
You can write the same also about nest statments like:
for i := 1 to 10
for j := 1 to 20
if f( i, j )
exit // but I want to exit from external FOR i := ... loop too
endif
next
next
In short words you are requesting about GOTO instruction which introduces
to compiler serious limitations or at least additional code necessary to
make it working correctly with statements which needs to allocate and then
free some resources. It's rather bad idea.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour