Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2014


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

Re: [QF-Test] What is the exact syntax


  • Subject: Re: [QF-Test] What is the exact syntax
  • From: Martin Moser <martin.moser@?.de>
  • Date: Tue, 11 Feb 2014 11:02:43 +0100

Hi,

I just want to add that you have to take care about the data types, if you
go for the "or" alternative.

For strings you have to use double quotes:

"$(variableA)" == "$(variableB)" or "$(variableA)" == "$(variableC)"
"$(variableA)" == "$(variableD)"

If the variables contain numbers or boolean values only you don't need to
specify double quotes.

Anyway the pythonic way with in is the more elegant way :-)


Best Regards,
Martin

--On Dienstag, Februar 11, 2014 09:54:44 +1100 GAUTHIER Denis
<Denis.Gauthier@?.au> wrote:

[@@ OPEN @@]
Hi Adesh,

The basic rule for the condition is to follow Python syntax, as hinted in
the manual: A condition is an expression that evaluates to either true or
false. QF-Test discriminates between simple expression that it evaluates
itself and complex expressions that are passed to the Jython script
language to evaluate.

Hence in your case you should use something like:
$(variableA) == $(variableB) or $(variableA) == $(variableC) or
$(variableA) == $(variableD)

Now you can make it a bit more 'Pythonic' using this syntax:
"$(variableA)" in ["$(variableB)", "$(variableC)", "$(variableD)"]

Cheers,
Denis GAUTHIER

This message contains OPEN information that is not sensitive and can be
freely accessed by people both inside and outside of the Thales Group

This email was classified by GAUTHIER Denis on Tuesday, 11 February 2014
9:54:44 AM From: qftest-list-bounces@?.de
[mailto:qftest-list-bounces@?.de] On Behalf Of Adesh Siddhu Sent:
Tuesday, 11 February 2014 5:20 AM
To: qftest-list@?.de
Subject: [QF-Test] What is the exact syntax

This is about the condition to be used in an IF
I want to check if variableA == (variableB or variableC or VariableD)   #
i.e. if A has any of the three values

# what would be the syntax if the variables were strings or numbers?

What is the exact syntax for this condition?
In the case where the variables are all strings,
I tried "$(variableA)" == "[$(variableB) or $(variableC) or
$(variableD)]" but that did not do the trick.

Adesh Siddhu
Director of Applications
Santa Clara County - Social Services Agency
408-755-7318
adesh.siddhu@?.org<mailto:adesh.siddhu@?.org>
Follow County News -
www.twitter.com/SCCgov<http://www.twitter.com/SCCgov>


NOTICE: This email message and/or its attachments may contain
information that is confidential or restricted. It is intended only for
the individuals named as recipients in the message. If you are NOT an
authorized recipient, you are prohibited from using, delivering,
distributing, printing, copying, or disclosing the message or content to
others and must delete the message from your computer. If you have
received this message in error, please notify the sender by return
email.


-------------------------------------------------------------------------
DISCLAIMER: This e-mail transmission and any documents, files and
previous e-mail messages attached to it are private and confidential.
They may contain proprietary or copyright material or information that
is subject to legal professional privilege.  They are for the use of
the intended recipient only.  Any unauthorised viewing, use, disclosure,
copying, alteration, storage or distribution of, or reliance on, this
message is strictly prohibited.  No part may be reproduced, adapted or
transmitted without the written permission of the owner.  If you have
received this transmission in error, or are not an authorised recipient,
please immediately notify the sender by return email, delete this
message and all copies from your e-mail system, and destroy any printed
copies.  Receipt by anyone other than the intended recipient should not
be deemed a waiver of any privilege or protection.  Thales Australia
does not warrant or represent that this e-mail or any documents, files
and previous e-mail messages attached are error or virus free.

-------------------------------------------------------------------------




--
Martin Moser
Development & Support

E: martin.moser@?.de
T: +49 (0)8171 38648-14
F: +49 (0)8171 38648-16

Quality First Software GmbH | www.qfs.de
Tulpenstr. 41 | 82538 Geretsried | Germany
GF Gregor Schmid, Karlheinz Kellerer
HRB München 140833



Videos Downloads Documentation Buy Free Trial