[chuck-users] returning arrays from functions

eduard aylon eduard.aylon at gmail.com
Sat Oct 13 17:06:22 EDT 2007


This seems something I should have done in the past, but I can't  
figure out how to return an array from a function. Couldn't find  
documentation nor examples.

case 1: compiling error. This seems the more natural way to me.

fun int return_array( int a[] )
{
	return a;
}

case 2: works, but the returned array is empty

fun int[] return_array( int a[] )
{
	return a;
}


thanks,

eduard


More information about the chuck-users mailing list