5888882003 2008-3-26 05:36
这段公式用循环语句如何写,请帮忙,谢谢
券基卖席席数:if(卖1席>200000 and 卖1席<300000,1,0)
+if(卖2席>200000 and 卖2席<300000,1,0)
+if(卖3席>200000 and 卖3席<300000,1,0)
+if(卖4席>200000 and 卖4席<300000,1,0)
+if(卖5席>200000 and 卖5席<300000,1,0)
+if(卖6席>200000 and 卖6席<300000,1,0)
+if(卖7席>200000 and 卖7席<300000,1,0)
+if(卖8席>200000 and 卖8席<300000,1,0)
+if(卖9席>200000 and 卖9席<300000,1,0)
+if(卖10席>200000 and 卖10席<300000,1,0),ColorAFFF00,linethick0;
券基卖额:if(卖1席>200000 and 卖1席<300000,卖1额,0)
+if(卖2席>200000 and 卖2席<300000,卖2额,0)
+if(卖3席>200000 and 卖3席<300000,卖3额,0)
+if(卖4席>200000 and 卖4席<300000,卖4额,0)
+if(卖5席>200000 and 卖5席<300000,卖5额,0)
+if(卖6席>200000 and 卖6席<300000,卖6额,0)
+if(卖7席>200000 and 卖7席<300000,卖7额,0)
+if(卖8席>200000 and 卖8席<300000,卖8额,0)
+if(卖9席>200000 and 卖9席<300000,卖9额,0)
+if(卖10席>200000 and 卖10席<300000,卖10额,0),ColorAFFF00,linethick0;
5888882003 2008-3-28 00:24
卖席和卖额是常数
tom76 2008-3-28 01:51
[code]券基卖席席数:=0;
券基卖额:=0;
卖席:=0;
卖额:=0;
卖席[1]:=210000;
卖席[2]:=10;
卖席[3]:=10;
卖席[4]:=10;
卖席[5]:=10;
卖席[6]:=10;
卖席[7]:=10;
卖席[8]:=10;
卖席[9]:=10;
卖席[10]:=10;
卖额[1]:=12345678;
卖额[2]:=1;
卖额[3]:=1;
卖额[4]:=1;
卖额[5]:=1;
卖额[6]:=1;
卖额[7]:=1;
卖额[8]:=1;
卖额[9]:=1;
卖额[10]:=1;
券基文字:='';
for i=1 to 10 do begin
券基卖席席数:=券基卖席席数+if(卖席[i]>200000 and 卖席[i]<300000,1,0);
券基卖额:=券基卖额+if(卖席[i]>200000 and 卖席[i]<300000,卖额[i],0);
券基文字:=券基文字+'\n 卖席'+numtostr(i,0)+': '+numtostr(卖席[i],1)+' 卖额'+numtostr(i,0)+': '+numtostr(卖额[i],1);
if(i=10)then 券基文字:=券基文字+'\n券基卖席总席数: '+numtostr(券基卖席席数,0)+'\n券基总卖额: '+numtostr(券基卖额,1);
end;
券基卖席席数;
券基卖额;
drawtext(barpos=sysparam(2),close,券基文字),align4,colorblack;[/code]卖席和卖额得自己手动输入,
当然也可以用f10文本直接提取
5888882003 2008-3-28 16:34
谢谢tom76朋友,非常感谢!!!
cyzpp 2008-4-8 00:27
太厉害了,不过我想知道用IF的循环语句:plain: