Jump to content

CSV to HTML translation: Difference between revisions

Added Easylang
m (→‎{{header|Wren}}: Changed to Wren S/H)
(Added Easylang)
Line 1,462:
</body>
</html></syntaxhighlight>
 
=={{header|EasyLang}}==
<syntaxhighlight>
h$ = "<table border=1>\n<tr><td>"
repeat
s$ = input
until s$ = ""
write h$
for c$ in strchars s$
if c$ = ","
c$ = "</td><td>"
elif c$ = "<"
c$ = "&lt;"
elif c$ = ">"
c$ = "&gt;"
elif c$ = "&"
c$ = "&amp;"
.
write c$
.
h$ = "</td></tr>\n<tr><td>"
.
print "</td></tr>\n</table>"
#
input_data
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!
</syntaxhighlight>
{{out}}
<<table border=1>
<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>>
</pre>
 
=={{header|EchoLisp}}==
2,076

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.