Attention is currently required from: pespin.
1 comment:
File s1gw/S1GW_Tests.ttcn:
Patch Set #2, Line 226: vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars);
Oh, this is actually my TTCN-3 discovery of the month! Instead of doing `list := list & { item }` every time you want to add something, you can just reference items by index sequentially. And what's more important, it also works for template lists, for which you cannot do `list := list & { item }`.
Sounds weird, given that you could have a lengthof(vc_conns)==4 and then do vc_conns[4543] = ...
It's a good question what happens in this case. I gave this code a try:
```
private type component dummy_CT { };
private type record of integer IntList;
testcase TC_record_of_test() runs on dummy_CT {
var IntList list;
list[0] := 42;
list[3] := 43;
log(list);
}
```
and this is what I got printed:
```
MTC@LEGION: { 42, <unbound>, <unbound>, 43 }
```
so you'll have thousands of unbound values in the middle if you do `vc_conns[4543]`.
To view, visit change 38210. To unsubscribe, or for help writing mail filters, visit settings.