Thanks Larry,

 

I had tried that before but I had other syntax issues that kept it from
working and never went back to it.

 

Works like a charm,

Paul

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Monday, January 19, 2009 3:16 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Question on "IF variable NOT IN (list) then"

 

<< 

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?

  >>


Your using variable evaluation (the dot) where you need macro substitution
(the ampersand).

Unfortunately, R:Base cannot parse IF vSGet NOT IN ( &vWordsFound )
correctly.  It is confused by the ampersand following the paren.  So you
need to do:

SET VAR vMatchSet = ('(' + .vWordsFound + ')')
IF vSGet NOT IN &vMatchSet THEN
  -- Stuff goes here.
ENDIF

--
Larry

Reply via email to