Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!dcl-cs!stephen From: stephen@comp.lancs.ac.uk (Stephen J. Muir) Newsgroups: net.lang.c++ Subject: Functions having return(e) AND return. Message-ID: <383@comp.lancs.ac.uk> Date: Thu, 21-Aug-86 06:23:14 EDT Article-I.D.: comp.383 Posted: Thu Aug 21 06:23:14 1986 Date-Received: Fri, 22-Aug-86 06:47:28 EDT Reply-To: stephen@comp.lancs.ac.uk (Stephen J. Muir) Organization: Department of Computing at Lancaster University, UK. Lines: 21 The compiler doesn't complain that function "answer" can return no result. # include int answer (int a) { if (a) return (1); } main () { int x; cin >> x; cout << answer (x); } C++ version 1.1, BSD 4.2, DEC VAX-11/750. -- EMAIL: stephen@comp.lancs.ac.uk | Post: University of Lancaster, UUCP: ...!mcvax!ukc!dcl-cs!stephen | Department of Computing, Phone: +44 524 65201 Ext. 4120 | Bailrigg, Lancaster, UK. Project:Alvey ECLIPSE Distribution | LA1 4YR