BC "Out of Memory" on Calculation with User Type Passed to SUB (78893)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
This article was previously published under Q78893 SYMPTOMS
The BC.EXE compiler may give an "Out of Memory" error message when
compiling a program that uses elements of a user-defined type in
calculations made inside a SUB program to which the typed variable was
passed as a parameter. Several workarounds are shown below.
STATUS
Microsoft has confirmed this to be a bug in the Standard and Professional
Editions of Microsoft Visual Basic for MS-DOS, version 1.0; and Microsoft
Basic Professional Development System (PDS) for MS-DOS and MS OS/2,
versions 7.0 and 7.1 (buglist7.00 and buglist7.1). We are researching this
problem and will post new information here in the Microsoft Knowledge Base
as it becomes available.
WORKAROUND- Re-arrange the user type. For example, moving a1 to the last
position in TYPE xytype corrects the problem.
- Compile with the /X compile option. Normally, /X indicates the
program contains RESUME statements, but it also inhibits some of
the compiler's optimizations.
- Make Var into a variable in COMMON SHARED, thus removing it from
the parameter list.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB78893 |
---|
|