Re: Disproof of the Halting Problem's Conclusion
stephen_at_nomail.com
Date: 07/24/04
- Next message: Marc Goodman: "Re: Disproof of the Halting Problem's Conclusion"
- Previous message: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- In reply to: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- Next in thread: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- Reply: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- Messages sorted by: [ date ] [ thread ]
Date: 24 Jul 2004 16:36:14 GMT
In comp.theory Peter Olcott <olcott@worldnet.att.net> wrote:
: "Marc Goodman" <marc.goodman@comcast.net> wrote in message news:mCqMc.175385$Oq2.78595@attbi_s52...
:>
:> True, it's not the only possible way to construct a halt analyzer.
:> False that you can construct a halt analyzer that doesn't return
:> its value.
: Why the hell not? It is by no means at all impossible to
: write a function that does not return a value to its caller.
: This is a standard feature of many programming languages.
Neither is it by no means at all impossible to modify a function
that prints its output to the screen to return it to the caller.
You are claiming you can write a function f1
void f1(int x)
{
int y;
//
// code to evaluate y
//
cout << y << endl;
}
but that it is impossible for us to write the function f2
int f2(int x)
{
int y;
//
// code to evaluate y
//
return y;
}
Changing the cout to a return is not going to change the
logic of the program. Anything that can be calculated by f1
can be calculated by f2. The following program will print the
same value twice, no matter what the 'code to evaluate y' is.
int main()
{
f1(10);
cout << f2(10) << endl;
}
Stephen
- Next message: Marc Goodman: "Re: Disproof of the Halting Problem's Conclusion"
- Previous message: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- In reply to: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- Next in thread: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- Reply: Peter Olcott: "Re: Disproof of the Halting Problem's Conclusion"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|