☰
Debian Codegraph
@
1.5.5.8-1
/
/
src
/
test
/
01-Basic
/
24.ck
☽
☼
src/test/01-Basic/24.ck
code
plain
raw
GPL-2.0+
2004 Ge Wang and Perry R. Cook. All rights reserved.
debian/copyright
1
// 24.ck : class with a member field and a member function
2
3
class X
4
{
5
// data
6
int i;
7
8
// function
9
public void foo( int a )
10
{
11
// set i
12
a => i;
13
}
14
}
15
16
// instantiate a X
17
X x;
18
19
// call
20
x.foo( 2 );
21
22
// test
23
if( x.i == 2 ) <<<"success">>>;