Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - What is built-in function in QTP give five examples?




283
views
asked marvit August 19, 2014 02:35 AM  

What is built-in function in QTP give five examples?


           

1 Answers



 
answered By Dharma   0  

Built functions are those which are already defined &
provided QTP by default.

For Built-in functions,only function Declaration/Calling is
sufficient for getting the output of that functions.


Important Functions

1) Abs Function
Returns the absolute value of a number.
Dim num
num=abs(-50.33)
msgbox num

2) Array Function

Returns a variant containing an Array
Dim A
A=Array("hyderabad","chennai","mumbai")
msgbox A(0)
ReDim A(5)
A(4)="nellore"
msgbox A(4)

3) Asc Function
Returns the ANSI character code corresponding to the first letter in a string.
Dim num
num=Asc("A")
msgbox num

* It returns the value 65 *

4) Chr Function
Returns the character associated with the specified ANSI character code.
Dim char
Char=Chr(65)
msgbox char

* It returns A *

5) CInt Function
Returns an expression that has been converted to a Variant of subtype Integer.
Dim num
num=123.45
myInt=CInt(num)
msgbox MyInt
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert