Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uflorida!novavax!hcx1!brad From: brad@SSD.CSD.HARRIS.COM (Brad Appleton) Newsgroups: comp.lang.c Subject: Re: Passing functions in C Summary: minor fix in function for previous posting Message-ID: <3243@hcx1.SSD.CSD.HARRIS.COM> Date: 12 Mar 90 17:24:44 GMT References: <1990Mar9.045151.9601@ucselx.sdsu.edu> <3242@hcx1.SSD.CSD.HARRIS.COM> Sender: news@hcx1.SSD.CSD.HARRIS.COM Distribution: usa Organization: Harris Computer Systems, Fort Lauderdale, FL Lines: 25 OOPS -- I screwed up! the body of function "runAfunct" in my previous post should have been "return (*myfunct)();" not "(*myfunct)();" without the return !!! My most sincere apologies. incidentally, that brings up an interesting point! If I have a function int foo() { int i; i = 10; } without a specified return value, what will be returned when foo is called. On one compiler I have used, it will return "10" because 10 was the last "thing that was evaluated". I doubt that this is reliable however (is it?) Should the compiler catch the "missing return" or is that left strictly to lint? advTHANXance +=-=-=-=-=-=-=-=-= "... and miles to go before I sleep." -=-=-=-=-=-=-=-=-=-+ | Brad Appleton | Harris Computer Systems Division | | | 2101 West Cypress Creek Road | | brad@ssd.csd.harris.com | Fort Lauderdale, FL 33309 USA | | ... {uunet | novavax}!hcx1!brad | MailStop 161 (305) 973-5007 | +=-=-=-=-=-=-=-=- DISCLAIMER: I said it, not my company! -=-=-=-=-=-=-=-=-=-+