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
How do I skip lines of code?
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How do I skip lines of code?
Code: Select all
for %city city1 city2 city3
if %city<>city3 then
'do manipulation stuff here
endif
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: How do I skip lines of code?
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!
city3 is not defined in "if %city<>city3 then"
edit: it worked once I put city3 in quotes
if %city<>"city3" then
Thanks!
Who is online
Users browsing this forum: No registered users and 37 guests