octave-maintainers
[Top][All Lists]
Advanced

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

Re: Does Matlab accept this syntax?


From: Michael D. Godfrey
Subject: Re: Does Matlab accept this syntax?
Date: Wed, 22 Jan 2014 22:16:37 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/22/2014 08:58 PM, Michael Goffioul wrote:
@clA/clA.m:
classdef clA
  methods
    idx = end (this, k, n);
  end
end

@clA/end.m:
function y = end (this, k, n)
  y = 1;
end
Matlab R2009b does not:

>> @clA/clA.m:
??? @clA/clA.m:
               |
Error: Expression or statement is incomplete or incorrect.

>> classdef clA
??? classdef clA
    |
Error: Illegal use of reserved keyword "classdef".

>>   methods
??? Error using ==> methods
Not enough input arguments.

>>     idx = end (this, k, n);
???     idx = end (this, k, n);
                  |
Error: Unbalanced or unexpected parenthesis or bracket.

>>   end
???   end
      |
Error: Illegal use of reserved keyword "end".

>> end
??? end
    |
Error: Illegal use of reserved keyword "end".

>>
>> @clA/end.m:
??? @clA/end.m:
         |
Error: Illegal use of reserved keyword "end".

>> function y = end (this, k, n)
??? function y = end (this, k, n)
    |
Error: Function definitions are not permitted at the prompt or in scripts.

>>   y = 1;
>> end



reply via email to

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