Function prototype: Difference between revisions
m
→{{header|Amazing Hopper}}
mNo edit summary |
|||
Line 130:
<lang Amazing Hopper>
#!/usr/bin/hopper
#proto noargs /* Declare a pseudo-function with no argument */▼
#proto twoargs(_X_,_Y_) /* Declare a pseudo-function with two arguments */▼
// Archivo Hopper
#include <hopper.h>
#synon noargs no arguments
#context multiargs /* Declare a pseudo-function with multi arguments */
▲#proto twoargs(_X_,_Y_) /* Declare a pseudo-function with two arguments. #PROTO need arguments */
main:
_two args
{1,2,3,"hola mundo!","\n"}, multiargs
exit(0)
.locals
multiargs:
_PARAMS_={},pushall(_PARAMS_)
[1:3]get(_PARAMS_),stats(SUMMATORY),println
{"Mensaje: "}[4:5]get(_PARAMS_),println
clear(_PARAMS_)
back
twoargs(a,b)
{a}mulby(b)
back
// This function is as useful
no args:
{0}minus(0),kill
back
{0}return
</lang>
|