Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Here we go LOOP-ty LOOP... Here we go LOOP-ty die.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00207863
Message ID:
00207876
Vues:
11
>I have the following loop in the Init of a Form:
>SELECT myfile
>GO TOP
>DO WHILE NOT EOF()
>
> this...
> and...
> that...
>
> SKIP
>ENDDO
>
>I loop until EOF, but then I want to go back to the top of the file and start the loop all over again. What's the best way to do that?
>
>I might also want to add a command button I can press to bail me out of the loop while stuck in the loop. What might that command button look like code-wise?
>
>I am sure I could figure it out, but you people have the coolest solutions to the hottest problems. Here we go loop-ty loop, here we go loop-ty die.
Local lExit
For nLoop=1 to 2
 Select mytable
 GO TOP
 Scan
  IF INKEY()=19 
   lExit=.T.
   EXIT
  ENDIF
 Endscan
 If lExit=.T.
  EXIT
 Endif
Endfor
and add label with caption "Press Ctrl+S to Stop the Process".
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform