.Modelica_LinearSystems2.Math.Vectors.printStringVectorInHtml

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>

Interface

function printStringVectorInHtml
  extends Modelica.Icons.Function;
  import Modelica.Utilities.Streams.print;
  input String s[:] "String vector";
  input String name = "" "Vector name used for printing";
  input String fileName = "log.html";
  input Boolean printIndices = true "=true, if row indices shall be printed, otherwise they are not printed";
end printStringVectorInHtml;

Revisions


Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos