Page 1 of 1

Subroutine - putting the results directly into table

Posted: Wed Jun 08, 2011 12:16 am
by jerry
Hello,

Is it possible (Eviews 6) to put the scalar result of subroutine directly into table through the argument? I mean something like the following structure (not working):

Code: Select all

table(5,5) myresults subroutine local abc (series x, series y, scalar z) z = @obs(x) + @obs(y) endsub call abc(ser1, ser2, myresults(1,1))
instead of (working):

Code: Select all

table(5,5) myresults subroutine local abc (series x, series y, scalar z) z = @obs(x) + @obs(y) endsub scalar temp call abc(ser1, ser2, temp) myresults(1,1) = temp
Thank You in advance.

Re: Subroutine - putting the results directly into table

Posted: Wed Jun 08, 2011 12:40 am
by trubador

Code: Select all

table(5,5) myresults subroutine local abc (series x,series y,table t,scalar i,scalar j) t(i,j) = @obs(x) + @obs(y) endsub call abc(ser1,ser2,myresults,1,1)
If you are not planning to use it in a loop, you can get rid of the scalar arguments...