队列是指暂存区排队还是传送带排队呢?
我的建议是可以返回一个队列目前的数值,以暂存区为例
treenode item = parnode(1);
treenode current = ownerobject(c);
int port = parval(2);
int aa = getinput(node("/a",model()) - getoutput("/a",model());
int bb = getinput(node("/b",model()) - getoutput("/b",model());
int cc = getinput(node("/c",model()) - getoutput("/c",model());
if (aa=bb && bb=cc && cc==0){n=3;}
else if (aa=bb && bb=cc){n=1;}
else if (aa<bb && bb<=cc){n=1;}
else if (bb<aa && aa<=cc){n=2;}
else if (cc<aa && aa<=bb){n=3;}
由于我也是初学并且也不知道你的n这里代表什么,所以这个代码可能有问题,只是单纯提供给你一个思路,希望有帮助。 |