詞彙 subroutine 在中文的含義

subroutine 在英語中是什麼意思?與 Lingoland 一起探索這個詞的含義、發音及具體用法

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.
使用子程式編寫模組化程式碼可以提高可讀性和可重用性。