a single parenthesized argument, while @print@ is a statement that takes
a comma-separated, unparenthesized list:
.DS
.ft CW
while (read(x)) {
print "value is ", x, "\n"
}
.ft
.DE
.NH
Functions and Procedures
.PP
Functions and procedures are distinct in @hoc@,
although they are defined by the same mechanism.
This distinction is simply for run-time error checking:
it is an error for a procedure to return a value,
and for a function @not@ to return one.
.PP
The definition syntax is:
.ix [hoc] function~definition
.ix [hoc] procedure~definition
.DS
.I
.ta 1i
function: func name() stmt
procedure: proc name() stmt
.R
.DE
.I name
may be the name of any variable \(em built-in functions are excluded.