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