Linda

Since R:Base 3.0, I have been advising people that the most thorough way to
check for not equals as well as NULL is by writing the code this way:

SET VAR v1 TEXT = NULL
SET VAR v3 TEXT = 'test value'
IF v1 <> v3 OR (v1 IS NULL AND v3 IS NOT NULL) THEN

You must test for BOTH.  R:Base is doing it RIGHT.  I'd suggest fixing your
code and then reinstalling 6.5++ - it's WELL worth it!

David Blocker

----- Original Message -----
From: "FISHER" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 5:10 PM
Subject: Null Warning - 6.5++ for Dos Upgrade


> We just installed the latest upgrade this morning and had to uninstall
> shortly thereafter in order to modify our code to account for the
> correct handling of Null value comparisons.
>
> I had read the Bug Fixes and Enhancements at the time of the install
> but didn't think that the change in how R:BASE was evaluating NULL
> values would affect us since we were using the OFF EQNULL setting and I
> knew that we rarely compared two null values.  However, a change related
> to the results of comparisons of null values to text values when EQNULL
> is OFF wreaked havoc with our program flow.  Below I have outlined the
> results of comparisons of null values to text values by R:BASE in 6.1,
> 6.5+ 6.5++ prerelease and 6.5++.
>
> SET VAR v1 TEXT = NULL
> SET VAR v3 TEXT = 'test value'
>
>                     Version     6.5++     6.5++       6.5 +     6.1
>                     Build         1.842       1.840         1.839
> 6.1ax
> IF v1 <> v3 THEN        False        False         True      True
> IF v1 NE v3  THEN        False        True          True      True
>
> As far as I can tell, and I have done extensive evaluations with
> INTEGER and DATE variables including BETWEEN and NOT BETWEEN checking,
> the only change that occurred when EQNULL is set to OFF is with the
> comparison of TEXT values as outlined above.  Also, the reason we didn't
> identify this when with the beta's is because we routinely use the NE
> syntax instead of <>.  Hopefully this will allow some of you out there
> to plan for the upgrade better than we did.
>
> Linda Fisher
> Manager, Data Services
> CIMRO Quality Healthcare Solutions
> 208 Metro Dr.
> Jefferson City, MO  65109
>

Reply via email to