|
-
May 20th, 2000, 06:52 AM
#1
Thread Starter
Lively Member
What is Early Binding and Late Binding? Can someone give me an analogy or example?
Thanks
-
May 20th, 2000, 07:25 AM
#2
Frenzied Member
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.
-
May 20th, 2000, 08:24 AM
#3
Hyperactive Member
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
|