Page 1 of 1

Unrecognized strings

Posted: Tue Mar 26, 2013 7:51 am
by LuisReyes
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

Re: Unrecognized strings

Posted: Tue Mar 26, 2013 8:05 am
by EViews Gareth
Might be a bug. Will look into it.

Re: Unrecognized strings

Posted: Tue Mar 26, 2013 9:27 am
by EViews Gareth
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

Re: Unrecognized strings

Posted: Wed Mar 27, 2013 2:26 am
by LuisReyes
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.

Re: Unrecognized strings

Posted: Wed Mar 27, 2013 2:27 am
by LuisReyes
By the way, I am using EV 7

Re: Unrecognized strings

Posted: Wed Mar 27, 2013 6:16 am
by EViews Gareth
So it works as expected, right?

Re: Unrecognized strings

Posted: Wed Mar 27, 2013 6:36 am
by LuisReyes
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...

Unrecognized strings

Posted: Wed Mar 27, 2013 6:43 am
by EViews Gareth
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.