𨀈𬧐內容

恪別𡧲版𢯢𢷮𧵑「板㑄:Qif」

Uy-ki có thể chỉnh sửa bằng chữ Hán Nôm 威其固体整𢯢憑𡨸漢喃
Trong Dang (討論 | 㨂𢵰)
空固縿略𢯢𢷮
𥮋𢯢𢷮移動 Mobile web edit Advanced mobile edit
Trong Dang (討論 | 㨂𢵰)
空固縿略𢯢𢷮
𥮋𢯢𢷮移動 Mobile web edit Advanced mobile edit
 
(空顯示2番版於𡧲𧵑共𠊛用)
𣳔12: 𣳔12:
  <nowiki>
  <nowiki>
{{qif
{{qif
   |test=GIÁ-TRỊ-ĐỂ-THỬ
   |test=價值抵㧗
   |then=văn bản để hiển thị nếu kết quả không trống (có thể bao gồm GIÁ-TRỊ-ĐỂ-THỬ)
   |then=文本抵顯示裊結果空𥧪(固体包𠁟價值抵㧗)
   |else=văn bản để hiển thị nếu nó trống
   |else=文本抵顯示裊伮𥧪
}}</nowiki>
}}</nowiki>


*Không bắt buộc định tham số <code>else</code>.
*空扒𫃚定參數 <code>else</code>
*Không định rõ kết quả nếu tham số <code>test</code> /hoặc <code>then</code> không được định ra.
*空定𤑟結果裊參數 <code>test</code> /<code>then</code> 空得定𫥨。
*Cũng không định rõ kết quả nếu tham số khác với <code>test</code>, <code>then</code>, và <code>else</code> được định ra.
*拱空定𤑟結果裊參數恪貝 <code>test</code><code>then</code>、吧 <code>else</code> 得定𫥨。
*Bản mẫu này không hoạt động với từ khóa <code>subst:</code>.
*板㑄尼空活動貝詞銙 <code>subst:</code>


===譬喻===
===譬喻===
𣳔26: 𣳔26:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Mã nguồn !! Kết quả
! 碼源 !! 結果
|-
|-
|
|

版㵋一𣅶13:24、𣈜22𣎃8𢆥2025


句常𠳨

板㑄尼用抵𫜵之?

伴固体使用板㑄尼抵扒着構築 if...else 𧵑仍言語立程實。板㑄尼㐌得𠊝替憑函句法 #if:

碎使用伮如勢𱜢?

{{qif
  |test=價值抵㧗
  |then=文本抵顯示裊結果空𥧪(固体包𠁟價值抵㧗)
  |else=文本抵顯示裊伮𥧪
}}
  • 空扒𫃚定參數 else
  • 空定𤑟結果裊參數 test 吧/或 then 空得定𫥨。
  • 拱空定𤑟結果裊參數恪貝 testthen、吧 else 得定𫥨。
  • 板㑄尼空活動貝詞銙 subst:

譬喻

碼源 結果
{{qif
 |test={{boolne|foo|bar}}
 |then=true
 |else=false
}}

true

{{qif
 |test={{booleq|foo|bar}}
 |then=true
 |else=false
}}

true

{{qif
 |test=
 |then=bar
}}
{{qif
 |test=foo
 |then=bar
}}

bar

䀡添