Path: utzoo!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps Newsgroups: comp.lang.c From: flaps@dgp.toronto.edu (Alan J Rosenthal) Subject: Re: Discarded Function Values (To Cast or Not to Cast) Message-ID: <1989Nov28.115625.6289@jarvis.csri.toronto.edu> References: <316@voa3.UUCP> <1120@cirrusl.UUCP> Date: 28 Nov 89 16:56:26 GMT dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes: >I will crudely divide standard library functions into two groups, based >on their return value: > >1. Those that return a status value >2. Those that return data ... >The return value from category 2 functions can usually be safely cast >to void... I don't think this is a very good taxonomy. You should distinguish functions that return interesting data from functions that return boring data. Functions like strcpy() that return boring data can be safely cast to void. Functions like atof() that return interesting data cannot. ajr -- "Learning algorithms from Knuth is almost as bad as learning physics from Newton in the Latin original." -- Jeffrey Kegler