Interactive programming (repl): Difference between revisions

Changed the REPL as "nrpl" ne longer compiles and "tnim" is not very friendly compared to "inim".
(Add min)
(Changed the REPL as "nrpl" ne longer compiles and "tnim" is not very friendly compared to "inim".)
Line 957:
 
=={{header|Nim}}==
Nim is not provided with a REPL but there is several available. Online, it is possible to use Nim playground at https://play.nim-lang.org/. And one can install “inim” with “nimble” (command <code>nimble install inim</code>).
Use <code>nimble</code> (Nim's package manager) to install a REPL ('''nrpl''' or '''tnim''')
 
Run the REPL and paste the following code:
 
<lang Nim>proc f(x, y, z: string) = echo x &, z &, z &, y
<pre>
f("Rosetta", "Code", ":")</lang>
proc f(x, y, z: string) = echo x & z & z & y
f("Rosetta", "Code", ":")
</pre>
 
which outputs:
 
<pre>Rosetta::Code</pre>
 
To get working arrow keys, compile nim with readline, like this: <code>./koch boot -d:release -d:useGnuReadline</code> or just run <code>rlwrap nim i</code> instead.
 
=={{header|OCaml}}==
Anonymous user