home *** CD-ROM | disk | FTP | other *** search
- COMAL is an easy to use, yet powerful language.
- It is standardized and available for many popular
- computers. COMAL has become the common ground
- between popular computers.
-
- In addition to sharing common keywords, each
- COMAL system provides the same programming
- structures.
-
- But it goes even further than just keywords and
- structures. Each COMAL has a compatible
- ENVIRONMENT. They all share the same LOOK AND
- FEEL. Once you know COMAL on one computer, you
- will feel right at home using COMAL on a
- different computer! They share a common FRIENDLY
- environment.
-
- The built-in full screen editor makes program
- entry easier. If you can see it on the screen,
- you can edit it. COMAL checks each line you enter
- -- WHEN YOU ENTER IT. If it sees a mistake it
- tells you RIGHT AWAY, and even attempts to help
- you fix it! The SCAN command checks your entire
- program to verify the multi-line structures.
- Before you run your program you will know that
- each line and structure is proper.
-
- When you LIST a program, COMAL automatically
- indents the structures for you! It also
- capitalizes the keywords but shows your variable
- names in lower case. You get a very readable
- program listing -- especially if you take
- advantage of long variable names. You can use
- names as long as the screen line permits!
-
- COMAL also helps you fine-tune your program. A
- TRACE facility helps you locate errors. The ERROR
- HANDLER allows your programs not only to catch
- errors, but often to correct them while the
- program continues running.
-
- You should enjoy writing programs in modules
- (procedures and functions). You give each one a
- name, and pass information back and forth with it
- via parameters. It can be open and share all
- variables with the main program or be CLOSED so
- that all variables and data inside it are
- considered local. An IMPORT statement allows you
- access to specific variables if needed. Once you
- have defined a module, you can call it from
- direct mode -- just like any other COMAL keyword!
- You can even call the module from inside itself
- (called recursion).
-
- Your modules are actually extending COMAL. In
- fact, a module can be stored on disk as an
- "external" procedure or function. Any program can
- then include that module simply by adding a one
- line "header". COMAL automatically gets the
- module from disk when it needs it.
-
- Packages are another method of extending COMAL.
- They are usually written in machine code and are
- specific to each computer. Part of the beauty of
- packages is that they allow fast access to
- hardware dependent features. An even greater
- advantage is that you call them from COMAL by
- name, just as if they were part of COMAL itself.
- You can use existing packages without knowing how
- they were created.
-
- Normally, the user can stop a program by pressing
- the break key (usually a <stop> or <esc> key).
- However, there are times when you want to be sure
- that the program is not stopped. COMAL allows the
- break key to be disabled and re-enabled anywhere
- within a program. Furthermore, it provides an ESC
- flag to notify the program when the user presses
- the break key.
-
- Since COMAL is available on many different
- computers, you need a convenient method of
- transferring programs between them. The MERGE and
- ENTER commands accept a program stored as an
- ASCII file. Of course COMAL also provides a way
- to store program lines in ASCII format: the LIST
- command! You can LIST your program to any output
- location: screen, printer, disk file, or even
- modem.
-
- BENCHMARK TIMINGS
-
- We did some quick benchmark tests. The results
- are shown below. The programs used are referenced
- under the chart. COMAL is nearly always faster
- than BASIC. This difference is significantly more
- dramatic when dealing with strings. Also it seems
- that AmigaCOMAL is on top between the various
- COMAL implementations.
-
- SYSTEM AHLS CALC TRIG QUICK SIEVE SUBSTR
-
- AmigaCOMAL 3.1 7.2 4.0 3.1 6.6 0.2
- AmigaBASIC 12.8 16.9 7.1 4.3 16.0 5.1
-
- IBM COMAL 10.2 32.8 26.7 17.7 8.6 0.3
- IBM BASIC 14.4 55.6 46.0 21.5 39.8 9.7
-
- C64 COMAL 2 25.5 72.9 58.2 40.7 28.0 1.0
- C64 BASIC 115.7 106.4 63.3 86.1 137.4 12.3
-
- Notes:
- Ahls = Ahls test from Creative Computing magazine
- Calc = Calc test from Byte magazine May 1985
- Trig = Trig test from COMAL Today 12 page 38
- Quick= Quick test from COMAL Today 12 page 39
- Sieve= Sieve test from Byte / COMAL Today 23
- Substr=Substring replacement test
- Base model Amiga 500 and IBM PC used for tests.
-