Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!unmvax!ddnvx1!ridout From: RIDOUT@ddnvx1.afwl.af.mil Newsgroups: comp.sys.amiga.tech Subject: testing DICE 2.05 Message-ID: <11479@ddnvx1.afwl.af.mil> Date: 10 Sep 90 08:30:32 GMT Lines: 39 The following is a little program I used while testing out DICE 2.05. I added the fflush(stdout) call to make this work the way I thought is should in the first place. Is I looked through the library source I found notes on how Matt uses a double buffer for output. My question is am I handleing this correctly or am I suposed to use a setvbuf call some how to make this work. Using setvbuf all I was able to accomplish is locking up my shell. This is DICE 2.05 unregistered if it makes a difference. The output without the fflush call lookes like the following: > test 12 2 Enter the speed in MPH: Enter the number of hours: Miles traveled = 24 > ----------------------------------------------------- #include #include main() { int mph, time; printf("Enter the speed in MPH: "); fflush(stdout); scanf("%d",&mph); printf("Enter the number of hours: "); fflush(stdout); scanf("%d",&time); printf("Miles traveled = %d \n",mph * time); } ------------------------------------------------------ Thanks for any help. - **************************************************************************** * Brian Ridout Internet: ridout@ddnvx1.afwl.af.mil * * wl/scev * * Kirtland AFB NM 87117 My Apple is better than your Orange. * ****************************************************************************