"Out of String Space" Concatenating Variable-Length String (45687)
The information in this article applies to:
- Microsoft QuickBASIC 1.0
- Microsoft QuickBASIC 1.01
- Microsoft QuickBASIC 1.02
- Microsoft QuickBASIC 2.0
- Microsoft QuickBASIC 2.01
- Microsoft QuickBASIC 3.0
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
This article was previously published under Q45687 SUMMARY
For variable-length string concatenation to execute successfully, even
if only 1 byte is to be added, there must be enough available memory
[reported by FRE("")] for the length of a copy of the existing string,
plus the length of the string being added, plus its new 4-byte string
descriptor. Otherwise, you will get an "Out of String Space" error,
caused by the temporary old string remaining in memory during the
string concatenation. The old string is deallocated only after a
successful concatenation.
This information applies to QuickBasic Versions 1.00, 1.01, 1.02,
2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50, and to Basic Compiler
Versions 6.00 and 6.00b for MS-DOS and OS/2.
This information also applies to Microsoft Basic PDS Version 7.00 when
using BC.EXE without the /Fs compiler switch. Inside the QBX.EXE
environment and when using /Fs compiler switch, Basic 7.00 uses a 64K
segment for temporary string storage and procedure-level strings (that
is, strings declared inside subroutines). To see how much temporary
string space you have when using far strings, use FRE("StringLiteral"),
where StringLiteral is any constant string (for example, "Hello"). For
more information about far strings, read Chapter 11 in the "Microsoft
Basic 7.0: Programmer's Guide" for Basic PDS Version 7.00.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB45687 |
---|
|