From bug-request at octave dot org Tue Jan 18 04:58:52 2005 Subject: Bug in mkstemp From: Mats Jansson To: bug at octave dot org Date: Tue, 18 Jan 2005 11:57:46 +0100 Hi, two things about the function 'mkstemp': 1) Error in doc-string: "tmpfile" should be changed to "mkstemp". 2) When mkstemp fails to create a temp-file, it returns the error-message in the second output argument, not the third as said in the documentation. Is this a documentation error or an error in the code? octave:6> help mkstemp mkstemp is a built-in function -- Built-in Function: [FID, NAME, MSG] = tmpfile (TEMPLATE, DELETE) ^^^^^^^ [snip] If successful, FID is a valid file ID, NAME is the name of the file, and and MSG is an empty string. Otherwise, FID is -1, NAME is empty, and MSG contains a system-dependent error message. octave:7> [fid, name, msg] = mkstemp ("/mkstemp-XXXXXX", true) fid = -1 name = Permission denied msg = octave:8> isempty (msg) ans = 1 Regards Mats Jansson ------------------------------------------------------------- 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 -------------------------------------------------------------