﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1986	Wrong Warning about usage of variable before defined	Jens Frenkel	Martin Sjölund	"For the model Modelica.Electrical.Spice3.Examples.Graetz following warning was reported
{{{
[Modelica 3.2.1/Electrical/Spice3.mo:10296:9-10308:28:writable] Warning: m_dCurrent was used before it was defined (given a value). Additional such uses may exist for the variable, but some messages were suppressed.
}}}

However in the named line of Modelica Code ""m_dCurrent"" is assigned inside an if equation.

{{{
        if (in_p.m_pBvIsGiven > 0.5) then
          (out_cc.m_dCurrent,m_dCond) :=
            Modelica.Electrical.Spice3.Internal.Functions.junction3(
                  m_dPNVoltage,
                  in_m.m_dTemp,
                  in_p.m_emissionCoeff,
                  in_c.m_tSatCur,
                  in_c.m_tBrkdwnV);
        else
          (out_cc.m_dCurrent,m_dCond) :=
            Modelica.Electrical.Spice3.Internal.Functions.junction2(
                  m_dPNVoltage,
                  in_m.m_dTemp,
                  in_p.m_emissionCoeff,
                  in_c.m_tSatCur);
        end if;

        (m_dCap,m_dCharge) :=
          Modelica.Electrical.Spice3.Internal.Functions.junctionCapTransTime(
                in_c.m_tJctCap,
                m_dPNVoltage,
                in_c.m_tJctPot*in_p.m_depletionCapCoeff,
                in_p.m_gradingCoeff,
                in_p.m_junctionPot,
                in_c.m_tF1,
                in_c.m_f2,
                in_c.m_f3,
                in_p.m_transitTime,
                m_dCond,
                m_dCurrent);
}}}"	defect	closed	normal	1.9.0	Frontend	trunk	invalid	Warning	
