Editing Business BASIC

Overview

The BASIS IDE Source Editor is a text editor that is optimized for writing Business BASIS source code. Features of the Source Editor include, but are not limited to:

  • Color syntax highlighting (with user-adjustable colors)

  • Breakpoint placement

  • Advanced find and replace

  • Keyboard macro recording and execution

  • User-defined abbreviations and abbreviation expansion

  • BBj Object syntax code completion

  • Bookmarking for quick navigation

The Source Editor cannot be used for executing or testing an application, but is the tool of choice when writing large amounts of new code or making extensive changes to existing source files. In BBj 2.01 and higher, breakpoints can be added to source code files opened in the Source Editor and then saved for use in future debugging sessions. Unlike the Debugger, the Source Editor does not create or communicate with a BBj interpreter and therefore does not show syntax errors as program statements are entered. See Linking to Compiler Errors for instructions on displaying syntax errors in the Source Editor after compiling the source. BBjServices does not need to be running in order to use the Source Editor.

source_editor_overview.png

The above image shows the Source Editor with four loaded files. The currently loaded file, called _FIXKEY, does not have a file extension. This file contains user line numbers shown in red to the left of each program statement, while physical line numbers are shown in the gutter along the left border of the window. See Displaying Line Numbers for more information toggling the display of physical line numbers. The default syntax coloring is being used, where BBj keywords are blue, functions are green, numbers and character strings are red, comments are gray italics, etc. See Customizing Options of the Source Editor for more information.

Any Business BASIC program file can be opened and edited in the Source Editor, provided it has either a recognized extension such as .bbj or .bbx, or no file extension at all. Both text and tokenized (compiled) files are useable. See the Managing File Extension section of Additional Options and Configurations for information about registering file extensions in the IDE.