Include statement in subroutine

For questions regarding programming in the EViews programming language.

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

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Include statement in subroutine

Postby jthodge » Thu May 08, 2014 8:25 am

Is there a way to put an include statement (referencing an outside program) within a subroutine?

I get the error "Nested subroutine" when trying this.

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

Re: Include statement in subroutine

Postby EViews Gareth » Thu May 08, 2014 8:31 am

No, you cannot.

You can use exec, though.

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Re: Include statement in subroutine

Postby jthodge » Thu May 08, 2014 8:56 am

Great. Thanks. "EXEC" works in my subroutine.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests