Jump to content

Recommended Posts

Posted

Plenty.

All depends what it is that you want to accomplish.

Local $Binne[7] = ["Su", "Mon", "Tue", "We", "Th", "Fr", "Sa"]
For $s = 1 To 7

    MsgBox(64, "Index no: " & $s, " Inside of $Binne [" & $s - 1 & "] is ===> " & $Binne[$s - 1], .5); array starts @ 0

Next
Posted

Switch <expression>
    Case <value> [To <value>] [,<value> [To <value>] ...]
        statement1
        ...
    [Case <value> [To <value>] [,<value> [To <value>] ...]
        statement2
        ...]
    [Case Else
        statementN
        ...]
EndSwitch

Parameters

<expression> An expression that returns a value. The value from the expression is then compared against the values of each case until a match is found. This expression is always evaluted exactly once each time through the structure.

<value> To <value> The case is executed if the expression is between the two values.

<value> The case is executed if the expression matches the value.

Remarks

If no cases match the Switch value, then the Case Else section, if present, is executed. If no cases match and Case Else is not defined, then none of the code inside the Switch structure, other than the condition, will be executed.

Switch statements may be nested.

Taken straight from the help file. hope its helpful

http://twentylinesofcode.blogspot.comLittle apps n crap. can be fun
Posted

Trying to do a function (If...Next, Switch, or Select) in-line in another function.

Since I didn't see a Choose function, I just used a Select. I would like to clean up the code, but I guess a Choose or IIF type function isn't out there.

Thanks for the ideas,

Bre

  • 4 weeks later...

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
×
×
  • Create New...