jer@peora.UUCP (J. Eric Roskos) (09/24/85)
> What should the code do when a range-check occurs? Print out an error > message on ticker-tape & hang? Do nothing? A better analogy, perhaps, > would be... Well, since the example was MX missiles, I guess it should invoke the Ada exception handler... the exception handler should then fix things up, and continue execution... or run the "abort" procedures... It's certainly better than having the missile overwrite some state variable and go off course into a city somewhere because there was no checking. -- Shyy-Anzr: J. Eric Roskos UUCP: Ofc: ..!{decvax,ucbvax,ihnp4}!vax135!petsd!peora!jer Home: ..!{decvax,ucbvax,ihnp4}!vax135!petsd!peora!jerpc!jer US Mail: MS 795; Perkin-Elmer SDC; 2486 Sand Lake Road, Orlando, FL 32809-7642 "Jryy, V qba'g guvax gung gur YBEQ zrnag hf gb rng puneerq png- recvyynef, ab znggre jung pbaqvgvba bs fgvssarff gurl'er va!"
chuck@dartvax.UUCP (Chuck Simmons) (09/30/85)
> > What should the code do when a range-check occurs? Print out an error > > message on ticker-tape & hang? Do nothing? A better analogy, perhaps, > > would be... The real advantage to range checking comes when you are debugging and testing your program. With range checking, bugs in the code become immediately apparent. Without range checking, the code may run for quite some time before it becomes obvious that something is terribly wrong. When an error condition does occur, the program should abort as cleanly and quickly as possible leaving as much information as it can for its programmer to figure out what went wrong. For some programs, it may be possible to return to some known state and then continue processing. -- chuck