Anonymous user
CSV to HTML translation: Difference between revisions
m
→{{header|Delphi}}: whitespace
m (→{{header|Retro}}: forgot to include the output) |
m (→{{header|Delphi}}: whitespace) |
||
Line 519:
This solution solves both the basic and extra credit tasks.
<lang Delphi>program csv2html;
{$APPTYPE CONSOLE}
Line 566 ⟶ 564:
'</body>'+CRLF+
'</html>';
{ Function to split a string into a list using a given delimiter }
Line 590 ⟶ 587:
Rslt.Insert(0,fld);
end;
{ Simple CSV parser with option to specify that the first row is a header row }
Line 649 ⟶ 645:
end;
end;
var
Line 697 ⟶ 691:
// Keep console window open
Readln;
end.</lang>▼
▲</lang>
'''Basic output:'''
<lang html5><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Line 734 ⟶ 723:
</table>
</body>
</html></lang>
'''Extra credit output:'''
<lang html5><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Line 767 ⟶ 754:
</table>
</body>
</html></lang>
=={{header|Go}}==
Minimalist version satisfies basic task requirements:
|