1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00

Removing other files causing build to fail.

This commit is contained in:
Cory Smith 2022-12-24 19:50:16 -06:00
parent 648a798a5a
commit 30b50c5658
4 changed files with 0 additions and 401 deletions

View file

@ -1,49 +0,0 @@
The **PRINT #, USING** statement is used to [PRINT](PRINT) formatted text data to a file.
## Syntax
> **PRINT *filenumber%,*** [*text$*{;|,}] **USING *template$*; *variable***[; ...][{;|,}]
## Parameter(s)
* [INTEGER](INTEGER) *filenumber* refers to the file number [OPEN](OPEN)ed previously followed by a [comma](comma).
* Literal or variable [STRING](STRING) *text$* can be placed between PRINT and USING or it can be included in the *template*.
* A [semicolon](semicolon) or [comma](comma) may follow the *text* to stop or tab the print cursor before the *template* [PRINT](PRINT).
* The literal or variable [STRING](STRING) *template* should use the template symbols to display each variable [Variable Types](Variable-Types) in the list following it.
* The list of data *variables* used in the *template* are **separated by semicolons** after the template string value.
* In **QB64** ONE [semicolon](semicolon) or [comma](comma) may follow the variable list to stop the print cursor for pending prints. QB only allowed a semicolon.
## Usage
* **If the *template* string is omitted or symbols don't match the *variable(s)* an "Illegal Function Call" [ERROR Codes](ERROR-Codes) will occur!**
* The list of data variables used in the template are **separated by semicolons** after the template string value.
* The variables should be listed in the order that they are used in the template from left to right.
* Normal text is allowed in the template also (see example).
* **NOTE:** If the numerical value exceeds the template's integer digit range a % symbol will appear in the leftmost digit area.
* **WARNING: The numbers displayed are rounded so the actual values are never changed and are actually more accurate.**
Template is a literal or variable [string](STRING) using the following formatting characters:
| & | Prints an entire string value. STRING length should be limited as template width will vary. |
| -- | -- |
| \  \ | Denotes the start and end point of a fixed string area with spaces between(LEN = spaces + 2). |
| ! | Prints only the leading character of a string value. Exclamation points require underscore prefix. |
| # | Denotes a numerical digit. An appropriate number of digits should be used for values received. |
| ^^^^ | After # digits prints numerical value in exponential E+xx format. Use ^^^^^ for E+xxx values.* |
| . | Period sets a number's decimal point position. Digits following determine rounded value accuracy. |
| ,. | Comma to left of decimal point, prints a comma every 3 used # digit places left of the decimal point. |
| + | Plus sign denotes the position of the number's sign. + or - will be displayed. |
| - | Minus sign (dash) placed after the number, displays only a negative value's sign. |
| $ | Prints a dollar sign immediately before the highest non-zero # digit position of the numerical value. |
| ** | Prints an asterisk in any leading empty spaces of a numerical value. Adds 2 extra digit positions. |
| **$ | Combines ** and $. Negative values will display minus sign to left of $. |
| _ | Underscore preceding a format symbol prints those symbols as literal string characters. |
**Note: Any string character not listed above will be printed as a literal text character.**
* Any # decimal point position may be specified. The exponent is adjusted with significant digits left-justified.
## See Also
* [PRINT USING](PRINT-USING), [PRINT (file statement)](PRINT-(file-statement))
* [LPRINT USING](LPRINT-USING)

View file

