subroutine
US /ˈsʌb.ruː.tiːn/
UK /ˈsʌbruːˌtiːn/
名詞
子程式, 子例程
a sequence of instructions within a larger program that performs a specific task, often used multiple times within the program or by other programs
範例:
•
The main program calls a subroutine to handle data validation.
主程式呼叫一個子程式來處理資料驗證。
•
Writing modular code with subroutines improves readability and reusability.
使用子程式編寫模組化程式碼可以提高可讀性和可重用性。