Loops/For with a specified step: Difference between revisions
Content added Content deleted
m (→[[Loop/For_with_step#ALGOL 68]]: minor tidy) |
|||
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 |
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 # |