W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2010

Re: Calabash: suspect loop?

From: mozer <xmlizer@gmail.com>
Date: Tue, 7 Sep 2010 15:31:40 +0200
Message-ID: <AANLkTi=NeCPbmWHGVbCYOgHyGvSOQ8HphAoD42Vi50fE@mail.gmail.com>
To: Florent Georges <fgeorges@fgeorges.org>
Cc: XProc Dev <xproc-dev@w3.org>
Ach Mensch !!!

On Tue, Sep 7, 2010 at 2:53 PM, Florent Georges <fgeorges@fgeorges.org>wrote:

> On 7 September 2010 13:47, mozer wrote:
>
> >>    while (log != null && level == null) {
> >>        log = log.getParent();
> >>        level = log.getLevel();
> >>    }
>
> > I can't see what's suspect here
> > If log != null
> > then log.getParent() is ok and log.getLevel() also
>
>   No, because getParent() can return null and its return value is
> assigned to log before calling getLevel().  You know, this language
> with side-effects, where a variable can change value during
> execution... ;-)
>
>  Regards,
>
> --
> Florent Georges
> http://fgeorges.org/
>
Received on Tuesday, 7 September 2010 13:32:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 7 September 2010 13:32:14 GMT