www.icetips.com  Icetips Utilities Documentation 6/16/2015    

Core Class: GetBit

Previous  Top  Next  


Prototype: (Long pVariable, Byte pBitToGet), Byte

 

pVariableThe value to get bit information from
pBitToGetThe bit to get the status from.  Note that bits are zero (0) based so the lowest bit is 0, next is 1 and so on.

 

ReturnsReturns the status of the specified bit, either 0 or 1

 

This method checks the status of a single bit and returns either 0 or 1 depending on if the bit is off or on.

 

Example:

ITC  ITCoreClass

Long

String(32)

Byte

Code

L = 8

B = 1

Message('Bit ' & B & ' is: ' & ITC.GetBit(L,B)

 

 

See also:

GetBitString
SetBit

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getbit_core.htm