Loops/Continue: Difference between revisions

Added FreeBASIC
(Added FreeBASIC)
Line 674:
 
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|FreeBASIC}}==
<lang freebasic>' FB 1.05.0 Win64
For i As Integer = 1 To 10
Print Str(i);
If i Mod 5 = 0 Then
Print
Continue For
End If
Print ", ";
Next
 
Print
Sleep</lang>
 
{{out}}
<pre>
1, 2, 3, 4, 5
6, 7, 8, 9, 10
</pre>
 
=={{header|GAP}}==
9,492

edits