outputing years in a table

For questions regarding programming in the EViews programming language.

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

nesheus
Posts: 34
Joined: Tue Oct 26, 2010 11:55 am

outputing years in a table

Postby nesheus » Thu Nov 18, 2010 2:45 pm

How can I put the years as title in a table. I have tried this and didn't work. Can you recommend a solution please? thanks

scalar yy=@first

for !j=1 to 20
setcell(results,3,4+!j,yy+!j)
next

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: outputing years in a table

Postby EViews Jason » Thu Nov 18, 2010 2:52 pm

Use

Code: Select all

setcell(results,3,4+!j,@str(yy+!j))

nesheus
Posts: 34
Joined: Tue Oct 26, 2010 11:55 am

Re: outputing years in a table

Postby nesheus » Thu Nov 18, 2010 3:32 pm

scalar yy=@first expression doesn't work!

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

Re: outputing years in a table

Postby EViews Gareth » Thu Nov 18, 2010 3:53 pm

Perhaps you could explain what you're trying to do.

nesheus
Posts: 34
Joined: Tue Oct 26, 2010 11:55 am

Re: outputing years in a table

Postby nesheus » Thu Nov 18, 2010 4:06 pm

I am trying to report forecast numbers with years. I cannot put the years on the title as I epxlained in the beginning of my posting.
thanks a lot for your help.

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

Re: outputing years in a table

Postby EViews Gareth » Thu Nov 18, 2010 4:08 pm

Code: Select all

results(1,1) = "1979" results(1,2) = "1872"

nesheus
Posts: 34
Joined: Tue Oct 26, 2010 11:55 am

Re: outputing years in a table

Postby nesheus » Thu Nov 18, 2010 4:51 pm

I know to put the numbers in the table. If you look at my original posting the forecast window changes so I don't know the years.
Anyway I found a way to do it.

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

Re: outputing years in a table

Postby EViews Gareth » Thu Nov 18, 2010 5:22 pm

Unfortunately your original, and subsequent, posts were not particularly clear. Asking us how to find "the years" is not particularly meaningful.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests