Applicability of Option Explicit - QTP

Option Explicit statement at the top of a library file allows a programmer to enforce variable declaration for all used variables. We might observe that even having Option Explicit in some of our associated libraries is not enforcing errors for undeclared variables.

This happens because of the way Global scope is created. We cannot enforce Option Explicit on individual libraries in a global scope. It can be done only on the complete global scope. To enforce ' ariable declaration Option Explicit should be put in every library used. If any of the libraries is missing Option Explicit then QTP will not use option xplicitrjfer the global scope.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

QTP Topics