Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Like generating a VFP C0005 error. BUG ?
Message
De
30/08/2003 10:30:14
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Like generating a VFP C0005 error. BUG ?
Divers
Thread ID:
00824767
Message ID:
00824767
Vues:
56
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform