KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q28050: QuickBASIC Hangs Using User-Defined Record Greater Than 64K

Article: Q28050
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: 22-JAN-1990

QuickBASIC fails to trap a user-defined record type that exceeds 64K
in size. It is not legal for a user-defined record to exceed 64K in
size.

The example program below will cause the system to hang.

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 and MS
OS/2 (fixlist7.00).

The following is a code example:

type foo
   a as string*32500
   b as string*32500
   c as string *1000
end type
dim x as foo
x.c=" "
print x.c
end

Note: Dynamic arrays of user-defined records may exceed 64K in size
provided that each record is less than 64K in size. When using an
array larger than 64K (which requires the /AH option), it is also
advisable to make the record-array element size a multiple (of any
power of 2) that terminates exactly on 64K boundaries.

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.