PRB: @ ... SAY to Text File Causes Page to EjectID: Q121958 2.5x 2.6x 3.00 | 2.00 2.5x 2.6x
The information in this article applies to:
SYMPTOMSIssuing an @ ... SAY statement whose coordinates are before the coordinates of a previously issued @ ... SAY statement causes a page to eject when output is directed to a text file.
CAUSEFoxPro cannot issue an @ ... SAY statement to a previous location in a text file. A file does not act like the screen, which can accept input for any location. In a text file, the data must be presented sequentially. It is not possible to move backward in a text file while sending output to it.
RESOLUTIONIssue the @ ... SAY statements sequentially according to their coordinates. For example, @ 1,1 SAY 'Name' would come before @ 2,2 SAY 'Phone'. To send output to a text file multiple times, (overwriting the file each time) without issuing any page ejects to the file, include code to capture or reroute the page eject. To redirect the page eject, use additional SET DEVICE TO FILE and @ ... SAY statements. The following code sample demonstrates how to do this.
In this example, when @ 0,0 SAY "" is executed, FoxPro checks the previous
@ ... SAY command. Because the value of the previous @ ... SAY is "2,2", a
page eject is sent to JUNKFILE.TXT before @ 0,0 SAY "" is run. If this code
is run a second time, no page eject will be sent to MYFILE.TXT because the
page eject has already been issued, and the coordinates 1,1 come after 0,0.
MORE INFORMATION
Steps to Reproduce BehaviorRun the following code twice (overwriting MYFILE.TXT during the second run). The second time it is run, a page eject will be issued to MYFILE.TXT.
Additional reference words: FoxDos FoxWin VFoxWin 2.00 2.50 2.50a 2.50b
2.60 2.60a 3.00
unnecessary extraneous eject character print
KBCategory: kbprint kbprb
KBSubcategory: FxprintGeneral
|
|
Last Reviewed: May 22, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |