The seq_skip_nan_TYPE() C Function

As explained in the Sequence Manipulator Functions page, the mco_seq_skip_nan_TYPE() API copies the input sequence to result skipping NaN (Not-a-Number) elements. And note that NaN is a special kind of types float or double, so the input sequence must be one of these types - the function is useless for integer or char types.

A note on NaN values in Microsoft Windows

In the Microsoft Windows environment NULLs are denoted as 0.0/0.0 instead of the"nan" string. This is the value passed into the SQL statement

Note that if 0.0/0.0 is passed as a parameter in a C/C++ application, Visual Studio 2013 does not have the "nan" or "nanf" symbols defined. Therefore the following workaround can be used in the application code:

 
    #ifdef _WIN32
        #if _MSC_VER < 1900 /* Visual Studio 2013 and earlier */
            #include <float.h>
            #define isnan   _isnan
            const unsigned long nan[2]={0xffffffff, 0x7fffffff};
            #define nan(s)      (*( double* )nan)
            #define nanf(s)     (*( float* )nan)
        #endif
    #endif
     

Staring from the Visual Studio 2015 the "nan" and "nanf" symbols are present.