- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Version 6.6, Win2000 Professional SP2, Excel 2000
I've read the four posts regarding the topic of 'overflow' and dlls, my problem is somewhat related, but not covered by them.
We have been getting Overflow errors when using an Excel VBA spreadsheet using a CVF compiled dll. The errors occur in sections of the mathematics where an unreasonably large number (> 1e300) may come from iteration.
I've tried 'Stop Always' in the Exceptions, as well as setting the Floating Point Exception handling to zero, in neither case does it interrupt at an infinite value.
I then made some test code like below:
subroutine tst3
real*8 a(10)
integer i,j,k
do i = 100,1000,100
a(1) = 10**(real(i))
enddo
END subroutine tst3
and compiled both as .exe and .dll The .exe breaks when a(1) > 1e300. I wrote a quick VB driver for the .dll, it doesn't break, it simply gives 'Infinity' in the debugger.
Are there any other compiler options to check so we can trap the error before it hangs VB?
Any advice appreciated,
dfh
I've read the four posts regarding the topic of 'overflow' and dlls, my problem is somewhat related, but not covered by them.
We have been getting Overflow errors when using an Excel VBA spreadsheet using a CVF compiled dll. The errors occur in sections of the mathematics where an unreasonably large number (> 1e300) may come from iteration.
I've tried 'Stop Always' in the Exceptions, as well as setting the Floating Point Exception handling to zero, in neither case does it interrupt at an infinite value.
I then made some test code like below:
subroutine tst3
real*8 a(10)
integer i,j,k
do i = 100,1000,100
a(1) = 10**(real(i))
enddo
END subroutine tst3
and compiled both as .exe and .dll The .exe breaks when a(1) > 1e300. I wrote a quick VB driver for the .dll, it doesn't break, it simply gives 'Infinity' in the debugger.
Are there any other compiler options to check so we can trap the error before it hangs VB?
Any advice appreciated,
dfh
Link Copied
0 Replies
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