- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been trying to debug a legacy DLL that uses a VB6.0 (SP4) driver. They both compile with zero errors and warnings. The Release version appears to function well, but the debugger stops at the following line of code with a string out of bounds error:
C Now look for right square bracket
K = INDEX (LINE(J:J+15), RBRACK)
RBRACK is ']' and is found in the string.
LINE is an 80 character string, but the value of J is 70, so I can see the Out of Bounds error. I was hoping there is a debugger setting that would let me ignore it, changing 15 to 10 led to other errors, as did increasing the string length.
Any comments appreciated,
dfh
C Now look for right square bracket
K = INDEX (LINE(J:J+15), RBRACK)
RBRACK is ']' and is found in the string.
LINE is an 80 character string, but the value of J is 70, so I can see the Out of Bounds error. I was hoping there is a debugger setting that would let me ignore it, changing 15 to 10 led to other errors, as did increasing the string length.
Any comments appreciated,
dfh
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why do you want to ignore the error? If you did (by disabling array and string bounds checking), your code would be accessing off the end of the string.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This section of code was developed over several years in the eighties, and hadn't previously caused problems.
I don't know compilers, and I find it odd that the CVF release version functions but not the debugger. Though probably worth mentioning, it also worked on FPS 4.0 debugger and release versions (I know, I know FPS is a poison compiler).
If it's bad programming, I'll change it, but I have tendency to introduce more errors than I solve when I'm don't write the code myself.
I don't know compilers, and I find it odd that the CVF release version functions but not the debugger. Though probably worth mentioning, it also worked on FPS 4.0 debugger and release versions (I know, I know FPS is a poison compiler).
If it's bad programming, I'll change it, but I have tendency to introduce more errors than I solve when I'm don't write the code myself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, Please disregard, I just changed
K = INDEX (LINE(J:J+15),
to
K = INDEX (LINE(J:)
and it appears to have loaded all of the records. If it checks out, it's not a problem anymore.
Thanks for your time,
dfh
K = INDEX (LINE(J:J+15),
to
K = INDEX (LINE(J:)
and it appears to have loaded all of the records. If it checks out, it's not a problem anymore.
Thanks for your time,
dfh
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
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