John Darrington <[email protected]> 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
unequal.
-- 
Ben Pfaff 
http://benpfaff.org

_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to