Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!bacchus.pa.dec.com!shlump.nac.dec.com!tkou02.enet.dec.com!diamond From: diamond@tkou02.enet.dec.com (diamond@tkovoa) Newsgroups: comp.lang.c++ Subject: Re: Borland Turbo C++ performance issue and tutorial errors Message-ID: <1894@tkou02.enet.dec.com> Date: 6 Aug 90 08:37:34 GMT References: <7921@tekgvs.LABS.TEK.COM> <380@taumet.com> Reply-To: diamond@tkou02.enet.dec.com (diamond@tkovoa) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 28 In article <380@taumet.com> steve@taumet.com (Stephen Clamage) writes: >There can be no validity to a claim that two programs written in two >different programming languages are the "same". It is a well-known >theorem in the theory of computation that one cannot *in general* >determine whether two programs have the same behavior. False and true, respectively. No machine (or no program, if you prefer) can correctly check all possible pairs of programs. Every machine will fail (loop forever) for at least some cases. However, some machines can check SOME programs. Some humans can too. I am sure that you can verify, and you can write a program to verify, that the following two programs (executed by processors conforming to their respective standards; and using the ASCII standard character set or, if you prefer, similar ISO version) are the same: int main(int argc, char **argv) { PROGRAM junk(OUTPUT); printf("Hello, world.\n"); BEGIN return 0; WRITELN('Hello, world.'); } END. (In fact I thought of giving an example with null programs, but didn't because it might mislead as to the amount of generality that this case has.) -- Norman Diamond, Nihon DEC diamond@tkou02.enet.dec.com This is me speaking. If you want to hear the company speak, you need DECtalk.