return_stm Production

Definition

return_stm : return exp_opt ;

Purpose

A return_stm returns from a function. In void-returning functions, no value is given. Otherwise, a value must be given.

Semantics

The exp_opt's type must match the return type of the function.