Function prototype: Difference between revisions

Content added Content deleted
mNo edit summary
mNo edit summary
Line 124: Line 124:


SKIP</lang>
SKIP</lang>

=={{header|Amazing Hopper}}==

Function prototypes are included in a #PROTO declaration in the header, at the beginning of a HOPPER source file, before the functional code (MAIN :). This is enforced by the HOPPER compiler, to declare pseudo functions.

<lang Amazing Hopper>
#proto noargs /* Declare a pseudo-function with no argument */
#proto twoargs(_X_,_Y_) /* Declare a pseudo-function with two arguments */
main:
_no args
_two args (2,2)
print
exit(0)
.locals
twoargs(a,b)
{a}mulby(b)
back

// This function is as useful as an ashtray on a motorcycle:
no args:
{0}minus(0),kill
back
</lang>


=={{header|C}}==
=={{header|C}}==