Aide:For.txt

De Wiki AutoIt Français
Aller à : navigation, rechercher

Document original V3.3.6.1 :

###Keyword###
For...To...Step...Next

###Description###
Loop based on an expression.

###Syntax###
<b>For</b> &lt;variable&gt; = &lt;start&gt; <b>To</b> &lt;stop&gt; [<b>Step</b> &lt;stepval&gt;]
	<i>statements</i>
	...
<b>Next</b>


###Parameters###
@@ParamTable@@
variable
	The variable used for the count.
start
	The initial numeric value of the variable.
stop
	The final numeric value of the variable.
stepval
	[optional] The numeric value (possibly fractional) that the count is increased by each loop.  Default is 1.
@@End@@


###Remarks###
The Variable will be created automatically with a LOCAL scope, even when MustDeclareVars is on.

For...Next statements may be nested.  The For loop terminates when the value of <i>variable</i> exceeds the <i>stop</i> threshold.  If <i>stepVal</i> or <i>stop</i> is a variable, its value is only read the first time the loop executes.

A For loop will execute zero times if:
   <i>start</i> &gt; <i>stop</i> and <i>step</i> <u>&gt;</u> 0, or
   <i>start</i> &lt; <i>stop</i> and <i>step</i> is negative


###Related###
ContinueLoop, ExitLoop


###Example###
@@IncludeExample@@


Document traduit V3.3.6.1 :

###Keyword###
For...To...Step...Next

###Description###
Boucle basée sur une expression.


###Syntax###
<b>For</b> &lt;variable&gt; = &lt;start&gt; <b>To</b> &lt;stop&gt; [<b>Step</b> &lt;stepval&gt;]
	<i>statements</i>
	...
<b>Next</b>


###Parameters###
@@ParamTable@@
variable
	La variable utilisée pour le compteur.
start
	La valeur numérique initiale de la variable.
stop
	La valeur numérique finale de la variable.
stepval
	[optionnel] La valeur numérique (peut être une fraction) qui incrémente le compteur à chaque boucle.  Par défaut 1.
@@End@@


###Remarks###
La variable sera créée automatiquement en portée "Local", même si MustDeclareVars est actif.

La déclaration For...Next peut être imbriquée.  La boucle For prend fin lorsque la valeur de <i>variable</i> excède le seuil de <i>stop</i>.  Si <i>stepVal</i> ou <i>stop</i> est une variable, sa valeur est lue uniquement lors de la première boucle.

Une boucle For ne s'exécute aucune fois si :
   <i>start</i> &gt; <i>stop</i> et <i>step</i> <u>&gt;</u> 0, ou
   <i>start</i> &lt; <i>stop</i> et <i>step</i> est négatif


###Related###
<a href="ContinueLoop.htm">ContinueLoop</a>, <a href="ExitLoop.htm">ExitLoop</a>


###Example###
@@IncludeExample@@


Traducteur : jbnh