Passing (control) variables from program to program

For questions regarding programming in the EViews programming language.

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

abossie
Posts: 15
Joined: Tue Jan 31, 2012 10:54 am

Passing (control) variables from program to program

Postby abossie » Sun Jul 01, 2012 1:16 pm

They way I have my programs currently set up I have a "master" program that then runs several smaller programs using the exec command. These smaller programs all open and close several workfiles.

I would like to be able to declare variables in the master program and have them be the same across my programs and across workfiles (for instance I would like to set the number of lags across all programs). As I have it now I have scalars declared in each workfile. This means I have to change the scalar in each program which is both annoying and prone to mistakes.

Anyway, is there a way that I can just have something like !lags=8 in my "master" program and have a control variable (or something like it) hold across all my programs.

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

Passing (control) variables from program to program

Postby EViews Gareth » Sun Jul 01, 2012 2:06 pm

No, but you could have your child programs take arguments, and then pass them on from the master program.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests