on mGetCombination (me)
-- 检测是否为第一次循环
if pNumLeft = pTotal then
-- 是第一次循环,使用当前子列表
pNumLeft = pNumLeft - 1
else
-- 不是第一次循环,获取新的子列表
x = pSubsetCount
-- 在当前子列表中循环并增值
repeat while pCurrentSubset[x] = pListCount - pSubsetCount + x
x = x - 1
end repeat
pCurrentSubset[x] = pCurrentSubset[x] + 1
repeat with y = (x + 1) to pSubsetCount
pCurrentSubset[y] = pCurrentSubset[x] + y - x
end repeat
-- 获取新的子列表
pNumLeft = pNumLeft - 1
end if
end