Function prototype: Difference between revisions

→‎{{header|REXX}}: added the REXX computer programming language.
(→‎{{header|REXX}}: added the REXX computer programming language.)
Line 844:
(: two-args (Integer Integer -> Any))
(define (two-args a b) (void))</lang>
 
=={{header|REXX}}==
In the REXX language, there is no difference between functions and
subroutines, &nbsp; <big> ''except that'' </big> &nbsp; functions &nbsp;
''must'' &nbsp; return a value, &nbsp; even if that value is a
"null" &nbsp; (empty string).
 
In REXX, if a function doesn't return a value,
a &nbsp; ''syntax'' &nbsp; condition is raised.
 
REXX has no need of pre─allocating a prototype &nbsp; (such as required
arguments and the like) &nbsp; for functions or subroutines, &nbsp; but there
are facilities (in the form of BIFs) to assist the REXX programmer to easily
determine the number of arguments passed (if any), &nbsp; and perform
(and/or enforce) any necessary argument passing (including
the &nbsp; ''type'' &nbsp; of values or variables passed), &nbsp; and
also including checking for omitted arguments. &nbsp; In effect, the
relaxation of requirements/rules for function or subroutine invocations has
been moved from the compile stage (for REXX, the parsing/interpretive) stage)
to the execution stage.
 
 
<small>Note: &nbsp; REXX is an interpretive language. </small>
<br><br>
 
=={{header|SNOBOL4}}==