"Out of String Space" if Multiple Illegal Calls to DATEVALUE (82880)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.1
  • Microsoft Basic Professional Development System for MS-DOS 7.0

This article was previously published under Q82880

SYMPTOMS

An "Out of String" 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 "Illegal Function Call" error occurs repeatedly, which decreases the string space each time the error occurs. With the string space being decreased from the "Illegal Function Call" error, an "Out of String Space" 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.

MORE INFORMATION

Steps to Reproduce Problem

  1. 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.
  2. Enter the following code:
            REM $INCLUDE: 'datim.bi'
            ON ERROR GOTO errorhandler
            ' Clear the screen.
            CLS
            ' Wait in loop until user hits a "q".
            WHILE INKEY$ <> "q"
              LOCATE 10, 1
              ' Print out available string space.
              PRINT "String space : ";FRE(x$)
              ' Call DATEVALUE# function.
              c# = DATEVALUE#("00-00-00")
            WEND
            END
    
            errorhandler:
              LOCATE 10, 1
              ' Print out available string space and error level.
              PRINT "String space : ";FRE(x$), "Error Number : ";ERR
              RESUME NEXT
    						
  3. Press F5 to run the example.
Watch the string space decrease each time the "Illegal Function Call" error occurs. You can determine when the "Illegal function call" error occurs by checking the value of ERR. If ERR = 5, then an "Illegal Function Call" has occurred. This error occurs repeatedly, which in turn causes the string space to decrease. Notice that the "String space" value decreases.

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

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

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB82880