PRB: SYS(3) Returns Duplicate FilenamesLast reviewed: June 27, 1995Article ID: Q114435 |
The information in this article applies to:
SYMPTOMSThe purpose of the SYS(3) function is to return a unique filename when it is called. Under certain circumstances, duplicate names may be returned.
CAUSEThis behavior occurs with some processors that run at high speeds.
RESOLUTIONTo avoid this problem, increase the time between calls of the SYS(3) function. For example, add the following line:
=INKEY(.001)This command forces FoxPro to wait for .001 seconds before issuing the next command.
MORE INFORMATION
Steps to Reproduce ProblemCreate and run the following program:
SET STATUS BAR OFF SET STATUS OFF SET TALK OFF CLEAR CREATE CURSOR systest (naam C(10)) DO WHILE RECNO() < 1000 APPEND BLANK REPLACE naam WITH SYS(3) ENDDO NumberOfRecords=RECCOUNT() ? STR(NumberOfRecords) INDEX ON naam TAG naam UNIQUE COUNT TO A ?STR(A) ?" ----" ?STR(NumberOfRecords-A)Note that the Total number of records (the first number printed) may differ from the number of unique records (the second number printed).
|
Additional reference words: FoxDos FoxWin 2.50 2.50a 2.50b 2.60 repeat
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |