Doing everything in a script on two pages

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Doing everything in a script on two pages

Postby miorinnovo » Wed Oct 30, 2019 7:46 am

Hi,

I have script that does what I need done. Is there a way to have it run through a second time but on a second page at a different frequency?

Thanks a lot!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Doing everything in a script on two pages

Postby EViews Gareth » Wed Oct 30, 2019 8:27 am

Question is a little ambiguous, but you can use @pageselect to change the active page.

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Doing everything in a script on two pages

Postby miorinnovo » Wed Oct 30, 2019 10:46 am

ok, so say I have 10 lines of code, i'll add @pageselect to the 11th line to chose another page. Then, how do I have the program run lines 1 through 10 again on the second page?

Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Doing everything in a script on two pages

Postby EViews Gareth » Wed Oct 30, 2019 10:49 am

Either a for loop, or use a subroutine.

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Doing everything in a script on two pages

Postby miorinnovo » Fri Nov 01, 2019 7:21 am

thanks, i'll do this:

Code: Select all

for !i=1 to 2 series x{!i}=nrnd all my code delete x{!i} pagecreate m 1990 2019


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests