ADDWORD – Add words to a list

This function adds one or more words to a list, if they are not already existing in the list.

ADDWORD(<list>,<new-items>)
Where:
<list>
The current list of words.
<new-items>
The new words to be added to the list, separated by blanks.

For each word defined in <new-items>, a check is performed to see if it already exists with the same format in the <list>. The function returns the original list, with any<new-items> not already contained within it appended to the list.

For example:
VARSUB SCAN                                 
VARSET IR = "SCOTT VIRGIL ALAN GORDON JOHN" 
VARSET IR = ADDWORD("!IR","BRAINS TIN TIN") variable IR set to 
GORDON JOHN BRAINS "SCOTT VIRGIL ALAN TIN"                                      
VARSET VARSET IR = IR = ADDWORD("!IR","ALAN GEOFF")  variable IR set to 
"SCOTT VIRGIL ALAN GORDON JOHN BRAINS TIN GEOFF”