pb_remove.m

来自「这是机械工业张德丰《MATLAB与外部程序接口编程》随书源码」· M 代码 · 共 12 行

M
12
字号
function pb_remove(pb_htalbe, name)
if ~pb_htable.containsKey(pb_keyfilter(name))
    disp(sprintf('The name %s is not in the phone book', name))
    return
end;
r=input(sprintf('Remove entry %s (y/n)? ', name), 's');
if r= ='y'
    pb_htable.remove(pb_keyfilter(name));
    disp(sprintf('%s has been removed from the phone book,', name))
else
    disp(sprintf('%s has not been remove', name))
end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?