Jump to content

Loops/Continue: Difference between revisions

(→‎{{header|Fortran}}: Thanks to I0 format...)
Line 607:
1, 2, 3, 4, 5
6, 7, 8, 9,10
Alternatively, FORMAT (4(I2,","),I2,/,4(I2,","),I3) would do the trick but there would no longer be the loop, break, continue aspect to the interpretation of the FORMAT statement, merely a grinding through a list.
 
This sort of scheme facilitates a compact way of printing a table with a heading, where the WRITE statement simply pours forth the data and relies on something like FORMAT("heading",/,(complex details for one line)) - thus printing the table line-by-line with only the first line having the heading, a saving on having a write and format statement pair for the heading and a second pair for the table body.
 
=={{header|GAP}}==
1,220

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.