Microsoft KB Archive/38277

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:55, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


LOCATE Must Place Cursor in VIEW PRINT Window or Line 25

Article ID: 38277

Article Last Modified on 11/21/2006



APPLIES TO

  • Microsoft QuickBasic 2.0, when used with:
    • Microsoft MS-DOS 6.22 Standard Edition
  • Microsoft QuickBasic 2.01, when used with:
    • Microsoft MS-DOS 6.22 Standard Edition
  • Microsoft QuickBasic 3.0, when used with:
    • Microsoft MS-DOS 6.22 Standard Edition
  • Microsoft QuickBasic 4.0, when used with:
    • Microsoft MS-DOS 6.22 Standard Edition
  • Microsoft QuickBASIC 4.0b, when used with:
    • Microsoft MS-DOS 6.22 Standard Edition
  • Microsoft QuickBasic 4.5 for MS-DOS, when used with:
    • Microsoft MS-DOS 6.22 Standard Edition



This article was previously published under Q38277

SUMMARY

Page 445 of the "Microsoft QuickBasic 4.00: Basic Language Reference" manual specifies that the LOCATE statement must operate within the screen limited by the VIEW PRINT statement. This is true for all lines except line number 25. Line 25 is unique; the following explanation appears on Page 256 of the same manual:

The last line on the screen is reserved for the softkey display and is not accessible to the cursor unless the softkey display is off (KEY OFF) and LOCATE is used with PRINT to write on the line.


KEY OFF (softkey display off) is the default. Therefore, even with a screen limited from line 4 to line 12, if the command KEY ON has not been issued, you may use the LOCATE command to print on line 25.

This information applies to QuickBasic Versions 2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2, and to Microsoft Basic Professional Development System (PDS) Version 7.00 for MS-DOS and MS OS/2.

The following is a code example:

   VIEW PRINT 4 TO 12
   LOCATE 25, 1     ' This LOCATE is OK
   LOCATE 13, 1     ' This LOCATE is an "Illegal Function Call"
                


Additional query words: QuickBas BasicCom

Keywords: KB38277