[net.unix-wizards] a useful utility

msc (04/21/83)

Dan Forsyth's "useful utility" provides an excellent example of
the power of object-oriented programming.  I will try to illustrate.

Here is a small extract from his article.

------
	By putting a special comment line at the beginning of an
	'nroff' file, you can get it formatted by entering

	    runoff <document>

	'Runoff' expects the first line of the first file named on
	the command line to contain an nroff-style comment as follows:

	    .\"  <command line to format the document>
-------

With this comment line, the document file becomes an object that
knows how to "runoff".  "Runoff" is a message that is sent to the
object telling it what the user wants, and the object responds by
"running itself off".

All the user ever has to know is the message, "runoff", and the name of the
object (s)he wishes to send it to.  No knowledge off tbl, eqn, me, ms or
anything other macro is needed.  Therein lies the beauty of object-oriented
programming.

			Mark Callow
			Qubix Graphic Systems Inc.
			...{decvax,ucbvax}!decwrl!qubix!msc
			...ittvax!qubix!msc
			decwrl!qubix!msc@Berkeley.ARPA