I'm having trouble getting this to work and I could use someone else to
point me in the right direction. I've got the code below:
SET VAR vdescription =
'This^is^a^test^string^with^some^words^this^test^string^has^some^words^that^
occur^twice'
SET VAR vslocp1 = (slocp(.vdescription2,'^',(.vcounter1-1)))
SET VAR vslocp2 = (slocp(.vdescription2,'^',(.vcounter1)))
IF vslocp2 = 0 THEN
SET VAR vslocp2 = =.vslen
ENDIF
SET VAR vsget = (SGET(vdescription2,(.vslocp2-.vslocp1-1),(.vslocp1+1)))
IF vsget NOT IN (.vwordsfound) THEN
SET VAR vwordsfound = (.vwordsfound + ',' + .vsget)
ENDIF
In the last 'IF' statement (IF vsget NOT IN (.vwordsfound) THEN) it is
adding words that are already in the list, i.e. this, some, words. If I
replace the statement with, IF vsget NOT IN (this,is,a) THEN, it works fine.
What am I missing?
Thanks in advance,
Paul Buckley