Function definition
A
function definition specifies the name of the function, the types
and number of parameters it expects to receive. A function
definition also includes a function body with the declarations of
its local variables, and the statements that determine what the
function does.
The syntax of a function declaration is
the following
func <function name>([<param type> <param
name>] [, …])
statement
endfunc
Example:
functest(int
a, string b, double c)
int count =
a
while
count<10
count=count+1
Println(b,
" ",
c)
endwhile
return
count
endfunc
#call test()
intiResult
= test(0,"Hello", 2.5)
Println(iResult)
|