Results 1 to 5 of 5

Thread: yay...winsock:(

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Oshawa, Ontario, Canada
    Posts
    88

    Unhappy

    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
    -|Kn|gHt|
    MSN - [email protected]

  2. #2
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258
    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 !!!!!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Oshawa, Ontario, Canada
    Posts
    88
    yah....but what is LBound and UBound then??
    -|Kn|gHt|
    MSN - [email protected]

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    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.

  5. #5
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357
    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]
    ~seaweed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width