convert_temperature
將溫度值從一個單位轉換成另一個單位。
Syntax
convert_temperature(
價值,
從,
自)
深入瞭解 語法慣例。
參數
名稱 | 類型 | 必要 | Description |
---|---|---|---|
value | real |
✔️ | 要轉換的值。 |
from | string |
✔️ | 要轉換的來源單位。 如需可能的值,請參閱 轉換單位。 |
to | string |
✔️ | 要轉換成的單位。 如需可能的值,請參閱 轉換單位。 |
轉換單位
- DegreeCelsius
- DegreeDelisle
- DegreeFahrenheit
- DegreeNewton
- DegreeRankine
- DegreeReaumur
- DegreeRoemer
- 凱氏
- MillidegreeCelsius
- SolarTemperature
傳回
傳回從一個溫度單位轉換為另一個溫度單位的輸入值。 不合法的單位會傳回 null
。
範例
print result = convert_temperature(1.2, 'Kelvin', 'DegreeCelsius')
輸出
結果 |
---|
-271.95 |
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應