Rosetta Code/Fix code tags: Difference between revisions

→‎{{header|REXX}}: made this REXX entry compliant with older REXXes by including a '''changestr''' bif. -- ~~~~
(→‎{{header|REXX}}: made this REXX entry compliant with older REXXes by including a '''changestr''' bif. -- ~~~~)
Line 347:
 
=={{header|REXX}}==
Some older REXXes don't have the '''changestr''' bif, so one is include here.
<lang rexx>
<lang rexx>/*REXX program fixes (changes) depreciated code tags with newer tags. */
 
old.='' /*define a default value for OLD.*/
 
Line 369 ⟶ 368:
call lineout ofid,_ /*write out the re-formatted rec.*/
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}}==