Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.f77 Subject: Re: when is a function not a function... Message-ID: <10988@brl-tgr.ARPA> Date: Thu, 23-May-85 17:31:58 EDT Article-I.D.: brl-tgr.10988 Posted: Thu May 23 17:31:58 1985 Date-Received: Fri, 24-May-85 22:37:48 EDT References: <10964@brl-tgr.ARPA> Distribution: net Organization: Ballistic Research Lab Lines: 12 > c This might just be unique to the UNIX(tm) compiler, > c or is it standard that functions can be CALLed > c and subroutines be (almost) treated as functions? The only difference between a function and a subroutine is that one leaves a return value in a place that the caller can find it (generally a machine register). Of course it would be nice if the compiler produced an error message when you misused the language like this, but this is hard to do in general since the function/subroutine could be in another (not yet written!) source file and not enough information is available at link-edit time to let the linker detect the usage error.