The following Linux command(s) display installed version of ocaml.
ocaml --version
On
2019-08-16 the output was as follows.
The OCaml toplevel, version 4.05.0
The file type of a
OCaml program file is
ml.
The following Linux command(s) create/edit a hello program in the your home directory using the nano text editor.
nano ~/hello.ml
Create the following program text in the editor that will output the text "Hello world"
print_string "Hello world\n";;
To exit with save, remember to press
Ctrl-X, then "
y" (for yes) and
Enter to exit.
The following Linux command(s) run the program.
ocaml hello.ml
The output should be as follows.
Hello world