@ -1,133 +0,0 @@
The [PRINT USING](PRINT-USING) statement is used to [PRINT](PRINT) formatted data to the Screen or a file using a [STRING](STRING) template.
## Syntax
> **PRINT** [*text$*{;|,}] **USING** *template$*; *variable*[; ...][{;|,}]
## Parameter(s)
* Literal or variable [STRING](STRING) *text$* can be placed between PRINT and USING or it can be included in the *template*.
* A [semicolon](semicolon) or [comma](comma) may follow the *text* to stop or tab the print cursor before the *template* [PRINT](PRINT).
* The literal or variable [STRING](STRING) *template* should use the template symbols to display each variable [Variable Types](Variable-Types) in the list following it.
* The list of data *variables* used in the *template* are separated by semicolons after the template string value.
* In QB64 one [semicolon](semicolon) or [comma](comma) may follow the variable list to stop the print cursor for pending prints. QB only allowed a semicolon.
## Description
* The *variables* should be listed in the order that they are used in the template from left to right.
* If the *template* string is omitted or symbols don't match the *variable(s)* an "Illegal Function Call" [ERROR Codes](ERROR-Codes) will occur.
* Can convert numerical exponential or [scientific notation](scientific-notation) values to normal decimal point values using less digits.
* NOTE: If the numerical value exceeds the template's digit range a % symbol will appear in the leftmost digit area.
* WARNING: The numbers displayed are rounded so the actual values are never changed and are actually more accurate.
Template is a literal or variable [string](STRING) using the following formatting characters:
| & | Prints an entire string value. STRING length should be limited as template width will vary. |
| -- | -- |
| \  \ | Denotes the start and end point of a fixed string area with spaces between(LEN = spaces + 2). |
| ! | Prints only the leading character of a string value. Exclamation points require underscore prefix. |
| # | Denotes a numerical digit. An appropriate number of digits should be used for values received. |
| ^^^^ | After # digits prints numerical value in exponential E+xx format. Use ^^^^^ for E+xxx values.* |
| . | Period sets a number's decimal point position. Digits following determine rounded value accuracy. |
| ,. | Comma to left of decimal point, prints a comma every 3 used # digit places left of the decimal point. |
| + | Plus sign denotes the position of the number's sign. + or - will be displayed. |
| - | Minus sign (dash) placed after the number, displays only a negative value's sign. |
| $ | Prints a dollar sign immediately before the highest non-zero # digit position of the numerical value. |
| ** | Prints an asterisk in any leading empty spaces of a numerical value. Adds 2 extra digit positions. |
| **$ | Combines ** and $. Negative values will display minus sign to left of $. |
| _ | Underscore preceding a format symbol prints those symbols as literal string characters. |
**Note: Any string character not listed above will be printed as a literal text character.**
* Any # decimal point position may be specified. The exponent is adjusted with significant digits left-justified.
## QBasic
* QBasic limited the number of specified digit positions to 24; QB64 has no such restriction.
## Example(s)
Printing formatted data using a predefined [STRING](STRING) template variable.
```vb
first$ = "Bobby": last$ = "Smith"
boxes% = 1510: sales! = 4530
tmp$ = "Salesperson: & & #####,. $$#####,.##"
PRINT USING tmp$; first$; last$; boxes%; sales!
```
```text
Salesperson: Bobby Smith 1,510 $4,530.00
```
*Explanation:* The *Salesperson:* text precedes the formatted data. The name lengths will change the length of the string template accordingly so columns will not all line up. If \ \ was used, the columns would stay the same, but parts of some names might be lost. If the box or sales values exceed 3 digits, a comma is used in the value every 3 digits.
How to display formatting symbols as normal text using underscores in a PRINT USING template.
```vb
errcode = 35
PRINT USING "Error ## occurred!"; errcode
'the ! is now displayed at the end of the printed string
PRINT USING "Error ## occurred_!"; errcode
```
```text
Error 35 occurred
Error 35 occurred!
```
> *Explanation:* The first template will not print the exclamation points or error when the requested text parameters are omitted.
Exponential notation is designated after the leading digits are formatted. Digit places determine rounded value displayed.
```vb
PRINT USING "##.##^^^^"; 234.56
PRINT USING ".####^^^^-"; -777777
PRINT USING "+.##^^^^"; 123
PRINT USING "+.##^^^^^"; 123
```
```text
2.35E+02
.7778E+06-
+.12E+03
+.12E+003
```
> *Explanation:* Note how 5 carets in the bottom format expands the number of exponent digits to accommodate larger exponent values.
USING does not necessarily have to immediately follow PRINT, but it must follow it in the code line.
```vb
money = 12345.45
tmp$ = "$$#######,.##"
PRINT "I have this much money!"; USING tmp$; money
```
```text
I have this much money! $12,345.45
```
> *Note:* This can also be used to print the USING formatting characters outside of the template.
## See Also
* [PRINT](PRINT), [PRINT USING (file statement)](PRINT-USING-(file-statement))
* [LPRINT](LPRINT), [LPRINT USING](LPRINT-USING)

View file

