Page 1 of 1

Passing on program argument to a string var

Posted: Tue Jan 27, 2009 10:26 am
by renjinlu
Hi, I have a simple question:

Suppose I want to pass on the value of a program argument to a string variable, how could I do that?

for Example

I am running a program called "diag" with an argument "CPI" (there are many other candidates, so I need to have a program variable). In the program, I want to make this explicit instead of keeping on using {%0}, so I have an extra line

%name={%0}

Hoping that I can pass on the string value of "CPI" to %name.
After typing in "run diag CPI", Eviews gives me an error message saying that this is illegal. Any idea why this is so? Thanks!

Re: Passing on program argument to a string var

Posted: Tue Jan 27, 2009 10:46 am
by EViews Gareth
%name = %0

Re: Passing on program argument to a string var

Posted: Tue Jan 27, 2009 12:18 pm
by renjinlu
Thanks, Gareth. You are always the last resort :)

Re: Passing on program argument to a string var

Posted: Tue Jan 27, 2009 12:22 pm
by EViews Gareth
Thanks.... I guess?