Data "Character,Speech"
Data "The multitude,The messiah! Show us the messiah!"
Data "Brian's mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!"
Data "The multitude,Who are you?"
Data "Brian's mother,I'm his mother; that's who!"
Data "The multitude,Behold his mother! Behold his mother!"
Data "***"
Print "" & Chr(10) & ""
Print "
"
Print "" & Chr(10)
Print ""
Print "CSV to html translation
"
Print: Print ""
Dim As Boolean header = true
Dim As String cadenaCSV, txt
Do
Read cadenaCSV
If cadenaCSV = "***" then Exit Do
If header then
Print "" & Chr(10) & "| ";
Else
Print " |
|---|
| ";
End If
For i As Integer = 1 To Len(cadenaCSV)
txt = Mid(cadenaCSV, i, 1)
Select Case txt
Case ",": If header then Print " | "; Else Print " | ";
Case "<": Print "<";
Case ">": Print ">";
Case "&": Print "&";
Case Else: Print txt;
End Select
Next i
If header then
Print " |
" & Chr(10) & "" & Chr(10) & ""
Else
Print ""
End If
header = false
Loop Until false
Print "" & Chr(10) & "
"
Print Chr(10) & ""
Print ""
Sleep