The Menus of the Editor
Omikron Basic 6 has seven menus, which are discussed subsequently.
Just as in the case with all Mac programs, this menu allows the user to reach the copyright box of the editor. All accessories can be accessed from here as well.
In addition to the copyright information, this dialog box also contains data relating to the user's registration of the program as well as the current version number and date of Omikron Basic.
This menu covers everything related to the loading and saving of files. In addition, it offers the option to print program texts and to stop work and exit the editor.
The menu options in detail:
A Dialog box appears an the screen.
Dialog Box: New Program
In order to start programming a completely new program, this dialog must be called up. First, the new program has to be named in the dialog window that opens.
If the default name 'NO_NAME.BAS' is accepted, the editor will verify the intended name of the program during its first-time save. The default work path is automatically chosen.
Reserved Memory in Bytes:
Normally, the preset value of 65536 bytes does not need to be modified. This setting serves to determine the initial amount of memory allocated to the program. In the case of an overall limited RAM, this setting should perhaps be lowered. Since it is unlikely that anybody will program more than 65536 continuous bytes, it is also unlikely that this setting has to be increased.
Exception: If a Library or a larger block is supposed to be loaded subsequently,
it is of course necessary to ensure that sufficient memory is available.
Accidentally exceeding the set value does not pose a problem either: Just save the program, close the window, and then reload the program. By this way 65536 Bytes are reserved again.
The user can determine with this setting whether the editor expects a line number before each typed line. It is recommended to deactivate this option, because it is generally easier to work without line numbers. However, this setting can still be changed later by using the 'Mode Menu' with the option 'Display Line Numbers'.
Types of Standard Variables:
The lower part of the dialog contains five text fields labeled DEFSTR, DEFDBL, DEFSNG, DEFINTL, and DEFINT.
With the aid of these edit lines it can be determined, which variables the editor displays without postfixes. In the interest of a clearly arranged program presentation, only one of these fields ("A-Z,_,*-ÿ") should be registered - all alphabetic characters, the underscore character and all characters from 128 to 255 are allocated to the variable type. As default, the editor displays long integer variables without postfixes. Of course, it can also be determined that e.g., all variables beginning with "S" are interpreted as strings, all starting with a "D" as double precise floating point numbers, and all with an "L" as long integers and so forth.
A BASIC program can still be loaded with the aid of this file selection box. Since the editor can process several programs at once, a new window is opened for the new program text.
When first called, the default work path is preset in the file selection box. Starting with the second call, the last selected path is the default path.
A file can also be opened by dragging the file icon onto the Omikron Basic program icon.
Note: Programs created with a version prior to 3.0 cannot be opened by the editor.
Open ASCII ...
A program saved in ASCII format can be loaded into the editor with this menu option. First, a file selection box appears, in which the program text to be loaded can be selected. Upon exiting this box, the dialog 'New Program' appears. After this dialog has been edited, the ASCII text is loaded and translated to BASIC code. This might take a while for longer programs, because the entire source text has to be tokenized. The loaded text appears in a new window.
Note: It is recommended to deactivate the declaration monitor in the dialog 'Preferences' in the 'Mode' menu before loading ASCII text; otherwise, a notification will appear repeatedly, pointing towards non-declared symbols.
New View (see also Duplicate)
An additional window is opened for the program in the uppermost window. Accordingly, this menu option is only available if the uppermost window is a program window. Unlike 'Duplicate' however, no copy of the program is created in RAM, but both windows still contain the same program. Any modifications made in one window are immediately displayed in the other as well. With the aid of this menu option, it is therefore possible to work in several locations of the same program at once, since it is also possible to open more than two windows for any given program.
Duplicate (see also New View)
This menu option is only available if the uppermost window is a program window. A copy of the program is made and placed in RAM. This copy is then displayed in a new window. Both of the windows (and their program texts) are independent from one another. Modifications made in one window thus have no effect in the other. The only way to differentiate between the two is to look for the extension ".Copy" appended to the file name of the copy. However, since both windows are still using the same file name, the copy should first be saved using 'Save As...' and given a new name. Possible data losses are thus prevented.
If the uppermost window is not a dialog window, it can be closed with this menu option. If the uppermost window is a program window containing a modification since the last 'Save', a verification dialog box opens first, querying as to whether to save the program window before closing it.
Close All (see also Close)
With this menu option all windows will be closed (see 'Close'). However, this menu option is only available if the uppermost window is not a dialog window.
Clicking on this menu option moves the lower editor window into the upper position.
Save (see also Save As ...)
This menu option is available if the uppermost window is a program window. The program is saved under the name and path shown in the window title. Clicking on the menu option is automatically changed to 'Save As...' if the program name is 'NO_NAME.BAS'.
Save As ... (see also Save)
If the uppermost window is a program window, the program can be saved under a new name or path with the aid of the appearing file selection box.
File Selection: Save Search File:
If the uppermost window shows the result of a search, the contents can be saved as a file. The file can be loaded into the editor using 'Open...' at any time.
File Selection: Save Compiler Messages:
If the uppermost window is a window containing compiler messages, its contents can be saved as a file. Using 'Open...' from within the editor will later load this file again.
File Selection: Save Shortcuts:
If the uppermost window is the window containing the shortcuts of the editor, this information can be saved as a file (NEWOMBAS.INF serves as storage for the shortcuts).
Save ASCII ...
With this menu option it is possible to save the contents of a program window as ASCII text. The setting 'New ASCII Format' (in the Mode Menu/Preferences ...) is considered.
Caution: Before saving as ASCII text, it is of absolute necessity that all folded up areas are unfolded first; otherwise, only the visible title lines will be saved.
Page Setup ...
The box 'PrStlDialog' of the printer driver opens. Depending on the driver, various settings can be effected.
However, nothing is printed yet upon closing this box.
Note: The Omikron Basic editor uses the same font and the same font attributes for printing that have been selected for display on the monitor. This can have the result that the font of the printout appears too large. For example, if the default setting is 14 point, bold Monaco, it is recommended to make an adjustment of 70% in this box, which should result in an easy to read printout. An alternate option is to choose a smaller font size (e.g., 10 or 12 points) in the dialog box of the 'Mode/Preferences' menu.
Print ... (see also Menu Edit/Print Block ...)
The contents of the uppermost window (and/or a block defined in it) can be printed on the printer. In the event one of the two menu options is called, the 'PrJobDialog' box of the printer driver appears first. Depending on the driver, various adjustments to the settings can be made. After exiting, a dialog of the editor will be displayed enabling the following adjustments:
Dialog Box: Print
The size of the left paper margin allocated by Omikron Basic can be adjusted with this setting.
Indicates the size of the upper margin (in lines) for every page.
This setting indicates how many characters per page and per line should be printed by Omikron Basic. If the indicated number does not fit on the chosen page size, the number is reduced to the highest number of printable characters possible and none of the characters are lost.
Indicates how many lines Omikron Basic prints on one page. If more lines are indicated than will fit on the chosen page size, the number will be reduced to the maximally possible value and none of the lines are lost.
ASCII 0-31 -> 32:
ASCII characters 0-31 in part contain control characters for the printer. For the most part, they are also not printable. In order to prevent undesired print results, it is possible to instruct the editor to replace all ASCII characters below 32 with blank spaces.
If this option is activated the program listings and other printouts feature page numbers. The number is always written in the center of the lower edge of the page. For example, if you want to print longer listings, this function will aid in sorting the individual pages so that they have the correct order.
If a color printer is being used, the program listings are also printed in color as long as 'Display in Color' is activated. To receive a monochrome printout, it is best to switch the printer to black & white. Incidentally, colored block markers are not printed in order to avoid an excessively high ink and/or toner consumption.
Since Omikron Basic permits the printing of up to 255 characters per line, but hardly more than 80 characters fit next to one another on a DIN A4 (German Industrial Standard - a bit narrower and a bit longer than an 8x11 page), longer lines are broken up during printing. Splitting of the lines occurs between words or tokens - if at all possible - so that the text retains a high readability level. The new line is indented to the same level as the old one, which means that the program's structure remains clearly visible.
If a program text was modified but not yet saved, a verification box will appear first. The respective window is moved to the front so that it becomes very clear, which program the verification box is referring to.
If this applies to several program texts, the verification box appears multiple times. If in doubt, first choose 'Cancel' and then securely save important data "manually."
This menu contains everything pertaining to editing the program text.
A short explanation will serve to clarify this point:
1. Basically, all block functions refer to only program windows. Block functions
cannot be applied to search and compiler windows.
2. All of the menu options of this menu always refer to the block of the uppermost window.
Exceptions: In the case of 'Copy Block', the block from the second uppermost program window will be copied into the uppermost program window. In the case of 'Merge Block', the block from the floppy disk/hard drive will be added to the uppermost program window and inserted at the current cursor position.
In case any ambiguity exists about the exact mode of operation of a block command, a new window should be opened using 'Duplicate', which then can be used to perform the operation before the actual action is carried out. This can help in avoiding annoying data losses.
The edit menu contains the following menu options:
All changes in the line containing the cursor are undone.
The marked area is removed from the program and written to the clipboard as ASCII text. The setting 'New ASCII Format' in the dialog 'Preferences' is considered.
Caution: The block to be copied may not contain folded areas. It is of
absolute necessity that these areas are unfolded first. Otherwise, only the visible
title lines will be written to the clipboard.
The marked area is copied and written to the clipboard as ASCII text. The setting 'New ASCII Format' in the 'Preferences' is considered.
Caution: The block to be copied may not contain folded areas. It is of absolute necessity that these areas are unfolded first. Otherwise, only the visible title lines will be copied.
The ASCII text currently in the clipboard is inserted at the cursor position.
Notice: If blocks are to be moved only within the same program window, it is better to use the menu options 'Paste Token Code' and 'Move Token Code' instead of the 3 functions 'Cut', 'Copy' and 'Paste'. The reason is that the first ones mentioned operate on the token code basis and are many times faster, especially with larger programs.
If things go very wrong, the functions 'Cut', 'Copy' and 'Paste' can even result in loss of information because the token code contains more information than the listed ASCII text e.g., if areas are folded up or if the program text contains the ASCII control characters CHR$(10), CHR$(13) and/or CHR$(26).
The block marked in the uppermost window is deleted. It can be restored neither with 'Undo Line' nor with 'Paste'. Before deleting a block, it might be prudent to call 'Duplicate' first. This means that the program text is still available if needed.
The entire program is marked as one block.
Paste Token Code
The block marked in the uppermost window is also inserted at the cursor position in the uppermost window. The block remains marked at the old position. This function can also be called by pressing the mouse button together with the command key.
Move Token Code
The block marked in the uppermost window is moved to the current cursor position of the uppermost window. The block remains marked at the new position.
The block marked in the second uppermost program window is inserted at the cursor position in the uppermost window. The block remains marked in both windows.
Caution: The block to be copied may not contain folded areas. It is of absolute necessity that these areas are unfolded first. Otherwise, only the visible title lines will be copied.
The start of the block is set at the cursor position in the uppermost window. If an end of block was already defined, the resulting block is then displayed. With this menu option, an already existing block can also be modified. A one line block can also be defined with this function if the start of block and end of block are placed in the same line.
The beginning of the block can also be modified by pushing the [Shift] key together with the mouse button, if the cursor is located in front of the block start; otherwise, the block end is changed.
The end of block is set at the cursor position in the uppermost window. If a start of block was already defined, the resulting block is then displayed. With this menu option, an already existing block can also be modified. A one line block can also be defined with this function if the start of block and end of block are placed in the same line.
The block end may also be modified by pushing the [Shift] key together with the mouse button, if the cursor is located behind the block start; otherwise, the block start is changed.
The block defined in the uppermost window is no longer displayed in the window. A hidden block cannot undergo any block operations. However, the block remains defined.
If the block is hidden, it is made visible by clicking this menu option again, meaning, the last block definition is activated once again.
Merge Block ...
A program text saved as an ASCII file can be inserted into the window at the cursor position.
Note: In order to avoid the continuous inquiries for non-declared symbols, it is best to deactivate the declaration monitor in the 'Preferences' dialog first.
The block defined in the uppermost window is stored as an ASCII file. The setting 'New ASCII Format' (in the menu Mode/Preferences ...) is considered.
Caution: Folded up areas have to be unfolded first. Otherwise, only the title lines will be saved.
Load MEMORY_BLOCK ...
When calling this menu option, the first thing to appear is a dialog. The number with which the block will be addressed in the future has to be entered into this dialog. This has to be a precise two-digit number. Once this number has been entered and the position for the block has been found in the program text, a file selector appears, offering the opportunity to select the file containing the data for the block.
Note: In order to once again remove a MEMORY_BLOCK from a program, the
following steps have to be followed:
1. Remove the command MEMORY_BLOCK from the program.
2. Click on the menu option 'Clean Sweep'.
Merge LIBRARY ...
To select the LIBRARY to be merged, a file selection box appears. Each LIBRARY to be merged has to be selected individually with this menu option.
Print Block ... (see also Print ...)
This function corresponds exactly to the printing function; the only difference is that only the selected area is being printed.
The following Dialog appears:
Dialog Box: Renumber Lines
The area for which this function is effective can be adjusted in the first two lines of the dialog. In this dialog, it is also possible to set with which line number the renumbering should begin and which increments should be used. In most cases, however, it would be more practical to work entirely without the use of line numbers.
Note: If a program is to be used without line numbers, which was originally written with line numbers in place, the entire program should be renumbered in single steps. Of course, the transition is only possible if the program does not contain any commands referring specifically to line numbers (e.g., GOTO 100).
Omikron Basic makes it possible to search for text, tokens, definitions, or errors.
In the case of searches for text and tokens, a hit list can be displayed in a separate
window. The same dialog is called via the corresponding menu options in the search
menu in all of these cases; however, each has a different default value.
If the search for a token reveals that this token is currently represented somewhere in the program window, the token list can also be created completely without a dialog. Simply double-click on the searched token. If the [Alt] key is pressed at the same time, a token list is not created; instead a jump is effected to the location where this token is defined. It is logical that this only applies to procedures, functions, and labels.
A similar dialog appears for 'Replace Text' and 'Rename Token', which has - depending on the chosen menu option - also different default settings. However, the default value can still be modified in both cases in the dialog enabling e.g., the calling of a text search. It is then possible to switch to error search.
The following menu options of the search menu are available
Find Text ...
Find Token ...
Find Definition ...
Find Error ...
These four menu items all call the same following dialog box only with different presettings.
Dialog Box: Searching Options (see also Dialog Box: Search
and Replace Options)
The item being the subject of a search can be set at the upper edge of this dialog. The choices are as follows:
Text, List Text:
The program text is searched for a character combination in the same way an ASCII text would be searched.
Token, List Token:
The search is for Omikron Basic commands or functions or self-defined variables, procedures, or function names.
The search is for a self-defined procedure, function, or label.
This option searches for a line with a syntax error.
The information about the searched item is entered in the edit line of the search dialog. Obviously, nothing can be entered in this edit line while the program is searching for errors.
The entire program text or only a part of it can be searched. This is determined with the button bar located under the edit line. By activating the 'Block' button, a single-line block can be entered in the search edit line behind the question 'What is the search item?'.
The setting at the bottom of the dialog - 'Distinguish Upper/Lower Case' - is only relevant for a text search.
Note: The search for text supplies the search result only in the area of the program text that is also visible in the window. That means that a string located in a folded up program part cannot be found. However, the search for tokens also takes place in folded up areas. The search result location will then be on the fold line, where the program text can be unfolded.
If the dimension of the searched token is not indicated, the editor searches for the name with the least dimension. If "PROC" or "P" - and/or "FN" is not specified before the name, the search first looks for a variable, then for a procedure, then for a label, and finally, for a function with the indicated name.
These two menu options do not call the 'Searching Options' dialog but rather jump directly to the corresponding program position. The settings indicated in the 'Searching Options' dialog are applied.
List Text ...
List Token ...
The dialog box 'Searching Options' is displayed.
In opposition to the previous functions the cursor is not being placed on the next find location of a search key. Instead, all occurrences of the search key are displayed in another window. A click on a line in this window positions the cursor to the corresponding location in the program window. If the command key is pressed at the same time, the search window is closed simultaneously.
Replace Text ...
Rename Token ...
A dialog is displayed.
Dialog Box: Search and Replace Options (see also Dialog Box:
This dialog corresponds to the search dialog- with essentially two differences:
1. It is possible to enter a replacement text.
2. In the case of a 'Replace Text ...', it is possible to ask at each search result location if the found item should be replaced. This is impossible in the case of the 'Rename Token ...' operation because of the fundamental principle underlying this operation.
It is not necessary always to specify the variable type when renaming a variable. If the variable type postfix is not indicated, the editor will then rename the variable of the default type. Whether a postfix is specified, is insignificant for the line with the new name. The editor always only changes the name of a variable or function but never the type.
Note: If the type of a variable is to be changed in the entire program
text, e.g., because it was noticed that the long integer variable defined by the
user can never adopt values outside of the range of short integers, than only the
following option exists:
The entire program (Mode Menu/Unfold All) has to be unfolded, followed by replacing the appropriate variable name using the function 'Replace Text....'
Compare Text ...
A dialog will be displayed.
Dialog box: Compare Text
This function serves to compare program texts.
If changes have been made in various places in a longer program, this program might cease to function due to these changes. This function permits the programmer to compare the non-functional version with an older, still functioning version of the same program. The changes causing the problems will be found with ease and can then be eliminated.
Before this menu option can be chosen, it is necessary to pull both windows, whose content is to be compared, to the front. The upper two lines of the dialog box will then contain the names of the two program windows to be compared. Below that, it is possible to indicate an area to be searched, similar to the 'Search' dialog. In addition, the direction of the search may also be set (searching lines front to back, 'Forward', or back to front, 'Backward').
Four execution buttons are in the lower line of the dialog box: First, click on
'Start' to start the compare process. As soon as the editor finds a change, the process
is halted and the cursor will point to the change in both windows. If you do not
want to modify the text at this time, you may click on 'Continue after Colon' or
'Continue next line'. The editor will continue its search behind/before the next
colon or in the next/previous line (depending on search direction) respectively.
For both functions shortcuts are provided too (F11=Continue after colon and F12=Continue next line). These shortcuts only work, if a program window is the frontmost. So, you do not need to call the dialog 'Compare Text ...' again and again.
Note: The compare process ignores leading spaces (tabs, spacebar). Thus
lines that are indented differently but are otherwise identical will be considered
equal. Line numbers are included in the compare process if they have been indicated.
If the compare process is supposed to ignore indicated line numbers, the display
of line numbers has to be first deactivated in both windows.
With the aid of the options in this menu, the cursor can be moved within a program window. The following options are available:
To Last Mark
The editor remembers the last cursor location and jumps to this location with this menu option. A double-click within the window forces the editor to remember the old cursor position ('List Token...'). The same applies to using 'Go To...' and when the editor changes the cursor positions (e.g., if a Library is loaded). Since the editor remembers up to 10 old positions, this menu option can also be used to jump back sequentially.
Go To ...
A line number, a label, or a definition can be indicated in this dialog. The cursor then jumps to the indicated location. This dialog can also be accessed by clicking on the Y display in the info line of a program window.
Note: If a line number is indicated it refers to the number of the BASIC line and not to the continuous numbering of the editor displayed in the info line.
Go To Block Start
The cursor jumps to the beginning of the marked block. This also applies to hidden blocks.
Go To Block End
The cursor jumps to the end of the marked block. This also applies to hidden blocks.
Cursor Line To Top
The cursor remains in the same line; however, the line is displayed in the window as the topmost line.
Cursor Line To Bottom
The cursor remains in the same line; however, the line is displayed in the window as the bottommost one.
Ten blank menu options are available in the lower part of the menu. Using this menu option, the 24 characters following the cursor of the current line are entered into these blank menu options. Just one click on one of these filled-in menu options results in a jump to exactly that location. When setting the markers, care should be taken to choose meaningful locations within the line, because the entry into the menu starts exactly at that point at which the cursor was located when placing the marker. If this was the end of the line, only an empty entry will be displayed in the menu option; however, it is possible to jump to that location without any problems.
A blank menu option filled with 'Place Marker' is deleted again. Namely, precisely the one that has the checkmark in front of it. Thus, it might be necessary to first jump to the location of a marker before this marker can be deleted.
Jump to Marker
The corresponding line within the program text is jumped to by clicking on one of the ten entries at the lower end of the menu. Of course, this will only work if the marker was also already placed. The last jumped marker is tagged with a checkmark.
This menu contains all basic settings for the operating mode of the editor. The following menu options are available:
Display Line Numbers
A line number can be displayed optionally at the beginning of every line in the program window. This menu options allows for the activation or deactivation of this setting. If the line number option is activated, a checkmark before the menu option serves as indicator.
Display All Postfixes
The default variable types set behind DEFINT, DEFINTL, DEFSNG, DEFDBL, and DEFSTR in the menu 'Mode/Preferences ...' are eliminated by this menu option insofar as the postfix is displayed with the set default types as well. The matching postfix is also displayed behind each constant floating point expression. This mode is indicated by a checkmark before the menu option. Further clicking deactivates this setting again.
Repeat Character ...
This menu option allows for the duplication of a character. The duplication repetitions of the character to be duplicated have to be entered in the dialog that appears after clicking on the menu option. The character in front of the cursor is inserted as often at the cursor position as indicated.
Fold Area (see also Unfold Area, Unfold All)
If the cursor is located in a line beginning with DEF PROC or DEF FN, then the entire procedure and function, respectively, is summarized in one line for display in the window (this definition line). Such a contraction is recognizable by an oblong before this keyword.
The next line still displayed in the window is then the line behind the line with the END_PROC and END_FN command, respectively.
The editor folds automatically up to the first unconditional RETURN, END_PROC, and END_FN, respectively. Therefore, a procedure can thus contain several RETURNs. As long as they are located within an IF ... THEN ... ELSE... ENDIF command they are not considered when the area is being folded. Accordingly, it is also possible to fold an area defined with an open and close brace.
Caution: If an unfolded area is saved as ASCII, only the title line of this area is then saved. The program text contained in the folded portion is thus lost.
Note: Entries cannot be made into the line representing a folded area. Every modification of this line is cancelled automatically if the cursor leaves the line.
Unfold Area (see also Unfold All, Fold Area)
An area hidden with 'Fold Area' is again unfolded, that is, again made visible in the window.
Unfold All (see also Unfold Area, Fold Area)
All folded areas are once again unfolded.
Caution: Since a function 'Fold All' does not exist, it probably would be a lot of work to fold a long and entirely unfolded program text again, if it was unfolded with this function. Therefore, the user should well consider first whether a complete unfolding is really necessary.
Enter Password ...
Folded areas can be protected with a password before unfolding. All parts of the program folded after the password has been entered into the dialog are protected by that password. This means that later they only can be unfolded with the correct password. A password can be deleted again in the dialog by pressing [SHIFT]+[Delete].
Memory Setup ...
The dialog 'Memory Setup' is displayed.
Dialog Box: Memory Setup
The settings possible in this dialog influence the amount of RAM required by Omikron Basic for internal management purposes.
Caution: Before exiting this dialog with 'OK', all programs should be securely saved, since all data must be deleted for the memory re-organization, and the program must be restarted. However, using the 'Load' button only leads to the loading of a NEWOMBAS.INF file with its memory settings being displayed in the dialog.
The following preference options exist:
Maximum Number of Windows:
This should not be set larger than required - especially not larger than the operating system permits. However, it should be considered that the dialogs are also located in windows.
Maximum Lines for List Buffer:
The list buffer is used in order to store any retrieved entries, which are the result of search functions. In addition, the compiler uses the list buffer for its output. Which size is practical depends on the size of the programs to be processed. Of course, a decisive factor is also the overall amount of available RAM.
Maximum Number of Variables:
Omikron Basic can manage 16384 variables, procedures, and/or functions at most. Even very long programs (more than 500 KB of token code) generally do not amount to more than 2000 variables, thus this setting should not be set too high. This value is only required when the program is being compiled. Therefore, it is unimportant for the editor. In the case of a RAM shortage, this is the place to conserve memory.
The entire memory requirement for a BASIC program is computed with the following formula:
Requirement = (650 + BZ * 50) * FZ + 10.4 * VZ + 4 * ZZ + RZ
FZ = number of windows
BZ = buffer lines
VZ = number of variables
ZZ = number of lines
RZ = allocated RAM
Maximum Number of Lines:
Here can be defined how many lines should be availabel for the processed program.
The number of variables and number of lines are only required by the compiler. The available program memory, the available BASIC memory, and the available heap memory are all displayed in the lower part of the dialog to aid in adjusting the appropriate memory size. For an explanation of the terms, please see the chapter 'Memory Organization in Omikron Basic'
In order to fragment the RAM as little as possible, the editor right away reserves all memory it needs in one operation. The amount of required memory depends on the setting applied in this menu option. However, it is not possible to request more memory than contained in the application heap. The size of the application heap can be modified using the finder. To do this, Omikron Basic has to be exited first; then the program icon has to be selected in the finder, followed by a click on 'Get Info' in the finder menu. An opening dialog box allows for the adjustment of the preferred memory size.
Minimum to Be Kept Empty:
Various MacOS functions request memory from the application heap of the program from which they were called, requiring that a certain amount of memory remains available. The minimum amount can be adjusted with this menu option. In the event that the editor cannot be started due to a lack of memory (maybe the result of an unfortunate memory setting), the following procedures should be followed to avoid losing all settings (e.g., all self-defined shortcuts):
It should be ensured that the editor cannot find the file NEWOMBAS.INF when starting the program. Thus, this file has to be renamed using the finder, choosing any name desired. Next, the editor has to be started. Since the editor cannot find any NEWOMBAS.INF, it will open a file selection box, requesting a search for the file. The search should be cancelled using the 'Cancel' button. The editor now starts with its default settings. The dialog 'Memory Setup ...' or 'Preferences ...' is called next, followed by clicking on the 'Load' button. The old NEWOMBAS.INF can now be loaded. Subsequently, the memory setting needs to be adjusted to reflect values that correspond to the available hardware, followed by saving the file NEWOMBAS.INF with the 'Save' button in one of the two dialogs.
This menu item calls the dialog 'Editor Preferences'
Dialog Box: Editor Preferences
In this dialog box several settings can be made, which are
taken over if the dialog is closed with 'OK'.
Exception: Text Font, Text Size, and Text Style are executed immediately.
This dialog can be divided into five areas according to its visual design:
Presettings for 'New
This part of the dialog and then Menu item 'File/New...' correspond to one another precisely.
The settings indicated in this menu option are the default settings for this dialog and thus you can find more detailed information there.
If this box is checked, the editor will display all floating point numbers with an exponential notation style, otherwise an attempt is made to write out the number in its entirety - if this is possible (e.g., 123450000000000 in exponential notation is 1.2345D+14).
If this option is activated, an already existing file with the same name is automatically provided with the extension *.BAK before saving.
Using this setting will determine the distance between tabulators, that is, by max. how many characters the cursor is automatically moved to the right when the TAB key is pressed.
Characters per line:
This may be used to determine the maximum number of characters within one program line. The default setting of 255 characters should suffice in most of the cases since programs can become rather difficult to read if the lines are too packed. If, for example, special case exists and many individual single parameters have to be passed to a procedure or function, than it might be useful to increase the line width.
In specific, risky situations, the editor can warn the user by asking for a verification of an operation or action about to take place. This warning is especially important and useful if a loss of data might be the result of that operation or action. If these warnings hinder the workflow, they can be deactivated using this setting.
The editor can issue a warning if a variable, a function, or a procedure is used although it has not yet been declared. In the case of the variable, a declaration is a simple allocation. Above all, the automatic declaration check protects the programmer against typographical errors. For example, if a variable with the name 'Counter' is used in the program, however, 'Conter' is subsequently typed in by mistake, a notification is issued indicating that 'Conter' has not been declared yet. This prevents that the program erroneously computes using 'Conter' instead of 'Counter'. Of course, this is only possible if the name 'Conter' has not yet been declared somewhere else. A further example would be the call of a procedure from the Extension Library. Writing the name incorrectly or passing an incorrect number of parameters results in an immediate notification of this error.
The declaration monitor works best if the function 'Clean Sweep' in the program menu is used in regular intervals, making sure that no dead variables accumulate in memory.
Indent Automatically by Characters:
The editor can automatically indent the contents of loops and IF...THEN...ELSE...ENDIF constructions. This is also valid if several structure commands are in one line. In this setting, the extent of the indentation can be adjusted (in characters). In addition, this feature can also be deactivated.
Note: In order to subject an older program to the indent procedure in its entirety, the program has only to be saved as ASCII and then newly loaded. An alternative is to mark the entire program as one block and then to copy the block into a previously opened window. (Warning: Enough memory has to be allocated for the new window.)
Close Compiler Window
When compiling any program, Omikron Basic will first open a new window in which the compilation procedure is documented. This setting allows the user to determine that the window will be closed again automatically if the compilation was successful. The window will always remain open if an error occurred or a warning message popped up. This allows the user to locate the error or find the cause of the warning.
ASCII 202 -> 32:
Select this option if you would like to transfer sample programs to the Omikron Basic window from the online manuals by using 'Copy' and 'Paste'. Many Browsers do realize the indent in HTML documents by inserting characters with the ASCII value 202. However, this same character is a valid Omikron Basic character for variable names, which might cause errors when pasting.
If this checkbox has been activated, all ASCII 202 characters are converted to normal blank spaces and the program lines of the Omikron Basic Editor can be interpreted correctly.
Display in Color:
Omikron Basic supports so-called color-coding. This means that commands, structure commands, functions, operators, constants, comments, etc. can be displayed in different colors. If used in moderation, the clarity of the program can be improved significantly. Of course, fans of "monochromy" can deactivate this behavior. See also 'Set Colors'.
Set To Default Values:
All settings are reset to the default values also used by the editor if it cannot find the NEWOMBAS.INF file.
This Button opens the dialog box 'Set Colors'.
Dialog Box: Set Colors
In this dialog, the colors for all objects and elements, which can appear in the different windows of the editor, can be determined. It is possible to create a rather individual work environment with these settings. Of special interest is the possibility to define different colors for different types of commands, commentaries, variables, etc. in the program windows (color-coding). It is then possible to recognize loops already by the color of the loop command. Using the dialog 'Preferences ... ', color-coding can also be deactivated.
Each element has to have its allocated color indicated with a color index. If
the index is unknown, the color can also be selected via a popup menu. Click on the
button 'Select Color' on the lower right side of the toolbox, keeping the mouse button
depressed. Move the mouse over the desired color, and then release the mouse button.
Now the desired color index is entered into the field in which the cursor is currently
located. The color choice procedure can be interrupted by releasing the mouse button
outside of the popup menu.
The colors can be adjusted for the following elements:
Everything that is not a character.
Background in Block:
The block markings.
Note: Since the text of a block is not inverted, the color of the block should have a similar brightness as the background. For example, yellow in the block if the background of the window is white. Otherwise, the text of the block becomes unreadable.
The line in which the cursor is currently located. In this line, the entire text is displayed in one color since the editor is not clairvoyant and does not know yet, what the user will type in ... ;-)
Commands and Token Char:
All commands not belonging to another group and characters such as commas, points, parentheses, etc.
The color set here is also used for output in search, compiler, shortcut, variable, and memory windows.
A line still containing a syntax error.
The set color is also used for the program pointer of the debugger (small triangle).
The set color is also used for break points of the debugger (small ellipses).
All functions available in BASIC such as e.g., MIN, CHR$, ABS, and so forth.
IF, THEN, ELSE, ENDIF, FOR, NEXT, REPEAT, UNTIL, WHILE, WEND, SELECT, CASE, DEFAULT, OTHERWISE, END_SELECT.
GOTO, GOSUB, and ON do not belong with this group.
Constant expressions in the program text such as e.g., everything written in quotes, directly indicated numbers, etc. This has nothing to do with the COMPILER control word DEF CONST.
Should be obvious.
+, -, *, /, <, >, AND, OR, and so forth.
PROC and FN Definitions:
DEF, DEF PROC, END_PROC, END_FN, RETURN. However, not the names of the procedures and functions.
PROC and FN Calls:
The names of procedures and functions and the calls of procedures in the program text. Not, however, the call of functions.
The label marker and the corresponding jump commands.
The title lines of these areas.
The rearmost plane of the dialogs.
The big boxes located against the background and not selected radio buttons.
All exit buttons.
Selected radio buttons.
Frames edit boxes and buttons for the 3D effect.
The dialog 'Set Color' can be exited with [Exit]. However, it can also remain
This button opens the dialog box 'Debugger Settings'. A more detailed description of this dialog box is listed in chapter 11 - The Source Code Debugger.
The 'Font' menu option is used to indicate the current font. A popup menu can be opened with a click and a different font can then be selected. The selected font applies to all windows with the exception of the dialog windows, which do not allow the selection of any desired font due to their fixed input masks. Since the editor only works correctly with non-proportional fonts, these are also the only ones being offered.
This button allows for the selection of the currently used font size. A popup menu can be opened with a click where a different size can then be selected. The selected size applies to all windows with the exception of the dialog windows, which do not allow the selection of any desired size due to their fixed input masks.
This menu option will show a bit mask (binary number), indicating which style flags have been set (just as with TEXT STYLE=). Clicking opens a popup menu in which the individual styles are once more listed by name. An activated style is characterized by a prefixed asterisk.
Several style attributes can be selected at the same time. The uppermost entry of the popup menu corresponds to the right flag.
This check box determines whether vector fonts or bitmap fonts should be used. Since the appearance of the characters and/or font sizes is different depending on the chosen font type, this setting affords the user additional selection options.
Note: Text output is in general slower with vector fonts than with bitmap fonts.
This part of the dialog in part corresponds to the dialog 'Print ...'. The settings shown are the default settings for this dialog. More detailed explanation about this can be found with the respective menu option.
Size of First Window:
The data indicated in this setting determines position and size of the first program window opened by the editor. Subsequent windows will be moved a little tiny bit to the right and bottom but are still opened with the same dimensions.
The effected settings can be stored with 'Save' in a NEWOMBAS.INF file. The dialog can be exited with 'Exit'. However, it can also remain open.
Set Work Path ...
The work path can be set in the appearing file selection box. The work path is the default path for the loading/saving of programs indicated by Omikron Basic directly after start of the program.
Set Shortcuts ...
Almost all keyboard shortcuts can be set up in the editor by the user him- or herself. Those users who wish to do this can also transfer the cursor movement by one character to the left onto the right cursor arrow (of course, this also works the other way around). In order to customize shortcuts, the corresponding menu option is selected. A window appears listing all editor commands, which can be allocated a shortcut and their respective current allocations. With the mouse, click on the shortcut to be modified. The next key or key combination being pressed will be recorded as the new shortcut for the chosen command and becomes active at once. The modifier keys are represented by small letters: a= [Alt] key, b=[Cmd] key, c=[Ctrl] key, s=[Shift] key. Since every time a key is pressed it is interpreted as a component of a new shortcut, please use only the mouse for customizing and working within the shortcut window. That applies to closing the window and marking of another command whose shortcut is supposed to be customized.
The editor checks whether a shortcut is possibly listed for two or more different
functions. A corresponding alert box then appears with a warning message. The shortcut
can still be customized - in spite of the warning message. It is advisable to assign
a different shortcut (or none) to the function whose shortcut has just been used.
Of course, when pushing the key(s) for the customized shortcut, always only one function
will be triggered and performed, even if a shortcut has been allocated multiple functions.
If this is the case - and when in doubt -, the shortcut listed closer to the top
of the shortcut window will be the one performed.
If no shortcut is supposed to be allocated to any particular function (e.g., to avoid erroneous operation of the program), it is only necessary to click on the corresponding function in the shortcut window while keeping the [Shift] key pressed at the same time. The customized shortcuts can be stored in the NEWOMBAS.INF file. For this purpose, choose 'Save As ...' in the file menu if the shortcut window is on top. It is also possible to click on 'Memory Setup ...' and then click on the 'Save' button.
Those shortcuts containing the [Cmd] key and control a menu option are displayed in the corresponding menu entry as a combination of the symbol of the [Cmd] key and that symbol, which is defined by the remaining selected keys. This is done to conform to Apple's 'Human Interface Guidelines'. Some users might consider this too complicated. Our suggestion: just try it!
Note: Controlling windows via the keyboard (scrolling) only works with program windows. Compiler windows and hit lists of search functions cannot be controlled via the keyboard.
Set Default Colors
The color registers for the colors 0 to 15 are set to Omikron Basic default values. Colors 241 to 255 are set to the inverse color values.
This menu contains all commands that are necessary for the debugging and compiling of the BASIC program:
This menu option may be used to compile and start a program in the debugging mode. A detailed description of this command can be found in chapter 11 - The Source Code Debugger.
Warning: A program started with 'Debug' cannot be edited during the debugging phase.
If you have started a program with 'Debug' a small dialog box opens automatically containing control buttons for the debugger. If this dialog box should slip behind some other windows you can pull this box back to the front at any time using this menu option.
New Memory Window
This opens a window where the content of the RAM memory is listed. A more detailed description of the Memory Windows is listed in chapter 11 - The Source Code Debugger.
New Variable Window
This menu option functions in a similar manner as the previous one with the exception that this one opens a variable window. A more detailed description of the Variable Window is listed in chapter 11 - The Source Code Debugger.
The program in the uppermost window is compiled. A new window is opened in which the compiler places its output.
Undefined and/or unused statements and errors are listed. At the completion of the compiling procedure, it is possible to jump to program locations by clicking on the corresponding passages in the compiler window. [Esc] can be used at any time to interrupt and cancel the compiler procedure. The contents of the compiler window can be stored as an ASCII file (menu option File/Save As ...). It is also possible to print the window content.
Save & Compile (see also Save, Compile ...)
This is a summary of the menu options 'File/Save' and 'Program/Compile', which are exactly in this order.
Compile & Run (see also Compile ...)
The program in the uppermost window is compiled and the produced object code is saved in the same folder in which the source file is stored. After this, the program is immediately started without first terminating Omikron Basic.
Omikron Basic generates the name of the compiled program as follows:
If the source file has an extension (e.g. ".BAS" or ".BAK"), this simply is cut. So the compiled program gets the same name as the source program, but without the extension.
If the source file has no extension, the compiled program gets the name of the source program with the extension ".APP" added to it.
Atari --> Mac
This menu option is only needed if the user wants to export programs developed on the Atari to the Mac. Because of the in part rather grave differences between the TOS and the MacOS, it was impossible to design Omikron Basic 6 to be 100% compatible with earlier versions for Atari computers. See chapter 1: 'Differences Compared to the Atari Version'. Therefore, it is necessary to make changes to the program.
If this menu option is chosen, a search window opens with all program locations marked that might possibly require adjustments. By clicking on the individual location, it is possible to jump to the corresponding location in the program text and make all required adjustments according to the instructions in chapter 1: 'Differences Compared to the Atari Version'.
This menu option is used to remove certain items from the variable table: variables declared sometime in the past and procedures or functions that were deleted and do not occur in the program. This shortens the *.BAS program. However, the effectiveness of the program remains unchanged.
This function should always be called if parts of the program were deleted or
if a Library has been removed. Consequently, the program becomes shorter, the effectiveness
of the declaration monitor increases, and the editor becomes faster because the variable
table does not have to be searched for dead entries. Since this function does not
only tidy up the variable table but also the variable pointer table, the procedure
might take some time, especially with longer programs and many dead variables.
Since dead variables inflate the program code unnecessarily and slow down the token search, any user should get used to call on this menu option in regular intervals. The more regularly this is done, the sooner the editor is finished with this call. It is recommended to save the program(s) before carrying out this function.
Note: Cleaning up can be interrupted at any time by pressing a key. The
program code is not damaged by this.
This menu option can only be chosen if the uppermost window is a program window. This function can be used to generate a library from within the program's uppermost window. To effect this, a dialog will be called first.
Dialog Box: Library Settings
The first line may contain a version number or any other text, which will be displayed behind the BASIC statement LIBRARY CODE and the library name after your library has been additionally loaded.
The following two check boxes are used to determine whether the time and date of the library creation should be indicated in the LIBRARY CODE line. The current system time of your computer is applied.
Note: If you wish to assign a different creation time to your library, this can also be done by adding the time to the first line in plain English and turning off the date check box.
The lower portion of the dialog box contains two additional
check boxes, which can be used to prompt the Library Maker to display a protocol
in the window of the Library Maker.
If the first check box is activated, a list of all exported and imported symbols will be displayed. This list can then be printed out, for example, and used as the basis for your operating manual for your library.
If the second check box is checked, a list of all unused symbols will be displayed at the end. This is helpful in finding superfluous parts of the program within the library.
Note: The list of unused symbols will also feature such symbols that have been declared at one time or another but then have been removed again from the library. In order to obtain a clearer overview, these symbols should be removed from your source code using the menu option 'Clean Sweep' prior to generating this list.
A more detailed explanation about the nature of libraries and what to watch out for when generating a library can be found in the chapter 'The Library Maker'.
© 1997-2001 Berkhan-Software