Runtime evaluation: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: fix markup) |
(Added Kotlin) |
||
Line 722: | Line 722: | ||
at Evaluator.eval(Evaluator.java:33) |
at Evaluator.eval(Evaluator.java:33) |
||
at Evaluator.main(Evaluator.java:21)</pre> |
at Evaluator.main(Evaluator.java:21)</pre> |
||
=={{header|Kotlin}}== |
|||
Kotlin has a REPL which is started from the command line by running the compiler without any parameters. |
|||
Any valid Kotlin code can then be entered and immediately evaluated. |
|||
Below is a sample session. |
|||
<pre> |
|||
$ kotlinc |
|||
Welcome to Kotlin version 1.2.31 (JRE 1.8.0_162-8u162-b12-0ubuntu0.16.04.2-b12) |
|||
Type :help for help, :quit for quit |
|||
>>> 20 + 22 |
|||
42 |
|||
>>> 5 * Math.sqrt(81.0) |
|||
45.0 |
|||
>>> fun triple(x: Int) = x * 3 |
|||
>>> triple(16) |
|||
48 |
|||
>>> :quit |
|||
</pre> |
|||
=={{header|Lasso}}== |
=={{header|Lasso}}== |