Diffrence betwn '='and'==' in webMethods

Hi Frens,

Im new to webMethods and i have a slight doubt regarding diffrence betwn = and == .I wish to use it under the Properties Panel in the Label Property.
Please guide

Regards
Mayank

Hi Mayank

There is no difference between = and == operators for the verifying the value of the variable in the label property. You can use any of it.

Thanks Jeevan for your valuable suggetion.
Can u plz suggest which is considered as best practise, using = or == ?

Hi Mayank

Precdence is same for both the operators, we can use any one. If I mentioned any thing wrong , Please suggest it.

I tend to use ‘==’ when testing for equality simply because it’s the equality operator in Java, which many are used to.

Thank you Reamon

Both the operators work same way, but most preferably use “==”

HTH,
RMG

Thanks Jeevan

Well the answer you posted was indeed correct .
If i come across any more suggestions i would definetly share.

Hi manik,

There is a difference b/w = and ==
= means asignement operator.It wont evaluate condition.
== Is used for comparision.This one u can use for evaluate condition.

Ex:
x=5 which means, u r assinging 5 to the variable x.( u decided x value initially)
x== 5 which means ,u r cheking weater the input value is 5 or not.If it is 5 then only contol come into that block

Thanks&Regards
Ashok Kodali

Hi Ashok,

Example you have provided is not a correct one .just check out in Developer once. You can use both the operators for verfiying the condition. Reamon and RMG has suggested to use === operator for best practice .

Thanks for your reply Ashok
But the answer u have posted is not true in case of webMethods.
As Jeevan suggested plz check out once yourself the same in the webMethods.
Do let us know your key findings

ashok1.niit

what ashok said is not correct … dont treat webmethods as programming language…its not like (java)

ashok please do some practice before posting

At the risk of starting a long debate…

“webMethods” is an umbrella product name that covers many products from Software AG. Integration Server (run-time) and Developer (solution development tool) are 2 of them and are what is being discussed here.

The FLOW language, used to create FLOW services, supports relational operators in the labels of steps/blocks under a BRANCH statement in which the evaluate labels setting is true. In this case, = and == are evaluated in the same way–a test for equality. No assignment operator is supported.

For Java services, obviously Java syntax applies and = is the assignment operator and == is a test for equality.

Thanks Reamon for your answer…
I believe that will clear the doubt.