on mgetcombination ( me ) -- 檢測是否為第一次循環(huán) if pnumleft = ptotal then -- 是第一次循環(huán),使用當(dāng)前子列表 pnumleft = pnumleft - 1 else -- 不是第一次循環(huán),獲取新的子列表 x = psubsetcount -- 在當(dāng)前子列表中循環(huán)并增值 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