"subroutine" in Chinese (Traditional)
子程序
Definition
子程序是在電腦程式中執行特定任務的一組指令,可以在程式中多次使用。
Usage Notes (Chinese (Traditional))
「子程序」是程式設計中的術語,有時與「函數」或「過程」通用,但在不同的程式語言中含義會有所不同。
Examples
This program uses a subroutine to add two numbers.
這個程式使用**子程序**來把兩個數字相加。
A subroutine helps keep the code organized.
**子程序**有助於讓程式碼更有條理。
You can call the subroutine many times in your program.
你可以在程式中多次呼叫這個**子程序**。
Let me show you how this subroutine makes everything run smoother.
讓我給你介紹這個**子程序**怎麼讓一切運行更順暢。
Oops, the bug was actually inside the subroutine!
啊,原來這個錯誤就在**子程序**裡!
When your code gets repetitive, just turn that part into a subroutine.
如果你的程式碼很重複,建議把那部分寫成一個**子程序**。