@isobject

For questions regarding programming in the EViews programming language.

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

lomfy
Posts: 36
Joined: Mon Jul 18, 2011 11:51 pm

@isobject

Postby lomfy » Sat Jul 30, 2011 7:14 am

hey folks!
i'm trying to simply count the numbers of series in my worksheet (in order to get a scalar for calculations) which are labeled
rs1 rs2 rs3 .... and so on.
i tried to do this via the following programme:


!count = 0
for !i=1 to 96
if @isobject(rs!i) then !count=!count+1
endif
next
scalar count = !count


however, @isobject does only accept strings, not the argument with !i...
any hints?
cheers

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

@isobject

Postby EViews Gareth » Sat Jul 30, 2011 8:28 am

Use @wlookup to return a string containing the name of every series in the workfile. Then use @wcount to count how many names are in that string.

lomfy
Posts: 36
Joined: Mon Jul 18, 2011 11:51 pm

Re: @isobject

Postby lomfy » Mon Aug 01, 2011 3:21 am

ok...i'll try that! thanks!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest