Traditionally, outside of Perl,
returned values that were used as a part of the calling expression.
Preferably they do not have side-effects.
Returned only status. True/false, an error code or an exception.
Usually side-effectful.
A generic term covering both and more.
I'm not sure if there is any language that actually enforced these rules. Didn't Pascal complain if you tried to return a value from a procedure?
In reply to Re: Difference between subroutine and functions
by BrowserUk
in thread Difference between subroutine and functions
by madtoperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |