Anonymous user
Spinning rod animation/Text: Difference between revisions
Scala contribution added.
(Scala contribution added.) |
(Scala contribution added.) |
||
Line 238:
end /*j*/
halt: say bs ' ' /*stick a fork in it, we're all done. */</lang>
=={{header|Ring}}==▼
<lang ring>load "stdlib.ring"▼
rod = ["|", "/", "-", "\"]▼
for n = 1 to len(rod) ▼
see rod[n] + nl▼
sleep(0.25)▼
system("cls")▼
next</lang>▼
Output:▼
|▼
/▼
-▼
\▼
=={{header|Scala}}==
<lang Scala>object SpinningRod extends App {
Line 258 ⟶ 269:
}</lang>
▲=={{header|Ring}}==
▲<lang ring>load "stdlib.ring"
▲rod = ["|", "/", "-", "\"]
▲for n = 1 to len(rod)
▲ see rod[n] + nl
▲ sleep(0.25)
▲ system("cls")
▲next</lang>
▲Output:
▲ |
▲ /
▲ -
▲ \
=={{header|zkl}}==
{{trans|C Shell}}
|