Path: utzoo!utgpu!attcan!lsuc!sparkles!pjr From: pjr@maccs.dcss.mcmaster.ca (Patrick J. Ryan ) Newsgroups: comp.databases Subject: dBase/Clipper Message-ID: <1989Aug4.172532.10732@maccs.dcss.mcmaster.ca> Date: 4 Aug 89 17:25:32 GMT Reply-To: pjr@maccs.dcss.mcmaster.ca (Patrick J. Ryan ) Distribution: na Organization: McMaster University, Hamilton, Ontario Lines: 23 In trying to run some dbaseIII+ programs using clipper, I have encountered a problem with the following example: The database is a baseball team roster which I am trying to order by batting average. Thus I have the statement INDEX ON (1-H/AB) TO BA (H and AB are numeric fields standing for hits and at-bats respectively) dbase III+ happily constructs the index, even when some of the records have a 0 value for AB. When the list is printed out using the index, the ratio H/AB is printed out as ****** but occurs at the bottom of the list, as if it were 0. Clipper compiles and links ok but when the program runs, it hits a division by 0 error. This happens even when there are no records having AB = 0. On the other hand, clipper can "list" the file in its standard ordering and correctly compute and print out H/AB for each record. Does anyone have an idea of why this occurs and/or how to avoid the problem? Thanks.