11.07.2015 Views

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong>Comment StatementsComment statements are used to provide documentation comments with the code.Comment StatementsCommentsDescriptionRemIncludes explanatory remarks in a program‘ Includes explanatory remarks in a program (single quote)Control Flow StatementsBy default, <strong>VBScript</strong> sequentially moves (flows) through the script from statement to statement. As istypical with virtually all high-level programming languages, control flow statements can alter this flow bybranching to other code sections based upon logic conditions, inputs, errors, etc.One of the most commonly used control flow statement is the If..Then..Else statement. This controlflow statement takes the following <strong>for</strong>mat:{simple <strong>for</strong>mat} If condition Then statement(s) [Else elsestatement(s) ]{block <strong>for</strong>mat}If condition Then[statement(s)][ElseIf condition-n Then[elseifstatement(s)]] . . .[Else[elsestatement(s)]]End IfThe condition can be a boolean constant or boolean variable, or a numeric or string expression thatevaluates to True or False.Refer to the Appendix <strong>for</strong> a detail description of these functions.Control Flow StatementsFunction DescriptionDo…Loop Repeats a block of statements while a condition is True or until a condition becomes TrueExecute Executes one or more specified statementsExecute Global Executes one or more specified statements in the global namespace of a scriptExit DoExit a Do Loop Function. Transfers control to the statement following the Loop statement.Exit For Exit a For Loop Function (For…Next or For Each…Next loop). Transfers control to thestatement following the Next statement.For...Next Repeats a group of statements a specified number of timesFor Each…Next Repeats a group of statements <strong>for</strong> each element in an array or collectionIf…Then…Else Conditionally executes a group of statements, depending on the value of an expressionSelect Case Executes one of several groups of statements, depending on the value of an expressionWhile…Wend Executes a series of statements as long as a given condition is TrueWith…End With Executes a series of statements on a single object<strong>InduSoft</strong>, Ltd. 19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!