home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!lax.pe-nelson.com!lax!twbrown
- From: twbrown@PE-Nelson.COM (Tom W. Brown)
- Newsgroups: comp.lang.c++
- Subject: Re: GOTO, was: Tiny proposal for na
- Message-ID: <600@lax.lax.pe-nelson.com>
- Date: 2 Sep 92 20:12:24 GMT
- References: <2318@devnull.mpd.tandem.com> <rmartin.715001372@thor> <4192@papaya.bbn.com> <1992Sep2.155510.4274@genghis.borland.com>
- Sender: news@lax.pe-nelson.com
- Organization: PE-Nelson
- Lines: 33
-
- In article <1992Sep2.155510.4274@genghis.borland.com>, pete@genghis.borland.com (Pete Becker) writes:
- |>
- |> C++ version:
- |>
- |> void foo()
- |> {
- |> ifstream input( "foo" );
- |> DataObject data;
- |> if( data.doStuff( input ) == ERROR )
- |> return;
- |> data.doMoreStuff();
- |> }
- |>
- |> Let the compiler do the work...
- |> -- Pete
-
- Tsk, tsk, tsk... You put a return in the middle of the function :-)
- How about:
-
- void foo()
- {
- ifstream input("foo");
- DataObject data;
- if (data.doStuff(input) != ERROR)
- data.doMoreStuff();
- }
-
-
- ----------------------------------------------------------------------------
- Tom Brown | "Strange women, lying in ponds, distributing
- PE Nelson Systems | swords is no basis for a system of government."
- twbrown@pe-nelson.com | Monty Python and the Holy Grail
- ----------------------------------------------------------------------------
-