Check_Bit

Syntax: Check_Bit(inputString, inputStringDataType, position)

Arguments:

  • inputString is the original string to be checked.
  • inputStringDataType is the input string data representation. Valid values are:

    0 or HEXADECIMAL_DATA, if the inputString is a hexadecimal representation (length of inputString must be divisible by 2)

    1 or BINARY_DATA, if the inputString is binary (length of inputString must be divisible by 8)

    2 or STRING_DATA, if the inputString is a string representation

  • position is the position of the inputString to be checked from left. It is 1-based index. The value of this field is in binary representation position.

Return Type: Integer

1: Bit position is 1

0: Bit position is 0

-1: Invalid position value or inputStringDataType

-2: Invalid inputString

Description: This function will check if the bit position in inputString parameter is 0 or 1.

Example:

returnCode is an integer;

returnCode = Check_Bit(CRTRAN25.terminalVerificationResults, HEXADECIMAL_DATA, 8);
if(returnCode = 1) then
{
                TriggerCase(SERVICE);
}

In this example, the Check_Bit function checks if bit 8 of terminalVerificationResults is 1 or 0. A service case is triggered if the bit in position 8 is 1.

  • www.fico.com