Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

CXML.DLL Routine SAXPY

danial
Beginner
782 Views
I can't get the CXML.DLL routine SAXPY to return the correct values. Same problem with function SDOT. The output is the value that I passed in. For SAXPY it is supposed to overwite vector b(10) with the answer. The output I get is as if it did not overwrite the vector b(10) with the answer. I get b(10) output with the same values that I sent into the routine. I am calling SAXPY from Visual Basic 6.0. Does any one have a clue as to why this is happening?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
782 Views
My guess is that you're not calling it correctly. Getting arrays passed from VB requires care - you need to pass the first element of the array rather than the whole array, and keep in mind that in VB, arrays are zero-origin by default.

Suggestion - write a dummy Fortran DLL with the same interface and call it from VB, then examine what the routine receives.

Steve
0 Kudos
danial
Beginner
782 Views
Thanks for the tip. I had those aspects right. It turned out I forgot to declare one of the arguments in VB so VB automatically made it a Variant type; this in turn fouled things up. Instead of passing a Single type to be received as a Real(4) type, I was passing a Variant in.
0 Kudos
Reply