Typename function is useful when you want to know the data type of the variable.
Vb script is a scripting language used in QTP. All variables used in QTP are by default variant.
When we assign a value to variable, its data type changes.
For example -
print typename(a) 'Empty
a=10
print typename(a) ' Integer
a=10.2
print typename(a) 'Double
a="sagar"
print typename(a) 'String
a=null
print typename(a) 'Null
This is how we can use the typename function in QTP to find the current data type of the variable.
Please give your inputs, suggestions, feedback to Us. We value your thoughts.
Vb script is a scripting language used in QTP. All variables used in QTP are by default variant.
When we assign a value to variable, its data type changes.
For example -
print typename(a) 'Empty
a=10
print typename(a) ' Integer
a=10.2
print typename(a) 'Double
a="sagar"
print typename(a) 'String
a=null
print typename(a) 'Null
This is how we can use the typename function in QTP to find the current data type of the variable.