Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucdavis!deneb.ucdavis.edu!ecs140w016 From: ecs140w016@deneb.ucdavis.edu (0000;0000018921;4000;250;215;ecs140w) Newsgroups: comp.sys.mac.programmer Subject: Output problems with LSC Message-ID: <3859@ucdavis.ucdavis.edu> Date: 25 Mar 89 01:34:50 GMT Sender: uucp@ucdavis.ucdavis.edu Reply-To: ecs140w016@deneb.ucdavis.edu (Wilbert Chin) Distribution: usa Organization: University of California, Davis Lines: 58 I am having trouble with the output in a small program that I wrote to spit out some data. I use the unix redirected output feature on the UNIX command line (ie. > outfile). The problem is that "outfile" does not contain the total output. In the sample program that I have included, I loop around 100 times and there should be 100 lines of output but I only end up getting around 90 to 95 lines. Other code that I have written gives even less. By the way, I have up loaded the program (and changed the header and _main to main) to a UNIX machine and all the output is there. So I know that the problem lies somewhere other than my code. If it makes any difference, I'm running LSC 3.01p4 on a stock Mac+ w/ and external drive. Does anyone know what is going on? THANKS #include _main() { float a11, a12, a13, a21, a22, a23, a31, a32, a33; float p0, p1, p2, pt0, pt1, pt2; int i; a11 = 0.0; a12 = 0.4; a13 = 0.0; a21 = 2.0; a22 = 0.0; a23 = 0.6; a31 = 3.2; a32 = 0.0; a33 = 0.0; p0 = 10.0; p1 = 0.0; p2 = 0.0; for (i = 1;i <= 100; i++) { pt0 = p0 * a11 + p1 * a12 + p2 * a13; pt1 = p0 * a21 + p1 * a22 + p2 * a23; pt2 = p0 * a31 + p1 * a32 + p2 * a33; printf(" %d %1.8f %1.8f %1.8f",i,pt0, pt1, pt2); if (pt0 != 0.0) printf(" %1.8f %1.8f\n", pt1/pt0, pt2/pt0); else printf("\n"); p0 = pt0; p1 = pt1; p2 = pt2; } } ******************************************************************************** * * * Masters of Trivial Pursuit show how trivial their lives are! * * * ********************************************************************************