Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 vs VFP 7 variables and errors
Message
From
28/01/2003 18:29:54
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00744918
Message ID:
00746479
Views:
14
>>We are seeing C0000005 errors in VFP7 on a too frequent basis.
>>
>>The errors, including C000005, are appearing in applications now running in VFP7 that ran like a champ in VFP6 (VFP6 projects recompiled in VFP7). They are also occuring in applications built from ground up in VFP7.
>>
>>The operating systems are Win98, NT, 2000.
>>
>>Most problems, so far, seem related to using a variable without first initializing it. In some cases the variable was declared local and in others it was not declared at all. FoxPro always supported these bad habits in the past.
>>
>>Is anyone else noticing this?
>
>Your statement seems contradictory because declaring variable as local also intializes it to .F.. Can you clarify it?

I agree that it sounds contradictory and that is the puzzle.
I provided an example elsewhere but will repeat this one part:

local l_csubject

If !used("table1")
use table1 in 0
endif

select * from table 2 into cursor csamples

l_csubject=.t.

**C0000005 occurs inconsistently
** adding l_csubject=.f. just after declaring it local fixes the problem.
Previous
Reply
Map
View

Click here to load this message in the networking platform