LibreOffice 24.8 Help
Vraca apsolutnu vrijednost brojcanog izraza.
Abs (Broj)
Double
Broj: Brojcani izraz za koji zelite apsolutnu vrijednost. Pozitivni brojevi, ukljucujuci 0, vracaju se neizmjenjeni, negativni brojevi se pretvaraju u pozitivne brojeve.
The following example uses the Abs function to calculate the difference between two values. It does not matter which value you enter first.
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