From bug-octave-request at bevo dot che dot wisc dot edu Thu Jan 22 21:18:19 2004 Subject: Re: unintended consequences of nargin changes From: "John W. Eaton" To: Paul Kienzle Cc: Quentin Spencer , bug-octave@bevo.che.wisc.edu Date: Thu, 22 Jan 2004 21:17:26 -0600 On 22-Jan-2004, Paul Kienzle wrote: | We should probably be using nargin as a constant. Here are the places | in the octave tree where we are not: | | Macintosh:~/cvs/octave/scripts paulkienzle$ grep "nargin--" */*.m | plot/__errcomm__.m: nargin--; | plot/__errcomm__.m: nargin--; | plot/__errcomm__.m: nargin--; | plot/__errplot__.m: while (nargin--) | plot/__plt__.m: while (nargin-- > 0) | plot/plot_border.m: while (nargin--) | | On Jan 22, 2004, at 9:05 PM, Quentin Spencer wrote: | | > The recent changes to nargin in CVS broke code in the octave-forge | > legend function that uses the syntax: | > nargin-- | > This now gives the following result: | > error: evaluating postfix operator `--' near line 137, column 11 | > | > Replacing this statement with "nargin = nargin-1" works, but if this | > syntax is used anywhere else, it will break. OK, for now at least, I've avoided the problem by using a temporary variable when we want to decrement nargin. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------