Integer "Overflow" Using SETMEM in Basic PDS and QuickBasic (84929)
The information in this article applies to:
- Microsoft QuickBASIC 4.5
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q84929 SUMMARY
The SETMEM function in Basic returns the amount of memory available to
Basic after any re-allocation from the SETMEM occurs. If you
inadvertently try to assign this return value to an integer variable,
an "Overflow" error may occur. The return value from SETMEM is a long
integer, and may have a value greater then 32,767 (the maximum value
for an integer variable).
This would normally only occur if you have a DEF type defined
somewhere in your program, such as a DEFINT. A typing of the specific
return variable would be required in this case.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB84929 |
---|
|