Can I continue a command from a new line?

For questions regarding programming in the EViews programming language.

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

learneviews
Posts: 2
Joined: Wed Jul 14, 2010 11:15 am

Can I continue a command from a new line?

Postby learneviews » Wed Jul 14, 2010 11:56 am

For example, in Matlab, you can add "..." (3 dots) to the end of a line and continue to write your command on the next line without breaking the codes.

Can I do something similar in Eviews. This is very useful when, for example, your ls equation is very long.

Thank you

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Can I continue a command from a new line?

Postby EViews Glenn » Wed Jul 14, 2010 1:49 pm

From the EViews Command and Programming Reference
If you wish to have greater control over the appearance of your lines, you can manually
break long lines using the ENTER key, and then use the underscore continuation character
“_” as the last character on the line to join the multiple lines. For example, the three separate
lines

Code: Select all

equation eq1.ls _ y x c _ ar(1) ar(2)
are equivalent to the single line

Code: Select all

equation eq1.ls y x c ar(1) ar(2)

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

Re: Can I continue a command from a new line?

Postby EViews Gareth » Wed Jul 14, 2010 3:15 pm

Note that the continuation character can be a bit quirky. You always need a space before it, thus it is probably proper to say that the character is \" _\", rather than just \"_. I also find that sometimes it doesn\'t quite accept it unless it also has a space afterwards, so I usually use \" _ \" for continuation.

learneviews
Posts: 2
Joined: Wed Jul 14, 2010 11:15 am

Re: Can I continue a command from a new line?

Postby learneviews » Wed Jul 14, 2010 4:50 pm

Thank you very much. This is great.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests