OCaml toplevel (terminal) embedded online (Simple version)¶
I recommend the following, more modern and comprehensive tools!
TryOCaml.OCamlPro.com is another good environment to use the basic OCaml system online, without installing anything!It’s done by OCamlPro and the « official » solution ;
Learn-OCaml is a heavier and more complete environment. Not sure if it works entirely offline.
Locally use an OCaml editor and interpreter? It is possible on this site! Without having to install anything!
Toplevel OCaml 4.00.1
- Try Ocaml
a few interactive lessons;
supports of the « drag and drop » of files;
allow to download the historic of the input;
and the best of all: it supports the
An example of OCaml program¶
The terminal above should start with the following lines in its textarea buffer :
let x = 50+10;; let y = x * 3;; String.make x 'a';; sin 1.;; let rec fact n = if n = 0 then 1. else float n *. fact (n - 1);; fact 20;; "abc" < "def";;
Like for the .special.rst file, I use the
.. raw:: htmlSphinx command to include raw
HTMLcode in the web page produced by Sphinx. It’s simple, it’s clean.
OCaml is © and ® Inria;
- toplevel.js is obtained thanks to the js_of_ocaml compiler.
For more information, see http://www.ocsigen.org/js_of_ocaml/.