Q38277: LOCATE Must Place Cursor in VIEW PRINT Window or Line 25
Article: Q38277 Product(s): See article Version(s): 2.00 2.01 3.00 4.00 4.00b 4.50 Operating System(s): MS-DOS Keyword(s): ENDUSER | B_BasicCom | mspl13_basic Last Modified: 26-FEB-1990 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"
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.