Page 1 of 1

How do I skip lines of code?

Posted: Mon Jan 28, 2019 2:50 pm
by miorinnovo
I'd like to skip a couple lines of code but can't seem to find a way to program it. SImply put I have 3 variables for 2 different cities and only 2 variables for a third city. I would like to skip the data manipulation code for that third variable when I get to the third city. I am using a for loop:

for %city city1 city2 city3

and thought an if statement would work but not sure how.

thanks in advance for any help

Re: How do I skip lines of code?

Posted: Mon Jan 28, 2019 5:52 pm
by EViews Gareth

Code: Select all

for %city city1 city2 city3 if %city<>city3 then 'do manipulation stuff here endif

Re: How do I skip lines of code?

Posted: Tue Jan 29, 2019 7:23 am
by miorinnovo
Thanks, this gives me an error:

city3 is not defined in "if %city<>city3 then"


edit: it worked once I put city3 in quotes

if %city<>"city3" then

Thanks!