KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q33685: "Illegal Function Call" Using SCREEN 0 Pages, then SCREEN 1

Article: Q33685
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | B_BasicCom buglist4.00 buglist4.00b fixlist4.50 | mspl13_basic
Last Modified: 5-DEC-1988

When invoking multiple video pages (as in SCREEN 0) and then switching
to a SCREEN that does not support multiple pages (SCREEN 1), the error
"Illegal function call" will occur on the second SCREEN statement, as
in the following example:

   SCREEN 0,,1,0
   SCREEN 1       'This gives "Illegal function call"

Microsoft has confirmed this to be a problem in QuickBASIC Versions
4.00 and 4.00b, and in the Microsoft BASIC Compiler Version 6.00 for
MS-DOS and MS OS/2 (buglist6.00). This problem was corrected in
QuickBASIC Version 4.50.

A workaround is to reset both pages to zero with another SCREEN
statement just before changing screen modes, as in the following code
example:

SCREEN 0,,1,0
SCREEN 0,,0,0  'Resets both pages to 0
SCREEN 1

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.