From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/zh-tw/glossary/parameter/index.html | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 files/zh-tw/glossary/parameter/index.html (limited to 'files/zh-tw/glossary/parameter/index.html') diff --git a/files/zh-tw/glossary/parameter/index.html b/files/zh-tw/glossary/parameter/index.html new file mode 100644 index 0000000000..0cd6c5abfd --- /dev/null +++ b/files/zh-tw/glossary/parameter/index.html @@ -0,0 +1,38 @@ +--- +title: 參數 +slug: Glossary/Parameter +translation_of: Glossary/Parameter +--- +

參數 (parameter) 是個會傳進函式 ({{Glossary("function")}}) 的已命名變量,用來把引數 (({{Glossary("argument","arguments")}})) 導入到函式中。

+ +

要特別注意參數和引數的差異:

+ + + +

 一般而言,參數的形式有兩種表示方式:

+ +
+
輸入用的參數
+
像這樣藉由值呼叫的形式最常見。此外,還可以根據不同的程式語言,讓輸入用參數的使用模式多樣,例如:用值呼叫 (call-by-value)、用位置呼叫 (call-by-address) 和完成函式程序後把它的值設定成回傳值 (也就是 call-by-reference)。
+
輸出和回傳 (return) 用的函數
+
在函式的程序完成之後,會負責回傳多重的量值。不過,這方式可能會讓程式開發者誤解它的意思,所以不建議使用。
+
+ +

想了解更多嗎?

+ +

一般常識篇

+ + + +

技術參考

+ + -- cgit v1.2.3-54-g00ecf