.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old December 3rd, 2001, 03:11 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
VB SCRIPT

Originally posted by : TUNDE (BOAKG@HOTMAIL.COM)DOES ANYONE KNOW A VB SCRIPT THAT TAKES IN NUMBERSAND REARRANGES THEM IN ASCENDING OR DESENDING ORDER

Reply With Quote
  #2  
Old December 4th, 2001, 06:26 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Originally posted by : RichardSorry, I couldn't resist that! Take a look at my VBScript AVL Binary Tree class:ftp://ftp.trinet.co.uk/codesamples/cbinarytree.zipThen use something like:Class cCompareNumbers Public Function ICompare_Compare(varLeft, varRight) On Error Resume Next If CLng(varLeft) CLng(varRight) Then ICompare_Compare = 1 Else ICompare_Compare = 0 End If End FunctionEnd ClassDim oBT, i, nSet oBT = New cBinaryTreeSet oBT.oCompare = New cCompareNumbersoBT.NoDuplicates = FalseRandomize Timer()For i = 0 To 1000 n = Rnd() * 1000 oBT.Add nNextFor i = 0 To oBT.Count - 1 Response.Write oBT.Item(i).DataNextYou can use the class to sort any data you want, including objects. Just define a comparison class that exposes the ICompare_Compare function, and add your data.------------TUNDE at 12/3/2001 1:11:41 PMDOES ANYONE KNOW A VB SCRIPT THAT TAKES IN NUMBERSAND REARRANGES THEM IN ASCENDING OR DESENDING ORDER

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > VB SCRIPT


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway