Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Fix FunctionThis standard VB function returns the integer part of a number. SyntaxReturnsUsageThe return value's data type matches the type of the numeric expression. This includes variant expressions, unless the numeric expression is a string (vartype 8) that evaluates to a number, in which case the data type for its return value is vartype 5 (double). If the numeric expression is vartype 0 (empty), the data type for the return value is vartype 3 (long). For both positive and negative numbers, Fix removes the fractional part of the expression and returns the integer part only. For example, Fix (6.2) returns 6; The effect of this function is the same as that of the Int function, except in the handling of negative numbers. Thus: ExampleThis example returns the integer portion of a number provided by the user. Sub Button_Click See AlsoAbs Function |
Siebel VB Language Reference |