Microsoft KB Archive/78094

= SCREEN Statement Syntax Correction for QuickBasic, Basic PDS =

Article ID: 78094

Article Last Modified on 11/21/2006



This article was previously published under Q78094



SUMMARY
The correct syntax of the SCREEN statement is

SCREEN [mode][,[colorswitch][,[apage][,vpage]]]

There are two additional restrictions on the SCREEN statement:

 You cannot specify a comma at the end of the statement without a value following the comma.  SCREEN without arguments is invalid and produces an &quot;Illegal Function Call&quot; error. 

(Adding these restrictions to the syntax diagram would make the diagram long and difficult to interpret.)

The syntax of the SCREEN statement is incorrect in the following sources, and should be replaced with the above syntax:


 * QB Advisor online Help system in QB.EXE in QuickBasic version 4.5
 * Page 288 of the &quot;Microsoft QuickBasic 4.5: Programming in Basic&quot; for MS-DOS manual
 * Microsoft Advisor online Help system in QBX.EXE in Basic Professional Development System (PDS) versions 7.0 and 7.1 for MS-DOS
 * Page 309 of the &quot;Microsoft Basic 7.0: Language Reference&quot; manual for Basic PDS versions 7.0 and 7.1



MORE INFORMATION
The SCREEN statement syntax is incorrectly documented in QB Advisor online Help system for QuickBasic 4.5 and the &quot;Microsoft QuickBasic 4.5: Programming in Basic&quot; manual as:

SCREEN [mode][,[colorswitch]][,[apage]][,[vpage]]

This syntax incorrectly states that any comma and the following argument can both be omitted. For example, this syntax is ambiguous when you specify three arguments; it is not possible to tell if the second argument is &quot;colorswitch&quot; or &quot;apage&quot;.

You may omit an argument to the SCREEN statement only when one of the following conditions holds:


 * The argument omitted is the last argument.
 * You specify a comma following the omitted argument.

The SCREEN statement syntax is incorrectly documented in the Microsoft Advisor online Help system in QBX.EXE for Basic Professional Development System (PDS) 7.0 and 7.1 for MS-DOS, and in the manual &quot;Basic Language Reference&quot; for Basic PDS 7.0 and 7.1 as:

SCREEN mode[,[colorswitch][,[apage][,vpage]]]

This syntax incorrectly states that the first argument, &quot;mode&quot; is required; it is optional.

Additional query words: QuickBas BasicCom 4.50 7.00 7.10

Keywords: KB78094

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.