Why do functions need to be declared before they are used?

后端 未结 11 786
挽巷
挽巷 2020-11-29 06:06

When reading through some answers to this question, I started wondering why the compiler actually does need to know about a function when it first encounters it. Wo

11条回答
  •  星月不相逢
    2020-11-29 06:39

    I remember with Unix and Linux, you have Global and Local. Within your own environment local works for functions, but does not work for Global(system). You must declare the function Global.

提交回复
热议问题