I'm trying to use a string variable to indicate the directory path for opening a file. But it doesn't work. But if i specify the whole path clearly and without the string variable, it works.
Can you help?
Is there any good reference book for Eviews programming for beginner?
thanks!
works:wfopen \\sac-psas-01\econ\riskindex\RI_V3.1\data\2011Q1\ur_nsa_eviews.csv
doesn't work:
%dir="2011Q1"
wfopen \\sac-psas-01\econ\riskindex\RI_V3.1\data\%dir\ur_nsa_eviews.csv
string variable used in path reference
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: string variable used in path reference
Try:
Code: Select all
%dir="2011Q1"
wfopen \\sac-psas-01\econ\riskindex\RI_V3.1\data\{%dir}\ur_nsa_eviews.csv
Re: string variable used in path reference
Yes it works this way. thanks!
is there a good book to recommend about these programming rules?
is there a good book to recommend about these programming rules?
Try:Code: Select all
%dir="2011Q1" wfopen \\sac-psas-01\econ\riskindex\RI_V3.1\data\{%dir}\ur_nsa_eviews.csv
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: string variable used in path reference
Only the Command and Programming Reference, and what you can pick up by reading this forum.
Who is online
Users browsing this forum: No registered users and 1 guest
