Mailing list - Entries of 2006

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

Re: [qftestJUI] problem adding months to this month

  • Subject: Re: [qftestJUI] problem adding months to this month
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 03 Apr 2006 21:36:59 +0200

Hi Mark,

now this is a tricky one to spot.

The error message is:

The expression '08 == 01' is not a valid test.

At first sight the expression looks perfectly fine. However,
conditional expressions are evaluated by the Jython interpreter and in
Python/Jython numeric literals that start with a '0' are treated as
octal numbers. And for octal numbers, only the digits 0 - 7 are legal,
08 is an illegal octal number.

If you simply quote the values in the expression, i.e. use

"$(DialogMonth)" == "01"

a string comparison will be performed instead which is fine.

Best regards,

Mark Willburger <Mark_Willburger@?.com> writes:

>    i have a routine that advances today's month to x number of months in
>    the future
>    if i advance to july "07" it works fine, if i advance to august "08"
>    the exact same code fails
>    here are the run files for each
>    thanks in advance

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