title: Sample function doesn't work on Dymola
body: <p>I try to compile the following code with Dymola: </p>
  
  <pre><code>class abc
    import Modelica.SIunits;
    parameter SIunits.Time delta_t=0.5;
  
    constant Real a[:]={4,2,6,-1,3,5,7,4,-3,-6};
    Real x;
    Integer j(start=1);
    Integer k=size(a, 1);
  
  algorithm 
    when {(sample(0, delta_t) and j &lt; k),j == 1} then
      x := a[j];
      j := j + 1;
    end when;
  end abc;
  </code></pre>
  
  <p>and for <code>time = 0</code> the variable <code>j</code> starts with <code>2</code>. But it should start with <code>j = 1</code>.<br>
  Does anybody have an idea for this problem?</p>