first commit
This commit is contained in:
commit
063194f8be
349 changed files with 36508 additions and 0 deletions
19
tester/testsuite/extensions/objects1/counter.jl
Normal file
19
tester/testsuite/extensions/objects1/counter.jl
Normal file
|
@ -0,0 +1,19 @@
|
|||
int main () {
|
||||
Counter c;
|
||||
c = new Counter;
|
||||
c.incr();
|
||||
c.incr();
|
||||
c.incr();
|
||||
int x = c.value();
|
||||
printInt(x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
class Counter {
|
||||
int val;
|
||||
|
||||
void incr () {val++; return;}
|
||||
|
||||
int value () {return val;}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue