Micro Focus QTP (UFT) Forums
vbscript dim question - 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: vbscript dim question (/Thread-vbscript-dim-question)



vbscript dim question - learnqtp - 06-12-2013

Hello

Usually

We define variable in dim like

Code:
Dim variable name

For array
Dim arrayname()

for resize
redim arrayname()

now
Today i got something like this in framework.

Code:
Dim variablename : variablename = 0

Now i don't understand what it this ? anybody can help me ?


RE: vbscript dim question - arescool - 06-12-2013

This is nothing else but Declaration (before the : ) and Definition ( after the : ) of the variable written in the same line.


RE: vbscript dim question - learnQtptips - 06-18-2013

You can use ":" to combine one or more executable statements. See one conditional statement to understand more

if a>b then msgbox a : msgbox b

You can apply this operator in lot of ways other than DIM


RE: vbscript dim question - Staff - 07-05-2013

Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.