octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #39561] MATLAB compatibility reported incorrec


From: Tom Olin
Subject: [Octave-bug-tracker] [bug #39561] MATLAB compatibility reported incorrectly
Date: Tue, 06 Aug 2013 17:11:33 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

Follow-up Comment #2, bug #39561 (project octave):

I cobbled up this file (bug.m) exhibiting the problem, based on some real code
that originally produced the warnings. Some cases might be further reducible.


function bug()

  % example 1
  if pi > pi ...
     && pi < pi
    pi;
  end

  % example 2
  s = ['abc' ...
             'def'];

  % example 3
  v = [1 2 3 ...
         4 5 6];

  % example 4
  a = {'a', 'b', 'c', ...
       'd', 'e', 'f'};

  % example 5
  p ...
  = pi;

  % example 6
  p = pi ...
      *pi;
end


This is what it produces:


>> warning('on','Octave:matlab-incompatible');
>> bug
warning: potential Matlab compatibility problem:  used as line continuation
marker near line 5 offile /home/test/bug.m
warning: potential Matlab compatibility problem:  used as line continuation
marker near line 11 offile /home/test/bug.m
warning: potential Matlab compatibility problem:  used as line continuation
marker near line 15 offile /home/test/bug.m
warning: potential Matlab compatibility problem:  used as line continuation
marker near line 19 offile /home/test/bug.m
warning: potential Matlab compatibility problem:  used as line continuation
marker near line 23 offile /home/test/bug.m
warning: potential Matlab compatibility problem:  used as line continuation
marker near line 27 offile /home/test/bug.m
>> 


Perhaps examples 2, 3 and 4 fall under the rule that continuation markers are
unnecessary inside parentheses? If so, then a tweak to the documentation could
clarify that. If not, then it looks like a bug.

What about examples 1, 5 and 6?

In any case, the warning's reference to a nonexistent backslash is
unnecessarily confusing and unhelpful.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39561>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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