Set consolidation: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added/changed whitespace and comments, made other cosmetic changes.) |
m (→{{header|REXX}}: changed the name of the function to reflect the task.) |
||
Line 1,472: | Line 1,472: | ||
do j=1 while @.j\=='' /*traipse through each of sample sets. */ |
do j=1 while @.j\=='' /*traipse through each of sample sets. */ |
||
call |
call SETconsolidate @.j /*have the function do the heavy work. */ |
||
end /*j*/ |
end /*j*/ |
||
exit /*stick a fork in it, we're all done. */ |
exit /*stick a fork in it, we're all done. */ |
||
/*──────────────────────────────────ISIN SUBRoutine───────────────────────────*/ |
/*──────────────────────────────────ISIN SUBRoutine───────────────────────────*/ |
||
isIn: return wordpos(arg(1), arg(2))\==0 /*is (word) arg1 in set arg2 ? */ |
isIn: return wordpos(arg(1), arg(2))\==0 /*is (word) arg1 in set arg2 ? */ |
||
/*──────────────────────────────────SETCONSOLIDATE subroutine─────────────────*/ |
|||
/*──────────────────────────────────SETCOMBINE subroutine─────────────────────*/ |
|||
SETconsolidate: procedure; parse arg old,new; #=words(old) /*nullify NEW.*/ |
|||
say ' the old set=' space(old) |
say ' the old set=' space(old) |
||