[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: confusion of local / private functions
From: |
Ben Abbott |
Subject: |
Re: confusion of local / private functions |
Date: |
Tue, 14 Sep 2010 19:48:55 -0400 |
On Sep 14, 2010, at 11:15 AM, bpabbott wrote:
> I noticed a confusing feature/bug.
>
> Rather than attempt a description, I've prepared an example.
>
> octave:1> fid = fopen ("__gnuplot_has_terminal__.m", "w");
> octave:2> fprintf (fid, "function [] = __gnuplot_has_terminal__ ()\n")
> octave:3> fprintf (fid, "disp ('HELLO')\n")
> octave:4> fprintf (fid, "endfunction\n")
> octave:5> fclose (fid);
> octave:6> plot (1:10)
> octave:7> print test1.eps
> octave:8> print test2.eps
> HELLO
> error: value on right hand side of assignment is undefined
> error: called from:
> error:
> /Users/bpabbott/Development/mercurial/local_clone/scripts/plot/gnuplot_drawnow.m
> at line 44, column 29
> error:
> /Users/bpabbott/Development/mercurial/local_clone/scripts/plot/__gnuplot_print__.m
> at line 125, column 5
> error:
> /Users/bpabbott/Development/mercurial/local_clone/scripts/plot/__gnuplot_print__.m
> at line 106, column 5
> error:
> /Users/bpabbott/Development/mercurial/local_clone/scripts/plot/__gnuplot_print__.m
> at line 52, column 5
> error: /Users/bpabbott/Development/mercurial/local_clone/scripts/plot/print.m
> at line 338, column 6
>
> The first print command calls the private version,
> ../scripts/plot/private/__gnuplot_has_terminal__, is called. The second print
> command calles the local one.
>
> I've attached a script, go.m. The first time it is run, there is no error.
> Running it again produce the error.
>
> Is there a quick fix, or should I file a bug report?
>
> Ben
After pulling with the tip below, and a fresh build ...
http://hg.savannah.gnu.org/hgweb/octave/rev/2d14817353a6
... this problem is now gone for me.
Ben