university

A simple math expression calculator in ocaml

Submitted by fabio on Sun, 2007-05-13 14:29.

I'm studying for the course of "Programming Paradigm" (traslation of Paradigmi di Programmazione) where we study different programming approaches by using some new programming languages.

The first programming language we are using is ocaml, a functional programming oriented language (for more informations read the ocaml Wikipedia page).

As first exercise we have developed a simple math expression calculator: for example given a string like (3*2)+5 the program is able to calculate the result.