base path for INCLUDE

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

base path for INCLUDE

Postby maxchen » Sat Sep 05, 2015 7:03 pm

EV 9 20150825, xp

In p709, Command Reference: If an include file is specified without an absolute path, the base location will be taken from the location of the program file, not from the default directory.
However, there are more stories.
TestPath2.7z
Soure prg files
(666 Bytes) Downloaded 94 times


unpack the attachment, run Test-path.prg, you will see the results of table tb:
C:\EViews9
e:\doc\ihs\eva
E:\DOC\HEDGE\GC
C:\Tmp
E:\DOC\EV9\TESTPATH2\TMPI\
E:\DOC\EV9\TESTPATH2\

note that
* the default dir is "E:\DOC\HEDGE\GC".
* For @linepath and @runpath, the return strings are ended with "\", other functions are not (I hope them consistently ended with or without "\").


run Test-path1.prg, you see the error
E:\DOC\EV9\TESTPATH2\EXEC\TMPI\TEST4.prg not found on disk in "EXEC E:\DOC\EV9\TESTPATH2\EXEC\TEST-PATH-E1".

* base path for INCLUDE: E:\DOC\EV9\TESTPATH2\EXEC\


run Test-path2.prg, you see the error
E:\DOC\EV9\TMPI\TEST4.prg not found on disk in "EXEC E:\DOC\EV9\TESTPATH2\EXEC\TEST-PATH-E2".

* base path for INCLUDE: E:\DOC\EV9\TESTPATH2\

run Test-path3.prg, you see the error
E:\..\TMPI\TEST4.prg not found on disk in "EXEC E:\DOC\EV9\TESTPATH2\EXEC\TEST-PATH-E3".

* base path for INCLUDE: E:\


Therefore, what really is the base path for INCLUDE? How about set it to be @linepath of parent program

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

Re: base path for INCLUDE

Postby EViews Gareth » Sat Sep 05, 2015 8:11 pm

Follow us on Twitter @IHSEViews

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: base path for INCLUDE

Postby maxchen » Sun Sep 06, 2015 1:34 am

I have just read it. However, there still some puzzle:

According to the white paper: For context no prefix and ".\" , both base on linepath, and "..\" goes to above linepath
* Test-path.prg -> exec Test-path-e.prg: no prefix, should fire an error, but works smooth
* Test-path1.prg -> exec Test-path-e1.prg, ".\", an error
* Test-path2.prg -> exec Test-path-e2.prg, "..\", expected to work but fail

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: base path for INCLUDE

Postby maxchen » Mon Sep 28, 2015 6:13 pm

with EViews9Patch_092815.exe , not fixed yet.

according to the white paper, http://www.eviews.com/download/whitepapers/Paths.pdf

E:\DOC\EV9\TESTPATH2
├─EXEC
└─tmpI

Code: Select all

include tmpI\Test4   'Test-path-e.prg
' include .\tmpI\Test4   'Test-path-e1.prg
' include ..\tmpI\Test4   'Test-path-e2.prg
' include \..\tmpI\Test4   'Test-path-e3.prg




Test-path2.prg should work and Test-path.prg should fail. However, the result is reversed.

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: base path for INCLUDE

Postby maxchen » Mon Sep 28, 2015 6:56 pm

include :
(no prefix) -> runpath;
' ".\" ->linepath;
"..\" -> runpath;
".\..\"-> above linepath

However, the white paper reports that both "no prefix" and "..\" point to linepath

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

Re: base path for INCLUDE

Postby EViews Gareth » Tue Sep 29, 2015 8:58 am

True. We should update the whitepaper to reflect that include with no prefix refers to runpath.

You're always better off being more explicit by using .\ and .\..\ rather than no prefix.
Follow us on Twitter @IHSEViews


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 3 guests