Chapter 3. Using the Console

KAlgebra's console is useful as a calculator on steroids. The user may enter expressions for evaluation in Calculate or Evaluate mode, depending on the Console menu selection.

In evaluation mode KAlgebra simplifies the expression even if it sees an undefined variable. When in calculation mode KAlgebra, calculates everything and if it finds an undefined variable shows an error.

In addition to displaying the user entered equations and results in the console display, all variables that are declared are displayed in a persistent frame to the right. By double clicking on a variable you will see a dialog that lets you change their values (just a way to trick the log).

The "ans" variable is special, every time you enter an expression, the "ans" variable value will be changed to the last result.

The following are example functions that can be entered in the input field of the console window:

  • sin(pi)

  • k:=33

  • sum(k*x : x=0..10)

  • f:=p->p*k

  • f(pi)

The following shows a screenshot of the console window after entering the above example expressions:


KAlgebra console window

A user can control the execution of a series of calculations using the Console menu options:

ConsoleLoad Script (Ctrl+L)

Executes the instructions in a file sequentially. Useful if you want to define some libraries or resume some previous work.

ConsoleSave Script (Ctrl+G)

Saves the instructions you have typed since the session began to be able to reuse. Generates text files so it should be easy to fix using any text editor, like Kate.

ConsoleExport Log (Ctrl+S)

Saves the log with all results into an HTML file to be able to print or publish.