Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -1,17 +1,17 @@
/*REXX program to seperate a string of comma-delimited words, and echo. */
/*REXX program seperates a string of comma-delimited words, and echoes. */
sss = 'Hello,How,Are,You,Today' /*words seperated by commas (,). */
say 'input string='sss /*display the original string. */
say 'input string =' sss /*display the original string. */
new=sss /*make a copy of the string. */
do items=1 until new=='' /*keep going until SSS is empty. */
parse var new a.items ',' new /*parse words delinated by comma.*/
end /*items*/
/* [↓] string NEW is destroyed. */
do items=1 until new=='' /*keep going until NEW is empty.*/
parse var new a.items ',' new /*parse words delinated by comma.*/
end /*items*/ /* [↑] the array is named A. */
say; say 'Words in the string:' /*display a header for the list. */
do k=1 for items /*now, display all the words. */
say a.k'.' /*append a period to the word. */
end /*k*/
do j=1 for items /*now, display all the words. */
say a.j || left('.', j\==items) /*append period to word, maybe. */
end /*j*/ /* [↑] don't append "." if last.*/
say 'End-of-list.' /*display a trailer for the list.*/
/*stick a fork in it, we're done.*/