Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
App in VFP7SP1 has C5. Is this normal?
Message
From
13/06/2006 11:08:17
 
 
To
13/06/2006 09:25:14
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01128510
Message ID:
01128719
Views:
21
>Hi Denis.
>
>>I presently have C5s in a particular place in my app. If I upgrade to VFP9 will I see a difference there. Will version 9 eliminate those C5s?
>>
>>The sad thing about those C5s is that they're happening in a third party tool and so far there not easily reproduced. And when I find the pattern to reproduce them I assume it won't be a piece of cake to fix it. That's the sad part about a third party tool. When everything goes right it's wonderful. But if there's a problem then it can become a nightmare.
>>
>>By the way that third party tool is Stonefield Report which I like a lot.
>
>I blogged about likely cause of this about a month ago (http://doughennig.blogspot.com): using RETURN inside WITH...ENDWITH structures. I used to do that a lot, but since I've eliminated that, all C5 errors have gone away. I suggest looking at every RETURN statement in every method and, if it's inside WITH...ENDWITH, changing the code as necessary.
>
>For example, something like:
>
>
with This
>    if SomeCondition
>        return .F.
>    endif
>... rest of code
>endwith
>
>can usually be changed to:
>
>
if SomeCondition
>    return .F.
>endif
>with This
>... rest of code
>endwith
>
>or:
>
>
with This
>    if SomeCondition
>        llReturn = .F.
>    else
>... rest of code
>    endif
>endwith
>return llReturn
>
>I realize there's a lot of code to look at and resolve this, but it's worth it. I spent a day going through all of Stonefield Query to remove RETURNs inside WITH...ENDWITH and completely eliminated C5 errors.
>
>Doug

I'll give that a try. Thanks a lot for that feedback Doug.
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Reply
Map
View

Click here to load this message in the networking platform