Documentation

Chapter 2. Getting Started with the Simpol Professional IDE

When the Simpol Professional Integrated Development Environment (IDE) first opens you will see a picture similar to the one below:

Initial state of the Simpol Professional IDE

The initial state of the Simpol Professional IDE.

Let's take a look around the interface and examine the various features. At the very top is the menu, and directly below that the toolbars. Although the menu is fixed, the toolbars are dockable and can be placed in various locations in the main window frame. In the upper left corner is the project window, which provides two different views of the project, the file view and the type view. To the right of that is the editor area which is an MDI area. Multiple source code and other document windows can be opened in this area. If they are maximized they can still easily be reached by clicking on the tab at the bottom of the area that represents the desired window (there are no tabs in this picture since there are no documents opened). Next is the output panel, which contains the various output areas as separate tab regions within the same area. This panel is where the results of a compilation or the running of a program can be found. In the lower left corner is the variable and object Watch panel. Unlike many common watch windows, this one always shows all of the variables for the current function once the variables have been declared in the flow of the program. The Me tab is provided so that the object passed to an event procedure can be examined easily (it does not need to be called Me in the function declaration). The last panel we see is the Call Stack panel. This panel shows the current state of the program in reverse order. In other words, if the program started in the main() function, and then called the init() function, which called the init_databases() function and we stopped execution within the last function then the Call Stack panel would show the three functions in the reverse order that we called them. Also, the Watch panel would contain the current state of the variables in the init_databases() function. If we then clicked on one of the earlier functions, the Watch window would then show us the state of the variables in that function.

The IDE is a very flexible environment and it is easily adapted to look the way any one person wishes to work. Panels can be turned on or off, they can be resized and rearranged. The toolbars can also be moved, undocked an arranged in a different manner that may better suit the user. Please feel free to try things out.

Now that we have had a look around, the smart thing to do would be to actually build something. In the next section, we will build our first project, a very basic program that is designed to teach us more about the development environment.

Creating Our First Project

To create a new SIMPOL project, select the New Project from the File menu. At that point, the following window will be shown:

The new project options window

The New Project Options window

In this window we define the project name, project output type (sml or smp), source code file type (sma or smu), where the project should be located and what it should be called. The options in the lower half of the window are advanced options that we won't cover at this time. In this example we will select the smp and sma options. The sml option is for producing compiled libraries of types and/or functions for use by yourself and others. The smu extension is for creating Unicode source files rather than ANSI ones. In the following examples we will only use the ANSI source file types. Unicode can be very useful when working with characters from multiple code pages, such as mixing Greek and western European languages, but is not available when working with Windows 9x and is therefore not appropriate as the standard type for source files when supporting all platforms.

For the purposes of our first example, select the smp and sma options. Now click on the button next to the Project location box. Beneath the Projects directory if no directory called "tutorial" is present then please create one using the Make New Folder. Once a tutorial directory exists below the Projects directory, select it and click on the OK button. In the Project name box enter learn01. Do not add any extension to this, the resulting program will be called learn01.smp, the main source file learn01.sma and the project directory learn01. See the picture below for details:

The new project options window with correct input

The New Project Options window with the correct input for learn01

Clicking on the OK button will create a new project with the name "learn01". The project will be opened, the main source file will be created, and the result will look something like the picture below:

The IDE with the learn01 project

The Simpol Professional IDE with the learn01 project created

Now that we have a project we can start writing the program code.