octave-maintainers
[Top][All Lists]
Advanced

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

Re: error('') behaviour


From: Søren Hauberg
Subject: Re: error('') behaviour
Date: Tue, 31 Mar 2009 16:35:20 +0200

tir, 31 03 2009 kl. 07:18 -0700, skrev John W. Eaton:
> On 31-Mar-2009, Marco Caliari wrote:
> 
> | Dear maintainers,
> | 
> | just to report the following incompatibility:
> | 
> | ml
> | >> error(''),disp('done')
> | done
> | 
> | octave
> | >> error(''),disp('done')
> | error:
> | 
> | That is, if the function error is called with an empty string, than no 
> | error should occour. I have seen this piece of code
> | 
> | error(nargchk(0,1,nargin));
> | 
> | exploiting the incompatibility.
> 
> Does the argument have to be completely empty?  What happens for
> 
>   error (' ')
> 
> ?

It has to be empty:

        >> error ('hello')
        ??? hello
        
        >> error ('')     
        >> error (' ')
        ???
        
        >> error (0)  
        ??? Error using ==> error
        The message must be specified as either a string or a message
        structure.
        
        >> error ([])
        >> error (struct())
        ???
        
Soren



reply via email to

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