Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Infinite loop
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Language support== {{see also|Control flow}} Infinite loops can be implemented using various [[control flow]] constructs. Most commonly, in unstructured programming this is jump back up ([[goto]]), while in structured programming this is an indefinite loop (while loop) set to never end, either by omitting the condition or explicitly setting it to true, as <code>while (true) ...</code>. Some languages have special constructs for infinite loops, typically by omitting the condition from an indefinite loop. Examples include Ada (<code>loop ... end loop</code>),<ref>[[b:Ada Programming/Control#Endless Loop|Ada Programming: Control: Endless Loop]]</ref> Fortran (<code>DO ... END DO</code>), Go (<code>for { ... }</code>), Ruby (<code>loop do ... end</code>), and Rust (<code>loop { ... }</code>).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)