### FIX

Returns the integer part of a number, rounding towards zero

**Syntax:**

**Usage:**

`
`

*result*=

**Fix**(

*number*)

**Parameters:**

*number*
the floating-point number to truncate

**Return Value:**

Returns the integer part of

`, rounding towards zero.`*number***Description:**

Equivalent to:

Note: this function is also equivalent to

The

`Sgn(`. For example,*number*) * Int(Abs(*number*))`will return`**Fix**(1.3)`1.0`, and`will return`**Fix**(-4.9)`-4.0`. For integer types, the number is returned unchanged.Note: this function is also equivalent to

`.`*number*- Frac(*number*)The

`unary`**Fix**`operator`can be overloaded with user defined types.**Examples:**

Print Fix(1.9) '' will print 1

Print Fix(-1.9) '' will print -1

Print Fix(-1.9) '' will print -1

**Dialect Differences:**

- In the
*-lang qb*dialect, this operator cannot be overloaded.

**Differences from QB:**

- None

**See also:**

Back to Math