Multi-Line Programming

For questions regarding programming in the EViews programming language.

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

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Multi-Line Programming

Postby fmgoto » Thu Jan 14, 2010 1:55 pm

I wonder if it is possible to write two commands in the same line. For the sake of "readability" only. Codes are getting too long. Thanks.

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

Re: Multi-Line Programming

Postby EViews Gareth » Thu Jan 14, 2010 2:01 pm

You cannot write two commands on the same line.

You can, however, write one command on two lines, by using the line continuation character " _ "

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Re: Multi-Line Programming

Postby fmgoto » Fri Jan 15, 2010 7:39 am

That would be a nice feature for a future version! It helps a lot when you need to define multi-dimensional objects! Thanks, Fabio

PS: Gareth, it also seems that when you write multi-line commands with "_", tabs and comments should not be used after the "_" symbol. Is that right?

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

Re: Multi-Line Programming

Postby EViews Gareth » Fri Jan 15, 2010 8:16 am

Literally all the _ symbol does is tell EViews to read two lines as one. Since you cannot have comments in the middle of a line in EViews (which would be a nice feature for us to add), you cannot have comments after a _


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests