[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange behaviour on creating cell array with canonicalize_file_name
From: |
Mike Miller |
Subject: |
Re: strange behaviour on creating cell array with canonicalize_file_name() |
Date: |
Tue, 22 Oct 2013 08:59:06 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Oct 22, 2013 at 13:00:18 +0100, Richard Crozier wrote:
> I'm seeing the following behaviour on hg id ef5a12a487b9+ (classdef)
>
> >>x = {canonicalize_file_name ('')}
> error: Invalid call to canonicalize_file_name. Correct usage is:
>
> -- Built-in Function: [CNAME, STATUS, MSG] = canonicalize_file_name
> (FNAME)
>
>
> Additional help for built-in functions and operators is
> available in the online version of the manual. Use the command
> 'doc <topic>' to search the manual index.
>
> Help and information about Octave is also available on the WWW
> at http://www.octave.org and via the address@hidden
> mailing list.
> >>x = canonicalize_file_name ('')
> x =
>
> Is this expected/reproducible by others? Why can't the output of
> canonicalize_file_name be put in a cell?
Yes, this is expected. Nothing specific to the particular function you
are calling. See
http://www.gnu.org/software/octave/doc/interpreter/Octave-Sources-_0028m_002dfiles_0029.html
The parser interprets space inside of [] or {} as separating elements of
the matrix or cell array, so canonicalize_file_name is called with no
arguments. For these kinds of uses, you have to remove the space after
the function name.
--
mike