Checking if a string is null
Manfred Nowak
svv1999 at hotmail.com
Fri Jul 27 19:29:56 PDT 2007
Frits van Bommel wrote
> Sorry, I've never had a secretary.
That is interesting.
Whome from the following persons would you believe in the first
place?
Person A says: you are wrong Frits, you always had a secretary, but
it was an empty secretary.
Person B says: you are wrong Frits, you always had a secretary, but
it was a null secretary.
Person C says: you are wrong Frits, you always had two secretarys: an
empty one and a null one, but you were not able to distiguish between
them.
Person D says nothing.
Person E is absent an therefore cannot say anything.
> About your analogy: If an empty envelope stands for an empty
> array, and null arrays are different from empty arrays (as one
> group of posters would prefer) then what would be the equivalent
> of a null array? No envelope at all? A postcard with "This is not
> an envelope" written on it perhaps? ;)
The premise evaluates to false under the analogy: the envelope is a
symbol for "static and dynamic arrays".
An empty envelope stand for the null array or null string.
An envelope containing one empty sheet of paper stands for the empty
array or the empty string.
Note: In the empty envelope, there are no characters. In the envelope
containing one empty sheet of paper, there are no characters as well.
Although both contain no charcters they are not equal in the common
sense.
Do you see more?
-manfred
More information about the Digitalmars-d
mailing list