Copia del wikiespejo

Este es un espejo del wiki de pascal.chat. La edición, el historial y el inicio de sesión están allí.

Break/es

Deutsch · English · Español · Français · Suomi · Русский

La palabra reservada break es uno de los comandos de los bucles (loops). Este comando se utiliza para salir de un bucle antes de que el mismo finalice. Solo se puede usar dentro de bucles.

Ejemplo:

pascal
var
  intI: Integer;
  intA: Integer = 50;
begin
  for intI := 20 to 200 do
  begin
      ...
      if intI = intA then break; // Si se satisface la condición entonces se sale del bucle, se finaliza el mismo.
      ...
  end;
end;

Ver también


From the Free Pascal wiki, page "Break/es", 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.

Revisión 1, último cambio por WikiArchive .