Jump to content

For loop and True-False


 Share

Recommended Posts

There is a better way to write this sort of pseudo-code?

Local $aTEST[4] = [True,False,False,True]

For $i = 0 To UBound($aTEST) - 1
    If $aTEST[$i] = True Then
        ConsoleWrite(False & @CRLF)
        ; MyFunc1(False)
        ; MyFunc2(False)
        ; MyFunc3(False)
        ; MyFunc4(False)
        ; MyFunc5(False)
        ; MyFunc6(False)
        ; MyFunc7(False)
        ; MyFunc8(False)
    ElseIf $aTEST[$i] = False Then
        ConsoleWrite(True & @CRLF)
        ; MyFunc1(True)
        ; MyFunc2(True)
        ; MyFunc3(True)
        ; MyFunc4(True)
        ; MyFunc5(True)
        ; MyFunc6(True)
        ; MyFunc7(True)
        ; MyFunc8(True)
    EndIf
Next

Thanks 

Nothing is so strong as gentleness. Nothing is so gentle as real strength

 

Link to comment
Share on other sites

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...