Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparison != What have I missed?
Message
De
14/12/2012 07:20:05
 
 
À
13/12/2012 14:50:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01559575
Message ID:
01559649
Vues:
66
Thanks Craig and all who are helping. I've been using SET EXACT all along, but this little nipper is a PITA that has all indications of being one of those insignificant "I could have had a V8' moments. (something simple, but overlooked) I noticed that I misspelled 'sidenote' as 'sidenotes' also, but have replaced that portion below. Still no luck with this problem, but it's keeping my elderly brain working. :-)

>Strings are compared up to the length of the string on the left. As others have said, you need SET EXACT or exactly equals (==). I prefer exactly equals because then I don't have to remember to SET EXACT OFF and the code is easier to read.
>
>
>>I am making a coding error that I cannot see. The != comparison is not being caught by the program and duplicate records are being recorded.
>>
>>
>>		SELECT indicators
>>		SCAN
>>			m.TheWord2 = ALLTRIM(LOWER(indicator))
>>			m.sidenote2 = action && text from a field
>>			IF m.TheWord2 $ lcTEXT AND m.TheWord2 != m.TheWord1 && The comparison of  m.TheWord2 != m.TheWord1  is not happening
>>				SELECT MASTER
>>				REPLACE indicator2 WITH m.sidenote2 
>>				SELECT indicators
>>				REPLACE hits WITH indicator.hits + 1
>>				m.sidenote2 = ""
>>			ENDIF
>>		ENDSCAN
>>
>>
>>What have I overlooked?
I ain't skeert of nuttin eh?
Yikes! What was that?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform