| << 5.3.2- Looping Controls | Chapter5 | 5.3.4- Examples of Control Structures >> |
Jumping Controls
Jumping controls allow the programmer to pause the execution of the current code and jump to another named block of code. For example, we may have written a block of code called ShowOrder that produces lines that show the customer the goods that they ordered. Whenever we want VBScript to show those lines we don't have to re-write or copy all of that code. Instead we just have VBScript jump out of our current code, execute ShowOrder and then come back and continue executing our original bit of code. There are two types of jumping controls:
- Subprocedures can be called with the Call keyword, or alternatively you can just provide the name of the subprocedure, which will run the statements in the subprocedure, and then return control to the main procedure.
- Functions can be used to execute some statements and return an answer to the main body of code. They can also be preceded by the keyword Call.
| << 5.3.2- Looping Controls | Chapter5 | 5.3.4- Examples of Control Structures >> |

RSS

