Using VBScript Statements
Data types aren’t the only things missing. VBScript also lacks several statements. It’s missing all of the statements related to file I/O, such as Open, Close, Read, and Input. Other statements that are not available are Write. GoSub, On GoSub, On GoTo, On Error, and DoEvents. Table 13.5 contains a complete list of all of the available VBScript statements.
Table 13.5: Statements Supported in VBScript
| Statement | Description |
| Call | Invokes a subroutine |
| Const | Declares a constant value |
| Dim | Declares variables |
| Do/Loop | Executes a loop until a condition or while a condition is True |
| Erase | Reinitializes the contents of a fixed-size array and frees all of the memory allocated to a variable-sized array |
| For/Next | Executes a loop while iterating a variable |
| For Each/Next | Executes a loop while iterating through a collection of objects |
| Function/End Function | Declares a routine that will return a value |
| If/Then/Else/End If | Conditionally executes one set of statements or another |
| On Error | Takes the specified action if an error condition arises |
| Option Explicit | Requires that all variables must be declared before their use |
| Private | Declares private variables |
| Public | Declares public variables |
| Randomize | Initializes the random-number generator |
| ReDim | Changes the size of an array |
| Select Case/End Select | Chooses a single condition from a list of possible conditions |
| Set | Assigns a reference to an object or creates a new object |
| Sub | Declares a subroutine |
| While/Wend | Executes a loop while a condition is True |
'C Lang > VBA,VBS Technic' 카테고리의 다른 글
| VB로 태스크 스케쥴러 기능 만들기(Schedule.Service모듈) (0) | 2018.04.03 |
|---|---|
| VBA에서 Visual Basic .NET으로 코드 변환 (0) | 2018.01.31 |
를 참조하십시오.