Sign in Join
Wiki copytemporary

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

Break/es

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.