in reply to Difference between subroutine and functions
A function is not necessarily a computing term -- in the English language it could mean anything from something your body does to a social event. A subroutine, however, is pretty much limited to a computing term, although i'm sure someone has used it outside of that scope. (UPDATE: touché, ysth!) In Perl, i tend to refer to the built-in functions such as print and sort as functions, but i refer to my own functions as subroutines. Of interest is perldoc -f, which is used to pull up documentation for Perl's built-in subroutines [sic]. ;) Notice it is -f and not -s.
As diotalevi said, they are homonyms in terms of computing.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Difference between subroutine and functions
by ysth (Canon) on Aug 17, 2006 at 22:17 UTC |