SCREEN Statement Syntax Correction for QuickBasic, Basic PDS (78094)






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 "Illegal
       Function Call" 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 "Microsoft QuickBasic 4.5: Programming in Basic" 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 "Microsoft Basic 7.0: Language Reference" 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 "Microsoft QuickBasic 4.5: Programming in Basic" 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 "colorswitch" or "apage".

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 "Basic Language Reference" for Basic PDS 7.0 and 7.1 as:

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

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

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: KB78094