more sun and vax diffs

Mike Rubenstein mmr at utmbvax.UUCP
Thu Aug 23 14:23:11 AEST 1984


> It is NOT proper to print "Infinity" in a numeric field that may
> have to be read back in by another program (even if the Sun scanf()
> can convert the string back into proper internal form, which I doubt,
> the output may be shipped to another system to be input).

It's better to print an incorrect value?  If another program reads in a
number produced by a VAX when it couldn't calculate a value you're going to
get some real garbage.  The Sun's output does have the advantage of making it
obvious that something is wrong.

I've watched in some horror during the past 20 years as the tendency has grown
to ignore the fact that the purpose of computing is to provide CORRECT
solutions to problems.  I believe that ideally a program which is incorrect
should terminate as quickly as it can with an obvious indication that it
failed.  Unfortunately because of our inabilities this does not always
seem to be practical.  The next best result of an incorrect program is
an obviously ridiculous answer (I'd class the Sun's output in this
category, though in some cases it might well be considered correct.  Of
course if one takes that view there is no question that the Sun's result
is preferable.)  Worst possible result is that the program produces
output that looks reasonable.  The VAX's output is certainly more likely to
fall into the latter category than is the Sun's.

A program which is asked to do something it cannot do should, ideally,
inform the user of the problem.  This is, unfortunately, often impractical.
If the program fails to do this, it should be handled as if the program
were in error.
-- 

	Mike Rubenstein, OACB, UT Medical Branch, Galveston TX 77550



More information about the Comp.unix.wizards mailing list