From: Boris P. on
Thank you all.
Okay, I only thought I missed something.
From: Boris P. on
Yes, I do have zero as "real" values.
I will define an unused number as QNAN.

ralph wrote:
> On Fri, 09 Jul 2010 14:24:25 +0200, "Boris P."
> <bpnotvalid(a)> wrote:
>> I am reading from a binary file and I fill an array of singles with the
>> values.
>> In my file I have several QNANs. Is there any equivalent of QNANs in VB6?
>> I have to store in the array that that these values are QNAN, I cannot
>> simply skip them.
>> Instead of an array of singles, I could make an array of udts with
>> Private Type Single2
>> .Value As Single and
>> .IsQNAN As Boolean
>> End Type
>> But that would seem really overkill to me.
> Yep.
> But little choice.
> Traditionally this is has been resolved by defining a specific value
> or range of values as the exception within a set of numbers.
> eg.
> Can your Singles ever be zero, or greater than 1, or greater than
> some high integer value, like 3200? (Doubles would give you greater
> scale.)
> Or you could use a UDT or Variant. With an array of Variants for
> example, you might define a String as a NAN.
> You might use two arrays or a 2 dimensional array. One for the values,
> one to indicate if Valid or not. This can be slightly faster for some
> computations.
> -ralph