1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dynamic scoping and static and late binding.

Discussion in 'C' started by madhu, Jul 25, 2005.

  1. madhu

    madhu New Member

    Joined:
    Jul 25, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    hello,
    i want to know the proper meanings and usage of the following .
    a>. dynamic scoping (an online link will be extremely helpful . and what
    is lexical scoping or static scoping ??


    b>. binding in general and then , dynamic binding and static binding.


    Thanking all those who might answer this.....Thanks once more.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Dynamic Scoping

    Dynamic variable scoping is when you scope a variable in a programming language by replacing the existing variable of that name with a new variable temporarily, for instance for the duration of a function call.

    Lexical Scoping or Static scoping

    Its a way that the scope (programming) of free variables is determined according to its position in program code. It is also called lexical scoping.

    Binding

    You can define the variables and they point to some memory location and then instead of calling that memeory location you can use the name of the variable this is called the binding of name to the memory location.

    dynamic binding

    A binding which is determined during execution. That is at compile time you dont know the location it points to. Implemented via pointers

    static binding

    A binding which is determined during compilation. Mainly done by variables but even pointers can be statically binded.

    Thanks
    Shabbir Bhimani
     
  3. madhu

    madhu New Member

    Joined:
    Jul 25, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Thats what I was looking for.
     

Share This Page