|
4.28.2 reference expressions
A reference expression:
-
any identifier
-
any subexpression of an identifier
-
an object of type
reference (result will reference the original identifier, too)
Example:
| system("reference"); system("shared");
int i = 17;
reference ref = i; // new reference
ref;
==> 17
==>
reference second = ref;
second;
==> 17
==>
second = 9; // also tied to 'i'
i;
==> 9
typeof(ref);
==> reference
list ll = list(1, 2, 3);
reference lref = ll[1];
lref;
==> 1
==>
lref = 12;
ll;
==> [1]:
==> 12
==> [2]:
==> 2
==> [3]:
==> 3
|
|