September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,13 +1,12 @@
/*REXX program to remove duplicate elements (items) in a list. */
old= '2 3 5 7 11 13 17 19 cats 222 -100.2 +11 1.1 +7 7. 7 5 5 3 2 0 4.4 2'
say 'original list:' old
say right(words(old),13) ' words in the original list.'; say
new= /*start with a clean slate. */
do j=1 for words(old); _=word(old,j) /*process the words in old list. */
if wordpos(_,new)==0 then new=new _ /*Doesn't exist? Then add to list*/
end /*j*/
/*REXX program removes any duplicate elements (items) that are in a list (using 2 lists)*/
old = '2 3 5 7 11 13 17 19 cats 222 -100.2 +11 1.1 +7 7. 7 5 5 3 2 0 4.4 2'
say 'original list:' old
say right( words(old), 17, '') 'words in the original list.'
new= /*start with a clean (list) slate. */
do j=1 for words(old); _=word(old, j) /*process the words in the OLD list. */
if wordpos(_,new)==0 then new=new _ /*Doesn't exist? Then add word to NEW.*/
end /*j*/
say
say 'modified list:' space(new)
say right(words(new),13) ' words in the modified list.'
/*stick a fork in it, we're done.*/
say right( words(new), 17, '') 'words in the modified list.'
/*stick a fork in it, we're all done. */