I don't think you can find any good tutorial on this combination of topics, because I fail to imagine a reasonable knowledgeable person who would take this pointless task. Likewise, I would not advise you to waste your time on it.
If you want a good "regular" (numeric) calculator, Prolog would make
little to no sense. This is a
logic programming language, strongly declarative, with notoriously weak
imperative semantics. Please see:
http://en.wikipedia.org/wiki/Prolog[
^],
http://en.wikipedia.org/wiki/Logic_programming[
^],
http://en.wikipedia.org/wiki/List_of_programming_languages_by_category#Declarative_languages[
^],
http://en.wikipedia.org/wiki/Declarative_programming[
^],
http://en.wikipedia.org/wiki/Imperative_programming[
^].
Even if you use Prolog implementation with enforced (I would say, "artificially enforced") imperative feature, notably Object-Oriented Visual Prolog, formerly Borland Turbo Prolog, it would not match with several much more suitable languages. Please see:
http://en.wikipedia.org/wiki/Comparison_of_Prolog_implementations[
^],
http://en.wikipedia.org/wiki/Turbo_Prolog[
^].
Generally, making a traditionally-looking calculator with buttons is a popular but very poor model for learning programming. Who need them? Anyone can easily make a decent expression-oriented calculator with any non-trivial scripting/interpretive language, because they have expression evaluators, which just few lines of code. For example, take a look at my JavaScript calculator:
http://sakryukov.org/freeware/calculator/[
^].
Such calculators are possible just because the imperative interpretive languages can parse/evaluate strings containing expressions in the same language, like JavaScript
Eval
. Please see:
http://en.wikipedia.org/wiki/Interpretive_programming_language#Advantages_of_interpreting_a_language[
^],
http://en.wikipedia.org/wiki/Interpreter_%28computing%29[
^].
From the other hand, if I assume that you want to make a calculator to learn Prolog,
I would advise to find a better goal. Such task would defeat the purpose of this language. In addition to having extra hassles, you would risk to go around essence of the logical programming and the essential features of the language.
And finally, I can assume that you are already knowledgeable in Prolog and want to polish your skills to make yourself a universal Prolog developer capable of solving nearly any problem. In this case, creation of the calculator could be justified, marginally, but in this case
I would not advise to look for a tutorial. For such a developer, the regular detailed language reference could serve the best.
—SA