tasks a-s

This commit is contained in:
Ingy döt Net 2013-04-10 23:57:08 -07:00
parent 47bf37c096
commit b83f433714
12433 changed files with 156208 additions and 123 deletions

View file

@ -0,0 +1,13 @@
/*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*/
say 'modified list:' space(new)
say right(words(new),13) ' words in the modified list.'
/*stick a fork in it, we're done.*/