BitMaskRead

Performs a bitwise mask read operation.

Returns an integer, created from length bits of number, beginning at start.

BitMaskRead( number, start, length )

Returns: Number

Argument Description
number
number, required

an integer to mask

start
number, required

Integer, in the range 0-31, inclusive; start bit for read

length
number, required

Integer, in the range 0-31, inclusive; length of mask

Examples

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

<cfoutput>#bitMaskRead(255, 5, 5)#</cfoutput>
<br>
<cfoutput>#bitMaskRead(255, 0, 4)#</cfoutput>

See also