Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Val FunctionThis standard VB function returns the numeric value of the first number found in a string. SyntaxReturnsThe value of the first number in string. If no number is found, Val returns 0. UsageSpaces in the source string are ignored. 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 AlsoCCur Function |
Siebel VB Language Reference |