Thu Dec 09, 2021 4:02 am
Login Register Lost Password? Contact Us


Difference Between IF and IFF

Comments and questions related to the Enterprise Control Language

Wed Mar 06, 2019 8:34 am Change Time Zone

Hi Team,


Can say What is the Difference Between the IF and IFF. Where we can use IF and IFF With example?

Regards,
Manikandan N
Daniel_mani
 
Posts: 11
Joined: Wed Jan 23, 2019 2:15 pm

Wed Mar 06, 2019 3:16 pm Change Time Zone

Manikandan N,

I'm quoting Gavin Halliday from this post: https://hpccsystems.com/bb/viewtopic.php?f=8&t=1491&p=8422&hilit=IFF#p8422
... IF() only tries to ensure that only the correct branch of the IF() is executed if the type of the results is an action or a dataset. For scalars (and rows) both branches may be executed.

To ensure that the other branch isn't executed you can use IFF(). ...

So, the bottom line is that IFF is used where you need to ensure that only the True response is evaluated if the expression is TRUE and only the False response is evaluated if the expression is FALSE.

Take a look at the referenced thread for the full discussion of that particular real-world problem that using IFF instead of IF solved.

HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1606
Joined: Wed Oct 26, 2011 7:40 pm

Thu Mar 07, 2019 10:07 am Change Time Zone

Thanks a lot Richard..

Regards,
Manikandan N
Daniel_mani
 
Posts: 11
Joined: Wed Jan 23, 2019 2:15 pm


Return to ECL

Who is online

Users browsing this forum: Bing [Bot] and 1 guest