VB IIF:

IIf(expr, truepart, falsepart)

The IIf function syntax has these named arguments:

Part                                         Description
________________________________________________
expr            Required.         Expression you want to evaluate.
truepart     Required.         Value or expression returned if expr is True.
falsepart     Required.         Value or expression returned if expr is
False.


Remarks

IIf always evaluates both truepart and falsepart, even though it returns
only one of them. Because of this, you should watch for undesirable side
effects. For example, if evaluating falsepart results in a division by zero
error, an error occurs even if expr is True.



FoxPro IIF:

IIF(lExpression, eExpression1, eExpression2)

Return Values
Character, Numeric, Currency, Date, or DateTime

Parameters
lExpression         Specifies the logical expression that IIF( ) evaluates.
eExpression1, eExpression2
If lExpression evaluates to true (.T.), eExpression1 is returned. If
lExpression evaluates to false (.F.), eExpression2 is returned.

This function, also known as Immediate IF, evaluates a logical expression
and then returns one of two expressions. If the logical expression evaluates
to true (.T.), IIF( ) returns the first expression. If the logical
expression evaluates to false (.F.), IIF( ) returns the second expression.





----- Original Message -----
From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 9:06 PM
Subject: Re: Not Equal


> > In addition to "IFNE", why not add "IFGE" (IF >=) and "IFLE"
> > (IF <=). This would give a full complement of boolean operators.
>
> How about a generalized immediate IF function:
>
>  IIF(BooleanExpression, TrueValue, FalseValue)
>
> which would evaluate the BooleanExpression and return the TrueValue or
> FalseValue depending on the result.  The BooleanExpression could be
anything
> that follows an IF in the R:Base language:
>
> vConfirmMsg = +
>   IIF(PayType IN ('Visa', 'MC', 'Amex'), 'Needs Confirmation', 'Payment
OK')
>
> This would have all the functionality of IFEQ, IFGT, etc, plus a lot more
> that is not currently available in the variable list in Forms and Reports.
>
> (IIF happens to be the name of this function in, I think, FoxPro, but the
> name could be anything else).
> --
> Larry Lustig
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/


================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to