Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!agate!ig!uwmcsd1!bbn!rochester!PT.CS.CMU.EDU!cadre!pitt!cisunx!ejkst From: ejkst@cisunx.UUCP (Eric J. Kennedy) Newsgroups: comp.sys.amiga Subject: printf() Message-ID: <7364@cisunx.UUCP> Date: 2 Mar 88 23:55:44 GMT Organization: Univ. of Pittsburgh, Comp & Info Sys Lines: 33 I was trying to debug a small program last night, using the world's most popular debugger: #ifdef DEBUG printf("At such-N-such a location\n"); #endif I was trying to track down a bug that was causing an immediate 'task held' requester. The problem appeared to be comming at the very 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. Now, my question is, why the heck didn't my message print out if it was before the actual bug? Is this a side effect of multitasking? Is it because my program and the console device are two different tasks, and my program was crashing before the console device got around to displaying the message? If so, how can I get around it? I sure don't want to printf("..."); getchar(...); /* stop program, wait for console to catch up */ or something silly like that. Thanks, -- ------------ Eric Kennedy ejkst@cisunx.UUCP