Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#Define oddity
Message
De
12/12/2004 10:42:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
#Define oddity
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
00968604
Message ID:
00968604
Vues:
41
hi,

Anyone can reproduce / explain the code below ?
=DefineTest()

*---------------------------------------------
function DefineTest()

	local a
	*------------------------------------------	
	&& this will create variable aa and it should not
	release aa
	#define	ALINEDEFINED	aa = aa
	
	a=1
	
	#define aa	a
	
	ALINEDEFINED
	
	#undefine ALINEDEFINED
	#undefine aa
	
	?vartype(aa), 'should be U', '  Error'
	?aa
	
	*------------------------------------------	
	
	&& this will not create variable aa
	release aa
	#define	ALINEDEFINED	m.aa = m.aa
	
	a=1
	#define aa	a

	ALINEDEFINED
	#undefine ALINEDEFINED
	#undefine aa
	
	?vartype(aa), 'should be U', ' OK'
	
endfunc
*---------------------------------------------------------------------------
Gregory
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform