﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1297	Flattening of functions without output does not work	Jan Brugård	Jan Brugård	"If a function without output is used within an if clause in an equation clause flattening fails, see example below. 

{{{
function noOutput
  input Real X;
end noOutput;

model Model1
  Real x(start=1);
equation
  x=der(x);
  if time>10 then
    noOutput(x);
  end if;
end Model1;
}}}

This type of functions is often used, e.g. by the Visualization library, to set different environment variables as in this example:

{{{
function setParticleEffect
  input Visualization.Internal.VisShapeID ID;
  input Real pos[3];
  input Real T[6];
  input Real scale[3];
  input Real intensity;
  input Integer effectType;
  input Real particleSize;
  input Real particleLifeTime;
  input Real wind[3];

  external ""C"" SetParticleEffect(ID,pos,T,scale,intensity,effectType,particleSize,particleLifeTime,wind) ;

end setParticleEffect;}}}

From MathCore: http://intranet/trac/mathmodelica/ticket/2924"	task	closed	low	Red October	Frontend		invalid		Jan Brugård Adrian Pop
