I have tried that several times, but I still get duplicates. I am going to reduce my indicators to 3 and go with the code that works.
Thanks all.
>The parens in this code don't do anything. Try this
>
>IF m.TheWord3 $ lcTEXT AND !(m.TheWord1 == m.TheWord3 OR m.TheWord2 == m.TheWord3)
>
>Note there is only one !.
>
>
>>Once again let me state that this is recreational programming - There is no deadline or money involved.
>>
>>I am scanning for up to five indicators. When I apply the suggested method, indicator 1 and indicator 5 are the same and 2-3 and 4 are the same. If I put parentheses around each comparison (below) the outcome is 1-2 and 5 are all different and 4 is a duplicate of 3.
>>
>>Here's the 3-4 code. Next. I'll try with the '!' inside the braces? (Tried it and it's still the same outcome)
>>
>> SCAN
>> m.TheWord3 = ALLTRIM(LOWER(indicator))
>> IF m.TheWord3 $ lcTEXT AND ! (m.TheWord1 == m.TheWord3) OR !(m.TheWord2 == m.TheWord3)
>> REPLACE hits WITH indicator.hits + 1
>> m.sidenote3 = action
>> SELECT MASTER
>> REPLACE indicator3 WITH m.sidenote3
>> ENDIF
>> SELECT indicators
>> ENDSCAN
>> SCAN
>> m.TheWord4 = ALLTRIM(LOWER(indicator))
>> IF m.TheWord4 $ lcTEXT AND ! (m.TheWord1 == m.TheWord4) OR !(m.TheWord2 == m.TheWord4) OR !(m.TheWord3 == m.TheWord4)
>> REPLACE hits WITH indicator.hits + 1
>> m.sidenote4 = action
>> SELECT MASTER
>> REPLACE indicator4 WITH m.sidenote4
>> ENDIF
>> SELECT indicators
>> ENDSCAN
>>
>>
I ain't skeert of nuttin eh?
Yikes! What was that?