Sujet : Re: Only C programmers tell the truth about the behavior of DD simulated by HHH
De : richard (at) *nospam* damon-family.org (Richard Damon)
Groupes : comp.lang.cDate : 17. Apr 2025, 23:52:17
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <c8041ecdcd4efaf109eb264050544813434dd258@i2pn2.org>
References : 1
User-Agent : Mozilla Thunderbird
On 4/17/25 11:38 AM, olcott wrote:
typedef void (*ptr)();
int HHH(ptr P);
int DD()
{
int Halt_Status = HHH(DD);
if (Halt_Status)
HERE: goto HERE;
return Halt_Status;
}
int main()
{
HHH(DD);
}
DD simulated by HHH includes HHH simulating itself
simulating DD until HHH sees the non-terminating
pattern and rejects DD as non-terminating.
No, because a real C programmer knows that the above has EXPLICT underfined behavior, because that program doesn't have an HHH defined.
And, if you try to equivocate and say you are including your Halt7.c to define it, then you explaniation is wrong, as your HHH is not defined to do that, but to only simulate the input for a little bit, then abort its simulation and return.
The problem is when you include that definition, all your descriptions become errors.
First, HHH doesn't do what you claim, and even your question become errors as you can't ask about the correct answer it could return, when, because it has to be difined first, there is only one answer that it DOES return.
You can't base the answer on it doing a correct simulation, when it doesn't actually do one.
All you are proving is that your logic, and yourself, is just unsound, as it is based on the assumption of false statement.
This just proves that you are nothing but a pathological liar that doesn't understand what he is talking about.