Syntax error

For questions regarding programming in the EViews programming language.

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

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Syntax error

Postby miorinnovo » Fri Nov 01, 2019 6:58 am

I'm getting a syntax error when I try to create a moving average in a for loop like this:

Code: Select all

for !i=1 to mygroupgr.@count
   %sn = mygroupgr.@seriesname(!i)
  series {%sn}ma = @movav({%sn},8))
  next


the same thing works with other functions like this though:

Code: Select all

for !i=1 to mygroup.@count
   %sn = mygroup.@seriesname(!i)
   series {%sn}gr = @pca({%sn})
   next


So I assume it has to do with the 8 option I'm adding to the moving average function. Any ideas on how to resolve this?

thanks

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

Re: Syntax error

Postby EViews Gareth » Fri Nov 01, 2019 7:41 am

You have two close parens
Follow us on Twitter @IHSEViews

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Syntax error

Postby miorinnovo » Fri Nov 01, 2019 7:44 am

ugh.

thanks


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 11 guests