Q28048: Repeated SOUND Statement Causes System Clock to Lose Time
Article: Q28048 Product(s): See article Version(s): 4.00 4.00b Operating System(s): MS-DOS Keyword(s): ENDUSER | B_BasicCom buglist4.00 buglist4.00b fixlist4.50 | mspl13_basic Last Modified: 31-JAN-1990 If the following program is run for two or three minutes, the system clock will lose time, that is, four to six seconds: starttime=TIMER WHILE (1) locate 1,1 : print using "#####.##"; TIMER-starttime ss=INT(201*RND)+37 SOUND ss,3 WEND The problem occurs whether compiled with BC.EXE or the QB.EXE environment. Further testing indicates that a duration of less than one second will stop the clock completely. Microsoft has confirmed this to be a problem in QuickBASIC Versions 4.00 and 4.00b, and in Microsoft BASIC Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2 (buglist6.00, buglist6.00b). This problem was corrected in QuickBASIC Version 4.50 and in Microsoft BASIC Professional Development System (PDS) Version 7.00 for MS-DOS (fixlist7.00). A similar problem occurs with the PLAY statement.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.