Sign in Join
Wiki copytemporary

Revision 1 of 2, by Bart on 1-17-2020. The page as it is now.

Break/fr

Le mot réservé break est l'une des commandes de boucle, utilisée pour sortir d'une boucle prématurément.
La commande break ne peut être employée qu'à l'intérieur d'une boucle et s'applique à la boucle englobante la plus imbriquée le cas échéant.

Exemple:\

pascal
var
  intI: Integer;
  intA: Integer = 50;
begin
  for intI := 20 to 200 do
  begin
      ...
      if intI = intA then break; // Si la condition est vérifiée, la boucle se termine
      ...
  end;
end;

Voir aussi

\


From the Free Pascal wiki, page "Break/fr", as it stood on 2020-01-17 after a change by Bart, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.