home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_oth / comal.lzh / COMAL / INFOTEXT / COMPATIBLE < prev    next >
Encoding:
Text File  |  1991-08-16  |  4.3 KB  |  120 lines

  1. COMAL is an easy to use, yet powerful language.
  2. It is standardized and available for many popular
  3. computers. COMAL has become the common ground
  4. between popular computers.
  5.  
  6. In addition to sharing common keywords, each
  7. COMAL system provides the same programming
  8. structures.
  9.  
  10. But it goes even further than just keywords and
  11. structures. Each COMAL has a compatible
  12. ENVIRONMENT. They all share the same LOOK AND
  13. FEEL. Once you know COMAL on one computer, you
  14. will feel right at home using COMAL on a
  15. different computer! They share a common FRIENDLY
  16. environment.
  17.  
  18. The built-in full screen editor makes program
  19. entry easier. If you can see it on the screen,
  20. you can edit it. COMAL checks each line you enter
  21. -- WHEN YOU ENTER IT. If it sees a mistake it
  22. tells you RIGHT AWAY, and even attempts to help
  23. you fix it! The SCAN command checks your entire
  24. program to verify the multi-line structures.
  25. Before you run your program you will know that
  26. each line and structure is proper.
  27.  
  28. When you LIST a program, COMAL automatically
  29. indents the structures for you! It also
  30. capitalizes the keywords but shows your variable
  31. names in lower case. You get a very readable
  32. program listing -- especially if you take
  33. advantage of long variable names. You can use
  34. names as long as the screen line permits!
  35.  
  36. COMAL also helps you fine-tune your program. A
  37. TRACE facility helps you locate errors. The ERROR
  38. HANDLER allows your programs not only to catch
  39. errors, but often to correct them while the
  40. program continues running.
  41.  
  42. You should enjoy writing programs in modules
  43. (procedures and functions). You give each one a
  44. name, and pass information back and forth with it
  45. via parameters. It can be open and share all
  46. variables with the main program or be CLOSED so
  47. that all variables and data inside it are
  48. considered local. An IMPORT statement allows you
  49. access to specific variables if needed. Once you
  50. have defined a module, you can call it from
  51. direct mode -- just like any other COMAL keyword!
  52. You can even call the module from inside itself
  53. (called recursion).
  54.  
  55. Your modules are actually extending COMAL. In
  56. fact, a module can be stored on disk as an
  57. "external" procedure or function. Any program can
  58. then include that module simply by adding a one
  59. line "header". COMAL automatically gets the
  60. module from disk when it needs it.
  61.  
  62. Packages are another method of extending COMAL.
  63. They are usually written in machine code and are
  64. specific to each computer. Part of the beauty of
  65. packages is that they allow fast access to
  66. hardware dependent features. An even greater
  67. advantage is that you call them from COMAL by
  68. name, just as if they were part of COMAL itself.
  69. You can use existing packages without knowing how
  70. they were created.
  71.  
  72. Normally, the user can stop a program by pressing
  73. the break key (usually a <stop> or <esc> key).
  74. However, there are times when you want to be sure
  75. that the program is not stopped. COMAL allows the
  76. break key to be disabled and re-enabled anywhere
  77. within a program. Furthermore, it provides an ESC
  78. flag to notify the program when the user presses
  79. the break key.
  80.  
  81. Since COMAL is available on many different
  82. computers, you need a convenient method of
  83. transferring programs between them. The MERGE and
  84. ENTER commands accept a program stored as an
  85. ASCII file. Of course COMAL also provides a way
  86. to store program lines in ASCII format: the LIST
  87. command! You can LIST your program to any output
  88. location: screen, printer, disk file, or even
  89. modem.
  90.  
  91. BENCHMARK TIMINGS
  92.  
  93. We did some quick benchmark tests. The results
  94. are shown below. The programs used are referenced
  95. under the chart. COMAL is nearly always faster
  96. than BASIC. This difference is significantly more
  97. dramatic when dealing with strings. Also it seems
  98. that AmigaCOMAL is on top between the various
  99. COMAL implementations.
  100.  
  101. SYSTEM       AHLS   CALC  TRIG QUICK SIEVE SUBSTR
  102.  
  103. AmigaCOMAL    3.1    7.2   4.0   3.1   6.6   0.2
  104. AmigaBASIC   12.8   16.9   7.1   4.3  16.0   5.1
  105.  
  106. IBM COMAL    10.2   32.8  26.7  17.7   8.6   0.3
  107. IBM BASIC    14.4   55.6  46.0  21.5  39.8   9.7
  108.  
  109. C64 COMAL 2  25.5   72.9  58.2  40.7  28.0   1.0
  110. C64 BASIC   115.7  106.4  63.3  86.1 137.4  12.3
  111.  
  112. Notes:
  113. Ahls = Ahls test from Creative Computing magazine
  114. Calc = Calc test from Byte magazine May 1985
  115. Trig = Trig test from COMAL Today 12 page 38
  116. Quick= Quick test from COMAL Today 12 page 39
  117. Sieve= Sieve test from Byte / COMAL Today 23
  118. Substr=Substring replacement test
  119. Base model Amiga 500 and IBM PC used for tests.
  120.