Micro Focus QTP (UFT) Forums
Variable declaration - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Variable declaration (/Thread-Variable-declaration)



Variable declaration - Suma Parimal - 01-16-2014

Is variable declaration is mandatory in vb script? How to make variable mandatory in vb script?


RE: Variable declaration - pranikgarg - 01-16-2014

Variable declaration is not mandatory in QTP. But for the good practice and reduce the risk of redundancy you should declare each and every variable while scripting.

To make variable declaration mandatory you should try "Option Explicit" command at the top of the each action.


RE: Variable declaration - Suma Parimal - 01-17-2014

Thank you Pranikgarg.