View Single Post
Old April 14th, 2005, 03:27 PM
rahzan rahzan is offline
Authorized User
Join Date: Jun 2004
Location: , , .
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts

I finally tried passong the Nan from fortran or C, and it seems to work fine.
The display in vba's watch window is "-1.#QNAN" however, explicit assignemnt of this value to a single or variant does not even compile.
A necessary technicality is to set the intent to "out" and not "inout" in the com-interface. I also made the Nan as the return value.

I further tested that passing this value back to fortran comes back as a Nan.
The value also copies fine from one vba variable to another.

Still it would be a little nicer to do it all in vba to be sure the semi-accessible QNAN representation won't go away in some future version.