Add java code and test cases
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
int add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
println(add(5, 8));
|
9
compiler/target/test-classes/examples/functions/scopes
Normal file
9
compiler/target/test-classes/examples/functions/scopes
Normal file
@ -0,0 +1,9 @@
|
||||
int i;
|
||||
i = 42;
|
||||
int randomNumber() {
|
||||
int i;
|
||||
i = 4;
|
||||
return i;
|
||||
}
|
||||
println(randomNumber());
|
||||
println(i);
|
@ -0,0 +1,5 @@
|
||||
int number() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
println(number());
|
Reference in New Issue
Block a user