Seemingly simple problem with If Statements and Strings

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

blonggovnl
Posts: 16
Joined: Thu Aug 22, 2013 7:45 am

Seemingly simple problem with If Statements and Strings

Postby blonggovnl » Tue Sep 03, 2013 6:27 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Seemingly simple problem with If Statements and Strings

Postby EViews Gareth » Tue Sep 03, 2013 7:09 am

Nothing looks wrong with it. I'll point out that if statements are case sensitive, so make sure you have the case correct.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests