src/test/01-Basic/196-array-append-array.ck
raw| 1 | // test array append array (float) |
| 2 | // SEE: https://github.com/ccrma/chuck/issues/202 |
| 3 | |
| 4 | // 2D float array |
| 5 | float foo[0][0]; |
| 6 | // float array |
| 7 | float bar[0]; |
| 8 | // append to bar |
| 9 | bar << 1 << 2 << 3 << 5; |
| 10 | // append 1D array into 2D array |
| 11 | foo << bar; |
| 12 | |
| 13 | // print contents |
| 14 | for( float x[] : foo ) |
| 15 | { |
| 16 | for( float y : x ) |
| 17 | { |
| 18 | <<< y >>>; |
| 19 | } |
| 20 | } |