Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
|
|
@ -1,17 +1,13 @@
|
|||
/*REXX program separates 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. */
|
||||
new=sss /*make a copy of the string. */
|
||||
/* [↓] 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 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.*/
|
||||
/*REXX program separates a string of comma─delimited words, and echoes them ──► terminal*/
|
||||
original = 'Hello,How,Are,You,Today' /*some words separated by commas (,). */
|
||||
say 'The input string:' original /*display original string ──► terminal.*/
|
||||
new= original /*make a copy of the string. */
|
||||
do #=1 until new=='' /*keep processing until NEW is empty.*/
|
||||
parse var new @.# ',' new /*parse words delineated by a comma (,)*/
|
||||
end /*#*/ /* [↑] the new array is named @. */
|
||||
say /* NEW is destructively parsed. [↑] */
|
||||
say center(' Words in the string ', 40, "═") /*display a nice header for the list. */
|
||||
do j=1 for # /*display all the words (one per line),*/
|
||||
say @.j || left(., j\==#) /*maybe append a period (.) to a word. */
|
||||
end /*j*/ /* [↑] don't append a period if last. */
|
||||
say center(' End─of─list ', 40, "═") /*display a (EOL) trailer for the list.*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue