BlitzMax/User Guide/MaxIDE

The BlitzMax IDE is an application used for editing source code files and building projects. IDE stands for 'integrated development environment'.

The BlitzMax IDE operates very much like a text editor or word processor.

Getting started
Ok, time to compile and run your first program!

First, select New from the file menu or toolbar. This will create a new, empty source file for you to work with.

Next, enter the following little program:

' 'My first BlitzMax program ' Print "Hello World!"

Now, its time to build and run: Select Build And Run from the Program menu. You should see the following output:

Building untitled1 Compiling:untitled1.bmx flat assembler version 1.51 3 passes, 2417 bytes. Linking:untitled1.debug.exe Executing:untitled1.debug.exe Hello World!

Process complete

Congratulations! You've just created your first program!

What happens if there's an error in your program? Create a new source file and try the following program instead:

' 'My first bug! ' rint "Hello World!" 'oops! Forgot a 'p'!

This program has an error in it - there is no such command as 'rint' so attempting to build this program will produce the following error:



When you return to the main source code window, the cursor will be placed at the line containing the error, allowing you to fix it.

This type of error is known as a compile time error, because the bug was detected by the compiler before you actually ran the program. However, the compiler cannot catch all possible errors - some errors are not apparent until your program is run. These kinds of errors are known as runtime errors. Here's an example of a program with a runtime error in it:

' ' My first runtime bug! ' Local an_array[10]

For k=0 To 10 Print an_array[k] Next

If you run this, you should see the following error message:



Note how the pane on the right has also switched to the 'Debug' pane. This means your program is in 'debug mode', and by navigating through the debug pane you can inspect your programs variables.