Omikron BASIC for Apple Power Mac

1. Overview Content | 3. The Menus of the Editor

Chapter 2

The Editor

General Information
Starting the Editor
The Program Windows
Keyboard Assignment
Special Characters, Abbreviations & Name Completion
The Dialog Windows
The Built-in Screen Saver

General Information

Omikron Basic uses a so-called tokenizing line editor. This results in a few advantages when developing programs compared with a full text editor:

1. Only the line with the cursor is changed. Any lines before or behind remain unaffected. This reduces the probability of unintentional input errors.
2. As soon as the cursor leaves the current line it is immediately tokenized, i.e., converted to a symbolic intermediate code. The syntax is checked as the same time so that many programming errors are already detected at this stage. If the editor has detected an error, the cursor is set to the location of the error, the line is marked in color, and a message referencing the error is issued in the info line.
3. Tokenized programs are much faster to compile than normal source texts (a few seconds in general).
4. Tokenized programs are shorter and thus require less RAM memory and less space on the hard drive.

Starting the Editor

The editor can be started in a variety of different ways:

1. Double-click on the OmikronBasic icon.
2. Select the icon with the mouse and then select the option 'Open' in the finder menu.
3. Pull a *.BAS file to the OmikronBasic icon using the mouse.
In this case, the editor is started first and then the file *.BAS is loaded immediately afterwards.

If you have less than 6 MB of memory available on your computer it may happen that Omikron Basic cannot be started. In that case you should delete or rename the file NEWOMBAS.INF. The program then starts with a minimal configuration. If this does not solve the problem either, the only solution is to add additional RAM modules.
A dialog box prompting you to register appears during the first program start. To register enter your name and the registration number listed on the CD.

The Program Windows

The BASIC programs to be processed are managed by the editor in separate windows. The title bar shows the name of the respective program. If a program is modified the editor indicates this with an '*' in front of the title bar of the window. Of course, after the file has been saved the '*' is removed.

The info bar of a program window shows the cursor position as well as the program size and the amount of memory reserved for this program and the amount still available.
A mouse click on the display 'Y=...' has the same effect as the menu option 'Go to ...'. A dialog box opens where you can enter a jump target location. If a syntax error occurs, the edit line is marked in red (gray for monochrome monitors) and a message specifying the error in more detail appears in the info line. Functions having an effect on the programming code in windows always affect only the uppermost window.

The Keyboard Assignment

The Omikron Basic folder contains a file named NEWOMBAS.INF. This file contains all settings of the editor such as shortcuts, window dimensions, font attributes, colors, debugger settings, etc. Of course, you can create additional files with special settings. During the start up the editor always looks for a file named NEWOMBAS.INF. By renaming a file of your choice to this name the program will use that file. It is also possible to subsequently load the file using the menu option 'Load Settings ...' from the Mode menu.

The Keyboard Assignment in NEWOMBAS.INF

 Caution: The keyboard assignment has been changed slightly in version 6.5 to avoid conflicts with the other MAC keyboard combinations for special characters. Since some MAC keyboards (Powerbooks) do not have the delete key the use of this key was avoided in the default setting. Of course, you can also continue to use the old NEWOMBAS.INF file.

Ctrl+Cursor left Cursor one page to the left 
Ctrl+Cursor right  Cursor one page to the right 
Cmd+Cursor upward Cursor one page up 
Cmd+Cursor downward Cursor one page down 
Cmd+Cursor left  Cursor to beginning of line 
Cmd+Cursor right Cursor to end of line 
Beginning Cursor to program start 
End Cursor to end of program 
Return Insert a line below 
Shift+Return Insert a line above 
Ctrl+Return Split line
Ctrl+Backspace Delete rest of line 
Shift+Backspace Delete cursor line 
Alternate+Backspace Delete cursor line, rest moves up 
TAB To the next tab 
Ctrl+A Enter special character 
F1 Preselection key for ASCII+64 
F2 Preselection key for ASCII+128 
Ctrl+Insert Switch between insert and replace mode 
Ctrl+TAB Set indent pointer 
Ctrl+F1...F10 Set marker 1 to 10 
Shift+F1...F10 Jump to marker 1 to 10 

Note: The keyboard assignment can be adjusted as desired with 'Mode/Settings>Shortcuts...'.

Special Characters, Abbreviations, & Name Completion

Special Characters
If special characters are to be added to the editor, which normally would trigger some sort of function, this can be achieved by first pressing [Ctrl]+[A]. The special character, which is entered afterwards, will then not be interpreted as a shortcut but represented in the editor instead. 

BASIC commands can also be abbreviated with a point. If the abbreviation is unambiguous, the command is selected in alphabetical order.

Automatic Name Completion
Those users who like to work with long variable names can save him- or herself a lot of typing time from hereon. For this purpose, the keys [0 to 9],[*],[-], and [+] on the numeric keypad in connection with the [Ctrl] key or the combination [Shift]+[TAB] are used. For example, instead of typing in "Customers_Addresses_Amount" the user now only enters "Customers" and then presses [Ctrl]+[*] or [Shift]+[TAB]. The editor then searches in the variable table for entries that begin with "Customer". If the editor finds an entry, the complete name is represented on the screen. If the name is incorrect, that is, it actually reads "Customer_No" it is possible to cause the editor to display the next suggestion by once more pressing [Ctrl]+[*] and/or [Shift]+[TAB] or [Ctrl]+[+]. With [Ctrl]+[-] the user can search the variable table backwards. The key combinations [Ctrl]+[0 to 9] have the same functions as [Ctrl]+[*] and/or [Shift]+[TAB], except that one can determine the dimension of the variable to be located via the digit.

The Dialog Windows

Dialogs are all depicted in windows. Dialog windows can be moved with the title bar. Omikron Basic uses so-called modal dialog boxes if input into a dialog box is necessary for the program to continue. These have to be exited by clicking on one of the two exit buttons before work can continue. Another option is to cancel the dialog by pressing [ESC] or confirming it by pressing [RETURN].
All other dialog windows can be exited at any time by clicking in another window with the mouse. These non-modal dialog windows thus can remain open during program work.

Warning: Settings made in a non-modal dialog box do not become effective until clicking on [Execute] or the [RETURN] key. However, this does not automatically close the dialog box and additional settings can be entered.

The Built-in Screen Saver

Since most of the screen savers do produce pretty pictures or patterns but also place unnecessary stress on the computer and monitor (at least use energy), Omikron Basic features a sleep corner. If the mouse cursor is moved to the left bottom corner and left there for at least 0.5 seconds, the screen turns dark and Omikron Basic enters into a holding loop. The computer is not awakened with an alarm clock but by simply moving the mouse cursor out of the corner. The computer is not blocked during the holding loop, so that the program can continue with its computations although the monitor is dark.

1. Overview Content | 3. The Menus of the Editor

Support | Order | Start | Home:

© 1997-2001 Berkhan-Software