Futurebasic/Language/Reference/print

Revised
May 5, 2000 (Release 3)

Description
Use this statement to put text out to the current window or to the currently 'd device. The text is printed using the window's or printer's current font ID, font size, text style, text mode and foreground color (see the,  and   statements). The parameters are interpreted as follows:

When the item to be printed is a point, FB makes special provisions during the print process.

The output looks like this

¥ This specifies where the first printed character should appear within the window or the printed page. If you use the variant, then   and   represent the text column and row where the first character should appear; the exact pixel location depends on the current font ID and font size. If you use the  variant, then   and  represent horizontal and vertical pixel positions; the first printed character is positioned with its lower-left corner at point. If you don't specify either variant, printing begins at the window's or printer's current pen position.

¥ This can be any of the following:

"Image Was Here

¥ You must use a comma or a semicolon to separate each pair of  's; you can also optionally put a comma or semicolon at the end of the   statement (following the last  ).

A comma causes space characters to be printed until the total number of characters on the line is a multiple of the current "tab field width." The default tab field width is 16; you can set it to other values using the  statement. Commas are usually used to help line up several lines of text into neat columns, or just to put some space between consecutive 's.

A semicolon does not cause any spaces to be inserted between consecutive 's. Use this when you want  's to be printed as close together as possible.

Normally,  moves the pen down to the beginning of the next line after the last   is printed. However, if you put a comma or a semicolon at the end of the  statement, the pen remains to the right of the last , and is not moved down to the next line. This allows you to continue printing on the same line using a subsequent  statement.

Note that you can use  without any parameters, like this:

This simply causes the pen to move down to the beginning of the next line; it effectively "prints" a carriage-return character. This is useful for putting blank line(s) between other lines of text.

Line wrap, scrolling and page-eject By default, if the 's reach the right edge of the window or the printer page, the   statement automatically "wraps the line"; that is, it moves the pen down to the beginning of the next line to continue printing the remaining  's. However, this behavior can be altered using the   statement; see the   statement for more information.

If you're printing to a window, and the  statement causes the pen to move below the bottom of the window, the window's contents are scrolled up so that the newly printed text will be visible.

If you're printing to the printer, and the  statement causes the pen to move below the bottom of the printer page, the page is ejected and printing continues at the top of the next page.

FB Lite behavior: When you use the "FB Lite" runtime,  behaves as follows:

 The [ ] parameters are ignored.

switches to the Text Window before printing (unless output has been routed to the printer or  is used). You can use  to display text in the Graphics Window at an exact pixel position. Text printing will continue in the graphics window until a carriage return is encountered. You may suppress carriage returns using the semicolon character.

The  statement has no effect. always wraps the line at the right edge of the window (or the printer page).

 Note: Text which is displayed using the  statement is not automatically refreshed, unless you're using the "FB Lite" runtime. To display text which is automatically refreshed, consider using Edit Fields (see the  statement).