FLOATING NULL?
Blair P. Houghton
bhoughto at pima.intel.com
Wed May 29 12:08:23 AEST 1991
In article <1991May28.153655.24199 at zoo.toronto.edu> henry at zoo.toronto.edu (Henry Spencer) writes:
>In article <13223 at uhccux.uhcc.Hawaii.Edu> karl at wiliki.UUCP (Karl Ihrig) writes:
>>...blank spots in my real world data. I am totally baffled. How do I
>>mark the float element of the array as null, blank, or not
>>available?
>
>There is no portable way except allocating a separate flag for each of
>your float values. C does not guarantee the existence of any "blank" value
Another idea is to keep the 2-d array of floating point
numbers, and in the spreadsheet cells keep pointers to the
members of the array. Then you can use a null pointer to
indicate a blank cell.
This roughly doubles the memory usage of that array, and
complicates a considerable amount of your floating-point
computations with pointer references, but it does provide
the important feature you desire.
--Blair
"There's got to be a way
to get back homeward..."
-Lennon & McCartney
More information about the Comp.lang.c
mailing list