Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

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:
  #1  
Old November 26th, 2005, 09:16 AM
MARKEDAGAIN's Avatar
MARKEDAGAIN MARKEDAGAIN is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Nov 2004
Location: Montreal
Posts: 668 MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 6 Days 7 h 4 m 19 sec
Reputation Power: 24
easy removel of items in array

this code will remove doubles, but it shows a good example of using the join methode to empty the array
Code:
Private  Function FindDuplicate(a)
    For i = 0 To UBound(a)
         For j = i + 1 To UBound(a)
        If a(i) = a(j) Then
            a(i) = ""
        End If
     Next j
Next i
strtemp = Join(a, ",")
        Do While InStr(1, strtemp, ",,")
            strtemp = Replace(strtemp, ",,", ",")
        Loop
    If Left(strtemp, 1) = "," Then strtemp = Mid(strtemp, 2, Len(strtemp) - 1)
    If Right(strtemp, 1) = "," Then strtemp = Mid(strtemp, 1, Len(strtemp) - 1)
b = Split(strtemp, ",")
End Function

article was found at
http://www.aspfree.com/c/b/ASP-Code/
Comments on this post
KingIsulgard agrees: Very Helpful
__________________
Mark
If you found a post particularly helpful, show your appreciation by clicking the "scales" icon in the bar just above the post, at the right hand side.

Last edited by MARKEDAGAIN : November 26th, 2005 at 11:55 AM.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > easy removel of items in array


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 3 hosted by Hostway