在循环中断掉不连续的。
a=#(1,2,3,4,5,6,8) cc =#() v=a.count-1 for i in 1 to v do ( s = a[i] ss = a[i+1] if ss-s ==1 then( append cc s print i )else ( append cc s exit ) ) cc
a=#(1,2,3,4,5,6,8) cc =#() v=a.count-1 for i in 1 to v do ( s = a[i] ss = a[i+1] if ss-s ==1 then( append cc s print i )else ( append cc s exit ) ) cc