Jump to content

CSV to HTML translation: Difference between revisions

m
(Added Easylang)
Line 1,465:
=={{header|EasyLang}}==
<syntaxhighlight>
h$ = "<table border=1>\n<tr><tdth>"
repeat
s$ = input
Line 1,472:
for c$ in strchars s$
if c$ = ","
c$if scnd = "</td><td>"0
c$ = "</th><th>"
else
h c$ = "</td></tr>\n<tr><td>"
.
elif c$ = "<"
c$ = "&lt;"
Line 1,482 ⟶ 1,486:
write c$
.
if scnd = 0
h$ = "</td></tr>\n<tr><td>"
h$ = "</th></tr>\n<tr><td>"
else
h$ = "</td></tr>\n<tr><td>"
.
scnd = 1
.
print "</td></tr>\n</table>"
Line 1,494 ⟶ 1,503:
The multitude,Behold his mother! Behold his mother!
</syntaxhighlight>
 
{{out}}
<<table border=1>
<tr><tdth>Character</tdth><tdth>Speech</tdth></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>
Line 1,502 ⟶ 1,512:
<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,060

edits

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