You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The plus, minus, -, and % operators must be separated. It should be written as 1 - 1, not 1-1.</p>
274
+
<p>You can use 1+1.</p>
275
+
</li>
276
+
<li>
277
+
<p>Binary operators: or, and, <<,>>, <,>, is, is not</p>
278
+
<ul>
279
+
<li>or, and</li>
280
+
<li>
281
+
<<,>>: Shift operator
282
+
</li>
283
+
<li>
284
+
<,>: Compare operator
285
+
</li>
286
+
<li>is: Equivalent to '=='.</li>
287
+
</ul>
288
+
</li>
289
+
<li>
290
+
<p>if then else 연산자</p>
291
+
<p><spanclass="scode">if 1 is 1 then 2 else 3</span>의 값은 2입니다.</p>
292
+
<p><spanclass="scode">if 1 is 2 then 2 else 3</span>의 값은 3입니다.</p>
293
+
<p><spanclass="scode">if A then B else C</span>의 값은 A가 참이면 B이고, 거짓이면 C입니다.</p>
294
+
<p><spanclass="scode">if A then B else if C then D else E</span>처럼 여러 조건을 걸 수도 있습니다.</p>
295
+
<p>You can also change a line.
296
+
<preclass="code">if A then B
297
+
else if C then D
298
+
else E</pre>
299
+
</p>
300
+
</li>
301
+
<li>
302
+
<p>'as' and function complex operator, function operator, unary function operator</p>
303
+
<p><spanclass="scode">a as 10</span> Assign 10 for a. The value of the expression is 10.</p>
304
+
<p><spanclass="scode">a func= 10</span> Assign f(a, 10) into a. The value of the expression is the value assigned into a.</p>
305
+
<p><spanclass="scode">a func! 10</span> The value of the expression is f(a, 10).</p>
306
+
<p><spanclass="scode">func: a</span> The value of the expression is f(a).</p>
307
+
</li>
308
+
</ul>
309
+
<p>Of course, you can concatenate operators in the format 1 + 1 + 1 + 1.</p>
310
+
<p>And of course, you can use parentheses in the format 1 + (1 + 1) + 1. It is recommended to use parentheses for functional compound operators and (unary) function operators.</p>
311
+
<h2>Condition, Repeat</h2>
312
+
<h2>Conditional blocks</h2>
313
+
<preclass="code">if 조건
314
+
inner code</pre>
315
+
<p>Case doesn't matter.</p>
316
+
<p>If 1 + 1 is 2, the code that prints Hello twice is:</p>
317
+
<preclass="code">if 1 plus 1 is 2
318
+
it println about "Hello"
319
+
it println about "Hello"</pre>
320
+
<h2>Repeat blocks</h2>
321
+
<p>There are three types of loop statements.</p>
322
+
<h3>For</h3>
323
+
<preclass="code">For 요소의타입 요소 of 순회할배열
324
+
inner code</pre>
325
+
<p>English++ supports arrays that can be simply written as [1..10]. [1..10] is an array containing numbers from 1 to 10 in order with a difference of 1. If you want an array up to 20, you can write [1..20]. If you want the difference of 2, just write [1...20] and 3 dots in the middle. Those numbers can only be constants. [a..b] is not possible.</p>
326
+
<p>Using that array, we can write code that prints numbers from 1 to 10. We haven't learned types yet, but let's move on.</p>
0 commit comments