Add help examples

This commit is contained in:
Diogo Cordeiro 2018-12-20 23:19:22 +00:00
parent f9d579c494
commit f12221bed0

View File

@ -138,20 +138,24 @@ do_process_input(help_menu) :-
writeln("Furthermore, I'm capable of memorizing polynomials during runtime. To learn more on that, type: tell me about storage").
do_process_input(help(show)) :-
writeln("It's almost an echo of what you said, but a mathy one."),
writeln("Some example queries:"),
writeln(">").
writeln("Example query:"),
writeln("> show two plus x squared"),
writeln("2+x^2").
do_process_input(help(multiply)) :-
writeln("Multiplies a polynomial represented as an expression by a scalar resulting in a second polynomial. The two first arguments are assumed to be ground. The polynomial resulting from the sum is in simplified form."),
writeln("Some example queries:"),
writeln(">").
writeln("Example query:"),
writeln("> multiply three by two plus x squared"),
writeln("3*x^2+6").
do_process_input(help(simplify)) :-
writeln("Simplifies a polynomial represented as an expression as another polynomial as an expression."),
writeln("Some example queries:"),
writeln(">").
writeln("Example query:"),
writeln("> simplify two plus two plus one times y"),
writeln("y+4").
do_process_input(help(add)) :-
writeln("Adds two polynomials as expressions resulting in a third one. The two first arguments are assumed to be ground. The polynomial resulting from the sum is in simplified form."),
writeln("Some example queries:"),
writeln(">").
writeln("> add two times x to four times x"),
writeln("6*x").
do_process_input(help(storage)) :-
writeln("Polynomials, pressed between the entries of my storage"),
writeln("Polynomials, simplified through the ages just like predicates"),
@ -163,13 +167,14 @@ do_process_input(help(storage)) :-
nl,
writeln("Storage manipulation is better illustrated with examples. Some example queries:"),
writeln("Asking me to memorize something:"),
writeln(">"),
writeln("> show two plus x squared as P1"),
writeln("P1 = 2+x^2"),
writeln("> multiply three by P1 as P2"),
writeln("P2 = 3*x^2+6"),
nl,
writeln("Asking me to forget something:"),
writeln(">"),
nl,
writeln("Some examples of memory resources usage:"),
writeln(">").
writeln("> forget P1 and show stored polynomials"),
writeln("P2 = 6+3*x^2").
do_process_input(help(bye)) :-
writeln("There must be some kind of way outta here"),
writeln("Said the joker to the thief"),