Categories
Uncategorized

Vb-scripting Abs value function

In this series we are going to discuss Vb-Scripting functions in UFT( Advance Quick Test Pro), our main focus will be on important functions, that are frequently  used in practical scenarios.



Function Name:- Abs

Meaning :- Used to return Absolute value of a number

  • Number should be valid numeric expression, else zero or Script error is returned

Syntax:- Abs(Number)

Example:-

  • Dim iNum1, iNum2 : iNum1 = 2013.09 :  iNum2 = – 2013.09
  • Msgbox Abs(iNum1 ) ‘ Returns 2013.09
  • Msgbox Abs( iNum2 ) ‘ Reruns again 2013.09
  • Msgbox Abs(uftHelp)  ‘Returns 0
  • Msgbox  Abs()   ‘Returns Script Error
  • Msgbox Abs(@@@) ‘ Returns again Script Error

Leave a Reply

Your email address will not be published. Required fields are marked *