|
4.26.4 shared expressions
shared expression:
-
any expression
-
an object of type
shared (result will reference the same data)
Example:
| system("reference"); system("shared");
shared sh = 17; // new shared
shared second = sh;
second;
==> 17
==>
second = 9; // also tied to 'sh'
sh;
==> 9
==>
typeof(sh);
==> shared
shared ll = list(1, 2, 3);
shared lref = ll[1];
lref;
==> 1
==>
lref = 12;
ll;
==> [1]:
==> 12
==> [2]:
==> 2
==> [3]:
==> 3
==>
|
|