WIDTH: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary Tag: visualeditor-switched |
No edit summary |
||
Line 1: | Line 1: | ||
The | The '''WIDTH''' statement changes the text dimensions of certain '''SCREEN''' modes. | ||
{{PageSyntax}} | |||
: | ;SCREEN: '''WIDTH''' [{{Parameter|columns%}}][, {{Parameter|rows%}}] | ||
;CONSOLE: (Windows Console Only): '''WIDTH''' [{{Parameter|columns%}}][, {{Parameter|rows%}}][{{Parameter|buffer_columns%}}][, {{Parameter|buffer_rows%}}] | |||
;File: '''WIDTH''' {file_number | device}, columnwidth% | |||
{{PageParameters}} | |||
* When parameters are not specified, columns defaults to 80 with 25 (30 in [[SCREEN]] 11 or 12) rows. | * When parameters are not specified, columns defaults to 80 with 25 (30 in [[SCREEN]] 11 or 12) rows. | ||
'' | {{PageDescription}} | ||
* '''WIDTH''' should be used after a program [[SCREEN]] statement. It does not affect screen graphics or graphic coordinates. | |||
* Affects SCREEN 0 Window size and alters the text block size of each screen mode listed in QBasic: | * Affects SCREEN 0 Window size and alters the text block size of each screen mode listed in QBasic: | ||
:* SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is WIDTH 80, 25. | :* SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is '''WIDTH''' 80, 25. | ||
:* SCREEN 9 can use 80 columns and 25 or 43(not supported on many monitors) rows. Default WIDTH 80, 25 fullscreen. | :* SCREEN 9 can use 80 columns and 25 or 43(not supported on many monitors) rows. Default '''WIDTH''' 80, 25 fullscreen. | ||
:* SCREEN 10 can use 80 columns and 25 or 43 rows. Default is WIDTH 80, 25 fullscreen. | :* SCREEN 10 can use 80 columns and 25 or 43 rows. Default is '''WIDTH''' 80, 25 fullscreen. | ||
:* SCREEN 11 and 12 can use 80 columns and 30 or 60 rows. Default is WIDTH 80, 30 fullscreen. | :* SCREEN 11 and 12 can use 80 columns and 30 or 60 rows. Default is '''WIDTH''' 80, 30 fullscreen. | ||
* '''QB64''' can alter all [[SCREEN]] mode widths and heights which may also affect text or [[_FONT]] block sizes. | * '''QB64''' can alter all [[SCREEN]] mode widths and heights which may also affect text or [[_FONT]] block sizes. | ||
* If a [[$CONSOLE]] window is active and you set [[_DEST]] [[_CONSOLE]], WIDTH will affect the console output window size (Windows only), with the last two optional parameters setting the buffer size for the console. (For example, you can set a console to be 80 characters x 25 lines for the display, with a buffer size of 300 characters and 100 lines, which allows you to display that much information and navigate the visible display with the scroll bars.) | * If a [[$CONSOLE]] window is active and you set [[_DEST]] [[_CONSOLE]], '''WIDTH''' will affect the console output window size (Windows only), with the last two optional parameters setting the buffer size for the console. (For example, you can set a console to be 80 characters x 25 lines for the display, with a buffer size of 300 characters and 100 lines, which allows you to display that much information and navigate the visible display with the scroll bars.) | ||
;Note: '''WIDTH''' changes may change screen color settings in QBasic. Use [[PALETTE]] to reset to default colors. | |||
:WIDTH LPRINT is not supported in QB64. | |||
Revision as of 21:03, 3 September 2022
The WIDTH statement changes the text dimensions of certain SCREEN modes.
Syntax
- SCREEN
- WIDTH [columns%][, rows%]
- CONSOLE
- (Windows Console Only): WIDTH [columns%][, rows%][buffer_columns%][, buffer_rows%]
- File
- WIDTH {file_number | device}, columnwidth%
Parameters
- When parameters are not specified, columns defaults to 80 with 25 (30 in SCREEN 11 or 12) rows.
Description
- WIDTH should be used after a program SCREEN statement. It does not affect screen graphics or graphic coordinates.
- Affects SCREEN 0 Window size and alters the text block size of each screen mode listed in QBasic:
- SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is WIDTH 80, 25.
- SCREEN 9 can use 80 columns and 25 or 43(not supported on many monitors) rows. Default WIDTH 80, 25 fullscreen.
- SCREEN 10 can use 80 columns and 25 or 43 rows. Default is WIDTH 80, 25 fullscreen.
- SCREEN 11 and 12 can use 80 columns and 30 or 60 rows. Default is WIDTH 80, 30 fullscreen.
- QB64 can alter all SCREEN mode widths and heights which may also affect text or _FONT block sizes.
- If a $CONSOLE window is active and you set _DEST _CONSOLE, WIDTH will affect the console output window size (Windows only), with the last two optional parameters setting the buffer size for the console. (For example, you can set a console to be 80 characters x 25 lines for the display, with a buffer size of 300 characters and 100 lines, which allows you to display that much information and navigate the visible display with the scroll bars.)
- Note
- WIDTH changes may change screen color settings in QBasic. Use PALETTE to reset to default colors.
- WIDTH LPRINT is not supported in QB64.
See also
- SCREEN, COLOR, OUT
- _PRINTWIDTH (function)
- _WIDTH (function), _HEIGHT (function)
- _FONT, _FONTWIDTH, _FONTHEIGHT