[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad data in structure (NaN HowTo?)




> Randall, is it true that you are filling the -12345 values within your
> CALL_EXTERNAL procedure?  If so, then perhaps you can try the second
> thing I suggested.  Namely, in IDL create whatever "null" variables
> you want, either NaN or whatever.  Then pass those variables into the
> CALL_EXTERNAL procedure.

This is exactly what I ended up doing...  Eventually I did learn that you
can also do 'A = 0.f/0.f' in C (works with gcc compiler) which gets
interpreted by IDL as NaN but this seemed somewhat inelegant and probably
wouldn't work on different machines/platforms/compilers. With regard to an
NaN for an 'int' number I re-read my first programming text to convince
myself that NaN was truly a floating point arithmetic concept.  The moral
of the story being 'one should never throw away old textbooks...' 

Thanks to all who offered help and advice!

Randall