Lexical scoping vs dynamic scoping

后端 未结 2 1038
长情又很酷
长情又很酷 2020-12-17 01:20

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:52

    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.

提交回复
热议问题