Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > Methods Reference for Siebel VB > Variable Manipulation Methods > Force Explicit Declaration StatementThe Force Explicit Declaration statement forces you to explicitly declare every variable in a module. It does not return a value. FormatUsageVisual Basic declares any variables that does not occur in one of the following statements, by default: If you include the Force Explicit Declaration statement in your code, then Siebel VB creates the following error every time it encounters a variable that is not declared: Using the Force Explicit Declaration statement makes debugging code easier because it forces you to declare each variable before you use it. It is recommended that you declare variables at the beginning of the project, module, or procedure where these variables possess scope. Declaring variables in this way simplifies locating their definitions when reading through code. You must include the Force Explicit Declaration statement in the general declarations section. For more information, see Set Array Lower Boundary Method. ExampleThe following example specifies that variables must be explicitly declared. This technique prevents mistyped variable names: Option Explicit Related TopicsCreate Subroutine Method |
Siebel VB Language Reference | Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |