| 1 |
// 19.ck : function that takes array as argument |
| 2 |
|
| 3 |
// function foo |
| 4 |
fun void foo( float a[] ) |
| 5 |
{ |
| 6 |
// use 'a' associative |
| 7 |
10.0 => a["foo"]; |
| 8 |
} |
| 9 |
|
| 10 |
// declare |
| 11 |
global float x[10]; |
| 12 |
|
| 13 |
// call foo |
| 14 |
foo( x ); |
| 15 |
|
| 16 |
// test |
| 17 |
if( 10.0 == x["foo"] ) <<<"success">>>; |