home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:12588 comp.programming:2407
- Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!sdd.hp.com!elroy.jpl.nasa.gov!ames!agate!linus!philabs!crpmks!billb
- From: billb@crpmks.uucp (Bill Bochnik (Info Systems))
- Newsgroups: comp.lang.c,comp.programming
- Subject: Re: A LITTLE BRAINTEASER...
- Message-ID: <1992Aug20.160744.17658@crpmks.uucp>
- Date: 20 Aug 92 16:07:44 GMT
- References: <aet.713608023@munagin> <Bswt31.7zC@research.canon.oz.au> <josef.713800013@uranium> <UuUwr*iT1@germal.bs.open.de>
- Reply-To: billb@crpmks.UUCP (Bill Bochnik (Info Systems))
- Organization: Ciba-Geigy Corporation
- Lines: 34
-
- In article <UuUwr*iT1@germal.bs.open.de> gm@germal.bs.open.de (Gerald Malitz) writes:
- >In article <josef.713800013@uranium>, Josef Moellers writes:
- >
- >> In <Bswt31.7zC@research.canon.oz.au> andy@research.canon.oz.au (Andy Newman) writes:
- >>
- >> >aet@mullian.ee.mu.OZ.AU (bert thompson) writes:
- >[...]
- >> >> char ch = getchar();
- >> > ^^^^^^^
- >> > NOT AGAIN!
- >[...]
- >> >So how may machines does this work on? Want to run it on something
- >> >without memory protection and let the little sucker recurse and
- >> >recurse...
- >>
- >> It'll run perfectly on systems that have signed characters!
- >
- > No, it won't.
- >
- >> EOF usually is -1, so '\377' will expand to -1.
- >
- > '\377' may appear at any place within a file. So (ch == EOF)
- >may be TRUE long before you reach EndOfFile.
- >
- > regards, Gerald.
-
-
- Isn't that an ESC 377 ? Or is that ESC followed by the 3 characters 377? If
- it is the former (what I thought was true) , my pc can't hold such a file.
- --
- Bill Bochnik | It's hard to be a James Bond in an Abbott
- Systems Analyst | and Costello world.
- Ciba-Geigy Corporation | Signed and sealed, they deliver oblivion.
- philabs!crpmks!billb | It's worse than that, he's dead Jim.
-