Page 1 of 1

Include statement

Posted: Fri Feb 03, 2012 8:15 am
by paues
From other posts and the somewhat mysterious behavior that the code below does not show a dialog box before returning an error I have understood that the include statement is processed before anything else in the code. This seems rather counter-intuitive (and is not mentioned in the command reference). Why is this? Are there any plans to change it?

Code: Select all

%tmp="C:\qwerty\uioup.prg" @uiprompt("hello world") include {%tmp}

Re: Include statement

Posted: Fri Feb 03, 2012 8:40 am
by EViews Gareth
No plans to change it. Use Exec instead.

Re: Include statement

Posted: Thu Mar 08, 2012 5:44 am
by paues
The problem I have with using the Exec command is that string variables assigned in the child are not passed back to the parent post execution of the child. This leaves the coder with the hassle of handling string objects.

Re: Include statement

Posted: Wed Dec 05, 2012 9:47 am
by paues
Are there still no plans to change this behavior?

Re: Include statement

Posted: Wed Dec 05, 2012 10:04 am
by EViews Gareth
Correct, no plans to change it.

Re: Include statement

Posted: Wed Dec 05, 2012 10:09 am
by paues
In that case, is it simply because the behavior would be difficult to change? Or is it because you think that it would be a bad idea to change it?

Re: Include statement

Posted: Wed Dec 05, 2012 10:18 am
by EViews Gareth
Both.

Re: Include statement

Posted: Thu Dec 06, 2012 2:29 pm
by paues
I was hoping for a more thorough explanation :-) I don't have any trouble seeing that it might be difficult for you to change it, but I can't see why it would be a bad idea. The change I am suggesting would be perfectly backward-compatible, in that all previously written code would work just fine, while giving struggling EViews programmers, such as myself, more options.

Furthermore, the current behavior violates the belief, held by me and probably most of your users, that programs are read from the beginning to the end. Are there any other instances where EViews departs from that?

(If you do not plan to change it, at the very least, it should be mentioned in documentation.)