Loops/For: Difference between revisions

Content deleted Content added
adding MUMPS example
Line 455: Line 455:
The if statement has to follow the write, or else the if statement would control the write (5 lines with one asterisk each).
The if statement has to follow the write, or else the if statement would control the write (5 lines with one asterisk each).
<lang MUMPS>FOR I=1:1:5 FOR J=1:1:I WRITE "*" IF J=I W !</lang>
<lang MUMPS>FOR I=1:1:5 FOR J=1:1:I WRITE "*" IF J=I W !</lang>

=={{header|NewLISP}}==
<lang NewLISP>
(for (i 1 5)
(for(j 1 i)
(print "*"))
(print "\n"))
</ang>


=={{header|Nimrod}}==
=={{header|Nimrod}}==