Rosetta Code/Fix code tags: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: made this REXX entry compliant with older REXXes by including a '''changestr''' bif. -- ~~~~) |
|||
Line 347: | Line 347: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
Some older REXXes don't have the '''changestr''' bif, so one is include here. |
|||
<lang rexx> |
|||
/*REXX program fixes (changes) depreciated code tags with newer tags. */ |
<lang rexx>/*REXX program fixes (changes) depreciated code tags with newer tags. */ |
||
old.='' /*define a default value for OLD.*/ |
old.='' /*define a default value for OLD.*/ |
||
Line 369: | Line 368: | ||
call lineout ofid,_ /*write out the re-formatted rec.*/ |
call lineout ofid,_ /*write out the re-formatted rec.*/ |
||
end |
end |
||
/*───────────────────────────CHANGESTR subroutine───────────────────────*/ |
|||
</lang> |
|||
changestr: procedure; parse arg o,h,n; r=; w=length(o); if w==0 then return n||h |
|||
do forever; parse var h y (o) _ +(w) h; if _=='' then return r||y; r=r||y||n; end</lang> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |