print the array values in ascending order?

Answer Posted / rajanikanth

Option Explicit
Dim a,i,b,j,temp
a=Array(30,70,10,60,90,20,50,80)

For i=0 To UBound(a)

For j=0 To UBound(a)

If StrComp(a(i),a(j),1)<0 Then
temp=a(i)
a(i)=a(j)
a(j)=temp
End If
Next
Next
For i=0 To UBound(a)
MsgBox a(i)
Next

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the environments where vbscript could be run?

772


what is the features of visual basic?

1641


what is the differance between BYVAL,BYREF?

1861


how to set one column as primary key in QTP and fetch values accordingly

1919


filter the array values without using filter function?

1755






Explain the support of asp for vb script functionality?

716


What is loose binding? Why is it not a good practice to use it?

735


Which loop is used in case of arrays in the vbscript language?

605


hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?

1640


What is the difference between javascript and vbscript?

626


What is the main difference between function and sub-procedure?

635


What is the use of the formatdatetime function in the vbscript language?

641


what is the difference between modular and data and keyword driven framework

1828


how to check whether link is disabled in QTP??

5708


what is the object hyrarchy in QTP for a web based application

1992