Jump to content

CSV to HTML translation: Difference between revisions

m (→‎[[CSV to HTML translation#ALGOL 68]]: define extra variable: nf.)
Line 107:
<lang algol68>#!/usr/local/bin/a68g --script #
 
[6]STRING linesrows := []STRING(
"Character,Speech ",
"The multitude,The messiah! Show us the messiah! ",
Line 151:
lmth = VOID: print(("</HTML>", new line));
 
FILE row input; STRING linerow; CHAR ifs = ",";
associate(row input, row); make term(row input, lineifs);
make term(input, ifs);
 
html;
Line 159 ⟶ 158:
body;
table;
FOR nr TO UPB linesrows DO
linerow := linesrows[nr];
table row;
on logical file end(row input, (REF FILE row input)BOOL: linerow end);
FOR nf DO
STRING sfield; get(row input,sfield);
(nr=1|th|td)(ENCODE sfield);
get(row input, space)
OD;
linerow end: reset(row input);
elbat row
OD;
Cookies help us deliver our services. By using our services, you agree to our use of cookies.