/usr/share/doc/chuck/examples/basic/func.ck is in chuck 1.2.0.8.dfsg-1.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 8 => int a;
fun int abs( int v )
{
if( v < 0 ) return -v;
return v;
}
fun void args( int y, int b )
{
4 => a;
<<<b>>>;
}
fun float sum( float a, float b )
{
return a + b;
}
fun void go( int a )
{
<<<abs(a)>>>;
if( a == 0 )
return;
go( abs(a)-1 );
}
int i;
for( 0 => i; i < 10; i + 1 => i )
go( 1000 );
<<<abs(-1)>>>;
args( 1, 2 );
<<<sum( 1.0, 2.0 )>>>;
<<<a>>>;
|