Debian Codegraph @

terps/tads/tads3/test/data/join.t

raw
1 #include <tads.h>
2
3 main(args)
4 {
5 test([1, 2, 'buckle my shoe', 3.00, 4.0000, 'open the door']);
6 test([1, 2, 'buckle my shoe', 3.00, 4.0000, 'open the door'], ',');
7 test([1, 2, 'buckle my shoe', 3.00, 4.0000, 'open the door'], ', ');
8
9 local v = new Vector();
10 v.append(1);
11 v.append('hello');
12 v.append(7.8);
13 v[3] *= 3.14159265;
14 v.append('another string');
15 test(v);
16 test(v, '; ');
17 }
18
19 test(lst, sep?)
20 {
21 "<<lst.join(sep).htmlify()>><br>";
22 }