📄 pb_add.m
字号:
function pb_add(pb_htable)
% 向电话本中添加记录,姓名和电话号码
disp 'Type the name for the new entry, followed by Enter.'
disp 'Then, type the phone number(s), one per line.'
disp 'To complete the entry, type an extra Enter.'
name = input(':: ','s');
entry=[name '^'];
while 1
line = input(':: ','s');
if isempty(line)
break;
else
entry=[entry line '^'];
end;
end;
if strcmp(entry, '^')
disp 'No name entered'
return;
end;
pb_htable.put(pb_keyfilter(name),entry);
disp ' '
disp(sprintf('%s has been added to the phone book.', name));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -