Functions | |
function | run (s) if(nargin! |
if (!isempty(d)) if(exist(d | |
rethrow (lasterror())") | |
unwind_protect_cleanup | cd (wd) |
end_unwind_protect else | error ("run: the path %s doesn't exist", d) |
endif else | if (exist(f,"file")) evalin("caller" |
else | error ("run: %s not found", s) |
Variables | |
endif [d, f, ext] = fileparts (s) | |
dir | wd = pwd () |
unwind_protect | cd (d) |
if (!exist(f,"file")||!strcmp(ext,".m")) error("run |
unwind_protect_cleanup cd | ( | wd | ) |
end_unwind_protect else error | ( | "run: the path %s doesn't exist" | , | |
d | ||||
) |
if | ( | ! | isemptyd | ) |
function run | ( | s | ) |
unwind_protect cd(d) |
endif[d, f, ext] = fileparts (s) |
if(!exist(f,"file")||!strcmp(ext,".m")) error("run |