?? inqueue2.m
字號(hào):
%flag 'D'-diskqueue, 'R'-readyqueue
function [Q,pos]=InQueue2(p,value,Q,Qlen,flag)
% disp('=========in InQueue2================');
i=1;
while i<=Qlen
if Q(i,1)==0
Q(i,1)=p;
Q(i,2)=value;
pos=i;
% if flag=='D'
% fprintf('In the p%d to QDisk\n',p);
% elseif flag=='R'
% fprintf('In the p%d to QReady\n',p);
% end
break;
end
i=i+1;
end
if i>Qlen
fprintf('The Queue(%c) is Full!\n',flag);
pos=-1;
return;
end
%-----------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -