The PCW is an ideal machine, in common with most of the older 8-bit machines, on which to learn programming and there are many languages available, such as BASIC, FORTH, LISP, LOGO, C, FORTRAN etc. On these machines you can get right down to the grass roots and with Machine code even rearrange the grass roots whilst understanding what you're doing. Useful programs can be written in as little as 1K and 30K is a large program.
You won't get rich these days programming for the PCW because
the market isn't big enough, but if you're in business you could well write
specialised programs to assist your endeavours. In any case it's an excellent
hobby or pastime, which can be pursued at any time, even away from the computer.
Writing the code is only one facet of programming. Deciding what to write and
how to set about it can be challenging, then there is the screen display to
consider, useability of the program and fool-proofing it to prevent users putting
in silly values.
It is an art form, akin to writing a good story or painting a work of art. Once
written, a program can always be improved, which is why most software is upgraded
regularly with different version numbers. One problem, rather like writing a
book, is to know when you've finished and stop trying to improve your work.
Programming induces a certain way of thinking, and having learned one language subsequent languages become progressively easier to get to grips with. A professional programmer will have several languages at his or her command and will use the one appropriate to the task in hand. Having had a go at several languages, I found HTML fairly easy to get to grips with and now I'm tackling Javascript for authoring websites. Terms like "array", "passing parameters", "variables", "constants", "global", "local" all mean something from past experience with other languages and the logic and syntax seems to become second nature.
Every language has many versions and many are so far apart that they can scarcely be recognised as the same language. Mallard Basic has much in common with earlier BASICS such as BBC basic and MBASIC although it has more powerful file handling facilities. It also forms a useful basis for learning later BASICS such as QuickBasic, but Visual Basic seems to have nothing in common with it. Modern languages, apart from "scripting" languages have so many wizards and other screens between the hardware and programmer that it's a bit like programming on remote control.
If you want to start programming on the PCW the obvious choice is Mallard Basic; it is supplied on all CP/M boot discs and manuals are still relatively easy to get. Recently Basic 98 has been developed by R D Hill adding extra commands, functions and a compiler to Mallard Basic. This is a great step forward; Mallard Basic is an interpreted language, which means that you always have to load it before you can run your program, but the compiler converts your program into a .COM file so that it becomes a stand alone program. Basic 98 costs only £25. R D Hill advertises in PCW Today or I can give you his address if you contact me by Email.
The other language supplied is DR Logo (DR stands for Digital Research, the software company). It is known for it's "turtle graphics", where a "turtle" can be directed to draw diagrams. It was widely used in schools and for this reason lost credence, but it was designed for controlling robots and is also a powerful listing language. It's capability is far beyond "turtle grapics".
Forth is an interesting language in that you build it yourself from building block. Starting with a few lines you make a module which can be given a name and put into a library. You can name several modules in this way, then name the group of modules. It works in a pyramid fashion, so that in the end a few words or even one word can run a program. It, difficult to explain; why not try it yourself?
The dreaded "C" needs no introduction. It was at one time the language that all programmers revered, and many tee-shirts were worn with thing like "I program in C" on them, even if the guy wearing it couldn't count up to ten, let alone program in C. It was, and still is, a powerful language which has largely been superceded by C++. However if you're contemplating using C++, C on the PCW will give you a good start at low cost. C is a language which is near enough universal and can be ported to most machines.
The languages discussed before are high level languages. The code you write is more or less written in English and the language converts it to a lower level that the machine's hardware can cope with. Programming in machine code removes protection from the programmer that high level languages bestow. It demands much greater concentration and forward thinking than higher languages and mistakes are harder to identify and put right. So why use it? Well, in many instances machine code is more compact than other languages and often runs faster but not always. Most high level languages, including BASIC allow the insertion of machine code modules, so a good compromise is to write most of the program in the higher language and reserve machine code for those instances when machine code is of most value.
So why not give that word processor a rest for a while and try some programming?
Ron King
Andover, England
Email..... ron@king27.freeserve.co.uk