Explain the difference between a procedure call and a proced

问题描述:

Explain the difference between a procedure call and a procedure declaration,and give an example.
1个回答 分类:英语 2014-11-27

问题解答:

我来补答
When you declare a procedure, you are defining things about it, like its name, its return type, its arguments, and its arguments' return types. But you are not asking the procedure to do anything. This is required so that the compiler or interpreter knows how to validate procedure calls, which is done later on. This would appear before any procedure calls are made.
When you make a prodecure call, you are asking the procedure to do something. This must be done after declaring the procedure, so that the compiler or interpreter knows how to validate the arguments.
You declare procedures exactly once. You call procedures from zero to as many times as you want.
 
 
展开全文阅读
剩余:2000