functionprintStringVectorInHtml

Print a string vector in html format on file (without html/body heading)

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

Vectors.printStringVectorInHtml(s, name, fileName, printIndices);

Description

Print vector of strings s called name into a file fileName in HTML format. Optionally, row indices are printed as well.

Example

s = {"w", "3", "alpha"};
printStringVectorInHtml(s, "myVec", "log.html", true);

saves following HTML code in the file log.html:

<table border="0">
<tr>
  <td valign="middle">&nbsp;&nbsp;&nbsp;myVec</td>
  <td valign="middle">=</td>
  <td>
    <table style="background-color:rgb(100, 100, 100);" cellpadding="3" border="0" cellspacing="1">
    <tr style="background-color:white">
      <td align="right" style="background-color:rgb(230, 230, 230);">1</td>
      <td align="left">w</td>
    </tr>
    <tr style="background-color:white">
      <td align="right" style="background-color:rgb(230, 230, 230);">2</td>
      <td align="left">3</td>
    </tr>
    <tr style="background-color:white">
      <td align="right" style="background-color:rgb(230, 230, 230);">3</td>
      <td align="left">alpha</td>
    </tr>
    </table>
  </td>
</tr>
</table>

Inputs

TypeNameDefaultDescription
String[:]sString vector
Stringname""Vector name used for printing
StringfileName"log.html"
BooleanprintIndicestrue=true, if row indices shall be printed, otherwise they are not printed

Revisions