Mailing list - Entries of 2005


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qftestJUI] (no subject)


  • Subject: [qftestJUI] (no subject)
  • From: gregor.schmid@?.de (Gregor Schmid)
  • Date: Mon, 14 Feb 2005 17:33:26 +0100 (CET)

<Reto.Ansorge@?.ch>
Subject: Re: [qftestJUI] Jython recursion problem
References: <9F6698CFCC9C4243AF0F83D86E4E8AA10263ABF7@?.ch>
From: Gregor Schmid <Gregor.Schmid@?.de>
Date: 14 Feb 2005 17:33:26 +0100
In-Reply-To: <9F6698CFCC9C4243AF0F83D86E4E8AA10263ABF7@?.ch>
Message-ID: <o1is4vm78p.fsf@?.de>
Lines: 43
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Emacs Gnus


Hello Reto,

your code will work fine in qftestJUI 1.8 where we've implemented a
workaround for Jython's lack of nested scopes.

For older qftestJUI versions, please add the line

global recMenu

before defining the recMenu method. Otherwise recMenu will not be
visible from within recMenu.

On the telnet console you're working in global scope, so recMenu will
automatically be global and therefore visible to itself.

Best regards,
    Greg

<Reto.Ansorge@?.ch> writes:

> I try to run the following (simplified) code in a SUT script.
> But there occours an error at the recursive call of recMenu()
>
> --begin code--
> def recMenu(n):
>    if n<8:
>       print n
>       recMenu(n+1)
>
> recMenu(1)
> --end code--
>
> If I run the same code in the telnet console it runs without any errors
>
> Thanks for any help and solution
> R.Ansorge

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876


Videos Downloads Documentation Buy Free Trial