-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent printing function returns on function decision execution mode…
… in interactive mode
- Loading branch information
1 parent
c80976e
commit b14ff02
Showing
5 changed files
with
55 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,47 @@ | ||
import tests.shell.modules.module1 | ||
|
||
void def f1() | ||
void def fa() | ||
print "hey" | ||
end | ||
|
||
asdasd1() | ||
|
||
f1() | ||
fa() | ||
|
||
asdasd2() | ||
|
||
num def f2() | ||
num def fb() | ||
num a = 5 | ||
return a | ||
end | ||
f2() | ||
fb() | ||
|
||
// Print the function return on function calls from modules | ||
module1.sub(7, 3) | ||
|
||
// Test for not printing function returns on function decision execution mode | ||
num def f1() | ||
num a = 101 | ||
return a | ||
end | ||
|
||
num def f2() | ||
num b = 102 | ||
return b | ||
end | ||
|
||
num def f3() | ||
num c = 103 | ||
return c | ||
end | ||
|
||
num def add(num x, num y) | ||
num z = x + y | ||
end { | ||
z == 8 : f1(), | ||
z > 10 : f2(), | ||
default : f3() | ||
} | ||
|
||
add(3, 5) | ||
print add(3, 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ Undefined function: asdasd2 | |
Absorbed by Interactive Shell | ||
5 | ||
4 | ||
101 | ||
101 |