Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
*Comments ;
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
*Comments ;
Divers
Thread ID:
00049462
Message ID:
00049462
Vues:
100
Attention!

I loose an hour to debug an apps and when i found
the bug, i decided to publish it.

I have a long LOCATE cut to multiple lines. ex:

LOCATE FOR Table1.Field1 = MyVar ;
AND Table1.Field4 = OtherVar ;
AND [...]

IF FOUND()
[...]

I change the var name from MyVar to MyNewVar
cut and paste the first line
and place this line in comment to keep
track of the change i have made.

*(7/9/97) LOCATE FOR Table1.Field1 = MyVar ;
LOCATE FOR Table1.Field1 = MyNewVar ;
AND Table1.Field4 = OtherVar ;
AND [...]

IF FOUND()
[...]

I run the apps with no problem, no error messages
but the 'LOCATE FOR' never find anyting!
Even when i change MyNewVar to an explicit value...
Debug,debug,debug...

HA,HA!
I found the answer, the commented line end with a semicolon (;)!
The comments don't need to start with a * or && if the previous
one is a comment and end with a semicolon.

Ok, it's not a VFP bug.

BTW the colored syntax confuse me because it not
show the entire 'locate' command in green (comment color)
it show only the first one (with the * at the begining).


Be carefull!


THE END

:)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform