Liste des Groupes | Revenir à c theory |
On 5/8/2025 8:30 PM, Keith Thompson wrote:PO is being quite deceptive here.olcott <polcott333@gmail.com> writes:HHH can only simulate a function that take no argumentsOn 5/8/2025 6:49 PM, Keith Thompson wrote:>olcott <polcott333@gmail.com> writes:>
[...]void DDD()"cannot possibly each"?
{
HHH(DDD);
return;
}
>
If you are a competent C programmer then you
know that DDD correctly simulated by HHH cannot
possibly each its own "return" instruction.
I am a competent C programmer (and I don't believe you can make
the same claim). I don't know what HHH is. The name "HHH" tells
me nothing about what it's supposed to do. Without knowing what
HHH is, I can't say much about your code (or is it pseudo-code?).
>
For the purpose of this discussion HHH is exactly
what I said it is. It correctly simulates DDD.
Does HHH correctly simulate DDD *and do nothing else*?
>
Does HHH correctly simulate *every* function whose address is passed
to it? Must the passed function be one that takes no arguments
and does not return a value?
>
Can HHH just *call* the function whose address is passed to it?
If it's a correct simulation, there should be no difference between
calling the function and "correctly simulating" it.
>
My knowledge of C tells me nothing about *how* HHH might simulate
DDD.
>
and has no return value. HHH also simulates the entire
chain of functions that this function calls. These can
take arguments or not and have return values or not.
Thus HHH ends up simulating itself (and everything
that HHH calls) simulating DDD in an infinite
sequence of recursive emulation until OOM error.
Exactly. None of these people on comp.theory couldWe need not know anything else about HHH to>
know that DDD correctly simulated by HHH cannot
possibly REACH its own "return" instruction.
Assuming that HHH(DDD) "correctly simulates" DDD, and assuming it
does nothing else, your code would be equivalent to this:
>
void DDD(void) {
DDD();
return;
}
>
get that even after three years.
Everybody on comp.theory understands this much. PO's plan is that when he goes elsewhere he can start with noobies and trick them into agreeing with certain "wordings" by not explaining relevent context for his questions. Then he goes back to comp.theory and triumphantly claims support from elsewhere, proving to himself that comp.theory posters are all idiots. :)Then the return statement (which is unnecessary anyway) will never beIt is only there to mark a final halt state.
reached.
In practice, the program will likely crash due to a stackYes you totally have this correctly.
overflow, unless the compiler implements tail-call optimization, in
which case the program might just run forever -- which also means the
unnecessary return statement will never be reached.
>
None of the dozens of comp.theory people could
ever achieve that level of understanding even
after three years. That is why I needed to post
on comp.lang.c.
Hmm, did PO make it clear that when he saysThis conclusion relies on my understanding of what you've said about
your code, which I consider to be unreliable.
Les messages affichés proviennent d'usenet.