Seafaring and Ship Building!

So I’ve been sailing the high-seas this evening! The first recommended reading book in the bibliography at the end of the manual was a book called Modula-2 ‘A Seafaring Manual and Shipyard Guide’:

An introduction to Modula-2

An introduction to Modula-2

For some reason this title always intrigued me but as this was an American book and not on my set list I didn’t buy it at the time. I thought it was about time now that I got hold of a copy to take a look. 99p + postage later I had a copy.

Modula-2: A Seafarer's Guide and Shipyard Manual

Modula-2: A Seafarer’s Guide and Shipyard Manual

The strange analogy is between programming languages and ships – with COBOL as a cruise liner, ADA as an aircraft carrier and my personal favourite Assembly that is a sub!

Seafarers2

Typical page from the Seafarers manual – analogies abound!

Seafarers3

A sample, straightforward Modula-2 program

Anyway, I decided that I would pick a page at random and enter the program into Benchmark Modula-2 to see how successful it might be off the bat. Modula-2 comes with a fairly limited set of standard modules designed for things like simple console input/output. As it happens this program was fully supported without issue in this version of Modula-2.

A sample program entered from the Seafarer's Manual

A sample program entered from the Seafarer’s Manual

I then decided to write my own little program, in a similar vein, to convert an imperial weight into metric. This was very straightforward!

My GoMetric! Program - it converts stones/lbs to kgs.

My GoMetric! Program – it converts stones/lbs to kgs.

Not bad for a first effort! Next I plan to explore the editor a bit and go through some of the supplied sample programs.

Current mood: Nostalgic