TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
I think a function is the same as either a routine or
subroutine. A subroutine, as the name implies, is a routine
called by a larger program.
The parens are significant and therefore are needed sometimes
(if you're writing for people who will understand them). They
mean that the function (or whatever) has to be handed an argument.
For example, the add() function gets parens, because it needs
something to add. The Unix function uptime doesn't, because it
takes no argument and always returns the time since the computer
was rebooted. The tricky thing is that there are functions that
can take arguments but don't have to: "date" by itself returns
the date, and "date <current date and time>" resets the system
clock. I'd use the parens on those as well; it means you have to
be sure of all the things a function does before you can leave
the parentheses off.
Vicki Rosenzweig
vr%acmcr -dot- uucp -at- murphy -dot- com