Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Sgn FunctionThis standard VB function returns a value indicating the sign of a number. SyntaxReturnsIf number is less than zero, -1. If number is equal to zero, 0. If number is greater than zero, 1. ExampleThis example tests the value of the variable profit and displays 0 for profit if it is a negative number. The subroutine uses Sgn to determine whether profit is positive, negative, or zero. Sub Button_Click See AlsoExp Function |
Siebel VB Language Reference |