hi,
any ideas how i could include an exception for a loop, because atm i have to rewrite the code for every single case. short example:
for !j = to 4
for !i = 1 to 30
eq.ls(n) pd!k c pdl(series4, 4, 2) pdl(series!i, !j, 2)
next
next
in this example, my loop gets an error ofc, because i can't include the same variable a second time. what i need would be something like:
for !i = 1 to 30 'except' 4
it would rly help a lot, thx in advance.
exception to a FOR loop
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: exception to a FOR loop
just use an if statement
Code: Select all
for !j = to 4
for !i = 1 to 30
if !i <> !j then
eq.ls(n) pd!k c pdl(series4, 4, 2) pdl(series!i, !j, 2)
endif
next
next
Follow us on Twitter @IHSEViews
-
- Posts: 12
- Joined: Tue Nov 04, 2008 10:09 am
Re: exception to a FOR loop
again the simplest way is the best thx
Who is online
Users browsing this forum: No registered users and 45 guests