Description

Performs a bitwise mask read operation.

Returns

An integer, created from length bits of_ number,_ beginning at start.

Category

Mathematical functions

Function syntax

BitMaskRead(number, start, length)

See also

BitMaskClearBitMaskSet

Parameters

Parameter

Description

number

32-bit signed integer to mask

start

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

length

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

Usage

Bit functions operate on 32-bit signed integers, in the range -2147483648 - 2147483647.

Example

<h3>BitMaskRead Example</h3>
<p>Returns integer created from <em>length</em> bits of <em>number</em>, beginning
with <em>start</em>.</p>

<p>BitMaskRead(255, 4, 4): <cfoutput>#BitMaskRead(255, 4, 4)#</cfoutput></p>
<p>BitMaskRead(255, 0, 4): <cfoutput>#BitMaskRead(255, 0, 4)#</cfoutput></p>
<p>BitMaskRead(128, 0, 7): <cfoutput>#BitMaskRead(128, 0, 7)#</cfoutput></p>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy