Lexical scoping vs dynamic scoping

后端 未结 2 520
情深已故
情深已故 2020-12-17 01:08

So I have this problem where I have to figure out the output using two different scoping rules. I know the output using lexical scoping is a=3 and b=1

2条回答
  •  伪装坚强ぢ
    2020-12-17 01:48

    C is not a dynamically scoped language. If you want to experiment in order to understand the difference, you're better off with a language like Perl which lets you chose between both.

提交回复
热议问题