Campbell CR5000 Specifiche Pagina 221

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 238
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 220
Section 9. Program Control Instructions
9-15
Select Case Statement
Executes one of several statement blocks depending on the value of an
expression.
Syntax
Select Case testexpression
[Case expressionlist1
[statementblock-1] ]
[Case expressionlist2
[statementblock-2] ]
[Case Else
[statementblock-n] ]
End Select
The Select Case syntax has these parts:
Part Description
Select Case Begins the Select Case decision control structure. Must
appear before any other part of the Select Case structure.
testexpression Any numeric or string expression. If testexpression matches
the expressionlist associated with a Case clause, the
statementblock following that Case clause is executed up to
the next Case clause, or for the final one, up to the End
Select. Control then passes to the statement following End
Select. If testexpression matches more than one Case
clause, only the statements following the first match are
executed.
Case Sets apart a group of CRBasic statements to be executed if
an expression in expressionlist matches testexpression.
expressionlist The expressionlist consists of a comma-delimited list of one
or more of the following forms.
expression
expression To expression
Is compare-operator expression
statementblock
Elements statementblock-1 to statementblock-n consist of
any number of CRBasic statements on one or more lines.
Case Else Keyword indicating the statementblock to be executed if no
match is found between the testexpression and an
expressionlist in any of the other Case selections. When
there is no Case Else statement and no expression listed in
the Case clauses matches testexpression, program execution
continues at the statement following End Select.
End Select Ends the Select Case. Must appear after all other statements
in the Select Case control structure.
Vedere la pagina 220
1 2 ... 216 217 218 219 220 221 222 223 224 225 226 ... 237 238

Commenti su questo manuale

Nessun commento