Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Richard Heathfield Newsgroups: comp.theory Subject: Re: Every sufficiently competent C programmer knows --- Semantic Property of Finite String Date: Fri, 14 Mar 2025 14:49:00 +0000 Organization: Fix this later Lines: 56 Message-ID: References: <5429f6c8b8a8a79e06b4aeefe677cc54a2a636bf@i2pn2.org> <924e22fc46d629b311b16a954dd0bed980a0a094@i2pn2.org> <033b052fccc451753d03d559358b9f1d2fd6623b@i2pn2.org> <47992d436edb4414b8fa8fa99688e25e22f3098e@i2pn2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 14 Mar 2025 15:49:05 +0100 (CET) Injection-Info: dont-email.me; posting-host="5fc3e144d8b4428c522cf2161043773b"; logging-data="1568141"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+El1hNu90v48raPS1SEBJls76CXM264ak8jQ9+WWdFHg==" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Zqu6d7BHQw2NEUM8Xr5YfjymJ7k= In-Reply-To: <47992d436edb4414b8fa8fa99688e25e22f3098e@i2pn2.org> Content-Language: en-GB Bytes: 3542 On 14/03/2025 14:10, Richard Damon wrote: > On 3/13/25 11:55 PM, olcott wrote: >> In other words you are stupidly trying >> to get away with saying that it is impossible >> for one C function to call another C function. >> > > Not at all, just that for a C function to call another C function > that other C function must be included as part of the Program > that the first is defined in. This is an easy area for ambiguity. In this code: int bar(void); int foo(void) { return bar(); } bar() is not included, merely prototyped, but it is reasonable to say that foo() is (syntactically) calling bar(). It is /not/ reasonable, though, to claim that we know what foo() will do unless we know for sure what bar() does. And neither is it possible for foo()'s program to run if bar()'s source is not in the module and cannot be tracked down elsewhere by the linker. The absence of bar() from ready availability does not mean that foo() isn't calling bar(). It only means that bar() might not be around to hear. As is so often the case, whether we're right to claim X depends on what we mean by X. > C functions are not programs, but programs can be built from C > functions, True, although I think one would have to be pretty tight to insist on the distinction in this case. If we can think of C functions as programs, we don't need to emulate anything at all (not that we did, of course); we can just call the function and catch its return vale (if any). > That is like asking what is the frequency of a square? I have it on good authority that squares broadcast on 4Hz. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within