home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12588 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.8 KB

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