Loops/For with a specified step: Difference between revisions

Content added Content deleted
Line 23: Line 23:
put("what's a word that rhymes with ""twelve""?");</lang>
put("what's a word that rhymes with ""twelve""?");</lang>
=={{header|ALGOL 68}}==
=={{header|ALGOL 68}}==
The</b> ALGOL 68 "universal" '''for'''/'''while''' loop:
The ALGOL 68 "''universal''" '''for'''/'''while''' loop:
[ '''for''' index ] [ '''from''' first ] [ '''by''' increment ] [ '''to''' last ] [ '''while''' condition ] '''do''' statements '''od'''
[ '''for''' index ] [ '''from''' first ] [ '''by''' increment ] [ '''to''' last ] [ '''while''' condition ] '''do''' statements '''od'''
The minimum form of a "loop clause" is thus: '''do''' statements '''od''' # an infinite loop #
The minimum form of a "loop clause" is thus: '''do''' statements '''od''' # an infinite loop #