octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46852] smarter diagnostic message when a user


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #46852] smarter diagnostic message when a user variable shadows a function definition
Date: Mon, 07 Mar 2016 19:00:04 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #7, bug #46852 (project octave):

I like this too.  I still have that patch in my working copy of Octave and
last night caught something immediately, e.g.:


octave:1> txtfiles = dir('*.txt');
octave:2> [dir, name, ext] = fileparts (txtfiles(1).name);
octave:3> csvfiles = dir('*.csv');
error: dir(118): out of bound 0
hint: function dir() may have been inadvertently redefined


Of course, what I was coding was more convoluted within a bigger file of code.
 The reason I had used "dir" as a variable was because "help fileparts" uses
DIR as an example variable.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46852>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]