Article ID: 242467
Article Last Modified on 10/15/2002
APPLIES TO
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q242467
SYMPTOMS
You perform a division where the divisor and dividend are both 0. The return value should be ******, but instead, a combination of ASCII characters or numerals and asterisks is returned. Additionally, if you perform such a calculation as a select item in a SQL SELECT statement, you might see an incorrect numeric return value.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
MORE INFORMATION
Steps to Reproduce Behavior
Simple Zero Division:
Execute the following commands in the Command window:
lnX = 0/0 ?lnX
- Look at the return value printed to the desktop. Note that you see an underscore or hyphen, followed by several garbage characters, followed by a series of asterisks.
Zero Division in SQL SELECT Statement:
Run the following code from a program (.PRG) file:
CREATE CURSOR c1 (f1 n(5), f2 n(5), f3 N(5), f4 N(5)) INSERT INTO c1 VALUES (3,2,0,0) SELECT f1/f2 as q1, f4/f3 AS q2; FROM c1; INTO CURSOR c2 BROWSE NOWAIT ?q2
- The value appearing in the second column of the BROWSE window is -.5000*****.**. Note that the return value printed to the desktop is -0.5000.
(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Jim Saunders, Microsoft Corporation.
Keywords: kbbug kbfix kbsqlprog kbdatabase kbvs600sp3fix KB242467