子程序;子程序模块:在更大的程序中执行某一特定任务的独立代码单元,常可被多次调用(在不同语言中也常对应 procedure/function/subroutine 的概念)。也可泛指“从属程序/分程序”。
/ˈsʌbˌproʊɡræm/
A subprogram can be reused in many parts of the code.
子程序可以在代码的许多部分被重复使用。
To improve maintainability, the developer extracted the validation logic into a separate subprogram that is called by multiple modules.
为了提高可维护性,开发者把验证逻辑提取成一个独立的子程序,由多个模块调用。
由 **sub-**(“下、次级、从属”)+ program(“程序”)构成,字面意思是“从属于主程序的程序”。在早期结构化编程与过程式语言语境中常用来指“子例程/子程序”,强调其可被调用、可复用的特性。