//冒泡排序算法
IF SM402 THEN
wData[0]:=50;
wData[1]:=41;
wData[2]:=23;
wData[3]:=1;
wData[4]:=58;
wData[5]:=77;
wData[6]:=42;
wData[7]:=3;
wData[8]:=9;
wData[9]:=99;
END_IF;
IF bLabel2 THEN
FOR wi:=0 TO 9 BY 1 DO
// wj:=wi+1;
FOR wj:=wi+1 TO 9 BY 1 DO
IF wData[wi]>wData[wj] THEN
wdata1:=wData[wi];
wData[wi]:=wData[wj];
wData[wj]:=wdata1;
END_IF;
END_FOR;
END_FOR;
END_IF;