Page 1 sur 1

PAUSE / DELAY / DELAYBLOCK / WAITFORENDDELAY : Faire une PAUSE dans un script / DELAY on script

Posté : 04 oct. 2018, 22:10
par Stéphane Charbonnel
Bonjour

Il y a différents moyens de faire une pause dans un script. Il y a la pause qui permet de faire par exemple du traitement avant la fin de la pause (couple DELAY / WAITFORENDDELAY) et la pause "exclusive" qui bloque toute évolution du programme ensuite (soit DELAYBLOCK, soit WAIT_UNTIL).

Syntaxes :
DELAY Timer_milliseconds
DELAYBLOCK Timer_milliseconds
WAIT_UNTIL Day$ Time$
WAITFORENDDELAY

Voici un exemple de programme qui illustre la différence entre ces pauses :

Code : Tout sélectionner

Timer_MilliSeconds=5000

PRINT "Beginning of the pause with treatments inside"
DELAY Timer_MilliSeconds
For i=1 10
   STR i i$
   PRINT i$
Next i
WAITFORENDDELAY
PRINT "End of pause"

PRINT "One second pause"
DELAYBLOCK Timer_MilliSeconds
PRINT "End of the second pause"

PRINT "Third type of pause"
Date$="2018/10/30"
Time$="12:15:11"
WAIT_UNTIL Date$ Time$
PRINT "It's finished !"