Rosetta Code/Fix code tags: Difference between revisions
Content added Content deleted
m (added whitespace before the TOC (table of contents), added a ;Task: and ;Usage: (bold) headers.) |
m (→{{header|REXX}}: added/changed comments and whitespace, changed indentations.) |
||
Line 729: | Line 729: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
<lang rexx>/*REXX program fixes (changes) depreciated code tags with newer tags.*/ |
<lang rexx>/*REXX program fixes (changes) depreciated HTML code tags with newer tags. */ |
||
@ |
@.=; @.1 = '<%s>' ; new.1 = "<lang %s>" |
||
@.2 = '</%s>' ; new.2 = "</lang>" |
|||
@.3 = '<code %s>' ; new.3 = "<lang %s>" |
|||
@.4 = '</code>' ; new.4 = "</lang>" |
|||
old.3 = @'code %s>' ; new.3 = @'lang %s>' |
|||
old.4 = @'/code>' ; new.4 = @'/lang>' |
|||
iFID = 'Wikisource.txt' /*the Input File IDentifier. */ |
|||
oFID = 'converted.txt' /*the Output " " */ |
|||
do while lines(iFID)\==0 /*keep reading the file until finished.*/ |
|||
_=linein(iFID) /*read a record from the input file. */ |
|||
do j=1 while @.j \== '' /*change old ──► new until finished. */ |
|||
_=changestr(@.j,_,new.j) /*let REXX do the heavy lifting. */ |
|||
end /*j*/ |
|||
⚫ | |||
end /*j*/ |
|||
⚫ | |||
⚫ | |||
⚫ | |||
end /*while lines(ifid...*/ |
|||
⚫ | |||
⚫ | |||
<br><br> |
<br><br> |
||