comp.lang.ada
 help / color / mirror / Atom feed
From: joe@petsd.UUCP (Joe Orost)
Subject: Re: Subscript out-of-bounds detection
Date: Mon, 30-Sep-85 16:00:15 EDT	[thread overview]
Date: Mon Sep 30 16:00:15 1985
Message-ID: <652@petsd.UUCP> (raw)
In-Reply-To: 568@unisoft.UUCP

In article <568@unisoft.UUCP> phil@unisoft.UUCP (Phil Ronzone) writes:
>Shucks - but I still CAN'T see how much the poor pilot in an F16 with an
>Ada programmed fire-control computer is going to be as a Mig-27 bears down
>on him, and right when he hears the lock-on buzz to fire his own missile --
>
>     Ada runtime error 498: subscript i value 23 out of range for array x (20)
>
>I mean,
>   
>     Bus error - core dumped
>
>reads quicker and thus gives the pilot a faster ``oh shit'' response time
>to take evasive action .... :-) :-)

Ada isn't as verbose as you think.  The Ada compiler I once used gave the
following run-time message:

	raise: no handler

and NO CORE DUMP!  Try to find the bug there?

However, there are some flaws in your "Bus error" logic.  An out-of-bounds
array subscript may not make the C or Fortran program die.  It just might
overwrite some random variable!  Say it overwrote the current altitude and
caused the plane to nose dive!  Wouldn't it be better for the error to just 
abort the subroutine it was in, and allow the rest of the program to 
recover, like Ada provides?  Remember, it was the DoD that came up with the
guidelines for the design of Ada in the first place.

				regards,
				joe

--

 ........        .........	Full-Name:  Joseph M. Orost
 .       .       .		UUCP:       ihnp4!vax135!petsd!joe
 . ......   ...  ........	ARPA:	    vax135!petsd!joe@BERKELEY
 .               .		Phone:      (201) 758-7284
 .               .........	Location:   40 19'49" N / 74 04'37" W
				US Mail:    MS 313; Perkin-Elmer; 106 Apple St
					    Tinton Falls, NJ 07724

  parent reply	other threads:[~1985-09-30 20:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <796@kuling.UUCP>
     [not found] ` <2580002@csd2.UUCP>
     [not found]   ` <191@graffiti.UUCP>
     [not found]     ` <568@unisoft.UUCP>
1985-09-29 18:21       ` What I miss... (really C, Ada, religion) Jan Steinman
1985-10-02  1:16         ` Eugene D. Brooks III
1985-10-03 20:14           ` William D Michael
1985-10-05 19:23             ` DARIN JOHNSON
1985-10-04 13:04           ` Re: What I miss... (really C, Ada, r rosen
1985-10-04 13:44           ` What I miss... (really C, Ada, religion) Jon Mauney
1985-10-05 15:17           ` Swamp Thing
1985-10-05 21:30           ` S.Rajeev
1985-10-06  6:04           ` Jan Steinman
1985-10-07 20:56           ` J. Eric Roskos
1985-10-02 16:04         ` Peter da Silva
1985-10-07 21:04           ` J. Eric Roskos
1985-10-09 18:56           ` Wayne Throop
1985-10-09 23:47           ` Peter Ludemann
1985-09-30 20:00       ` Joe Orost [this message]
1985-10-06 20:54   ` Eugene D. Brooks III
1985-10-07 14:13   ` Karl Tombre
1985-10-11 12:59   ` J. Eric Roskos
1985-10-13  6:28   ` Barry Margolin
1985-10-16  5:46   ` systolic processor? wildstar
1985-10-21  2:26   ` Re: What I miss... (really C, Ada, religion) Richard Welty
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox