Select / Case / End Select

Takes a variable number of conditional statements to compare against a single source


Traditional Select / Case / End Select conditional block(s) to assist with flow control of a procedure using a single source comparison.

These conditions in an If / End If block can take two forms:

  1. If Field/Expression (Boolean)
  2. If Field/Value Condition Field/Value/Expression (Condition)

When Boolean, no value is specified on the Select line. Each Case line then must be:

When Condition:

Case Else:



Method Start(pQ)
[Pull] (pQ), "Ajax Route Action"
  Case Ajax : AjaxReply : Start.Ajax pQ
  Case Route : Start.Route pQ
Case Action : Start.Action pQ
Case Else : Default.Get pQ
End Select
End Method

Method Start.Route(pQ)
[Pull] (pQ), "Route"
Select Route
Case cRouteFirst : Route.First pQ
Case cRouteSecond : Route.Second pQ
Case Else : End.NotFound pQ
End Select
End Method
[New] SixtyFive = 65
Select SixtyFive == 'Test against a number
Case 55
abc = 123
Case 65
def = 456
End Select
[New] SixtyFive = 65
Select SixtyFive
Case > 7
HtmlAlert "Does not display because this is the text comparison operator"
Case >> 7
HtmlAlert "This is true because this is the numerical comparison operator"
End Select
If Req.Mode = "Post" : And Req.HasFile
Or Req.Mode = "Get" : And Not Req.HasFile
abc = 123
Case Not (SessionIsGroupType$ "DB Admin, Office Admin, Office")
HtmlAlert "When evaluating an expression, surround it with ( )"
abc = 321
Case 456 == (abc - def)
HtmlAlert "When testing Math, use the doubled-up Math operators"
zxy = 456
Case bOther
def = 654
If bFinal Then Other.Method.DoSomething
Case Else
def = 456
End Select
End If