﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2072	intialization of output formal parameters in modelica functions	Willi Braun	Martin Sjölund	"I guess we should set an implicit default value for formal output parameters, even if I haven't found that sentence in the spec. Of course, that's bad modelica code and we should try at least to warn the user, but I think the MSL is full of such stuff. 
What do you think?

Example:
{{{
function f
  input Real x;
  output Real a;
  output Real b;
algorithm
  if x > 0.5 then
    a := sin(x);
  else
    b := cos(x);
  end if;
end f;

model A
 Real x,y,z;
equation
 der(x) = x+y+z;
 (y,z) = f(time);
end A;
}}}


BTW.: This is also the reason for our mysterious failing of simulation_libraries_msl32.Modelica.Electrical.Spice3.Examples.Nor.mos 
with the clang compiler. 
"	defect	closed	high	1.9.0	Frontend	trunk	fixed		Adrian Pop Martin Sjölund Lennart Ochel
