Results 1 to 3 of 3

Thread: Early Binding and Late Binding

  1. #1

    Thread Starter
    Lively Member James Bond 007's Avatar
    Join Date
    May 2000
    Location
    London
    Posts
    116
    What is Early Binding and Late Binding? Can someone give me an analogy or example?

    Thanks

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Yeah, It's quite simple but I've never seen it written down anywhere.

    when you Declare a variable you assign a block of memory to hold that variables value. eg

    Dim x As Long

    Allocated 4 bytes of memory to hold a long integer.

    The program can either allocate this at compile time, or at runtime. if you declare it like that then it's allocated at compile time, which means it's faster to access

    Dim x
    or
    Dim x as Variant

    are Late Binding, VB Can't tell how much memory the variables are going to take up, so It has to allocate it at runtime, this is slightly slower.

    as a rule of thumb Variants and strings are late binding, other variables are early binding, Objects are a bit of both.

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

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