Q: What is the history of OmniBasic?
A: OmniBasic evolved from a native code compiler for the OS9/68000 operating system developed in 1994. Over the years it was enhanced to operate on multiple operating systems. Starting two years ago a program was
implemented to add graphical capabilities to make the program useful to a larger segment
of the programming population. This program has developed into the official release version 2.20
Q: What language was OmniBasic written in?
A: The OmniBasic compiler is written in OmniBasic. This creates a compiler that is much easier to maintain and support. Unlike most other Basics, OmniBasic creates extremely fast executable code. This allows it to be
used for compilers as well as other time critical applications.
Q: What can OmniBasic do that other Basics cannot do?
A: First, with the release of 2.2, OmniBasic is the only multi-platform Basic with true graphical development capability.
Second, OmniBasic is capable of producing systems programs. Attempting to write systems
code in most Basics usually results in the use of PEEKing and POKEing and other
"tricks". OmniBasic has all the power and utility of C but without the cryptic
and often terse syntax of C. These include pointer variables, dynamic buffer allocation,
internal and external functions, function pointers, conditional compilation, include
files, macros, structures, compiler variables (manifest constants), command line
arguments, and others.
Q: What does OmniBasic have that C does not have?
A: The first thing is that OmniBasic is easier to learn and use than C.
The second is that OmniBasic provides more meaningful (and accurate) reporting of compile time errors than most C compilers. The third is full STRING capability (in OmniBasic, STRING is a bonafide data type, not an external
afterthought). The fourth is VECTOR (based) variables. These are similar in concept to
pointers, but as easy to use as ordinary variables. The fifth is portability. While C made portability famous, data structures in one C and another (even on the same computer) are often "padded" differently (just do a sizeof and see for yourself). In
OmniBasic, all data structures are declared as a char array with ALL internal management
and referencing handled by OmniBasic. The sixth is the ability to exchange and transfer all data types (including arrays) in a single statement. Exchanges are especially useful for sorting data. OmniBasic has all the features of Basic, which means it is a higher level language than C. (C is variously referred to a mid-level language or universal assembler). This unique set of features makes OmniBasic equally at home at systems as well as
applications programming.
Q: Does OmniBasic support structured programming techniques?
A: Yes. Various control structures are available including FOR/NEXT, WHILE DO/ENDWHILE, REPEAT/UNTIL, IF/ELSE/ENDIF,
LOOP/EXITIF/ENDEXIT/ENDLOOP.
Q: Do I have to use structured programming techniques?
A: No. You can make your program as structured or unstructured as you wish (or anywhere in between).
Q: Will programs I write in OmniBasic on Linux run on Windows based systems and vice versa?
A: Yes, if you recompile the program on the Windows system or Linux system.
Q: If OmniBasic is as powerful as C, then how is it easer to learn and use?
A: First, as a beginner on OmniBasic, you can use the more traditional Basic features and work your way into the more
advanced features as you progress. Second, the advanced features are easier to learn and use than those in C and the syntax is more English-like than C. Also, while OmniBasic does have pointers like C, the Vector (based) variable allows the same power as the pointer without any pointer syntax at all.
Q: What is dynamic buffer allocation used for?
A: Sometimes when you are writing a program, you have no way of knowing how large to dimension an array. You won't know this until the program is run and you can (for example) check the size of an input file. In this case, you can check the size of the file (using the FILSIZ() function), request the required amount of memory, and set a vector (based) variable to the memory buffer address. You can then operate on the array just as if it were dimensioned the standard way. In
standard "Basics" this problem is solved by dimensioning an arbitrary array size, and then if the arbitrary size is too large, you waste memory space, and if it is too small, the data must be operated on a little at a time.
Q: Can OmniBasic be used to write system utilities?
A: Absolutely! Since OmniBasic programs end up as pure machine language programs, you can write your own system utilities
and use them just like the ones that came with your system. You can even "read"
options from the command line and use these options to control the flow of your
program.
Q: What is difference between OmniBasic Legacy and the new Version 2.2?
A: Applications that are machine or system based typically are written in a console environment. Programs that are user interfaces rely upon graphical screens to operate in the Windows or Unix-based environments. OmniBasic
Legacy is console only. OmniBasic 2.2 is designed to be used in either environment.