Skip to content

Commit 5818bf9

Browse files
committed
updated examples
1 parent 3896a6c commit 5818bf9

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

doc/examples.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,88 @@ Output
5555
42.0
5656
```
5757

58+
###var_bool
59+
60+
PipelineScript
61+
```
62+
bool x = true
63+
print x
64+
```
65+
66+
Java
67+
```java
68+
boolean x = true;
69+
System.out.println(x);
70+
```
71+
72+
Output
73+
```
74+
true
75+
```
76+
77+
###var_array
78+
(not yet implemented)
79+
80+
PipelineScript
81+
```
82+
num[] x = [1, 2, 3]
83+
print x
84+
```
85+
86+
Java
87+
```java
88+
double[] x = new double[]{1, 2, 3};
89+
System.out.println(x);
90+
```
91+
92+
Output
93+
```
94+
1.0 2.0 3.0
95+
```
96+
97+
###var_table
98+
(not yet implemented)
99+
100+
PipelineScript
101+
```
102+
table x = [[1, 2], [3, 4]]
103+
print x
104+
```
105+
106+
Java
107+
```java
108+
Table x = new Table(new double[][]{{1, 2}, {3, 4}});
109+
System.out.println(x);
110+
```
111+
112+
Output
113+
```
114+
1.0 2.0
115+
3.0 4.0
116+
```
117+
118+
###var_graph
119+
(not yet implemented)
120+
121+
PipelineScript
122+
```
123+
graph x = 3[[1, 2], [1, 3], [2, 3]]
124+
print x
125+
```
126+
127+
Java
128+
```java
129+
Graph x = new Graph(3, new int[][]{{1, 2}, {3, 4}});
130+
System.out.println(x);
131+
```
132+
133+
Output
134+
```
135+
3
136+
1 2
137+
3 4
138+
```
139+
58140
###arith_add
59141

60142
PipelineScript

0 commit comments

Comments
 (0)