Task 3: Introducing the IDE
Most programming languages today come with tools to aid the
programmer in writing code. One of the most powerful of these tools is
the Integrated Developer Environment, otherwise known as the IDE. The
IDE aids the programmer by providing command structure help, debugging
tools and real-time syntax help, a sort of spell checker for commands.
The IDE is where the programmer types in code or develops an
application visually depending on the language being used. Here are a
few examples of IDEs that have been and are still in use today:
Arduino IDE Utilizing the C Language
Lego NXT IDE Utilizing Lego's Visual Language
Microsoft QuckBASIC 4.5 IDE Utilizing the BASIC Language
QuickBASIC 64 IDE Utilizing the BASIC Language
Microsoft VisualBASIC IDE Utilizing the BASIC Language
xBasic IDE Utilizing a Form of the BASIC Language
you can see from the images above an IDE can be rather sparse or
complex depending on the language and the type of programming involved.
QB64's IDE is rather spartan but looks can be deceiving as it offers a
rich set of tools awaiting the programmer. Have you noticed how
Microsoft's QuickBASIC 4.5 IDE and QuickBASIC 64's IDE look almost
identical? As you read in the history of BASIC, Microsoft's last
official release of QuickBASIC was in 1988 with version 4.5. This
version of QuickBASIC however had a huge following all the up until
Windows Vista was released in 2007. Windows Vista finally broke
compatibility with QuickBASIC 4.5 and many figured it was the end of
QuickBASIC as we knew it. But, as usually happens when fans take over,
a project was created to keep QuickBASIC alive and this project
eventually morphed into what is called QuickBASIC 64 today. The IDE for
QuickBASIC 64 (which will now be referred to as QB64) was purposely
modeled after the IDE for QuickBASIC 4.5 so programmers would feel
right at home in QB64.
-- The QB64 IDE --
Go ahead and double-click on the QB64
shortcut located on your desktop to explore the IDE you'll be using in
this course. Let's take a brief tour of the IDE to discover the
features available before writing our first program. We'll start off by
examining the various visual features of the IDE as shown in figure 1 below.
Figure 1 - Features of the QB64 IDE
The QB64 IDE acts just like any other simple text editor, such as
Notepad. The flashing cursor depicts where text will be inserted when
the programmer strikes a key or pastes text from the clipboard.
Position of Cursor:
The IDE will display the current location of the cursor within the
source code. This feature can be handy when aligning text for screen
Current Program Loaded:
The IDE will display the project that is currently loaded and being
edited. If the project you are working on is new and has not been saved
yet it will show the default name of "Untitled".
- You can search the source code for any string of text by entering it in the search area and pressing enter.
- Selecting Help
brings up a very comprehensive help screen that the programmer can use
to get command descriptions, help on the current command and sample
code to copy and paste in the current project amongst other things.
Errors and Info Displayed Here:
This is where the IDE will inform you of errors that it has identified
in the source code or relevant information it needs to convey to you
about your current project.
The menu is fairly consistant with most Windows programs that are
encountered, such as the File and Edit menus. A few of the menus
however are devoted strictly to the QB64 programming environment.
- Create a new QB64 project (.BAS file)
Open . . .
- Open an existing QB64 project (.BAS file)
- Save the current active QB64 project.
Save As . . .
- Save the current active QB64 project with a different name.
- Check for and download any update to the QB64 language installed on the hard drive.
-Leave the QB64 IDE (you will be prompted to save the project if any changes have been made since the last save).
- Allows the programmer to cut, copy and paste code in the same manner as any other Windows program.
- Deletes the character to the right of the cursor or any currently highlighted text.
- Allows the programmer to select the entire text currently in the IDE.
- Undo or Redo last action
Comment (add ')
- Allows the programmer to comment (remark) out lines of code.
Uncomment (remove ')
- Allows the programmer to uncomment (unremark) lines of cade.
New SUB . . .
- Allows the programmer to create a new subroutine.
New FUNCTION . . .
- Allows the programmer to create a new function.
|SUBS . . .|
Allows the programmer to view a list of subroutines and functions
contained in the source code. Subroutines and functions are like little
mini-programs contained within the main code that can be called over
and over again.
|Find . . .|
- Allows the programmer to seek out a specific string of text within the program's source code.
Repeat Last Find
- Performs the previous Find command again allowing the programmer to find all instances of the text being searched for.
Change . . .
Allows the programmer to seek out a specific string of text within the
program's source code and replace it with some other text.
Allows the programmer set bookmarks, or markers, within the source code
which tells the IDE to stop at these points so the programmer can
perform tasks related to the source code.
- Informs the IDE to continue to the next bookmark within the source code.
- Informs the IDE to move back to the previous bookmark within the source code.
Go to line . . .
- Directs the IDE to move the cursor to a specific line of code within the source code.
- Executes the program's source code while the IDE watches its execution.
- Executes the program's source code without the aid of the IDE.
Make EXE Only
- Compiles the source code into a stand-alone executable Windows program.
|Display . . .|
- Allows the programmer to customize the look and feel of the IDE, such as colors and fonts.
Language . . .
- Directs the IDE to use special characters and keyboard codes as specified by other human languages.
Code layout . . .
- Allows the programmer to customize the way code appears on the screen in the IDE.
Update . . .
- Customizes the way updates are delivered to QB64.
Backup/Undo . . .
- Allows the programmer to set the buffer size of the Undo/Redo menu commands.
- Brings up the help index (lower half of screen) allowing the programmer to search through the entire help database.
- Currently performs the same function as the View command.
- Brings up a listing of all commands used by the QB64 programming language.
Keywords by usage
- Brings up a listing of all commands used by QB64 but sorted by use, such as arithmatic, graphics, sound, etc..
- Displays a standard programmer's ASCII chart.
Update current page
- Checks for any updates to the current help screen displayed and downloads them if available.
Update all pages
- Checks for updates to the entire help database and downloads them if available.
About . . .
- Displays the QB64 version currently installed.
-- Make It Bigger --
of the above IDE options and commands will be explained further as the
course proceeds and their need is encountered. For now, let's go ahead
and adjust the size of the IDE's window from its standard 80x25 text
viewing area. Go into the Options menu and choose Display . . .
Figure 2 - Display Options
You should now see the QB64 IDE display options as seen in figure 2 above. Change the width to 150 and the height to 50 and then click OK.
This will give you a 150x50 text area in which to type your source
code. If the QB64 IDE window is now too large for your computer's
desktop, simply go back into options and change the height and width
accordingly until the IDE fits within your desktop. Or, if you prefer,
you can enter larger numbers for the width and height if you still have
plenty of desktop space left.