Results 1 to 9 of 9

Thread: Len

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    204
    what does that fuction do in vb i see people use it alot and i dont know what it does thanks
    WHat would we do with out Microsoft.
    A lot more.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    It returns the length of a string
    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.

  3. #3
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    NO kedaman!

    The Len function returns the length of a variable. Try this:

    Code:
    Dim a As Long
    Debug.Print Len(a)
    It will return 4. So, the Len function in VB returns the length (number of bytes) of a variable.

  4. #4
    Guest
    Actually, you're both right. The Len function will perform either of these options depending on what you pass through it.

  5. #5
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    No MegaTron -- I am right, keda is wrong.

    What he says is that the Len funcion does not return the length of a Long, for instance. Whereas I say the Len function returns the length of a string and anything else, you pass it.

    SO, I am right, hehe.

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    HaxSoft:
    kedaman didn't say it didn't do anything...He said one of the things it does...and who cares about my daddy's bigger than your daddy junk. As long as Bob gets an understanding of what is happening and I am sure he can figure it out between the lines.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Len does actually returns the length of a string, if you compare to LenB that returns the length of the memory used by the string. So actually yes, were both right, + Megatron is right and not to forget HeSaidJoe is right.
    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.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    204
    so it can return a strinf value right lets say i ave a dim a string i can get the lenth of that string riht
    WHat would we do with out Microsoft.
    A lot more.

  9. #9
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Bob:
    Yes, as stated above, it will return the length of a string if you pass it a string.
    myString = "Bob"
    myLen = len(myString) ' Return of 3
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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