Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,13 +1,13 @@
|
|||
/*REXX program separates a string of comma─delimited words, and echoes them ──► terminal*/
|
||||
/*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.*/
|
||||
Say 'The input string:' original /*display original string --> terminal.*/
|
||||
new=original /*make a copy of the string. */
|
||||
Do n=1 Until new=='' /*keep processing until NEW is empty.*/
|
||||
Parse Var new word.n ',' new /*parse words delineated by a comma (,)*/
|
||||
End /*n*/ /* [?] the new array is named word. */
|
||||
Say /* NEW is destructively parsed. */
|
||||
Say center('Words in the string',40,'-') /*display a nice header for the list. */
|
||||
Do j=1 To n /*display all the words (one per line),*/
|
||||
Say word.j||left(.,j\==n) /*maybe append a period (.) to a word. */
|
||||
End /*j*/ /*Don't append a period after the 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