Re: potentially uninitialized local variables in Analytic GJR-GARCH(1, 1) Engine
Posted by
Ferdinando M. Ametrano-3 on
URL: http://quantlib.414.s1.nabble.com/potentially-uninitialized-local-variables-in-Analytic-GJR-GARCH-1-1-Engine-tp12134p12138.html
On Fri, Nov 27, 2009 at 2:12 PM, Luigi Ballabio
<
[hidden email]> wrote:
> On Fri, 2009-11-27 at 12:56 +0100, Ferdinando Ametrano wrote:
>> On Fri, Nov 27, 2009 at 12:30 PM, Luigi Ballabio
>> > The variables above are all initialized one way or the other in a
>> > section of code that reads:
>> >
>> > if (init_ != true || constants_match != true || ...) {
>> > ... the variables are initialized to some values ...
>> > }
>> > else if (init_ == true && constants_match == true) {
>> > ... the variables are initialized to some other values ...
>> > }
>>
>> mmm... it seems to me the condition you summarized as "..." might
>> really imply some other logic branch where variables are not
>> initialized.
>
> No. If either init or constants_match is false, the code takes the first
> branch (it's an or, so one suffices.) If not, either the conditions in
> "..." are true (and the code takes the first branch) or, since init and
> constant_match are both true, it takes the second branch.
ooops... now I got it.
I was confused between AND and OR... go figure :-)
so I'll commit a revisited if else: please don't forget to check my logic
ciao -- Nando
ciao -- Nando
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev