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

thanks for confirming. I have addded one line to your code, an #undefine before the vartype()
release aa, a

#define	ALINEDEFINED aa = aa

a=1

#define aa a

ALINEDEFINED
* The next two line should display the same
? [ALINEDEFINED]	&& aa = a  - Bug
? [aa = aa]		&& a = a   - correct

#undefine aa
?vartype(aa), 'should be U', '  Error'
&& this is wrong also
release aa, a

#define	ALINEDEFINED aa = m.aa

a=1

#define aa a

ALINEDEFINED
* The next two line should display the same
? [ALINEDEFINED]	&& aa = a  - Bug
? [aa = aa]		&& a = a   - correct

#undefine aa

?vartype(aa), 'should be U', '  Error'
&& this is ok
&& strange: the m. prefix on the left side where you do not need it, unless of course
release aa, a

#define	ALINEDEFINED m.aa = m.aa

a=1

#define aa a

ALINEDEFINED
* The next two line should display the same
? [ALINEDEFINED]	&& aa = a  - Bug
? [aa = aa]		&& a = a   - correct

#undefine aa

?vartype(aa), 'should be U', '  OK
>Hi Gregory,
>
>I think you found a bug that still exist in VFP9. See code below
CLEAR
>release aa
>#define	ALINEDEFINED aa = aa
>a=1
>#define aa a
>ALINEDEFINED
>* The next two line should display the same
>? [ALINEDEFINED]	&& aa = a  - Bug
>? [aa = aa]		&& a = a   - correct
>?vartype(aa), 'should be U', '  Error'
>
>
>>
>>Anyone can reproduce / explain the code below ?
>>
><snip>
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform