blob: 262a206b08b3bdb543dd4358a43099d39df5cb67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Functions
=========
The 'FizzBuzz' example gave us an good overview.
== Arguments 'by reference'
We can also pass parameters by reference.
This enables us to change the variable with in the function.
[source,chapel]
./reference.lm
----
include::code/reference.lm[]
----
Compiling and running would give us:
----
in global global
in SA global
in SA sa
in global sa
----
|