From help-octave-request at bevo dot che dot wisc dot edu Wed Jan 7 15:55:04 2004 Subject: path in Octave 2.1.52 ? From: "John W. Eaton" To: Bart Vandewoestyne Cc: help-octave at bevo dot che dot wisc dot edu Date: Wed, 7 Jan 2004 15:54:48 -0600 On 7-Jan-2004, Bart Vandewoestyne wrote: | Is the 'path' command broken in Octave 2.1.52 ? | | octave:2> path("/usr/local") | ans = /usr/local | octave:3> path | | LOADPATH contains the following directories: | | . | /usr/lib/octave/2.1.52/site/oct/i386-pc-linux-gnu// | /usr/lib/octave/site/oct/api-v3/i386-pc-linux-gnu// | /usr/lib/octave/site/oct/i386-pc-linux-gnu// | /usr/share/octave/2.1.52/site/m// | /usr/share/octave/site/api-v3/m// | /usr/share/octave/site/m// | /usr/lib/octave/2.1.52/oct/i386-pc-linux-gnu// | /usr/share/octave/2.1.52/m// Yes, it is always printing out DEFAULT_LOADPATH, which is definitely the wrong thing to do. I've committed some changes that will make Octave's path work more like the one in the other leading brand. Now it will return a path with DEFAULT_LOADPATH appropriately substituted. So if you start with LOADPATH == ":" (the default) then do something like path (path, "~/octave") LOADPATH will be replaced with the contents of DEFAULT_LOADPATH followed by "~/octave". Does that seem reasonable, and closer to what Matlab users would expect? Should it also expand any trailing // found in the elements? 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 -------------------------------------------------------------