Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit caf8282

Browse filesBrowse files
committed
bugfux
1 parent d6913c7 commit caf8282
Copy full SHA for caf8282

File tree

Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed
Open diff view settings
Collapse file

‎src/lambdacloud/test/TestLCStatements.java‎

Copy file name to clipboardExpand all lines: src/lambdacloud/test/TestLCStatements.java
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
package lambdacloud.test;
22

3-
import static symjava.symbolic.Symbol.x;
4-
import static symjava.symbolic.Symbol.y;
53
import lambdacloud.core.CloudConfig;
64
import lambdacloud.core.lang.LCDouble;
5+
import lambdacloud.core.lang.LCReturn;
76
import lambdacloud.core.lang.LCStatements;
87
import lambdacloud.core.lang.LCVar;
9-
import lambdacloud.core.lang.LCReturn;
10-
import symjava.symbolic.Expr;
118

129
public class TestLCStatements {
1310

@@ -18,18 +15,21 @@ public class TestLCStatements {
1815
public static void main(String[] args) {
1916
CloudConfig.setTarget("server");
2017

18+
LCVar x = new LCDouble("x");
19+
LCVar y = new LCDouble("y");
20+
2121
LCVar i = new LCDouble("i");
2222
LCVar j = new LCDouble("j");
2323
LCVar ret = new LCDouble("ret");
2424

2525
LCStatements s = new LCStatements();
26-
s.append(i.assign(1)); //i=1
27-
s.append(j.assign(x*y)); //j=x*y
28-
s.append(ret.assign(i+j)); //result=i+j
29-
s.append(new LCReturn(ret));
26+
s.append(i.assign(1)); //i = 1;
27+
s.append(j.assign(x*y)); //j = x*y;
28+
s.append(ret.assign(i+j)); //result = i+j;
29+
s.append(new LCReturn(ret)); //return result;
3030
System.out.println(s);
3131

32-
double t = CompileUtils.compile(s, new Expr[]{x, y}).apply(3,4);
32+
double t = CompileUtils.compile(s, new LCVar[]{x, y}).apply(3,4);
3333
System.out.println(t);
3434
}
3535

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.