Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!husak From: husak@ux1.cso.uiuc.edu (BugsBunny) Newsgroups: comp.lang.pascal Subject: Is this a bug in TurboPascal Message-ID: <1991May1.021059.2129@ux1.cso.uiuc.edu> Date: 1 May 91 02:10:59 GMT Organization: University of Illinois at Urbana Lines: 28 I'm running the following in TP and get the wrong answer.. Please correct me if I'm wrong... program Is_this_wrong; var xx,yy,c1,c2,c3,c4: integer; begin xx := 639; yy := 479; c1 := Trunc(50*xx/639); c2 := Trunc(50*yy/479); c3 := Trunc(300*xx/639); c4 := Trunc(250*yy/479); writeln(xx,yy,c1,c2,c3,c4); end. OUTPUT: 639,479,50,50,-7,-23 How does it happen that the last two numbers are wrong and the rest right??? Really confused in Illinois, Steve -- "What am I trying to do, what am I trying to say, I'm not trying to tell you anything you didn't know when you woke up today..." - Depeche Mode "Nothing" MUSIC FOR THE MASSES