??? No CASE or SWITCH statements ???

General discussion about the Phantom Automation Language and related tools.

??? No CASE or SWITCH statements ???

Postby SpiritualMadMan on Wed Feb 09, 2011 7:26 pm

Niether the "case" or "switch" shows up in the .chm help file or my own indexing of the .html help files.

I have a situation where I have two sets of switche banks each having some 32 switch banks.

And, each bank having varying amounts of switched in its matrix.

Worse yet they are on a multi-level bank of tabs and I can not directly access tabs, at this time. (At least not these)

The function void sel_Switch(string Sxxx)

Recieves one of 40 some switch names S101 thourgh S906

I first have to decide which level of tabs the selection can be found on.

(Another global variable keeps track of which bank is high and which bank is low)

So, for the default lower level of Tabs I have 1 of 32 input possibilites, this is an ideal place for either a VB Select Case or a "C" style Switch statement. Although my VB Background leans towards the Select Case because the construct is "cleaner". IMHO

ex. Select Case Sxxx
Case "S101","S201","S202",....
Case Else
End Select

Hey any tips or pointers would be greatly appreciated...

As it is my work around requires everal really ugly string of "OR" statements....
SpiritualMadMan
 
Posts: 20
Joined: Mon Dec 06, 2010 4:02 pm

Return to Phantom

Who is online

Users browsing this forum: No registered users and 0 guests

cron