How to use string in if statement?

Is it not possible to use string in if statements? Sorry if this is a stupid question, I am not a very experienced user of GAUSS. I keep getting G0071 : Type mismatch for the second line of the following code:

However, if your list of items gets longer, I would recommend using the GAUSS contains function. contains takes two inputs: haystack and needle. It answers the question "Can 'needle' be found in haystack. Let's modify your example to use contains

Have a Specific Question?

Need Support?

Try GAUSS for 30 days for FREE

GAUSS is the product of decades of innovation and enhancement by Aptech Systems, a supportive team of experts dedicated to the success of the worldwide GAUSS user community. Aptech helps people achieve their goals by offering products and applications that define the leading edge of statistical analysis capabilities.