When you
declare a procedure or function, you specify its name, the number and type of
parameters it takes, and, in the case of a function, the type of its return
value; this part of the declaration is sometimes called the prototype, heading,
or header. Then you write a block of code that executes whenever the
procedure or function is called; this part is sometimes called the routine’s body
or block.
The
standard procedure Exit can occur within the body of any procedure or
function. Exit halts execution of the routine where it occurs and
immediately passes program control back to the point from which the routine was
called.
Procedures and functions: Overview
声明过程或函数时,需要为其指定名称、接受参数的个数及类型,对于函数,还要指定返回值的类型,这部分声明有时叫做原型(prototype)、标题(heading)或首部(header)。然后编写代码块,用于过程或函数随时被调用时的执行,这部分声明有时叫做例程的主体(body)或块(block)。
标准过程Exit可以出现在任何过程和函数的块中。Exit过程在其出现的位置停止例程的执行并立即将程序控制交回例程被调用的执行点处。