284
BitMaskSet
Returns number bitwise masked with length bits of mask beginning from start.
See also
Syntax
BitMaskSet( number , mask , start , length )
number
Long integer to be masked.
mask
Long integer specifying the mask.
start
Integer specifying the starting bit in number for masking.
length
Integer specifying the length of mask.
Usage
Parameters start and length must be in the range from 0 to 31.
Bit functions operate on 32-bit integers.
Examples
<!--- 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>
BitMaskClear
and BitMaskRead.
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers