|
-
Nov 8th, 2000, 05:27 PM
#1
Thread Starter
Lively Member
um....question is, what is LBound and UBound for in a winsock controL???? i need an answer quick...cause i want to finish up my program and i want to know if i left anything out that i could add in
-
Nov 8th, 2000, 05:50 PM
#2
Hyperactive Member
They reutrn the Ubound and Lbound of a winsock control array .
[]P
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Nov 8th, 2000, 06:59 PM
#3
Thread Starter
Lively Member
yah....but what is LBound and UBound then??
-
Nov 8th, 2000, 07:52 PM
#4
Lively Member
Every time you do a load on the winsock control, it loads another winsock control with the same name. This increase the number of winsock controls in that array. The lbound tells you what is starts at (almost always 0) and ubound tells you the top one, which depends on how many you have loaded.
-
Nov 8th, 2000, 08:05 PM
#5
Frenzied Member
LBound returns the lower bound (smallest index number) of an array, and UBound returns the upper bound (largest index) of an array.
If you have an array like this: MyArray(0 To 22), then LBound will return 0 and UBound will return 22. The number of elements in your array is UBound - LBound + 1, or 23.
Example from MSDN:
UBound
The values from these functions are helpful when you are looping through an array of items and are unsure of what the starting and ending indexes are. For example:
Code:
Dim nCounter as Integer
For nCounter = LBound(GlobalArray) To UBound(GlobalArray)
Debug.Pring GlobalArray(nCounter)
Next ' nCounter
Hope that helps...
[Edited by seaweed on 11-08-2000 at 08:18 PM]
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
|