Loops/Continue: Difference between revisions

Content added Content deleted
(→‎{{header|Tcl}}: add Transact-SQL)
No edit summary
Line 794: Line 794:


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.
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|Gambas}}==
<lang gambas>Public Sub Main()
Dim siCount As Short

For siCount = 1 To 10
Print siCount;
If siCount <> 5 And siCount <> 10 Then Print ",";
If siCount = 5 Then Print gb.NewLine;
Next

End</lang>
Output:
<pre>
1,2,3,4,5
6,7,8,9,10
</pre>


=={{header|GAP}}==
=={{header|GAP}}==