Alternatively known as an infinite loop or a continuous loop, an endless loop is a continuous repetition of a program segment. For example, when creating a batch file, an endless loop can be created using the GOTO statement that refers back to the beginning of the loop.

:BEGIN Echo I am an endless loop! GOTO BEGIN

As illustrated in the above example, the program prints “I am an endless loop!” and then go back to the BEGIN statement and repeat this process indefinitely.

End, Loop, Programming terms

  • How to loop or start a batch file over after it has completed.
  • How to abort a batch file, command, or program stuck in a loop.