bitMaskClear

Performs a bitwise mask clear operation.

bitMaskClear(number, start, length) → returns numeric

Argument Reference

number numeric
Required

Integer

start numeric
Required

Start bit for the mask (Integer in the range 0-31, inclusive)

length numeric
Required

Length of bits in the mask (Integer in the range 0-31, inclusive)

Examples
Sample code invoking the bitMaskClear function

Uses the bitMaskClear function to clear (setting to 0) each of the corresponding bits

bitMaskClear(3, 0, 1)

Expected Result: 2

bitMaskClear(3, 1, 1)

Expected Result: 1

bitMaskClear(10, 1, 2)

Expected Result: 8

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub