循环序表中的记录
A B C D E
1 =demo.query("select * from STOCKRECORDS where STOCKID=’000062’")        
2 0 0 0  
3 for A1      
4   if A3.CLOSING>A2 >B2=B2+1  
5   else if B2>C2 >C2=B2
6     >B2=0  
7   >A2=A3.CLOSING    
8 if B2>C2 >C2=B2    

C2中计算股票最大连续上涨天数,执行后结果如下: