06 November 2017

Finding the Highest And Lowest value from an Array using UFT

Finding the Highest value:

a = array(4,5,8,9,1,7)

For i = 0Toubound(a)
    If a(i) > a(0) Then
        a(0) = a(i)
    EndIf
Next

MsgBox a(0)   'Returns 9



Finding the Lowest value:

a = array(4,5,8,9,1,7)

For i = 0Toubound(a)
    If a(i) < a(0) Then
        a(0) = a(i)
    EndIf
Next

MsgBox a(0)   'Returns 1



...

No comments:

Post a Comment

AOM - Automation Object Model

'Creating QuicTest Object Set  qtapp =  createobject ( "QuickTest.Application" ) 'Launching the Application If  qtapp...