
#演示静态数组的排序

#预处理函数: 可配置 MKScript 脚本加载后自动运行
#mkscript_config_auto_start()

#定义数组
int fen[5] = {1,0,2,7,4}

#修改数组中的值
fen[0] = 1
fen[1] = 5
fen[2] = 2
fen[3] = 3
fen[4] = 4


int m,n

#临时变量
int t

m = 0
for m = 0 to 4    
    
    for n = m + 1 to 4

        if fen[m] < fen[n]

            t = fen[m]

            fen[m] = fen[n]

            fen[n] = t

        endif        

    next   

next

for int i = 0 to 4

    println("fen[" + i + "]: " + fen[i])

next

