死碼 (編程)
閱讀設定
永遠唔會行得到(例如係行嘅條件永遠唔會有可能達到;睇下面),
a = 0 if a>1000: # 如果 a 數值永遠冇可能超過 1000,噉呢行跟住就會有拃死碼。 [省略]
或者就算行咗段碼,段碼嘅 output 唔會畀個程式嘅任何部份攞嚟用。
應用
[編輯]睇埋:代碼難讀化
做代碼難讀化嘅人,有陣時會加少少死碼落段原始碼,嚟擾亂嘗試解讀段碼嘅人[1]。
睇埋
[編輯]攷
[編輯]- ↑ Barría, C., Cordero, D., Cubillos, C., & Osses, R. (2016, May). Obfuscation procedure based in dead code insertion into crypter. In 2016 6th International Conference on Computers Communications and Control (ICCCC) (pp. 23-29). IEEE.