Closed apjanke closed 5 years ago
You can call continue from within a function, and it works on the loop in the calling function?
function out = get_status (this) %RAII.cd = packajoozle.internal.Util.local_cd_change (this.repo_path); cmd = sprintf ("git -C '%s' status --porcelain", this.repo_path); [exit_code, txt] = system (cmd); % Non-zero exit status does not mean error! lines = regexp (txt, "\r?\n", "split"); out.file = {}; out.status = {}; if isempty (txt) continue endif for i = 1:numel (lines) line = lines{i}; if isempty (line) continue endif out.file{i} = line(4:end); out.status{i} = line(1:2); endfor endfunction
Called that from a loop, and it skipped passes!
Reported upstream: https://savannah.gnu.org/bugs/?55995
This has been changed upstream: in Octave default, continue is now lexically scoped.
continue
You can call continue from within a function, and it works on the loop in the calling function?
Called that from a loop, and it skipped passes!