• RSS
  • Facebook
  • Twitter

One Center for all the Testing Need. OneTestingCenter is for all, for all QA, for all Automation. Automation is easy, fun and enriching experience. Happy Learning and Happy Testing!

  • Access to All QA

    At OneTestingCenter, you find lots of books,articles,blogs and detailed guides. Everyone has access to QA. Happy Learning, Happy Testing.

  • Global Trainings

    All the QA/Auotmation trainings are available at OneTestingCenter. QA, Automation, QTP/UFT, Selenium, LoadRunner, QC/ALM, Appium...

  • Automation Learning Fun

    Technology is always evolving. Automation is always challenging. To be frank, Automation is fun, enthusiastic and enrching experience.

    '********************************************************
    ' @ Purpose of the script: To sort an array
    '********************************************************
    Dim arrSortOut(8)
    arrSortOut(0)="X"
    arrSortOut(1)="Z"
    arrSortOut(2)="Y"
    arrSortOut(3)="H"
    arrSortOut(4)="I "
    arrSortOut(5)="A"
    arrSortOut(6)="L"
    arrSortOut(7)="M"
    arrSortOut(8)="R"

    ' Before Sorting an array
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    Print " Before Sorting : The Array elements are "
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    For x=0 to 8
    Print arrSortOut(x)
    Next

    ' Sorting an array now...
    For i = UBound(arrSortOut) - 1 To 0 Step -1
        For j= 0 to i
            If arrSortOut(j)>arrSortOut(j+1) Then
                temp=arrSortOut(j+1)
                arrSortOut(j+1)=arrSortOut(j)
                arrSortOut(j)=temp
            End If
       Next
    Next
    ' After Sorting an array
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    Print " After Sorting out  :The Array elements are "
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    For x=0 to 8
    Print arrSortOut(x)
    Next
    Reactions:

    QTP @ VBScript > Array Sorting

    '********************************************************
    ' @ Purpose of the script: To sort an array
    '********************************************************
    Dim arrSortOut(8)
    arrSortOut(0)="X"
    arrSortOut(1)="Z"
    arrSortOut(2)="Y"
    arrSortOut(3)="H"
    arrSortOut(4)="I "
    arrSortOut(5)="A"
    arrSortOut(6)="L"
    arrSortOut(7)="M"
    arrSortOut(8)="R"

    ' Before Sorting an array
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    Print " Before Sorting : The Array elements are "
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    For x=0 to 8
    Print arrSortOut(x)
    Next

    ' Sorting an array now...
    For i = UBound(arrSortOut) - 1 To 0 Step -1
        For j= 0 to i
            If arrSortOut(j)>arrSortOut(j+1) Then
                temp=arrSortOut(j+1)
                arrSortOut(j+1)=arrSortOut(j)
                arrSortOut(j)=temp
            End If
       Next
    Next
    ' After Sorting an array
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    Print " After Sorting out  :The Array elements are "
    Print "@@@@@@@@@@@@@@@@@@@@@@@"
    For x=0 to 8
    Print arrSortOut(x)
    Next