Command @...SAY Foundation
Output data on the screen or to the printer.
@ <nRow>, <nCol> SAY <SayExpr> ;
[PICTURE <cSayPicture>] ;
The command @...SAY outputs the value of <SayExpr> on the current output device. Normally this is the screen. When the command SET DEVICE TO PRINTER is called prior to @...SAY, the output occurs to the printer. Simultaneous output to the screen and printer (which is possible with the command ?|??) does not occur with @...SAY. Also, the command SET CONSOLE ON | OFF does not have an effect on the output to the screen.
The value of <SayExpr> can be of any data type.
The PICTURE option specifies a PICTURE format used to format the output value. A PICTURE format is a character string which can consist of two parts: the format function and the format mask.
The PICTURE formatting function
The format function always appears at the beginning of a PICTURE format and is prefixed with the character @ (Chr(64)). One or more characters from the following table follow this character. Each of the characters specified following @ stand for a specific formatting rule used in the display of <SayExpr>. A PICTURE format can consist only of one formatting function. If a format mask is also specified to format each individual character of <SayExpr>, this mask must appear after the formatting function and must be separated from it by a single blank space (Chr(32)).
|Displays number left justified
|Displays "CR" (Credit) after positive numbers
|Displays character strings in SET DATE format
|Fills numeric values from the left with the character <c>
|Inserts characters which are not mask characters
|Displays "DB" (Debit) after negative numbers
|Only blank spaces are displayed when the value is 0
|Displays negative numbers in parentheses with leading blank spaces
|Displays negative numbers in parentheses without leading blank spaces
|Places the country specific currency character in front of a number
|Converts letter characters to upper case
The PICTURE formatting mask
The formatting mask is a character string whose individual characters define rules for formatting individual characters of <SayExpr> during display. The characters from the following table are interpreted as formatting characters. Any other characters contained in the PICTURE mask are displayed at the corresponding position. If the PICTURE format contains the formatting function @R, the unknown formatting characters are inserted into the display. If @R is missing, the corresponding characters are overwritten in the display of <SayExpr>. The formatting mask can be specified in the PICTURE format along with the formatting function. If both are used, the formatting function must appear first and be separated from the formatting mask by a single blank space.
|Displays character for each data type
|Displays logical values as "T" or "F"
|Displays logical values as "Y","J" or "N"
|Converts lower case letters to upper case
|Replaces leading blank spaces of numbers with a dollar sign ($)
|Replaces leading blank spaces of numbers with an asterisk (*)
|Marks position for a decimal point
|Marks position for a comma
Output on the screen
The formatted value of <SayExpr> is displayed on the screen by default. The display color is either the color value specified in the option COLOR or is the default color of SetColor(). The display occurs at the coordinates <nRow> and <nCol> and after the display, the values of the functions Row() and Col() are updated. The cursor appears immediately after the last output character. When characters extend past the screen margin, the cursor position is outside of the visible display area.
Output to the printer
The command SET DEVICE TO PRINTER redirects output from @...SAY to the printer. Prior to output, the print head is moved to the coordinates <nRow> and <nCol>. Then the characters of <SayExpr> are sent to the printer and the function values of the functions PRow() and PCol() are updated to correspond with the new print head position. If the value for <nRow> is less the internal row counter of the function PRow(), an automatic form feed occurs before the output (similar to the EJECT command). The print head is then positioned at the start of the page. When the value of <nCol> is less than the internal column counter of the function PCol(), the print head is automatically positioned at the next row prior to output. This automatic behavior can be suppressed by setting the internal counters of PRow() and PCol() to appropriate values with the function SetPrc() before output.
When a left page margin is set with the command SET MARGIN TO, the specified number of characters is added to the value of <nCol>.
The output with @...SAY can be sent to a file if the output device is set with SET DEVICE TO PRINTER and the print output is redirected to a file using SET PRINTER TO <cFileName>.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.