Scor­pio News

  

July–September 1987 – Volume 1. Issue 3.

Page 6 of 67

“C Language” by Friedman Wagner-Dobler, published by Pitman. £3-95. Don’t buy this, I think it is awful. Look at pages 25 and 26 in Boots, if you don’t believe me. [Ed. – can’t I just wear sneakers?]

“Practical C” by Mark Harrison, published by Sigma Press. £7-95. Much better, especially as it uses Hisoft C in the examples; shame it had to be the Amstrad version, but nobody is perfect. Don’t be put off by the blurb telling you to “avoid C sickness”.

“Understanding C” by Bruce H Hunter, published by Sybex. I seem to have peeled the price tag off this. It was expensive, but is good.

“The C Compendium” by David Lawrence and Mark England, published by Sunshine. £12-95. This gives a lot of examples of routines, building up into a useful library. I forgive the authors for saying Quicksort is “probably” the quickest in-memory sort. I thought Knuth said it was definitely the quickest.

Enough name dropping. Having read all those, I thought I ought to be able to program in C. I was right. The input and output the language uses are like those in Unix, which is right and proper, and unpleasant to use as well. As languages go, C is very concise, which is a good thing sometimes. It can be a bad thing as well, and I found myself frequently baffled by code writte to impress, when I looked at some more C programs recently. The problem is that many programmers like to use slick tricks, which are difficult to read. Anyone lumbered with the task of maintaining such a program will know what I mean.

Hisoft C follows the standards laid down by Kernighan and Ritchie, who apparently are major deities in the Unix/C view of the universe. You can write i++ or ++i instead of i = i+1, which is fairly comprehensive. And you may be easily able to appreciate that there is a difference between comparatively simple statement like i=(j++)+(k++) and i=(++j)+(++k). But sooner or later, you will fail to understand what a bit of code does, and alter it disastrously. (The first assignment increments j and k after it has set i to their sum, so i is j+k, whereas the second assignment makes i hold j+k+2.)

The Language is certainly very powerful, but it does not protect the programmer from making mistakes. Where Pascal will notice you are trying to access an array element that does not exist, C will cheerfully amend the operating system for you. The resulting crash is usually a real mess. Anything you write that fulfills the rules of C syntax will compile…

Still, Hisoft were only following the rules there, and none of that is their fault. The real catch, with this compiler, is that there are no “reals”. Now this is a big disappointment, and not just because it means we are unable to run that damnable benchmark program. Floats are an important part of much of computer programming, and this compiler would have been a really great one if it had had trhem. It hasn’t, and that is my only genuine (nearly said “real”) criticism of it. I hope that Hisoft are going to produce a further version, with floats, and I would suggest that they do it soon, and include support for the Belectra HSA-88B as well. Otherwise, everyone is going to buy Mix-C, and I for one won’t blame them.

Hisoft Pascal 80

Yes, another Hisoft language review. The latest version of Hisoft’s Pascal is now available for a very reasonable price. And if you already have an earlier version, you don’t have to pay out all over again: you just get an upgrade for £10 by sending them the old disk back. This way of doing business is the only acceptable way, if one is going to bring out upgraded versions of things like compilers. Unfortunately we will never be able to convince the hardware manufacturers of the wisdom of taking their old machines back, and selling the new ones for only a £10 upgrade fee, What a pity!

What you get, whichever way you pay for Pascal 80, is a disk and a manual in a ring binder. The front of the manual consists of lots of update pages, which it is up to you to put in the right place, and remove the old ones. I managed it,

Page 6 of 67