Re: Every sufficiently competent C programmer knows

Liste des GroupesRevenir à cl c 
Sujet : Re: Every sufficiently competent C programmer knows
De : polcott333 (at) *nospam* gmail.com (olcott)
Groupes : comp.theory
Date : 11. Mar 2025, 03:27:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqo72u$1l6i0$2@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 3/10/2025 9:21 PM, Richard Damon wrote:
On 3/10/25 7:41 PM, olcott wrote:
typedef void (*ptr)();
int HHH(ptr P);
>
void Infinite_Loop()
{
   HERE: goto HERE;
   return;
}
>
void Infinite_Recursion()
{
   Infinite_Recursion();
   return;
}
>
void DDD()
{
   HHH(DDD);
   return;
}
>
int DD()
{
   int Halt_Status = HHH(DD);
   if (Halt_Status)
     HERE: goto HERE;
   return Halt_Status;
}
>
That when HHH correctly emulates N steps of the
above functions that none of these functions can
possibly reach their own "return" instruction
and terminate normally.
>
Since HHH does see that same pattern that competent
C programmers see it correctly aborts its emulation
and rejects these inputs as non terminating.
>
 Problem: DD Isn't a program, and if you try to compile it, you will get an undiefined symbol HHH.
 
HHH need not be a program for this correct thought experiment.
The only detail required to know about HHH is that it correctly
emulates N steps of DD.
--
Copyright 2025 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer

Date Sujet#  Auteur
24 May 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal