Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!cadre!pitt!cisunx!ejkst From: ejkst@cisunx.UUCP (Eric J. Kennedy) Newsgroups: comp.sys.amiga Subject: Re: printf() Message-ID: <7428@cisunx.UUCP> Date: 4 Mar 88 02:19:45 GMT References: <8803030730.AA20513@cory.Berkeley.EDU> Organization: Univ. of Pittsburgh, Comp & Info Sys Lines: 22 In article <8803030730.AA20513@cory.Berkeley.EDU>, dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: > :beginning of the program, so I inserted a printf("Beginning\n"); as the > :first line of the program, after the declarations. I still got a 'task > :held' requester _before_ anything printed out. Well, I figured out that > :the bug was in a fscanf(file,"%d",n), (forgot the &n) on about the > :fourth line of the program. > No, it should have printed it before crashing. I don't know > about lattice, but in Aztec C the stdout buffer is flushed whenever a \n > is encountered. Try sticking a fflush(stdout) after the printf... -Matt I'm using Aztec. I think I might have left out the \n, now that I think about it. That certainly would do it, huh? Also, someone else suggested using fprintf(stderr,...); which should also work fine. Thanks -- ------------ Eric Kennedy ejkst@cisunx.UUCP