BitMaskSet(number, mask, start, length)

Description

Returns number bitwise masked with length bits of mask beginning from start.

Category

Mathematical functions

See also

BitMaskClear, BitMaskRead

Parameters

Parameter
Description
number
32-bit signed integer to mask
mask
32-bit signed integer; specifies the mask
start
Integer; starting bit in number for masking
length
Integer; length of mask

Usage

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

Example

<!--- This example shows BitMaskSet --->
<html>
<head>
<title>BitMaskSet Example</title>
</head>

<body>
<H3>BitMaskSet Example</H3>

<P>Returns number bitwise masked with length
bits of mask beginning from start.

<P>BitMaskSet(255, 255, 4, 4): <cfoutput>#BitMaskSet(255, 255, 4, 4)#
</cfoutput>
<P>BitMaskSet(255, 0, 4, 4): <cfoutput>#BitMaskSet(255, 0, 4, 4)#
</cfoutput>
<P>BitMaskSet(0, 15, 4, 4): <cfoutput>#BitMaskSet(0, 15, 4, 4)#
</cfoutput>

</body>
</html>