- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Suggestion - write a dummy Fortran DLL with the same interface and call it from VB, then examine what the routine receives.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page