BUG: "Invalid Coordinates" Error Sending @ SAYs to Text File

Last reviewed: May 9, 1997
Article ID: Q164739
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0, 5.0a

SYMPTOMS

The "Invalid coordinates" error message is received when sending @..SAYs to a text file when the coordinates for the @..SAY reach a certain number. The certain number is dependent on the FontSize property of _SCREEN. The smaller the _SCREEN.FontSize, the larger the coordinate values can be.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The "Invalid coordinates" error message is error number 1959. The Help file states that the coordinate values must be between -32768 and 32767. Visual FoxPro 3.x for Windows and Macintosh, and FoxPro for Windows, can use coordinates within the range specified by the Help file without error.

Steps to Reproduce Behavior

  1. Enter the following commands in the Visual FoxPro Command window:

          SET DEVICE TO PRINTER
          SET PRINTER TO test.txt
    
          @ 32700,1 SAY "Hello"     && This line will cause the error
          SET PRINTER TO
          SET DEVICE TO SCREEN
    
       Although these few lines of code are all that is needed to reproduce
       the error, it may be useful to find out what the maximum coordinate
       can be in a particular situation. Continue with the next few steps to
       determine the maximum coordinate that can be used.
    
    

  2. Place the following code in a new program file and save it.

          IF FILE("test.txt")
    
               DELETE FILE "test.txt"
          ENDIF
    
          _SCREEN.FONTNAME="Arial"
          _SCREEN.FONTSIZE=10
    
          SET DEVICE TO PRINTER
          SET PRINTER TO test.txt
          FOR i=1 TO 32770
          @ i, 1 SAY "Hello "+ STR(i)
          ENDFOR
    
          SET PRINTER TO
          SET DEVICE TO SCREEN
          MODIFY FILE test.txt
    
    

  3. Run the program. Because you should get the "Invalid coordinates" error, cancel the program when the error dialog box comes up.

  4. Finish out the program by entering the following commands in the Visual FoxPro Command window:

          SET PRINTER TO
          SET DEVICE TO SCREEN
          MODIFY FILE test.txt
    

  5. If the text file is not at the bottom, scroll down until the end is reached. The maximum coordinate should be listed. With _SCREEN.FontSize set to 10, the maximum coordinate should be about 2,047. If the _SCREEN.FontSize is set to 4, the maximum coordinate should be about 5,461. _SCREEN.FontSize won't accept sizes less than 4 point. The program code in step 2 above has a command for changing the FontSize property of _SCREEN.


Additional query words:
Keywords : buglist5.00 FxprgGeneral FxprintGeneral vfoxwin vfpbug5.0a kbbuglist
Version : 5.0 5.0a
Platform : WINDOWS
Issue type : kbbug


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.

Last reviewed: May 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.