Bill,

If eqnull is set "on" then RBase will make the comparison as not 
equal. Otherwise, I guess the logic is that since Null represents 
"unknown" any comparison to it returns "unknown"... I suppose 
presuming the possibility that the comparison might be true if the 
value "were" known. 

I personally think this kind of logic is a lot of whoey. The only 
redeeming quality supporting it that I've come across came from 
Bill Downall, who pointed out that statistical calcs would be 
skewed if nulls were included in the calculation. Though my 
response would be to simply exclude them.

Ben Petersen




On 28 Jan 2002, at 11:00, William Carson wrote:

> I have question in regards to IF-THEN comparisons.  
> In this situation:
>       vA INT=5
>       vB INT=NULL
> Why doesn't R:Base (and some other programming languages) know that they
> are not equal?  Why do you need an IF vB IS NULL THEN when IF vA <> vB
> THEN should suffice?
> 
> Bill
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> On Behalf Of MikeB
> Sent: Monday, January 28, 2002 10:20 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Not Equal
> 
> 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/
> 
> ================================================
> 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