Loops/N plus one half: Difference between revisions

→‎{{header|ASIC}}: Added a solution.
(→‎{{header|Tiny BASIC}}: Added a solution for the dialects that support string concatenation (e.g. Tom Pittman's TinyBasic).)
(→‎{{header|ASIC}}: Added a solution.)
Line 615:
20 PRINT I;
30 IF I < 10 THEN PRINT ", "; : NEXT I</syntaxhighlight>
 
==={{header|ASIC}}===
If equality checking affect the efficiency or if the last value were treated in different manner, one can extract the last iteration.
 
ASIC prints integer numbers as six-char strings. If shorter ones are needed, one can use the <code>STR$</code> and <code>LTRIM$</code> functions.
<syntaxhighlight lang="basic">
REM Loops/N plus one half
FOR I = 1 TO 9
PRINT I;
PRINT ",";
NEXT I
PRINT 10
END
</syntaxhighlight>
{{out}}
<pre>
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
</pre>
 
==={{header|Basic09}}===
512

edits