你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

abs()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Calculates the absolute value of the input.

Syntax

abs(x)

Learn more about syntax conventions.

Parameters

Name Type Required Description
x int, real, or timespan ✔️ The value to make absolute.

Returns

Absolute value of x.

Example

print abs(-5)

Output

print_0
5