Microsoft KB Archive/82880

= &quot;Out of String Space&quot; if Multiple Illegal Calls to DATEVALUE =

Article ID: 82880

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q82880



SYMPTOMS
An &quot;Out of String&quot; error can eventually occur after repeated calls to the DATEVALUE function in the DTFMTER.QLB Quick library. In the code example below, the problem occurs because an &quot;Illegal Function Call&quot; error occurs repeatedly, which decreases the string space each time the error occurs. With the string space being decreased from the &quot;Illegal Function Call&quot; error, an &quot;Out of String Space&quot; will eventually occur.



STATUS
Microsoft has confirmed this to be a bug with the DTFMTER libraries included with Basic Professional Development System (PDS) versions 7.0 and 7.1. This problem was corrected in Microsoft Visual Basic version 1.0 for MS-DOS.



Steps to Reproduce Problem
 Start QBX.EXE with the following option:

QBX /L DTFMTER.QLB

This will load up the Quick library with the Day Time Formatter Quick library.  Enter the following code: REM $INCLUDE: 'datim.bi' ON ERROR GOTO errorhandler ' Clear the screen. CLS ' Wait in loop until user hits a &quot;q&quot;. WHILE INKEY$ <> &quot;q&quot; LOCATE 10, 1 ' Print out available string space. PRINT &quot;String space : &quot;;FRE(x$) ' Call DATEVALUE# function. c# = DATEVALUE#(&quot;00-00-00&quot;) WEND END

errorhandler: LOCATE 10, 1 ' Print out available string space and error level. PRINT &quot;String space : &quot;;FRE(x$), &quot;Error Number : &quot;;ERR RESUME NEXT  Press F5 to run the example.

Watch the string space decrease each time the &quot;Illegal Function Call&quot; error occurs. You can determine when the &quot;Illegal function call&quot; error occurs by checking the value of ERR. If ERR = 5, then an &quot;Illegal Function Call&quot; has occurred. This error occurs repeatedly, which in turn causes the string space to decrease. Notice that the &quot;String space&quot; value decreases.

When the string space gets down to 0, the value returned by ERR will be 14. This means an &quot;Out of string space&quot; error has occurred.

The &quot;Out of string space&quot; error message is caused by multiple illegal calls to DATEVALUE, which generate error messages that fill your far data area.

Additional query words: VBmsdos BasicCom 7.00 7.10 b_vbmsdos 1.00 buglist7.00 buglist7.10 fixlist1.00

Keywords: KB82880

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.