NeturalMath Quick Start Guide

Part 1: Installing NeturalMath

Installing NeturalMath is as easy as downloading the setup files from this site and running it. The setup files may be found at It is recommended that you always use the latest version of the application unless you have a specific reason for doing otherwise.

Once NeturalMath has been installed, you will see a black and white console window like in the image shown below:

You are now ready to start using NeturalMath.

Basics of MathConsole

MathConsole is the primary interface into the NeturalMath environment. NeturalMath is both a programming language as well as a system for interpreting that language. MathConsole is a program which hooks into that NeturalMath system and makes it easy to access. One way to think about this is that you can read and write in English (or other native language). You may have tools on your computer such as Microsoft Word, Notepad, or Outlook that allow you to write thoughts and ideas in your native language and share them with others. NeturalMath is a language just like English, and MathConsole is a tool to help you write mathematical ideas. Because MathConsole is the main interface which is distributed as part of this NeturalMath package, this does not mean that this is the only way to write NeturalMath code. NeturalMath code may be written in any text editor (such as Notepad), and there may exist specialized third-party tools for editing NeturalMath code quickly and easily.

Using MathConsole is as easy as clicking on it from your start menu. Once MathConsole opens, you will see a black console screen with white text. This console window is the main means of interaction with MathConsole. From this command line, you can do two things: Enter NeturalMath code and input MathConsole commands. NeturalMath code is any generic code for the NeturalMath language which could be run in any program. As each line of code is entered, it is evaluated and the results are output in the console window. MathConsole commands are special commands which only work from the MathConsole window. They either modify the MathConsole environment, or perform some special action like opening or saving a file. These commands cannot be used in a program, as they are not part of the NeturalMath language, and will not be interpreted correctly.

Math Console Commands

The first system command you should know when using MathConsole is the Help Command. You can access the help command simply by typing help into the console window.

Typing in the help command will display a synopsis of how to use the system help. We recommend that you read it before proceeding any further. You may also call the system help by hitting the ctrl+h keyboard combination.

The second command to learn is the Exit Command. The Exit command causes you to exit the system and shuts down MathConsole. You can also exit MathConsole by hitting the escape key (esc). You will notice that if you have entered any input into the console window, MathConsole will ask if you want to save your work first. If you save your work, you can load it into MathConsole for later use. This is very useful when you are working on a large set of equations that may take a great deal of time to solve. Try the exit command below:

By using the exit command, we can leave MathConsole, and we are prompted to save our work, but what if we want to save our work without exiting. We all know from experience that problems can occur with computers, and that they may suddenly loose power or an application might crash for no reason. Anything not saved with our work will be lost. The Save Command allows us to avoid this problem by saving a file containing our work to the computer's hard drive, a portable USB drive, or any other form of permanent storage.

The save command has a few ways that it can be used. First, you can type in the word save followed by a standard file path. This means that the file will be saved at that location. If no path is provided, then a standard operating system save dialog box will display and allow you to choose where you want to save your file. By default, the .math extension is applied to the file name. Once a file has been saved, typing the save command again will cause it to update the file with the latest changes. The save command can also be invoked using the ctrl+s key combination.

Saving a file is only useful if we can open the file for use later. The Open Command allows us to do just this. By typing open followed by a file path, MathConsole will open the selected NeturalMath file and attempt to recover it's state in memory. If no file path is specified, the open command will display a standard operating system open dialog window. Once a file has been opened, it may be edited and saved for later use. The ctrl+o key combination will also call the open command.

clear and reset
When working on a large set of equations, or switching between two sets of work, you may find that your screen becomes cluttered and busy. There are two ways to deal with this problem, although they have very different behaviors, and it is important not to confuse them with each other. The first command is the Clear Command. The clear command wipes the window clean and displays only the input cursor. No data is modified and no work is lost. Only the trail of commands is cleaned off the screen. The ctrl+w key combination will also call the clear command.

The Reset Command is very different. The reset command forces the NeturalMath environment to return to its default state. All values and settings which have been modified will be returned to their default values. Any equations entered into the system will be erased. Like the exit command, the reset command prompts you if you want to save your work first. The ctrl+r key combination will also reset the system.

It is recommended that you call the reset command after each of the examples in this tutorial in order to reset the system to a default state before proceeding on to the next example, as it may cause the example to work incorrectly. Unless otherwise stated, each of the examples in this tutorial assume that you are starting from a default system configuration.

The Run Command executes an already written program within the current program context. It is very similar to the Import Statement, except that it is not saved as a statement within a program (since MathConsole commands don't get added to program files). This can be useful if you have programs that you may want to use repeatedly. It can also be useful if you have a program for performing some type of task or operation within the code. This type of program which helps you write other programs is known as a macro.

Like the save and open commands, the run command may be called with or without a file path following it. If no file path is given, the run command displays an operating system open window for you to select the file you wish to run. If the file is not a proper NeturalMath file, an error will be returned.

Lastly, the Edit Command causes the console window to switch from interpreter mode to editor mode. Editor mode allows you to go back into the sequence of commands that were entered and make changes. You may toggle between the interpreter and the editor mode using the ctrl+e keyboard combo. Using the editor is not covered until later in this Guide. Until stated otherwise, all examples provided are assumed to be entered in interpreter mode. Interpreter mode is better for learning because of the instant feedback recieved upon entering each line of code. The editor is better once you have learned the basics of the NeturalMath language and are ready to start writing real programs.

Now that you have learned how to navigate around MathConsole, it is time to start learning the basics of the NeturalMath language itself. Get started using MathConsole and NeturalMath as a calculator in the next section, Part 2: Performing Basic Operations

Last edited Nov 27, 2010 at 5:29 PM by zanethorn, version 7


No comments yet.