AnsweredAssumed Answered

vrf using statements in formula's

Question asked by VRFuser on Apr 8, 2004
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><META content="MSHTML 5.50.4937.800" name=GENERATOR></HEAD><BODY><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Hi Stijn,</SPAN></FONT></DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>look at the triadic operator. see below description from  the Vee help</SPAN></FONT></DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004></SPAN></FONT> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004></SPAN></FONT> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Use</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Use the triadic operator in a Formula object with the following syntax:<BR>(condition ? expression : expression)</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>If the condition is true, the result of the first expression is returned.  <BR> If the condition is false, the result of the second expression is returned. </SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>The triadic operator must be used within a Formula object or other object that takes an expression.</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Example</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>(A|10 ? A*2 : A*3) returns the result of A*2 if A|10 is true, but returns the result of A*3 if A|10 is false.</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Notes</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>The enclosing parentheses are required.</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>The triadic operator is useful in setting up "IF/THEN/ELSE" conditional tests.  The syntax is the same as for the C language triadic operator.</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Location</SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Device  Function & Object Browser  </SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Type:  Operators <BR>Category: Miscellaneous <BR>Member: (a ? b : c) </SPAN></FONT></DIV><DIV> </DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>Regards,</SPAN></FONT></DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004>giovanni D'amore</SPAN></FONT></DIV><DIV><FONT color=#0000ff size=2><SPAN class=136203509-09042004></SPAN></FONT> </DIV><BLOCKQUOTE>  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma   size=2>-----Original Message-----<BR><B>From:</B> Deblancq Stijn   [mailto:Stijn.Deblancq@Advantra.com]<BR><B>Sent:</B> Friday, April 09, 2004   11:29 AM<BR><B>To:</B> PDL-LISTS,VRF (A-Lists,unix1)<BR><B>Subject:</B> [vrf]   using statements in formula's<BR><BR></FONT></DIV>  <DIV><SPAN class=329541709-09042004><FONT size=2>Hello All,</FONT></SPAN></DIV>  <DIV><SPAN class=329541709-09042004><FONT size=2></FONT></SPAN> </DIV>  <DIV><SPAN class=329541709-09042004><FONT size=2>I was wondering if there is a   posibility to put a if... else structure inside a formula.</FONT></SPAN></DIV>  <DIV><SPAN class=329541709-09042004><FONT size=2>This could make my code more   readable, and the number of blocks used for my program   decrease.</FONT></SPAN></DIV>  <DIV><SPAN class=329541709-09042004><FONT size=2></FONT></SPAN> </DIV>  <DIV><SPAN class=329541709-09042004><FONT size=2></FONT></SPAN> </DIV>  <DIV class=Section1>  <P><B><SPAN style="FONT-SIZE: 10pt; COLOR: green">Stijn   Deblancq</SPAN></B><B><SPAN style="FONT-SIZE: 10pt; COLOR: black"><BR>ADVANTRA   INTERNATIONAL</SPAN></B></P>  <P><B><SPAN style="FONT-SIZE: 10pt; COLOR: black">Software   Engineer</SPAN></B><SPAN   style="FONT-SIZE: 10pt; COLOR: black"><BR></SPAN><SPAN   style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Wingdings">(</SPAN><SPAN   style="FONT-SIZE: 10pt; COLOR: silver"> </SPAN><B><SPAN   style="FONT-SIZE: 10pt; COLOR: black">Work Tel#: </SPAN></B><B><SPAN   style="FONT-SIZE: 10pt; COLOR: blue">+32 (0) 56-23.94.42</SPAN></B><SPAN   style="FONT-SIZE: 7.5pt; COLOR: black"><BR></SPAN><B><SPAN   style="COLOR: black; FONT-FAMILY: Wingdings">+</SPAN></B><SPAN   style="FONT-SIZE: 7.5pt; COLOR: black"> </SPAN><U><SPAN   style="COLOR: black; mso-bidi-font-size: 10.0pt">mailto: <A   href="mailto:stijn.deblancq@advantra.com">stijn.deblancq@advantra.com</A></SPAN></U><U><SPAN   style="COLOR: navy; mso-bidi-font-size: 10.0pt"> </SPAN></U><U><SPAN   style="FONT-SIZE: 7.5pt"><o:p></o:p></SPAN></U></P>  <P style="MARGIN-LEFT: 36pt">- - - - - - - Appended by Advantra. - - - - - -   -<BR>This e-mail and any attachments may contain information which is   confidential, proprietary, privileged or otherwise protected by law. The   information is solely intended for the named addressee (or a person   responsible for delivering it to the addressee). If you are not the intended   recipient of this message, you are not authorized to read, print, retain, copy   or disseminate this message or any part of it. If you have received this   e-mail in error, please notify the sender immediately by return e-mail and   delete it from your computer.</P></DIV>  <DIV> </DIV>---<BR>You are currently subscribed to vrf as:   giovanni_damore@agilent.com<BR>To subscribe send a blank email to   "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to   "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,   email "vrf@agilent.com". <BR>If you need help with the mailing list send a   message to "owner-vrf@it.lists.it.agilent.com". </BLOCKQUOTE>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>  

Outcomes