Method

# Abs

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Returns the [absolute value](http://en.wikipedia.org/wiki/Absolute_value) of a number.

## Usage

``` xojo
result = Abs(value)
```

| Part   | Type                             | Description                                 |
|--------|----------------------------------|---------------------------------------------|
| result | `Double</api/data_types/double>` | The absolute value of *value*.              |
| value  | `Double</api/data_types/double>` | The number to convert to an absolute value. |

## Notes

The <span class="title-ref">Abs</span> function returns the positive equivalent of the value specified.

## Sample code

These examples use the <span class="title-ref">Abs</span> function to return the absolute values of the numbers specified.

``` xojo
Var d As Double
d = Abs(23.9)  ' returns 23.9
d = Abs(-23.9) ' returns 23.9
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Sign</api/math/sign>` function

</div>
