Anonymous user
Eertree: Difference between revisions
m
→{{header|REXX}}: simplified the DO loop, added/changed comments and whitespace.
m (→{{header|REXX}}: simplified the DO loop, added/changed comments and whitespace.) |
|||
Line 809:
parse arg x . /*obtain optional input string from CL.*/
if x=='' | x=="," then x= 'eertree' /*Not specified? Then use the default.*/
L= length(x)
@.=
$= /*list of unsorted & unique palindromes*/
end
▲ end /*j*/
say '──────── The input string being used: ' space(x)
say '──────── The list of sub─palindromes found: ' strip($)
{{out|output|text= when using the default input:}}
<pre>
────────
──────── The number of sub─palindromes found: 7
──────── The list of sub─palindromes found: e ee eertree ertre r rtr t
▲──────── The list of sub─palindromes found:
</pre>
|