home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / ada / 3890 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.4 KB  |  42 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fraser
  3. From: fraser@munta.cs.mu.OZ.AU (Fraser Wilson)
  4. Subject: Semantics Question
  5. Message-ID: <9300612.21535@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. Date: Wed, 6 Jan 1993 01:23:34 GMT
  9. Lines: 31
  10.  
  11. Hi.  I have a small question regarding exceptions, the answer to which
  12. I couldn't find in the ARM.  Basically, what happens if you raise a
  13. local exception, but don't handle it before the end of the block in which
  14. it is declared.  Like this:
  15.  
  16. procedure p is
  17.  
  18.   procedure q is
  19.     e : exception;
  20.   begin
  21.     raise e;
  22.   end q;
  23.  
  24. begin
  25.   q;
  26. end p;
  27.  
  28.  
  29. Is the result defined somewhere, or not?  If there are handlers in
  30. subprograms that call p, and they handle any exception (ie, with an
  31. others clause), will they catch e?  Should the program abort as soon
  32. as it leaves e's scope?
  33.  
  34. Thanks in advance,
  35. Fraser.
  36. ======================================================================== \._,
  37. Can death be sleep, when life is but a dream  | Fraser Wilson,           < /
  38. And scenes of bliss pass as a phantom by?     | Melbourne University     _'
  39. The transient pleasures as a vision seem      | fraser@cs.mu.OZ.AU      //
  40. And yet we think the greatest pain's to die.  | Phone - +61 3 344 7877 // NZ!
  41. ============================meat is murder===================================
  42.