# BitMaskSet()

Performs a bitwise mask set operation.

```
BitMaskSet( number=number, mask=number, start=number, length=number );
```

**Returns:** number

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| number | number | Yes | an integer |  |
| mask | number | Yes | integer mask |  |
| start | number | Yes | Integer, in the range 0-31, inclusive; start bit for mask |  |
| length | number | Yes | Integer, in the range 0-31, inclusive; length of mask |  |

# Examples

The following code example will output an example numbers returned from the bitMaskSet() function.

```cfml
    writeOutput(bitMaskSet(255, 255, 5, 5));
    writeOutput("<br>");
    writeOutput(bitMaskSet(255, 15, 0, 4));
```







# Categories

[Numbers](../../categories/number.md), [Math](../../categories/math.md)

# See Also

[numeric.bitMaskSet()](../objects/numeric/bitmaskset.md)