Subj : Re: Dartmouth BASIC to C To : comp.programming From : Gerry Quinn Date : Mon Aug 08 2005 01:30 pm In article <42f60872$0$14679$ed2619ec@ptn-nntp-reader02.plus.net>, usenet@jdh30.plus.com says... > Gerry Quinn wrote: > > In article , JSmith@mail.net says... > >> if(D == 0.0) > >> { > >> printf("no unique solution\n"); > >> exit(EXIT_FAILURE); > >> } > > > > This isn't a good use of exit(). The program hasn't failed, the data > > has. Since the data error was detected, the program can congratulate > > itself on a successful run. > > > > (Technically the data is embedded in this program, but that is > > presumably something you will be changing over time.) > > > > So you should just print the above message and return normally. > > Don't compilers return FAIL when the program they are run on is incorrect? I don't know - I don't use command-line software! But my point is that the program is correct - it determines that the data has no unique solution. - Gerry Quinn .