Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Variables

Status
Not open for further replies.

Skark166

IS-IT--Management
Aug 6, 2002
54
US
Hey All,

I need some help. I am having problems figuring out an easier way to sort these variables than writing a large function full of if - then statements.

I have 5 variables ranging from 1 to 6. My object is to sort them, turn them into a string and stick them into a variable to run a match on. But the have to be in numeric order in order for my regexp to work (either that or have an enormous regexp).

Any Ideas?

Scarecrow
 
why dont u use the array object and store the values there and sort it?

 
You can sort the contents of an array? How would you do this?

Scarecrow
 
how about the sort() [lol] function

_________________________________________________________
for the best results to your questions: FAQ333-2924
01001111 01101110 01110000 01101110 01110100
onpnt2.gif
[/sub]
 
>> how about the sort() function

That will never work! ;-)

-pete

 
Actually I found a For/Next if/then solution that wasn't to bad. But now I know of that sort() function I can use that.

Thanks for all your guys' help (and some of the smart-ass comments) :)

Scarecrow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top