LibreOffice 24.8 Help
Returns an integer number between -1 and 1 that indicates if the number that is passed to the function is positive, negative, or zero.
Sgn (Skaitlis)
Integer
Skaitlis: skaitliska izteiksme, kura nosaka funkcijas atgriezto vērtību.
| Number | Atgrieztā vērtība | 
| negatīvs | Sgn atgriež -1. | 
| 0 | Sgn atgriež 0. | 
| pozitīvs | Sgn atgriež 1. | 
Sub ExampleSgn
    Print sgn(-10) ' atgriež -1
    Print sgn(0) ' atgriež 0
    Print sgn(10) ' atgriež 1
End Sub