CSV to HTML translation: Difference between revisions

Added 11l
(Added 11l)
Line 26:
(via <nowiki><thead></nowiki> preferably; CSS if you must).
<br><br>
 
=={{header|11l}}==
{{trans|C}}
<lang 11l>V input_csv = ‘Character,Speech
The multitude,The messiah! Show us the messiah!
Brians mother,<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
The multitude,Who are you?
Brians mother,I'm his mother; that's who!
The multitude,Behold his mother! Behold his mother!’
 
print("<table>\n<tr><td>", end' ‘’)
 
L(c) input_csv
print(S c {
"\n"{"</td></tr>\n<tr><td>"}
‘,’ {‘</td><td>’}
‘<’ {‘&lt;’}
‘>’ {‘&gt;’}
‘&’ {‘&amp;’}
E {c}
}, end' ‘’)
 
print("</td></tr>\n</table>")</lang>
{{out}}
<lang html5><table>
<tr><td>Character</td><td>Speech</td></tr>
<tr><td>The multitude</td><td>The messiah! Show us the messiah!</td></tr>
<tr><td>Brians mother</td><td>&lt;angry&gt;Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!&lt;/angry&gt;</td></tr>
<tr><td>The multitude</td><td>Who are you?</td></tr>
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr>
<tr><td>The multitude</td><td>Behold his mother! Behold his mother!</td></tr>
</table></lang>
 
=={{header|Ada}}==
1,481

edits