comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: Exception Handling
Date: 1996/09/19
Date: 1996-09-19T00:00:00+00:00	[thread overview]
Message-ID: <1996Sep19.145824.1@eisner> (raw)
In-Reply-To: 96091718200832@psavax.pwfl.com


In article <96091718200832@psavax.pwfl.com>, "Marin David Condic, 407.796.8997, M/S 731-93" <condicma@PWFL.COM> writes:
> Larry Kilgallen <kilgallen@EISNER.DECUS.ORG> writes:
>>DEC Pascal triggers exceptions when constraints are violated, and
>>catching them is done in a vendor-specific manner.  I would assume
>>the discussion is not limited to standard-based implementations,
>>because then we would not be talking about who originate the concept
>>but rather whose committee was quickest to adopt research.
>>
>     I've long admired the quality of DEC compilers ever since using
>     their Fortran-10 on the PDP-10. I have two questions: 1) At what
>     point in time did they extend "standard" Pascal with some form of
>     exception processing? 2) Could you show a "simple" example of how
>     a user might raise & handle the exception? Thanks.

From the start the VMS operating system had exceptions built into
the stack frames, so DEC Pascal V1 (1979 or so ?) users could
force establishment of their own handler by calling the VMS
routine LIB$ESTABLISH.  When DEC Pascal V2 arrived (1982 ?)
it was a total rewrite and required use of a specific language
extension to establish programmer-specified handlers since the
same OS mechanism was also used for language-specified handlers
pertaining to the chaining for uplevel addressing as I recall.

The following code has not been run through a compiler, and
leaves out some of the attributes required for safe programming.
The compiler would surely complain, but the is probably more
clear than the version the compiler would accept:

	PROCEDURE MY_PROCEDURE;

	FUNCTION MY_HANDLER ( SIGVEC : SIGVEC_TYPE;
				 MECHVEC : MECHVEC_TYPE ) : INTEGER;
		BEGIN

		IF SIGVEC [1] = MY_EXCEPTION_VALUE
		THEN
			MY_HANDLER := SS$_CONTINUE
		ELSE
			MY_HANDLER := SS$_RESIGNAL;
		END;
	BEGIN

	ESTABLISH ( MY_HANDLER );

	LIB$SIGNAL ( MY_EXCEPTION_VALUE );

	END;

Larry Kilgallen




  reply	other threads:[~1996-09-19  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-17  0:00 Exception Handling Marin David Condic, 407.796.8997, M/S 731-93
1996-09-19  0:00 ` Larry Kilgallen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-05-29  0:00 NANCY HEHIR
2000-05-29  0:00 ` Preben Randhol
2000-05-30  0:00 ` Robert Dewar
2000-05-30  0:00 ` Jeffrey D. Cherry
2000-05-30  0:00   ` Gautier
2000-06-05  0:00     ` Robert Dewar
2000-06-01  0:00   ` Preben Randhol
2000-06-01  0:00     ` Preben Randhol
2000-06-01  0:00     ` Ehud Lamm
2000-06-01  0:00     ` Jeffrey D. Cherry
2000-06-02  0:00       ` David C. Hoos, Sr.
2000-06-02  0:00         ` Jeffrey D. Cherry
2000-06-01  0:00     ` Jeff Carter
2000-06-02  0:00       ` Preben Randhol
2000-06-02  0:00       ` Jeffrey D. Cherry
2000-05-30  0:00 ` Antonio Dur�n Dom�nguez
1996-09-28  0:00 Robert Dewar
1996-09-17  0:00 John Goodenough
1996-09-13  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-09-15  0:00 ` Larry Kilgallen
1996-09-23  0:00 ` Robin Vowels
1996-09-12  0:00 Robbie Gates
1996-09-12  0:00 ` Bryce
1996-09-12  0:00   ` Larry Kilgallen
1996-09-13  0:00     ` Robbie Gates
1996-09-14  0:00       ` Paul A. Houle
1996-09-18  0:00         ` Rick Decker
1996-09-12  0:00 ` Patrick Doyle
1996-09-12  0:00   ` Rick Decker
1996-09-13  0:00     ` Larry Kilgallen
1996-09-13  0:00 ` Felix Kasza
1996-09-13  0:00   ` David B. Shapcott [C]
1996-09-18  0:00     ` Bart Termorshuizen
1996-09-16  0:00 ` Norman H. Cohen
1996-09-23  0:00   ` Robin Vowels
1996-09-24  0:00     ` Bob Halpern
1996-10-02  0:00       ` Fritz Schneider
1996-10-07  0:00         ` Robin Vowels
1996-10-09  0:00         ` shmuel
1996-10-09  0:00           ` Bob Halpern
1996-09-26  0:00     ` Thiago
1986-05-13 22:57 exception handling MIXSIM
replies disabled

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