Page 1 of 1

Seemingly simple problem with If Statements and Strings

Posted: Tue Sep 03, 2013 6:27 am
by blonggovnl
Hi,

I have a loop with loops through strings. In this loop I have an if statement : if (%school="gonzaga") then...where the %school string is the index for the loop. I just noticed that the program never enters this if statement, despite the string taking the value "gonzaga." Is there something wrong with this string comparison? I've tried using @eqna to no avail.

Thanks,

BL

Re: Seemingly simple problem with If Statements and Strings

Posted: Tue Sep 03, 2013 7:09 am
by EViews Gareth
Nothing looks wrong with it. I'll point out that if statements are case sensitive, so make sure you have the case correct.