« Simscript III/Dictionnaire des instructions/WITH » : différence entre les versions
Contenu supprimé Contenu ajouté
m <source> -> <syntaxhighlight> (phab:T237267) |
obs tag |
||
Ligne 1 : | Ligne 1 : | ||
< |
<span style="color:#0000FF;">with</span> est utilisée pour contrôler l<nowiki>’</nowiki>exécution d<nowiki>’</nowiki>une boucle (commandée par un énoncé <span style="color:#0000FF;">for</span>, <span style="color:#0000FF;">while</span>, <span style="color:#0000FF;">until</span> ou <span style="color:#0000FF;">list attributs of each</span>). C<nowiki>’</nowiki>est un proche parent d<nowiki>’</nowiki><span style="color:#0000FF;">unless</span>. |
||
{|border="0" cellspacing="2" width="75%" |
{|border="0" cellspacing="2" width="75%" |
||
|- |
|- |
||
|Syntaxe : |
|Syntaxe : |
||
| |
| |
||
Version actuelle du 5 novembre 2021 à 07:52
with est utilisée pour contrôler l’exécution d’une boucle (commandée par un énoncé for, while, until ou list attributs of each). C’est un proche parent d’unless.
Syntaxe : |
|
Exemples :
for i = 1 to n with x(i) > 0 ...
for each Train in Ligne(1) with Vitesse(Train) <= 25.0 do ...
while i < max with y(i) > 0 and y(i) + z(i) < 2 do ...