Prev: Restore tray icon after Explorer restarts
Next: NetUserGetInfo via Citrix returns ERROR_BAD_NETPATH
From: Boris P. on 9 Jul 2010 09:37 Thank you all. Okay, I only thought I missed something.
From: Boris P. on 9 Jul 2010 09:38 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)nospamhotmail.com> 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
First
|
Prev
|
Pages: 1 2 Prev: Restore tray icon after Explorer restarts Next: NetUserGetInfo via Citrix returns ERROR_BAD_NETPATH |