你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
convert_mass
将质量值从一个单位转换为另一个单位。
语法
convert_mass(
值,
从,
到)
详细了解语法约定。
参数
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
value | real |
✔️ | 要转换的值。 |
from | string |
✔️ | 要从其进行转换的单元。 有关可能的值,请参阅转换单位。 |
to | string |
✔️ | 要转换为其的单元。 有关可能的值,请参阅转换单位。 |
转换单位
- Centigram
- Decagram
- Decigram
- EarthMass
- Grain
- 克
- Hectogram
- 千克
- Kilopound
- Kilotonne
- LongHundredweight
- LongTon
- Megapound
- Megatonne
- 微克
- 毫克
- 纳克
- Ounce
- Pound
- ShortHundredweight
- ShortTon
- Slug
- SolarMass
- Stone
- Tonne
返回
返回从一种质量单位转换为另一种质量单位的输入值。 无效的单位将返回 null
。
示例
print result = convert_mass(1.2, 'Kilogram', 'Pound')
输出
result |
---|
2.64554714621853 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