
好词典

源自 'sub-'(下级的)和 'routine'(例行程序),20世纪中期计算机科学术语。
❶ 子程序,指计算机程序中可重复调用的一段代码,用于执行特定任务,通常有输入和输出参数。
“The program uses several subroutines to handle different calculations.”
(该程序使用多个子程序来处理不同的计算任务。)
“You can call this subroutine whenever you need to sort the data.”
(每当需要排序数据时,你可以调用这个子程序。)
call a subroutine — 调用子程序,指在程序中执行一个已定义的子程序。
“The main program calls a subroutine to validate the user input.”
(主程序调用一个子程序来验证用户输入。)