Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mjtest-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IPDSnelting
mjtest-tests
Commits
578766b8
Unverified
Commit
578766b8
authored
Nov 29, 2018
by
uwdkn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply review
parent
b9d47d46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
21 deletions
+20
-21
exec/binary_ops.mj
exec/binary_ops.mj
+5
-5
exec/can_short_circuit.mj
exec/can_short_circuit.mj
+14
-14
exec/multiassign.mj
exec/multiassign.mj
+1
-2
No files found.
exec/binary_ops.mj
View file @
578766b8
class A {
public static void main(String[] args) {
System.out.println(2 - 1); /
/ 1
System.out.println(4 / 2); /
/ 2
System.out.println(1 + 2); /
/ 3
System.out.println(2 * 2); /
/ 4
System.out.println(11 % 6); /
/ 5
System.out.println(2 - 1); /
* 1 */
System.out.println(4 / 2); /
* 2 */
System.out.println(1 + 2); /
* 3 */
System.out.println(2 * 2); /
* 4 */
System.out.println(11 % 6); /
* 5 */
if (false || true) { System.out.println(6); }
if (true || false) { System.out.println(7); }
...
...
exec/can_short_circuit.mj
View file @
578766b8
class A {
public boolean side_effect() {
System.out.write(70); /
/
System.out.write(10); /
/ newline
System.out.write(70); /
* F */
System.out.write(10); /
* newline */
return false;
}
public static void main(String[] args) {
A a = new A();
if (true || a.side_effect()) {
System.out.write(79); /
/ O
System.out.write(75); /
/ K
System.out.write(10); /
/ newline
System.out.write(79); /
* O */
System.out.write(75); /
* K */
System.out.write(10); /
* newline */
}
if (false && a.side_effect()) {
} else {
System.out.write(79); /
/ O
System.out.write(75); /
/ K
System.out.write(10); /
/ newline
System.out.write(79); /
* O */
System.out.write(75); /
* K */
System.out.write(10); /
* newline */
}
if (!(false && a.side_effect())) {
System.out.write(79); /
/ O
System.out.write(75); /
/ K
System.out.write(10); /
/ newline
System.out.write(79); /
* O */
System.out.write(75); /
* K */
System.out.write(10); /
* newline */
}
if ((true || a.side_effect()) && true) {
System.out.write(79); /
/ O
System.out.write(75); /
/ K
System.out.write(10); /
/ newline
System.out.write(79); /
* O */
System.out.write(75); /
* K */
System.out.write(10); /
* newline */
}
}
}
exec/multiassign.mj
View file @
578766b8
eass A {
class A {
public static void main(String[] args) {
int x = 8;
int y = x = 4;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment