|
-
Nov 10th, 2000, 04:19 AM
#1
Thread Starter
Fanatic Member
-
Nov 10th, 2000, 04:34 AM
#2
Fanatic Member
What do you want to know?
r0ach™
Don't forget to rate the post
-
Nov 10th, 2000, 05:05 AM
#3
Thread Starter
Fanatic Member
how it was use?
how would you declare a collection?
how can you store and retrieve.
anything you know about...
thank you
-
Nov 10th, 2000, 06:27 AM
#4
transcendental analytic
Code:
'to declare
Private test As Collection
Private Sub Form_Load()
Dim strtest As String, itest As Integer
Set test = New Collection 'initialize
test.Add "A text item", "a key"
test.Add Text1 'a textbox is added
test.Add Command1 ' a commandbutton
test.Add strtest ' a string variable is added
test.Add itest ' a integer is added
test.Remove 2 'item 2 (the textbox is removed)
MsgBox test.Count 'the amount of items now
test.Item(2).Value = True 'the commandbutton is clicked
test.Remove "a key" 'the first item is removed, according to the key
Set test = Nothing 'remove the collection
End Sub
So basically:
1. You can store almost anything in it.
2. You can retrieve them by either it's index or a key string.
3. Don't use them if you
a) aren't upto removing and adding items frequently
b) need to access them frequently in a time critical application.
- otherways you could use regular arrays.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|