to bind a function at run time is known late binding .but still i don't know how to achieve it..?please anyone reply
Dynamic binding is certainly possible for normal C functions. Binding is a function of the binder (linker) and has nothing to do with the language itself.
Static binding occurs at compile time. Dynamic binding occurs at runtime.
the concept of dynamic linking and dynamic binding with example
Dynamic binding, or late binding, is when the object code for the class does not get loaded into memory until it is needed. This saves time at module load time, at the cost of delayed execution for the first invocation.
Yes and no. Static vs dynamic binding is not a C or C++ language issue; it is a linker issue. If you link with a .lib file that contains stubs for run-time loading, then the called routine will not be loaded until it is invoked, and it will not be made a part of the load module.
Dynamic Binding means declaring variables at run time only rather than declaring it at compile time.
Late binding and dynamic binding are related to runtime polymorphism. By contrast, compile time polymorphism is known as static binding. Template functions and classes are examples of static binding because the exact type can be determined at compile time.
Static polymorphism is used the concept of early binding or we can say compile time binding where as dynamic polymorphism used the concept of late binding or run time binding.
at runtime
There is no preference as such. The type of binding you use is more dependant upon the design and circumstance rather than any preference you may have. Static binding is certainly more predictable and therefore easier to program, but dynamic binding offers much greater flexibility.
Yes, Pascal supports both static binding and dynamic binding. Static binding occurs at compile time, typically with procedures and functions that are known at that time. Dynamic binding, on the other hand, is often associated with objects in object-oriented Pascal, where method calls can be resolved at runtime based on the actual object type. This allows for polymorphism, enabling more flexible and reusable code.
1.Classes and Objects 2.Constructors and Destructors 3.Inheritance 4.Polymorphism 5.Dynamic Binding