mcewan@uiucdcs.UUCP (mcewan ) (12/15/83)
#N:uiucdcs:36100018:000:6902 uiucdcs!mcewan Dec 15 00:55:00 1983 I just got COMAL for the C64, and it's great. If you don't know what COMAL is, you can think of it as basic done right. It has all of basic plus while loops, repeat-until, if-then-elif...else-endif, named procedures and functions with parameters (call by value or by reference), case statements, saner i/o and disc commands, turtle graphics and sprite commands, and improved editing commands (including auto line numbering, delete range of lines, and list that nicely formats the listing). The only big lack is structured data. The best part is the price: its free! There is a small charge to obtain it from the COMAL Users Group, but anyone can copy it and give it away. I will make copies for local people only (I don't want to have to deal with a flood of requests). I'll put details at the end of this note. Others can get a copy from COMAL Users Group 5501 Groveland Terrace Madison, WI 53716 The price is $19.95 + $2 S&H, HOWEVER, since a number of reviews have mistakenly given the price as $10 postpaid, they are honoring this "for a limited time". The following is reprinted from the documentation that comes with COMAL (reprinted with implicit permission; the thing has "copy me please" written all over it), with comments from me. WHY COMAL WILL REPLACE BASIC [modest, aren't they] *** COMAL is FASTER than BASIC In 11 benchmark tests between COMAL and BASIC, COMAL was faster in every test. It was over 10 times faster overall, and an amazing 79 times faster in string searches. *** COMAL is STANDARDIZED A standard for the COMAL language exists, refered to as the COMAL KERNAL, with the addition of recommended COMAL extensions for enhanced versions of COMAL. *** COMAL is OFFICIAL COMAL is already the official language in Denmark, Ireland, and Sweden, with Germany, England and Norway soon to follow. *** COMAL is STRUCTURED *** COMAL includes virtually all BASIC keywords and commands *** COMAL has HIGH RES COLOR GRAPHICS *** COMAL is HELPFUL COMAL checks each line of your program as you enter it !!! ... You are informed, with UNDERSTANDABLE error messages, whenever you type in an incorrect program line. [well, most of them are understandable. Some are a little strange, like "stack overflow" when you run out of memory. Also, it reads the error messages from a file, rather than use up memory by having all the messages in core. If there isn't a disc with that file in the drive, you get "error n", with n being the appropriate error number.] In addition, the cursor is placed at the point in error in the line. COMAL also checks your entire program before it does a run to verify that all your program structures are correct. This takes less than a second. *** COMAL is easy to read COMAL lets you use long variable names and named procedures. [names can be up to 16 characters long] *** COMAL has virtually UNLIMITED program size Since COMAL allows external procedures and functions .. a COMAL program is limited only by the amount of disc space [sorry, not this version. This is the biggest drawback. There is only 9900 bytes of free space available. But see the comments on COMAL 2.00 farther down.] *** COMAL is EASILY EXPANDED You can link your own machine language routines, with parameter passing onto any COMAL program easily with the link command. [not this version. In fact, I have yet to figure out how to load a ML program. You can call one with SYS, just like basic.] *** COMAL has GOOD MEMORY Once a program is run ALL procedures and functions can be called individually from direct mode.[This is real nice. The only problem I've found is that if you RUN a program and an error is found, it prints the line number along with an error message. If you call the procedure from direct mode, no line number. Makes no sense to me.] *** COMAL allows you to merge program segments together *** COMAL is CONSISTENT and WELL DESIGNED COMAL benifits from over 10 years of developement. It is not a series of "patches" to basic, but a well researched and designed language of its own. *** COMAL has a built in RUN TIME COMPILER [more on this below] QUESTIONS AND ANSWERS Q: What computers can run COMAL? What are the differences in the CBM COMAL versions? A: CP/M computers may use METANIC COMAL-80, available from Metanic. ... TI is rumored to be working on a version of COMAL for its personal computers. Commodore 64, PET, and CBM can use these versions: Version 0.14 [this is the one available now] ... Version 2.00 is the complete COMAL with many enhancements, vertually upward compatible from version 0.14. It has over 30k free RAM [versus <10k for 0.14]. Added features include ... LIST by procedure, ... GLOBAL variables in a CLOSED procedure [normally, all variables are global. If a procedure is CLOSED, its variables are all local, but it can't access any global vars. Whats worse, though, is that any procedure a CLOSED procedure calls becomes CLOSED. Blech.], ... [lotsa other nice stuff, including vertual memory in the form of external procedures and functions]. It will be available as a cartridge for the C64 ... The cartridge should be available Spring 1984 for under $100 [ I wonder if this is "under $100" the way that Simons' Basic is ($25) or "under $100" the way $99 is.] from Commodore. Q: Is a compiler for COMAL available? A: All versions of CBM COMAL include a RUN TIME COMPILER ... We have been told that it is even faster than a C compiler running on the C64 [there's a C compiler running on the C64???] All CBM COMAL systems so far are "three pass interpreters - run time compilers". Pass one is when you enter a program line. It is checked for correct syntax. Pass two is when you RUN the program. All structures are checked for correctness and all branches are changed to absolute address jumps. This pass normally takes less than one second. Pass three is the actual program RUN. I've been playing with it for a few days, and it's a lot of fun. Its very fast and pretty friendly. I could use better documentation (I've read "Structured Programming with Comal" by Roy Atherton, but there are features (extensions) that Atherton doesn't describe (if anybody out there figures out how to use DELETE or PRINT USING let me know)). Writing and debugging time is about an order of magnitude less than for basic. The memory limit is going to be a problem, though. If anyone wants a copy of COMAL from me, get a disc to: Scott McEwan 114d DCL Easiest way is to put it in my mailbox. Either arrange to pick up the copied disc and documentation at my office, or provide me with a self addressed envelope that I can send to you via CAMPUS mail (arbitrary restriction to keep down number of requests). People with a box in DCL don't need envelopes. If you want your copy before I leave for Christmas, get the disc to me on or before Monday, Dec. 19. Merry Christmas and Happy Hacking Scott McEwan uiucdcs!mcewan