Unrecognized strings

For questions regarding programming in the EViews programming language.

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

LuisReyes
Posts: 17
Joined: Wed Jan 09, 2013 5:23 am

Unrecognized strings

Postby LuisReyes » Tue Mar 26, 2013 7:51 am

Hi,

I have built a rather large code which I have run several times already and which used to recognize some strings bu does not anymore. The strangest thing is that it still runs. I elaborate on this with an example:

One of the strings I use for creating (very simple) graphs is

%graph_size = "(t=png)"

I reduced to the minimum what goes between the parenthesis for simplicity. When I tried to use the resulting graphs (up to 15 for 3 models) to use them in LaTeX, I realized the file type is not what I was asking for, but .emf. I started playing with the content of the string but it always showed the same unresponsiveness. I even commented the string, but the code still works! (I did erase the graphs and tables in the corresponding folder before using the code again). I would normally expect that once the string does not even exist the program would not even run (right?), but the program keeps on sending me .emf files.

Another thing is that the program does not recognize either the program mode, which I set as "quiet" but does it in "verbose" mode... there might be other unnoticed issues, but my model keeps on working. However, up to now, the main issue is that LaTeX (at least TexStudio) does not recognize .emf, and I have potentially lots of graphs I would have to convert to make it recognize them.

Any idea why this is so? Or, more importantly, any idea how I could overcome this issue?

Thanks in advance

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

Re: Unrecognized strings

Postby EViews Gareth » Tue Mar 26, 2013 8:05 am

Might be a bug. Will look into it.

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

Re: Unrecognized strings

Postby EViews Gareth » Tue Mar 26, 2013 9:27 am

Actually, I cannot replicate it:

Code: Select all

create u 100 series x=nrnd freeze(g) x.line %graph_size = "(t=png)" g.save{%graph_size} myfile.png

LuisReyes
Posts: 17
Joined: Wed Jan 09, 2013 5:23 am

Re: Unrecognized strings

Postby LuisReyes » Wed Mar 27, 2013 2:26 am

Hi (again) Gareth,

thank you for your reply. I ran the code you sent me (by adding cd "path" at the very beginning) and it works fine. It even works when I "comment" the string %graph_size = "(t=png)".

Even more, when I try your code as it is, it saves the graph in .png, but when I comment the string it saves another one in .emf.

Thanks again for your help.

LuisReyes
Posts: 17
Joined: Wed Jan 09, 2013 5:23 am

Re: Unrecognized strings

Postby LuisReyes » Wed Mar 27, 2013 2:27 am

By the way, I am using EV 7

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

Re: Unrecognized strings

Postby EViews Gareth » Wed Mar 27, 2013 6:16 am

So it works as expected, right?

LuisReyes
Posts: 17
Joined: Wed Jan 09, 2013 5:23 am

Re: Unrecognized strings

Postby LuisReyes » Wed Mar 27, 2013 6:36 am

Well, your code apparently works, yes, but mine still doesn't. There must be something wrong with strings. As I mentioned above, your code works even if you comment (or erase, which amounts to the same thing) the string. I wonder why your code still works if the string doesn't even exist in this case...

I noticed this was also the case with EV6, but eventually I just stopped using it. However, I do not really wish to stop using EV 7...

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

Unrecognized strings

Postby EViews Gareth » Wed Mar 27, 2013 6:43 am

I'm not sure why you think there must be something wrong with strings.

Yes the command works when the string doesn't exist, but that's because the line of code just becomes:

Code: Select all

g.save myfile.png
And the default save type is emf, so it creates an emf file.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests