Programming language conditional loop early exit loop continuation redo retry correctness facilities begin middle end count collection general infinite variant invariant Ada APL C C++ C# COBOL Common Lisp D Eiffel F# FORTRAN 77 Fortran 90 Fortran 95 and later Go Haskell Java JavaScript Natural OCaml PHP Perl Python Rebol Ruby Standard ML Visual Basic .NET PowerShell while (true) does not count as an infinite loop for this purpose, because it is not a dedicated language structure. C's for (init; test; increment) loop is a general loop construct, not specifically a counting one, although it is often used for that. Deep breaks may be accomplished in APL, C, C++ and C# through the use of labels and gotos. Iteration over objects was added in PHP 5. A counting loop can be simulated by iterating over an incrementing list or generator, for instance, Python's range(). Deep breaks may be accomplished through the use of exception handling. There is no special construct, since the while function can be used for this. There is no special construct, but users can define general loop functions. The C++11 standard introduced the range-based for. In the STL, there is a std::for_each template function which can iterate on STL containers and call a unary function for each element.for_each. Sgi.com. Retrieved on 2010-11-09. The functionality also can be constructed as macro on these containers.Chapter 1. Boost.Foreach . Boost-sandbox.sourceforge.net (2009-12-19). Retrieved on 2010-11-09. Count-controlled looping is effected by iteration across an integer interval; early exit by including an additional condition for exit. Eiffel supports a reserved word retry, however it is used in exception handling, not loop control. Requires Java Modeling Language (JML) behavioral interface specification language. Requires loop variants to be integers; transfinite variants are not supported. D supports infinite collections, and the ability to iterate over those collections. This does not require any special construct. Deep breaks can be achieved using GO TO and procedures. Common Lisp predates the concept of generic collection type.
Programming language conditional loop early exit loop continuation redo retry correctness facilities begin middle end count collection general infinite variant invariant Ada APL C C++ C# COBOL Common Lisp D Eiffel F# FORTRAN 77 Fortran 90 Fortran 95 and later Go Haskell Java JavaScript Natural OCaml PHP Perl Python Rebol Ruby Standard ML Visual Basic .NET PowerShell while (true) does not count as an infinite loop for this purpose, because it is not a dedicated language structure. C's for (init; test; increment) loop is a general loop construct, not specifically a counting one, although it is often used for that. Deep breaks may be accomplished in APL, C, C++ and C# through the use of labels and gotos. Iteration over objects was added in PHP 5. A counting loop can be simulated by iterating over an incrementing list or generator, for instance, Python's range(). Deep breaks may be accomplished through the use of exception handling. There is no special construct, since the while function can be used for this There is no special construct, but users can define general loop functions. The C++11 standard introduced the range-based for. In the STL, there is a std::for_each template function which can iterate on STL containers and call a unary function for each eleme.nt.for_each. Sgi.com. Retrieved on 2010-11-09. The functionality also can be constructed as macro on these containers.Chapter 1 Boost.Foreach . Boost-sandbox.sourceforge.net (2009-12-19). Retrieved on 2010-11-09. Count-controlled looping is effected by iteration across an integer interval; early exit by including an additional condition for exit. Eiffel supports a reserved word retry, however it is used in exception handling, not loop control. Requires Java Modeling Language (JML) behavioral interface specification language. Requires loop variants to be integers; transfinite variants are not supported. D supports infinite collections, and the ability to iterate over those collections. This does not require any special construct. Deep breaks can be achieved using GO TO and procedures. Common Lisp predates th.e concept of generic collection type.