is it allowed to use program arguments in a for loop ?

For questions regarding programming in the EViews programming language.

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

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

is it allowed to use program arguments in a for loop ?

Postby melamel » Tue Jun 14, 2016 2:07 am

Good morning,
I wanted to include program arguments in a for loop, but eviews prompted me an error message saying that there was a syntax error in the control statement. Here's the piece of code i'm using :

Code: Select all

FOR %k %0 %1 %2 %3 %4 %5 freeze(table_Trend_{%k}) {%k}.uroot(exog=trend) next
before running this program I included the names of the variables to be replaced by the %0 %1...in the appropriate field.
Can you please explain me what's the problem ?

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

Re: is it allowed to use program arguments in a for loop ?

Postby EViews Gareth » Tue Jun 14, 2016 2:30 am

Try braces around the arguments.

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

Re: is it allowed to use program arguments in a for loop ?

Postby melamel » Tue Jun 14, 2016 3:02 am

It worked !thank you a lot :)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests