Tuesday, 30 July 2013

What is Round function in QTP?

QTP supports round function that can be used to round the decimal numbers.

For example -

mydecimal = 6.34344 
roundedvalue= Round(mydecimal , 3)
print roundedvalue ' it will print 6.343

The second parameter to round function determines how many places to the right of the decimal should be used.

Another example of rounding.

mydecimal = 6.34644 
roundedvalue= Round(mydecimal , 2)
print roundedvalue 

' it will print 6.35 because the third decimal place value (6)  is greater than or equal to 5.


Please give your inputs, suggestions, feedback to Us. We value your thoughts.

No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.