Changing SCREEN mode affects screen width only when moving between SCREEN 2 and SCREEN 1 or SCREEN 0.
Changing the screen width clears the screen and sets the border screen color to black.
Changing Line printer Width
The following WIDTH statement is used as a deferred width assignment for the line printer. This statement stores the new width value without actually changing the current width setting:
WIDTH "LPT1:", size
A statement of the following form recognizes this stored width value:
OPEN "LPT1:" FOR OUTPUT AS number
and uses it while the file is open:
WIDTH file number, size
If the file is open to lpt1:, line printer width is immediately changed to the new size specified. This allows the width to be changed at will while the file is open. This form of WIDTH has meaning only for lpt1:. After outputting the indicated number of characters from the open file, GW-BASIC inserts a carriage return at the end of the line and wraps the output, if the width is less than the length of the record.
Valid widths for the line printer are 1 through 255.
Specifying WIDTH 255 for the line printer (lpt1:) enables line wrapping. This has the effect of infinite width.
Any value entered outside of these ranges results in an "Illegal function call" error. The previous value is retained.
Using the WIDTH statement on a communications file causes a carriage return to be sent after the number of characters specified by the size attribute. It does not alter either the receive or transmit buffer.
10 WIDTH "LPT1:", 75
20 OPEN "LPT1:" FOR OUTPUT AS #1
6020 WIDTH #1, 40
Line 10 stores a line printer width of 75 characters per line.
Line 20 opens file #1 to the line printer and sets the width to 75 for subsequent PRINT #1, statements.
Line 6020 changes the current line printer width to 40 characters per line.
All Frank Sinatra recordings, All Beatles albums, All solo albums from John Lennon, Paul McCartney, George Harrison and Ringo Starr, All Beatles songs, List of Platinum selling albums, Database with hits from 1950 to 1999.
Sought after DLL files, Nutworks magazine (retro), Worldwide ISO and TLD codes, File extensions database, The Hackers dictionary, Free software for the Atari, Amiga and Macintosh, Nokia smartphone, PocketPC, List of all BASIC programming language commands, List of all DOS commands, Free Advanced Bash-Scripting Guide (Linux-Unix)