Search:

Type: Posts; User: Norm

Search: Search took 0.15 seconds.

  1. Replies
    8
    Views
    961

    Re: comparing values in a boolean array

    Ok, I'm glad you are making progress.
  2. Replies
    8
    Views
    961

    Re: comparing values in a boolean array

    Ok, that could be 8 if statements, one for each case.
    For example to test boolArray's contents for
    case 1: all true:
    if(boolArray[i] && boolArray[i+1] && boolArray[i+2])
    and case 8: all false:...
  3. Replies
    8
    Views
    961

    Re: comparing values in a boolean array

    There are only two operands in any comparison.
    With three different binary values there can be 8 different combinations: T,T,T to F,F,F
    Which of those 8 combinations do you want to test for?


    ...
  4. Replies
    8
    Views
    961

    Re: Boolean array comparison/arguments

    You can use the == operator to compare two boolean values:

    if(theArray[i] == theArray[idx2]) { // compare two values in an array


    Note: you do not need to use == true to test a boolean...
Results 1 to 4 of 4