@ -1,177 +0,0 @@
The [SCREEN](SCREEN) statement sets the video display mode and size of the program window's workspace.
## Syntax
> **SCREEN** {*mode%*|*imagehandle&*} [, , active_page, visual_page]
## Parameter(s)
* The SCREEN *mode* [INTEGER](INTEGER) values available today are 0 to 2 and 7 to 13 listed below.
* **QB64** can use a [LONG](LONG) [_NEWIMAGE](_NEWIMAGE) page or [_LOADIMAGE](_LOADIMAGE) file *image handle* value instead.
* The empty comma disables color when any value is used. **DO NOT USE!** Include the comma ONLY when using page flipping.
* If the SCREEN mode supports pages, the *active page* is the page to be worked on while *visual page* is the one displayed.
## Usage
* No SCREEN statement in a program defaults to [SCREEN](SCREEN) 0 text ONLY mode.
* A SCREEN statement that changes screen modes also clears the screen like [CLS](CLS). Nothing on the screen is retained.
* Some screen mode text sizes are adjustable with [WIDTH](WIDTH) and all **QB64** screens support [PCOPY](PCOPY) and page flipping.
```text
**LEGACY SCREEN MODES AT A GLANCE**
**Screen Text Graphics Colors Video Text Default**
**Mode Rows Columns Width Height Attrib. BPP Pages Block QB64 Font**
0 25/43/50 80/40 No graphics 16/16 DAC 4 0-7 ----- _FONT 16
1 25 40 320 200 16/4 BG 4 none 8 X 8 _FONT 8
2 25 80 640 200 2/mono 1 none 8 X 8 _FONT 8
.................................................................................
7 25 40 320 200 16/16 DAC 4 0-7 8 X 8 _FONT 8
8 25 80 640 200 16/16 4 0-3 8 X 8 _FONT 8
9 25 80 640 350 16/64 DAC 4 0-1 8 X 14 _FONT 14
10 25 80 640 350 4/2 GScale 2 none 8 X 14 _FONT 14
11 30/60 80 640 480 2/mono 1 none 8 X 16 _FONT 16
12 30/60 80 640 480 16/262K 4 none 8 X 16 _FONT 16
13 25 40 320 200 256/65K 8 none 8 X 8 _FONT 8
**QB64 allows video paging and [PCOPY](PCOPY) in ALL screen modes!**
```
## QB64 Custom Screen Modes
> [SCREEN](SCREEN) *imagehandle&* [, , *active_page*, *visual_page*]
> [SCREEN](SCREEN) [_NEWIMAGE](_NEWIMAGE)(*wide&*, *high&*[, {*mode*|*256*|*32*}]) [, , *active_page*, *visual_page*]
> [SCREEN](SCREEN) [_LOADIMAGE](_LOADIMAGE)(*file$*[, {*mode*|*256*|*32*}]) [, , *active_page*, *visual_page*]
* Custom screen modes can be created using a [_NEWIMAGE](_NEWIMAGE) or [_LOADIMAGE](_LOADIMAGE) function *imagehandle* return value.
* **QB64** screen modes 0 to 2 and 7 to 13 can be emulated with the same color depth and text block size and different dimensions.
* [_NEWIMAGE](_NEWIMAGE) screens can be any set size. A screen mode can be emulated or 256 or 32 bit colors can be designated.
* The [_LOADIMAGE](_LOADIMAGE) screen size will be the size of the image loaded. Can designate a *mode* or 256 or 32 bit colors.
* **QB64** allows page flipping or a [PCOPY](PCOPY) in ANY SCREEN mode. [_DISPLAY](_DISPLAY) can also be used to reduce flickering in animations.
* All SCREEN modes are Windows in QB64. Use [_FULLSCREEN](_FULLSCREEN) to set the window area to full screen.
* [_SCREENMOVE](_SCREENMOVE) can position a window or the _MIDDLE option can center it on the desktop.
## Legacy Screen Modes
* **[SCREEN](SCREEN) 0** (default mode) is a **text only** screen mode. 64 (VGA) colors with hi-intensity(blinking) colors 16 to 31. ([DAC](DAC) attrib 6, 8 to 15). 8 Background colors intensities only(0 - 7). No graphics are possible! Normally runs in a window. ALT-Enter switches from a window to fullscreen. To automatically run in **QBasic** fullscreen, use another Screen mode before using SCREEN 0. Can use PCOPY with video pages 0 to 7. Text is 25, 43 or 50 rows by 40 or 80 columns. Default is 25 by 80. See WIDTH.
> **Note:** Use [OUT](OUT) or [_PALETTECOLOR](_PALETTECOLOR) to create higher intensity color backgrounds than [COLOR](COLOR) , 7.
> **All other available [SCREEN](SCREEN) modes can use text and graphics and are fullscreen in QBasic ONLY.**
* **[SCREEN](SCREEN) 1** has 4 background color attributes. 0 = black, 1 = blue, 2 = green, 3 = grey. White foreground only. Text is 25 by 40. White graphics is 320 by 200.
* **[SCREEN](SCREEN) 2** is **monochrome** with black background and white foreground. Text is 25 by 80. White graphics 640 by 200.          NO [COLOR](COLOR) keyword allowed.
* **[SCREEN](SCREEN) 3 to 6 are no longer supported** on most computers! Using them will cause a video [ERROR Codes](ERROR-Codes)!
* **[SCREEN](SCREEN) 7** has 16 color attributes ([DAC](DAC) attrib. 8 to 15) with background colors. Text 25 rows by 40 columns. Graphics 320 columns by 200 rows. Video pages 0 to 7 for flipping or PCOPY.
* **[SCREEN](SCREEN) 8** has 16 color attributes with background. Text is 25 by 80. Graphics is 640 by 200. Video pages 0 to 3.
* **[SCREEN](SCREEN) 9** has 64 DAC color hues for ([DAC](DAC) attrib. 6, 8 to 15) with background colors. Text is 25 by 80. Graphics is 640 by 350. Video pages 0 and 1 for flipping or PCOPY.
* **[SCREEN](SCREEN) 10** has 4 gray scale color attributes with black background. 1 = normal white, 2 = blinking white and 3 = bright white. Text is 25 by 80. Graphics is 640 by 350.
* **[SCREEN](SCREEN) 11** is **monochrome** with black background and white foreground. Text is 30 or 60 by 80 columns(see WIDTH). White graphics is 640 by 480. NO [COLOR](COLOR) keyword allowed.
* **[SCREEN](SCREEN) 12** has 16 color attributes, black background. 256K possible color hues. Text is 30 or 60 by 80 columns(see WIDTH). Graphics 640 by 480.
* **[SCREEN](SCREEN) 13** has 256 color attributes, black background. 256K possible color hues. Text is 25 by 40. Graphics is 320 by 200.
* **[SCREEN](SCREEN) [_NEWIMAGE](_NEWIMAGE)**(wide&, deep&, mode%) can imitate any size screen mode or use 32 bit or 256 color modes in **QB64**.
* **[SCREEN](SCREEN) [_LOADIMAGE](_LOADIMAGE)**(imagehandle&, colors) can load a program screen of an image file handle in **QB64** using 256 or 32 bit.
**QB64 can use page flipping with any number of pages in any screen mode!**
## Text and Graphics
> **Text Coordinates:**
* Are a minimum of 1 and the values given above are the maximums. [LOCATE](LOCATE) 1, 1 is the top left [SCREEN](SCREEN) text position.
* Text characters occupy a certain sized pixel box adjusted by [WIDTH](WIDTH) in some screen modes.
* Text [PRINT](PRINT) cursor positions can be read by CSRLIN and POS(0) to [LOCATE](LOCATE) text [PRINT](PRINT)s.
* [VIEW PRINT](VIEW-PRINT) can be used to designate a text view port area.
* In **QB64** the [_WIDTH (function)](_WIDTH-(function)) and [_HEIGHT](_HEIGHT) functions will return the text dimensions in SCREEN 0 only.
> **Graphic Coordinates:**
* The minimum on screen graphics pixel coordinates are 0 for columns and rows in the top left corner.
* Maximum pixel coordinates are one less than the maximum dimensions above because the pixel count starts at 0.
* Graphic objects such as [PSET](PSET), [PRESET](PRESET), [LINE](LINE), [CIRCLE](CIRCLE) and [DRAW](DRAW) can be placed partially off of the screen.
* [GET (graphics statement)](GET-(graphics-statement)) and [PUT (graphics statement)](PUT-(graphics-statement)) screen image operations MUST be located completely on the screen in QBasic!
* [VIEW](VIEW) can be used to designate a graphic view port area of the screen.
* [WINDOW](WINDOW) can be used to set the graphics SCREEN coordinates to almost any size needed. Use the SCREEN option for normal row coordinate values. Row coordinates are Cartesian(decrease in value going down the screen) otherwise.
* In **QB64** the [_WIDTH (function)](_WIDTH-(function)) and [_HEIGHT](_HEIGHT) functions will return the graphic pixel dimensions in SCREENs other than 0.
> **QB64 Screen Statements and Functions:**
* For file image screens that adopt the image dimensions and image color settings use: [_LOADIMAGE](_LOADIMAGE)
* To create custom sized screen modes or pages and 256 or 32 bit colors use: [_NEWIMAGE](_NEWIMAGE)
* [_PUTIMAGE](_PUTIMAGE) can stretch or reduce the size of images to fit the SCREEN size.
* [PUT (graphics statement)](PUT-(graphics-statement)) can use [_CLIP](_CLIP) to set objects partially off screen. [GET (graphics statement)](GET-(graphics-statement)) can read objects off screen as a color in QB64 ONLY.
* A [_DISPLAY](_DISPLAY) statement can be used to only display an image after changes instead of using page flipping or [PCOPY](PCOPY).
* The current desktop screen resolution can be found using the [_SCREENIMAGE](_SCREENIMAGE) handle value with [_WIDTH (function)](_WIDTH-(function)) and [_HEIGHT](_HEIGHT).
* **NOTE: Default 32 bit backgrounds are clear black or [_RGBA](_RGBA)(0, 0, 0, 0)! Use [CLS](CLS) to make the black opaque!**
## Example(s)
> *Example 1:* Shows an example of each legacy screen mode available to QBasic and QB64.
```vb
SCREEN 0
PRINT "This is SCREEN 0 - only text is allowed!"
FOR S = 1 TO 13
IF S < 3 OR S > 6 THEN
DO: SLEEP: LOOP UNTIL INKEY$ <> ""
SCREEN S
PRINT "This is SCREEN"; S; " - can use text and graphics!"
IF S = 2 OR S = 11 THEN PRINT "Monochrome - no COLOR statements!"
IF S = 10 THEN
COLOR 2: PRINT "This SCREEN has only 4 colors. Black and 3 white: 2 blinks.
CIRCLE (100,100), 50, 2
ELSE : CIRCLE (100,100), 100, S
END IF
END IF
NEXT
SLEEP
SYSTEM
```
```text
This is SCREEN 0 - only text is allowed!
```
> Displays each SCREEN mode one at a time with a CIRCLE (except for SCREEN 0)
## See Example(s)
* [SAVEIMAGE](SAVEIMAGE) (QB64 Image to Bitmap SUB by Galleon)
* [Program ScreenShots](Program-ScreenShots) (Member program for legacy screen modes)
* [ThirtyTwoBit SUB](ThirtyTwoBit-SUB) (QB64 Image area to bitmap)
* [SelectScreen](SelectScreen) (Member Screen mode selection function)
* [ScreenMode](ScreenMode) (Member function to find current Screen mode)
## See Also
* [COLOR](COLOR), [CLS](CLS), [WIDTH](WIDTH)
* [_NEWIMAGE](_NEWIMAGE), [_LOADIMAGE](_LOADIMAGE), [_SCREENIMAGE](_SCREENIMAGE)
* [_LOADFONT](_LOADFONT), [_FONT](_FONT)
* [_DISPLAY](_DISPLAY), [_COPYIMAGE](_COPYIMAGE), [_SCREENMOVE](_SCREENMOVE)
* [_SCREENHIDE](_SCREENHIDE), [_SCREENSHOW](_SCREENSHOW), [_SCREENICON](_SCREENICON)
* [PALETTE](PALETTE), [OUT](OUT), [PCOPY](PCOPY),
* [GET (graphics statement)](GET-(graphics-statement)), [PUT (graphics statement)](PUT-(graphics-statement)) (graphics)
* [VIEW](VIEW), [WINDOW](WINDOW) (graphic viewport), [VIEW PRINT](VIEW-PRINT) (text view port)
* [SCREEN (function)](SCREEN-(function)) (text only), [POINT](POINT) (graphic pixel colors)
* [Screen Memory](Screen-Memory), [Screen Saver Programs](Screen-Saver-Programs)
* [_CONSOLE](_CONSOLE)

View file

@ -1,42 +0,0 @@
The WRITE statement writes a [comma](comma)-separated list of values to the screen without spacing.
## Syntax
> WRITE [expression, List]
## Description
* expressionList is a comma-separated list of variable or literal values to be written to the screen.
* Write statement separates displayed values using [comma](comma) separators(required) that will display on the screen.
* Leading and trailing number spaces are omitted when displaying numerical values.
* [STRING](STRING) [quotation mark](quotation-mark)s will also be displayed.
* [Semicolon](Semicolon)s cannot be used in or following the WRITE statement!
## Example(s)
Comparing WRITE to the same PRINT statement.
```vb
a% = 123
b$ = "Hello"
c! = 3.1415
PRINT a%, b$, c! 'commas display tab spaced data
WRITE a%, b$, c! 'displays commas between values, strings retain end quotes
```
```text
123        Hello      3.1415
123,"Hello",3.1415
```
## See Also
* [WRITE (file statement)](WRITE-(file-statement))
* [INPUT (file statement)](INPUT-(file-statement))
* [PRINT](PRINT), [PRINT (file statement)](PRINT-(file-statement))
* [PRINT USING](PRINT-USING)