miss_hit icon indicating copy to clipboard operation
miss_hit copied to clipboard

2019b change to function precedence order

Open florianschanda opened this issue 5 years ago • 0 comments

https://uk.mathworks.com/help/matlab/matlab_prog/upgrade-code-for-r2019b-changes-to-function-precedence-order.html

Previously this printed 1 and 2:

function myfunc
   local(1); % local is a function
   local = 2; 
   disp(local);
end

function local(x)
   disp(x)
end

This now errors:

function myfunc
   % local is an undefined variable
   local(1); % Errors
   local = 2; 
   disp(local);
end

function local(x)
   disp(x)
end

florianschanda avatar Jan 21 '20 07:01 florianschanda