﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1502	pre operator cannot be compiled	fh77	fh77	"Here I'm not sure if its a bug.

The pre operator cannot be compiled if it is applied on a
variable, which does not change during the runtime
(in the sample the value of i1.el.val is always 12)

If the value is incremented the pre operator can be 
compiled:

Here is the small sample:
{{{
block tst4B
  String k;   
  output ct i1;
  output ct i2;
  output ct i3;
  Boolean clock;
  Integer cntr;
  initial equation 
    cntr=0;
  equation
     clock = sample(0,0.1);
     i1.el.val=12;
     i2.el.val=pre(cntr)+2;
     i3.el.val=14;
    algorithm
     when clock then
        cntr:=cntr+1;
      end when;

    when (pre(i1.el.val)<> i1.el.val)   then 
      k:= f3(String(i1.el.val)+""abcdef185"",""eee1.txt"");     
     end when; 

end tst4B;

type Int16 = Integer; 


record tstR
     Int16 val;
end tstR;

connector ct
  tstR el;
 end ct;

function f3 
   input String s2;
   input String s1;
   import Modelica.Utilities.Streams;
   output String s3; 
algorithm
    Streams.print(s1 + s2 + ""xyz"" ,""eee1.txt"");
    s3:=s1+s2; 
end f3;
}}}"	defect	closed	high			1.7.0	fixed		fh77 Jens Frenkel
