Control flow: Difference between revisions

Content deleted Content added
no sentence
m Loops: APL can also loop through sets
Line 309:
=== Collection-controlled loops ===
{{main article|Foreach loop|l1=Foreach}}
Several programming languages (e.g., [[Ada (programming language)|Ada]], [[APL (programming language)|APL]], [[D (programming language)|D]], [[C++11]], [[Smalltalk]], [[PHP]], [[Perl]], [[Object Pascal]], [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]], [[MATLAB]], [[Visual Basic]], [[Ruby (programming language)|Ruby]], [[Python (programming language)|Python]], [[JavaScript]], [[Fortran 95]] and later) have special constructs which allow implicit looping through all elements of an array, or all members of a set or collection.
 
someCollection '''do''': [:eachElement |xxx].