Provides access to environment variables 提供访问环境的变量
Can these functions access variables defined outside its scope?
这些函数可以访问在它的范围之外定义的变量吗?
Why can function defined in a different file access variables defined in that file without extern?
为什么在不同的文件中定义的函数访问变量定义在文件没有外面的吗?。
A scope activity can contain more scope activities within it, so activities within a scope can also access variables of all enclosing scopes.
范围活动可以在其内部包含多个范围,因此范围中的活动也可以访问所有封闭范围的变量。
So, conceptually if you've ever wondered why you get access in all of your functions to global variables that's because they're not down here, they're at the very top of RAM and any function can access that RAM way up there, but for now the interesting player in the story is this thing called the heap.
所以,如果你想知道为什么全局变量能在,所有的函数中使用,那是因为它们不在这下面,而是在内存的顶端,那样任意函数都可以在内存中使用它们,现在,这里面一个有用的角色是,叫做堆的东西。
应用推荐