LibreOffice 24.2 Help
숫자 식의 절대값을 구합니다.
Abs (Number)
Double
Number: 절대값을 구할 임의의 숫자 식입니다. 0을 비롯한 양수는 그대로 구해지며 음수는 양수로 변환됩니다.
다음은 Abs 함수를 사용하여 두 값의 차를 계산하는 예입니다. 어떤 값을 먼저 입력하든 상관이 없습니다.
Sub ExampleDifference
Dim siW1 As Single
Dim siW2 As Single
siW1 = Int(InputBox("Please enter the first amount","Value input"))
siW2 = Int(InputBox("Please enter the second amount","Value input"))
Print "The difference is "; Abs(siW1 - siW2)
End Sub