Hello,
I am wandering if there is a possibility of executing a for loop by skipping some values.
For example, I have 100 variables v1, v2,...v100 and I want to set them all to zero except v52 and v80. Is there a way of doing this within a "restricted" for loop?
Thank you
for loop with skipped values
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13313
- Joined: Tue Sep 16, 2008 5:38 pm
Re: for loop with skipped values
Put an if statement inside the loop
Follow us on Twitter @IHSEViews
Re: for loop with skipped values
This was so simple I didn't think doing this way. Thank you!
Who is online
Users browsing this forum: No registered users and 15 guests