To know what round function is used for in QTP click this link Round function
Difference between int and fix
Case 1 - Positive numbers
Int and fix function return the integer part of positive number.
For example -
print int(77.4) ' Will print 77
print fix(77.4) ' Will print 77
So when the numbers are positive, both the functions int and fix behave in same manner.
Case 2 - Negative numbers
print int(-77.4) ' Will print -78 (return value is less than or equal to number)
print fix(-77.4) ' Will print -77 (return value is more than or equal to number)
Basically for positive numbers, int and fix return same value for a given number.
For negative numbers above logic applies.
Please give your inputs, suggestions, feedback to Us. We value your thoughts.
Difference between int and fix
Case 1 - Positive numbers
Int and fix function return the integer part of positive number.
For example -
print int(77.4) ' Will print 77
print fix(77.4) ' Will print 77
So when the numbers are positive, both the functions int and fix behave in same manner.
Case 2 - Negative numbers
print int(-77.4) ' Will print -78 (return value is less than or equal to number)
print fix(-77.4) ' Will print -77 (return value is more than or equal to number)
Basically for positive numbers, int and fix return same value for a given number.
For negative numbers above logic applies.
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