Hi All,
I am trying to do double looping across regions and countries.
Now I have two regions (Europe and FSU) and I am trying to perform the same operation across regions and countries. If a specify the region (i.e. %r="Europe") then the code works well, however, I receive an error once I add a loop for the two regions.
%rgn="europe fsu"
for {%r} {%rgn}
if %r="Europe" then %ctry="deu fra ita esp nld pol bel aut fin nor che swe eu"
endif
if %r="FSU" then %ctry="rus ukr aze"
endif
for %x {%ctry}
group {%x} demand_{%x}*
next
next
Any ideas what the issue can be? The code has already given me quite a lot of headaches...
Double looping
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: Double looping
Probably a case issue. When using “=“ to test whether two strings are the same, case matters.
Follow us on Twitter @IHSEViews
Re: Double looping
Hi Gareth,
Thank you, it's all good now. It turned out the issue was with the 'endif' part (it should have been 'elseif').
Thank you, it's all good now. It turned out the issue was with the 'endif' part (it should have been 'elseif').
Re: Double looping
Hi Gareth,
Thank you, it's all good now. It turned out the issue was with the 'endif' part (it should have been 'elseif').
Thank you, it's all good now. It turned out the issue was with the 'endif' part (it should have been 'elseif').
Who is online
Users browsing this forum: No registered users and 52 guests