Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!cica!tut.cis.ohio-state.edu!bloom-beacon!apple!farrier From: farrier@Apple.COM (Cary Farrier) Newsgroups: comp.sys.apple Subject: Re: console FST EOF Keywords: Apple IIGS GS/OS console FST EOF Message-ID: <3539@internal.Apple.COM> Date: 14 Aug 89 15:59:04 GMT References: <10727@smoke.BRL.MIL> Organization: Apple Computer Inc, Cupertino, CA Lines: 30 In article <10727@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >How does one type an "end of file" to the console when, e.g., the following >APW C program is run: > >/* character counter */ >#include>main() >{ int n = 0; > while (getchar() != EOF) > ++n; > printf("%d\n", n); >} > >I desperately need this facility and was unable to find any mention of it >in the various GS/OS and ProDOS-16 docs I have obtained from APDA. > >If this is currently impossible, please fix it in a near-future release >of GS/OS. It is absurd to have to reboot the computer simply because >one's program happens to be stuck in a read loop. Try Ctrl-Z, it is the ASCII code for EOF. Cary Farrier -- +--------------+-------------------------+----------------------------------+ | Cary Farrier | farrier@goofy.apple.com | The contents of this article are | +--------------+-------------------------+ real. Only the facts have been | | Copyright 1989 Cary Farrier | changed to protect the innocent. | | All Rights Reserved | | +----------------------------------------+----------------------------------+