Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Like generating a VFP C0005 error. BUG ?
Message
From
30/08/2003 10:30:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Like generating a VFP C0005 error. BUG ?
Miscellaneous
Thread ID:
00824767
Message ID:
00824767
Views:
55
Hi,

If you want put VFP on memvar inconsistent status,
run this, and IGNORE errors.
PUBLIC X2
X2=CREATEOBJECT('pippo')
RELEASE X2
* now X2 have on internal array memvars name and pointer defined, but heap storage is released, and internal vartype char is bad.

* x3 for compare error trpping
? TYPE('M.X3')		&& OK, U
? VARTYPE(M.X3)		&& OK, U
? VARTYPE(M.X3,.T.)	&& BUG, Variable not found
=m.X3  			&& OK,  Variable not found
? m.X3			&& OK,  Variable not found

* if you use x2:

? TYPE('M.X2')		&& ??? U
? VARTYPE(M.X2)		&& ??? Data Type Mismatch
? VARTYPE(M.X2,1)	&& ??? Data Type Mismatch
=m.X2  			&& ??? Data Type Mismatch
? m.X2 			&& Print fire a strong C0005 error.

DEFINE CLASS pippo as Custom
 PROCEDURE init
   RETURN 
 ENDPROC
 
 PROCEDURE Destroy
   * now X2 not exists
	PUBLIC X2
   * now X2 is correct 
        ? 'var x2 = ', m.X2
 ENDPROC
 
ENDDEFINE
then VFP RELEASE memvar is not correct

Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform