home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!nwnexus!emagnuso
- From: emagnuso@halcyon.com (Erik Magnuson)
- Subject: Re: Language pitfalls (was Re: FORTRAN bug)
- Message-ID: <1992Dec16.202735.596@nwnexus.WA.COM>
- Summary: One example of function w/o return
- Sender: sso@nwnexus.WA.COM (System Security Officer)
- Organization: The 23:00 News and Mail Service
- References: <1992Dec15.203558.18211@inmet.camb.inmet.com>> <EACHUS.92Dec15202249@oddjob.mitre.org> <256@visicom.com>
- Date: Wed, 16 Dec 1992 20:27:35 GMT
- Lines: 31
-
- In article <256@visicom.com> rlk@VisiCom.COM (Bob Kitzberger) writes:
- >Robert, I can't think of a reason to have a function that does nothing
- >but raise an exception... can you provide an example? (I'm not
- >questioning the need for it -- just curious)
-
- Howabout when you have a common interface, but cannot (or choose not
- to) implement the function for a specific implementation.
-
- function Foo return Foo_Type is
- begin
- raise Not_Supported;
- end Foo;
-
- Currently you have to write:
-
- function Foo return Foo_Type is
- Dummy : Foo_Type; -- should this be initialized?
- begin
- raise Not_Supported;
- return Dummy;
- end Foo;
-
- >
- > .Bob.
- >----------------
- >Bob Kitzberger VisiCom Laboratories, Inc.
- >rlk@visicom.com 10052 Mesa Ridge Court, San Diego CA 92121 USA
- > +1 619 457 2111 FAX +1 619 457 0888
- --
- Erik
-
-