× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Tue, Oct 11, 2011 at 12:43 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
In any event, even if we consider an empty string to be
non-null, I agree with Jon that the only tests that make
sense is EMPTY and NOT EMPTY...

If you accept that an empty string is a valid string and is not null,
then what makes the most sense is to allow the empty string to be
compared against any other valid string. With a single test.

What you are saying is that any time you want to compare two arbitrary
strings, you must perform up to three tests. First, you must test
whether one string is empty, then you must test whether the other
string is empty. Then, and only then, IF both strings are not empty,
THEN you can perform a third test to actually do the comparison.

Does this make sense? Is it practical?

I cannot stress enough that some systems DO treat the empty string as
null. For that case, it is reasonable to require a separate check for
null versus not null (i.e. invalid value versus valid value; we can
only reasonably be expected to compare two valid values). But for the
case where the empty string is just a regular, valid, everyday string
that HAPPENS to have a length of zero, then it is absolutely and
utterly reasonable to allow it to be compared to any other valid
string. And it would be ludicrous and illogical not to.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.