print function executes index.m in CWD

Ben Abbott bpabbott at mac.com
Fri Sep 5 20:33:45 CDT 2008


On Sep 5, 2008, at 9:27 PM, Dmitri A. Sergatskov wrote:

> I think I know what happened.
> When I have index.m in the current directory it
> shadows off the index.m function from strings
> package.
> The strings package (and function index()) is being
> used by octaverc.
>
> I do not know what the situation with Matlab.
> Does it have index.m somewhere (I cannot find it on the web)?
> Does it have the pernicious feature to execute index.m
> in current directory (or perhaps in all directories in the path)?
>
> We definitely have a conflict here and I do not know what is the best
> way to solve it: do we rename index() function into something else
> (I would suggest idx())?
>
> Sincerely,
>
> Dmitri.
> --


in Matlab 2008b

 >> which index
'index' not found.
 >>

Matlab will search the pwd prior to the path.

I'd suggest you rename *your* file to something other than index.m.

Ben



More information about the Bug-octave mailing list