[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blank string values.

From: Ben Pfaff
Subject: Re: Blank string values.
Date: Fri, 10 Sep 2010 09:39:28 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

John Darrington <address@hidden> writes:

> From what I remember playing with SPSS (I no longer have a system to use)
> I remember two things:
> String values cannot be empty, every alpha value contains the number of
> bytes corresponding to its width.  However a string variable which contains
> only whitespace is treated as if it were empty.

I do know of some special cases where this is true, but I have
never noticed a general rule of this form.

> This raises the question: Should we special case the value_hash
> function, such that it returns the same hash for blank values
> regardless of their width?  Likewise, value comparisions should
> perhaps treat fully blank values as identical.

I do not think that these changes would be too useful, because it
is rare to hash many values of different lengths.  Usually, when
values are compared, they have the same length.  In the cases
where strings of different lengths are compared, we already make
provisions: for example, the compare_string() function in
src/language/expressions/helpers.c ignores trailing blanks;
otherwise strings of different length would always compare
Ben Pfaff

reply via email to

[Prev in Thread] Current Thread [Next in Thread]