CBit

<< Click to Display Table of Contents >>

Manual > Control Reference > Route > Route Methods >

CBit


 

Extracts bits from a number.

 


syntax

CBit(

         val,

         pos

         [, size = 1]

         )

 


Parameters

 

val

 

Type:

Number

 

The base value to convert bits to. Arrays can be specified.

 

pos

 

Type:

Number

 

Bit number position (0 to 31). For example, to get the 3rd bit, specify 3. Arrays can be specified.

 

size

 

Type:

Number

 

Bit size (1 to 32). For example, if you want to get 3 bits from pos, specify 3. Arrays can be specified.

 

Return Value

 

 

Type:

Number

 

The bit-extracted number.

 


hmtoggle_plus1Explanation

 


Supported


Script Action

Browser script

Calculation Expression Syntax

 

 


reference