Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site utmbvax.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!hplabs!hao!seismo!ut-sally!utmbvax!mmr From: mmr@utmbvax.UUCP (Mike Rubenstein) Newsgroups: net.unix-wizards Subject: Re: more sun and vax diffs Message-ID: <363@utmbvax.UUCP> Date: Thu, 23-Aug-84 00:23:11 EDT Article-I.D.: utmbvax.363 Posted: Thu Aug 23 00:23:11 1984 Date-Received: Sun, 19-Aug-84 02:45:45 EDT References: <12362@sri-arpa.UUCP> Organization: U. Texas Medical Branch, Galveston, Texas Lines: 30 > 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