Anonymous user
Dutch national flag problem: Difference between revisions
m
→{{header|REXX}}: added DO-END labels, changed DO loop indentation, changed comments, added comments. -- ~~~~
(Added PicoLisp) |
m (→{{header|REXX}}: added DO-END labels, changed DO loop indentation, changed comments, added comments. -- ~~~~) |
||
Line 502:
end /*g*/
say 'number of colored balls generated = ' N ; say
say 'original ball order:'
say @ ; say
$=$ copies(_'
end
▲ end
say ' sorted ball order:'
say space($); say
do
if wordpos(word($,
say "The list of sorted balls isn't in proper order!"; exit 13
end /*k*/
say ' sorted ball list has been confirmed as being sorted correctly.'
exit /*stick a fork in it, we're done.*/
/*──────────────────────────────────COUNTWORDS subroutine───────────────*/
countWords: procedure; parse arg ?,hay; s=1
|