```gwion,editable
var int array_ref[];
-new int[2] => array_ref;
+new int[2] :=> array_ref;
<<< array_ref >>>;
```
```gwion,editable
for(var int i; i < 3; ++i) {
- i/2 => var float f1;
- i/2. => var float f2;
+ i/2 :=> var float f1;
+ i/2. :=> var float f2;
<<< i, " " , f1, " ", f2 >>>;
}
```
var int i;
foreach(a: array) {
foreach(b: a)
- <<< ++i => b >>>;
+ <<< ++i :=> b >>>;
}
foreach(a: array) {
foreach(b: a)
```gwion,editable
repeat(3) {
- maybe ? "You" : "Me" => var string s;
+ maybe ? "You" : "Me" :=> var string s;
<<< "Hello, ", s, "!" >>>;
}
```
### Passing to a function pointer
```gwion,editable
funptr void fptr_t(int);
-\ i { <<< "passed '", i, "'" >>>; } @=> var fptr_t fptr;
+\ i { <<< "passed '", i, "'" >>>; } :=> var fptr_t fptr;
fptr(4);
```
return i + j;
}
-test(_, 2) @=> const auto mytest;
+test(_, 2) :=> const auto mytest;
<<< 40 => mytest >>>;
```
};
#! create an union with field `i` set to `1`
-new U(i, 1) => var U u;
+new U(i, 1) :=> var U u;
<<< u.i >>>;
#! set field f to 2.4
-2.4 => u.f;
+2.4 :=> u.f;
<<< u.f >>>;
#! this will trigger an invalid access error