KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q57646: Use STACK, Not FRE("), with QBX.EXE or /Fs in BASIC 7.00

Article: Q57646
Product(s): See article
Version(s): 7.00   | 7.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_basic
Last Modified: 14-JAN-1990

With the advent of far string support in Microsoft BASIC Professional
Development System (PDS) Version 7.00 for MS-DOS and OS/2, the FRE()
function has some different properties. The following statement

   PRINT  FRE("")

does not return the remaining default data segment (DGROUP) space when
run in the QBX.EXE environment or when run as a program compiled with
the /Fs (Far String) option. To obtain the remaining DGROUP space in
these cases, you must now use the STACK function (introduced in BASIC
7.00). For example, the following statement

   PRINT STACK

returns the current space available in DGROUP for the STACK to be
resized. The stack is always in DGROUP, so the new STACK function
conveniently informs you of the total remaining space that can be used
in DGROUP.

This information applies to Microsoft BASIC PDS 7.00 for MS-DOS and
MS OS/2.

For more information on the many changes in the FRE() function in
regard to far strings, refer to Pages 140-142 of the "Microsoft BASIC
7.0: Language Reference" manual.

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.