QTP supports round function that can be used to round the decimal numbers.
For example -
mydecimal = 6.34344
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
For example -
mydecimal = 6.34344
roundedvalue= Round(mydecimal , 3)
print roundedvalue ' it will print 6.343
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
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.
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