@isobject

For questions regarding programming in the EViews programming language.

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

raphbrun
Posts: 8
Joined: Thu Feb 26, 2009 3:36 am

@isobject

Postby raphbrun » Sat Feb 12, 2011 12:00 pm

Hi. I am facing a problem with @isobject. I am trying to run the following:

for %y fr

scalar is_{%y}_fxvol=@isobject("fxvol_{%y}")
scalar is_{%y}_cpi=@isobject("dcpi_{%y}")

next

Both series fxvol_fr and dcpi_fr exist and contain values. However the scalar values in the program are zero. @isobject does not work in a loop environment?

Thanks

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

Re: @isobject

Postby EViews Gareth » Sat Feb 12, 2011 12:06 pm

You can't use replacement variables inside quotes. Try this:

Code: Select all

for %y fr %temp1 = "fxvol_" + %y %temp2 = "dcpi_" + %y scalar is_{%y}_fxvol=@isobject(%temp1) scalar is_{%y}_cpi=@isobject(%temp2) next


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests