The include command does not allow for a file to be included more than once. This is just wrong.
(I see that you might want to add some sort of limitation so that the program does not end up in an infinite loop, although I think also that should be up to the user. After all, you let infinite loops pass with e.g. the while command. But if you must include an infinite-loop limitation, then do it properly by going through each included file and check that such a loop does not occur.)
Also, it is very much possible to include a file more than once just by putting it in a for or while loop.
Include more than once
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Include more than once
I'm not sure I see the case for wanting to include a file more than once. Surely once the subroutines are defined, they're defined, and don't need to be re-defined.
Re: Include more than once
In my case there is no subroutine in the included file. It is just code. And I would like to include the code from that file more than once in another file. It is possible that I could rewrite the whole thing as a subroutine, but this is nevertheless an unneccessary restriction. I just cannot see any reason for why I should not be allowed to include a file more than once. (Ideally, EViews would not object until a file became too large to process.)
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Include more than once
I'm not sure I've ever used an include statement that wasn't there solely for use with subroutines. I'll take your objection under advisement though.
Who is online
Users browsing this forum: No registered users and 2 guests
