Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOR NEXT and Event()
Message
De
05/03/1997 16:04:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
FOR NEXT and Event()
Divers
Thread ID:
00023029
Message ID:
00023029
Vues:
80
I have a FOR NEXT which is going like this.

FOR lnCompteur=1 TO 100
Send('Something')
...
NEXT

The Send() method is sending a string to a server. This sent string will make the server send a reply back which will arrive in a Receive() event.

I can't continue with the second FOR NEXT loop until the Receive() event has fired. So, for each 100 send, I need to wait for the Receive() event to loop and continue with the next send.

I tried this but this was locking the CPU and the Receive() event was never fired.

FOR lnCompteur=1 TO 100
Send('Something')
llReady=.F.
* We assume the Receive() event will make llReady=.T.
DO WHILE NOT llReady
ENDDO
NEXT

Then, I tried with a timer but with no success.

Any idea?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform