1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00

Update help files

Help file snapshot as of 07/31/2022.
This commit is contained in:
Roland Heyder 2022-07-31 23:57:56 +02:00
parent 4952f1b873
commit 6912727753
625 changed files with 4514 additions and 5062 deletions

View file

@ -1,29 +1,30 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:06:28}}
This metacommand enables debug tests with the [[_ASSERT]] statement.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:36:10}}
The '''$ASSERTS''' [[metacommand]] enables debug tests with the [[_ASSERT]] macro.
{{PageSyntax}}
:[[$ASSERTS]][:CONSOLE]
: '''$ASSERTS'''
: '''$ASSERTS:CONSOLE'''
{{PageDescription}}
* The metacommand does not require a comment or [[REM]] before it. There is no space after the colon.
* If this metacommand is used in a program and any of the set [[_ASSERT]] checkpoints will fail, then the program will stop with an '''{{Text|_ASSERT failed|#fc5454}}''' error.
* Detailed error messages passed to the [[_ASSERT]] statement will be displayed in the console window, but only if [[$ASSERTS|$ASSERTS:CONSOLE]] is used.
* This metacommand does not require a comment ''[[Apostrophe|']]'' or [[REM]] before it. There is no space between the metacommand name, the colon and the CONSOLE parameter.
* If this metacommand is used in a program and any of the set [[_ASSERT]] checkpoints will fail, then the program will stop with an '''{{Text|_ASSERT failed|red}}''' error.
* Detailed error messages passed to the [[_ASSERT]] statement will be displayed in the console window, but only if '''$ASSERTS:CONSOLE''' is used.
;Note: This metacommand is the main switch to enable debug tests during development. Later just remove this metacommand to compile the program without debugging code, all the [[_ASSERT]] statements may remain in the code for later debugging sessions, they are simply ignored without this metacommand.
{{PageAvailability}}
* '''QB64 1.4 and up''' (QB64 Team)
* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
* '''QB64 v1.4 and up''' (QB64 Team)
* '''QB64-PE v0.5 and up''' (QB64 Phoenix Edition)
{{PageExamples}}
;Example:Adding test checks for parameter inputs in a function.
{{CodeStart}}
{{Cl|$ASSERTS}}:CONSOLE
{{Cl|$ASSERTS|$ASSERTS:CONSOLE}}
{{Cl|DO}}
a = {{Cl|INT}}({{Cl|RND}} * 10)
@ -43,6 +44,7 @@ This metacommand enables debug tests with the [[_ASSERT]] statement.
{{PageSeeAlso}}
* [[Metacommand]]
* [[_ASSERT]]
* [[$CHECKING]]
* [[Relational Operations]]
@ -51,3 +53,4 @@ This metacommand enables debug tests with the [[_ASSERT]] statement.
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:06:53}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:36:34}}
The [[$CHECKING]] metacommand turns C++ event checking ON or OFF.
@ -27,3 +27,4 @@ The [[$CHECKING]] metacommand turns C++ event checking ON or OFF.
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:07:06}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:36:45}}
[[$COLOR]] is a metacommand that adds named color [[CONST|constants]] in a program.
@ -12,13 +12,14 @@
* [[$COLOR]]:0 adds [[CONST|constants]] for colors 0-15. The actual constant names can be found in the file '''source/utilities/color0.bi'''.
* [[$COLOR]]:32 adds [[CONST|constants]] for 32-bit colors, similar to HTML color names. The actual constant names can be found in the file '''source/utilities/color32.bi'''.
* [[$COLOR]] is a shorthand to manually using [[$INCLUDE]] pointing to the files listed above.
* Prior to QBPE v0.5 (ü), [[$COLOR]] was not compatible with [[$NOPREFIX]].
* Prior to QBPE v0.5 ({{Text|ü|red}}), [[$COLOR]] was not compatible with [[$NOPREFIX]].
* Since QBPE v0.5, [[$COLOR]] can now be used with [[$NOPREFIX]], with a few notable differences to three conflicting colors -- Red, Green, Blue.
:Red would conflict with [[_RED]], Green would conflict with [[_GREEN]], and Blue would conflict with [[_BLUE]], once the underscore was removed from those commands with [[$NOPREFIX]].
:
:To prevent these conflicts, the [[COLOR]] values have had '''NP_''' prepended to the front of them, to distinguish them from the non-prefixed command names. All other color names remain the same, with only the three colors in conflict having to use '''NP_''' (for '''N'''o '''P'''refix) in front of them.
(ü) QBPE = QB64 Phoenix Edition
({{Text|ü|red}}) QBPE = QB64 Phoenix Edition
{{PageExamples}}
@ -58,4 +59,3 @@
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:07:11}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:36:50}}
The [[$CONSOLE]] [[Metacommand]] creates a console window that can be used throughout a QB64 program module.
@ -59,7 +59,7 @@ Max hex _INTEGER64 = FFFFFFFFFFFFFFFF with 16 digits =-1
Max _INTEGER64 value = 7FFFFFFFFFFFFFFF with 16 digits
Min _INTEGER64 value = 8000000000000000 with 16 digits
{{OutputEnd}}
: ''Console:'' Right click and select ''Edit'' > ''Select All'' (mouse highlight after) then hit Enter or select ''Edit'' > ''Copy'' to the [[_CLIPBOARD$ (function)|clipboard]].
: ''Console:'' Right click and select ''Edit'' > ''Select All'' (mouse highlight after) then hit Enter or select ''Edit'' > ''Copy'' to the clipboard.
{{TextStart}}Max hex _BYTE = FF with 2 digits = 255
Max hex INTEGER = FFFF with 4 digits = 65535
Max hex LONG = FFFFFFFF with 8 digits = 4294967295
@ -69,6 +69,7 @@ Max hex _INTEGER64 = FFFFFFFFFFFFFFFF with 16 digits =-1
{{PageSeeAlso}}
* [[_CLIPBOARD$]] (function), [[_CLIPBOARD$ (statement)]]
* [[_CONSOLE]]
* [[$SCREENHIDE]], [[$SCREENSHOW]] (QB64 [[Metacommand]]s)
* [[_SCREENHIDE]], [[_SCREENSHOW]]
@ -76,4 +77,3 @@ Max hex _INTEGER64 = FFFFFFFFFFFFFFFF with 16 digits =-1
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:07:28}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:05}}
'''$DEBUG''' is precompiler [[Metacommand|metacommand]], which enables debugging features, allowing you to step through your code running line by line and to inspect variables and change their values in real time.
@ -42,3 +42,4 @@
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,14 +1,14 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:56}}
The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (changeable) arrays.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:02}}
The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (resizable) arrays.
{{PageSyntax}}
:{[[REM]] | ' } [[$DYNAMIC]]
:{[[REM]] | [[apostrophe|']] } [[$DYNAMIC]]
{{PageDescription}}
* QBasic [[Metacommand|metacommands]] require [[REM]] or [[Apostrophe|apostrophe]] (') before them and are always placed at the start of the main module.
* QBasic [[Metacommand|metacommands]] require [[REM]] or [[Apostrophe|apostrophe]] (') before them and are normally placed at the start of the main module.
* Dynamic arrays can be resized using [[REDIM]]. The array's type cannot be changed.
* All data in the array will be lost when [[REDIM]]ensioned except when [[_PRESERVE]] is used.
* [[REDIM]] [[_PRESERVE]] can preserve and may move the previous array data when the array boundaries change.
@ -47,3 +47,4 @@ The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (cha
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,69 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:03}}
'''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing.
{{PageSyntax}}
:[[$IF]] variable = expression THEN
:.
:[[$ELSEIF]] variable = expression THEN
:.
:[[$ELSE]]
:.
:[[$END IF]]
* $IF is the start of a precompiler code block which includes or excludes sections of code from being compiled.
* There is no single line $IF statement. $IF must be in a valid $IF THEN...$END IF block to work properly.
* Like all other metacommands, you can not use more than one metacommand per line. '''Use of : to separate statements in a single line is not allowed.'''
* Variable names can contain numbers, letters, and periods -- in any order.
* Expressions can contain one set of leading and/or trailing quotes; and any number of numbers, letters, and periods, in any order.
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude for us. These are: '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment. '''LINUX''' if the user is running QB64 in a Linux environment. '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment. '''32BIT''' if the user is running a 32-bit version of QB64. '''64BIT''' if the user is running a 64-bit version of QB64.
* [[$END IF]] denotes the end of a valid precompiler $IF block.
* [[$ELSEIF]] must follow a valid $IF or $ELSEIF statement.
* If [[$ELSE]] is used, it must be used as the last conditional check before $END IF. $ELSEIF cannot come after $ELSE.
** There can only be one $ELSE in an '''$IF-$ELSEIF-$ELSE-$END IF''' block, and it must be the last block selection before the $END IF. $ELSEIF cannot follow $ELSE.
{{PageExamples}}
''Example 1:''
{{CodeStart}}
{{Cl|$LET}} ScreenMode = 32
{{Cl|$IF}} ScreenMode = 0 THEN
{{Cl|CONST}} Red = 4
{{Cl|$ELSEIF}} ScreenMode = 32 THEN
{{Cl|CONST}} Red = _RGB32(255,0,0)
{{Cl|$END IF}}
{{Cl|COLOR}} Red
{{Cl|PRINT}} "Hello World"
{{CodeEnd}}
''Explanation:'' The same CONST is defined twice inside the program. Normally, defining a CONST more than once generates an error, but the $IF condition here is choosing which CONST will be inside the final program.
As long as Screenmode is 0, the program will exclude the code where CONST Red is defined as color 4. If Screenmode is 32, CONST Red will be defined as _RGB32(255, 0, 0).
The [[$LET]] and $IF statements let the programmer control the code that actually gets compiled, while excluding the other blocks completely.
''Example 2:''
{{CodeStart}}
{{Cl|$IF}} WIN THEN
{{Cl|CONST}} Slash = "\"
{{Cl|$ELSE}}
{{Cl|CONST}} Slash = "/"
{{Cl|$END IF}}
{{Cl|PRINT}} "The proper slash for your operating system is "; Slash
{{CodeEnd}}
''Explanation:'' For the above, the CONST slash is defined by the automatic internal flags which returns what operating system is being used at compile time. On a Windows PC, the Slash will be the backslash; for any other OS it will be the forward slash.
{{PageSeeAlso}}
* [[$LET]]
* [[Metacommand]]s
{{PageNavigation}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:34}}
See page [[$IF]]
[[Category:Final]]

View file

@ -1,69 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:02}}
'''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing.
{{PageSyntax}}
:[[$IF]] variable = expression THEN
:.
:[[$ELSEIF]] variable = expression THEN
:.
:[[$ELSE]]
:.
:[[$END IF]]
* $IF is the start of a precompiler code block which includes or excludes sections of code from being compiled.
* There is no single line $IF statement. $IF must be in a valid $IF THEN...$END IF block to work properly.
* Like all other metacommands, you can not use more than one metacommand per line. '''Use of : to separate statements in a single line is not allowed.'''
* Variable names can contain numbers, letters, and periods -- in any order.
* Expressions can contain one set of leading and/or trailing quotes; and any number of numbers, letters, and periods, in any order.
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude for us. These are: '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment. '''LINUX''' if the user is running QB64 in a Linux environment. '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment. '''32BIT''' if the user is running a 32-bit version of QB64. '''64BIT''' if the user is running a 64-bit version of QB64.
* [[$END IF]] denotes the end of a valid precompiler $IF block.
* [[$ELSEIF]] must follow a valid $IF or $ELSEIF statement.
* If [[$ELSE]] is used, it must be used as the last conditional check before $END IF. $ELSEIF cannot come after $ELSE.
** There can only be one $ELSE in an '''$IF-$ELSEIF-$ELSE-$END IF''' block, and it must be the last block selection before the $END IF. $ELSEIF cannot follow $ELSE.
{{PageExamples}}
''Example 1:''
{{CodeStart}}
{{Cl|$LET}} ScreenMode = 32
{{Cl|$IF}} ScreenMode = 0 THEN
{{Cl|CONST}} Red = 4
{{Cl|$ELSEIF}} ScreenMode = 32 THEN
{{Cl|CONST}} Red = _RGB32(255,0,0)
{{Cl|$END IF}}
{{Cl|COLOR}} Red
{{Cl|PRINT}} "Hello World"
{{CodeEnd}}
''Explanation:'' The same CONST is defined twice inside the program. Normally, defining a CONST more than once generates an error, but the $IF condition here is choosing which CONST will be inside the final program.
As long as Screenmode is 0, the program will exclude the code where CONST Red is defined as color 4. If Screenmode is 32, CONST Red will be defined as _RGB32(255, 0, 0).
The [[$LET]] and $IF statements let the programmer control the code that actually gets compiled, while excluding the other blocks completely.
''Example 2:''
{{CodeStart}}
{{Cl|$IF}} WIN THEN
{{Cl|CONST}} Slash = "\"
{{Cl|$ELSE}}
{{Cl|CONST}} Slash = "/"
{{Cl|$END IF}}
{{Cl|PRINT}} "The proper slash for your operating system is "; Slash
{{CodeEnd}}
''Explanation:'' For the above, the CONST slash is defined by the automatic internal flags which returns what operating system is being used at compile time. On a Windows PC, the Slash will be the backslash; for any other OS it will be the forward slash.
{{PageSeeAlso}}
* [[$LET]]
* [[Metacommand]]s
{{PageNavigation}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:33}}
See page [[$IF]]
[[Category:Final]]

View file

@ -1,69 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:05}}
'''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing.
{{PageSyntax}}
:[[$IF]] variable = expression THEN
:.
:[[$ELSEIF]] variable = expression THEN
:.
:[[$ELSE]]
:.
:[[$END IF]]
* $IF is the start of a precompiler code block which includes or excludes sections of code from being compiled.
* There is no single line $IF statement. $IF must be in a valid $IF THEN...$END IF block to work properly.
* Like all other metacommands, you can not use more than one metacommand per line. '''Use of : to separate statements in a single line is not allowed.'''
* Variable names can contain numbers, letters, and periods -- in any order.
* Expressions can contain one set of leading and/or trailing quotes; and any number of numbers, letters, and periods, in any order.
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude for us. These are: '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment. '''LINUX''' if the user is running QB64 in a Linux environment. '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment. '''32BIT''' if the user is running a 32-bit version of QB64. '''64BIT''' if the user is running a 64-bit version of QB64.
* [[$END IF]] denotes the end of a valid precompiler $IF block.
* [[$ELSEIF]] must follow a valid $IF or $ELSEIF statement.
* If [[$ELSE]] is used, it must be used as the last conditional check before $END IF. $ELSEIF cannot come after $ELSE.
** There can only be one $ELSE in an '''$IF-$ELSEIF-$ELSE-$END IF''' block, and it must be the last block selection before the $END IF. $ELSEIF cannot follow $ELSE.
{{PageExamples}}
''Example 1:''
{{CodeStart}}
{{Cl|$LET}} ScreenMode = 32
{{Cl|$IF}} ScreenMode = 0 THEN
{{Cl|CONST}} Red = 4
{{Cl|$ELSEIF}} ScreenMode = 32 THEN
{{Cl|CONST}} Red = _RGB32(255,0,0)
{{Cl|$END IF}}
{{Cl|COLOR}} Red
{{Cl|PRINT}} "Hello World"
{{CodeEnd}}
''Explanation:'' The same CONST is defined twice inside the program. Normally, defining a CONST more than once generates an error, but the $IF condition here is choosing which CONST will be inside the final program.
As long as Screenmode is 0, the program will exclude the code where CONST Red is defined as color 4. If Screenmode is 32, CONST Red will be defined as _RGB32(255, 0, 0).
The [[$LET]] and $IF statements let the programmer control the code that actually gets compiled, while excluding the other blocks completely.
''Example 2:''
{{CodeStart}}
{{Cl|$IF}} WIN THEN
{{Cl|CONST}} Slash = "\"
{{Cl|$ELSE}}
{{Cl|CONST}} Slash = "/"
{{Cl|$END IF}}
{{Cl|PRINT}} "The proper slash for your operating system is "; Slash
{{CodeEnd}}
''Explanation:'' For the above, the CONST slash is defined by the automatic internal flags which returns what operating system is being used at compile time. On a Windows PC, the Slash will be the backslash; for any other OS it will be the forward slash.
{{PageSeeAlso}}
* [[$LET]]
* [[Metacommand]]s
{{PageNavigation}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:35}}
See page [[$IF]]
[[Category:Final]]

View file

@ -1,21 +1,21 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:06}}
The [[$ERROR]] metacommand triggers a compilation error.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:38}}
The '''$ERROR''' [[metacommand]] triggers a compilation error.
{{PageSyntax}}
: [[$ERROR]] MESSAGE
: '''$ERROR''' {{Parameter|message}}
{{PageDescription}}
* The Metacommand does '''not''' require a comment or REM before it.
* MESSAGE is any text. Quotation marks are not required.
* When QB64 tries to compile an $ERROR metacommand a compilation error is triggered and MESSAGE is shown to the user. This is useful in [[$IF]] blocks.
* This metacommand does not require a comment ''[[Apostrophe|']]'' or [[REM]] before it.
* {{Parameter|message}} is any text. Quotation marks are not required.
* When QB64 tries to compile an '''$ERROR''' metacommand a compilation error is triggered and {{Parameter|message}} is shown to the user. This is useful in [[$IF]] blocks.
{{PageDescription}}
* If there is a particular situation where you know your program will not work properly, you can prevent the user compiling and give them a helpful error message instead by checking for the condition with [[$IF]].
* An [[$ERROR]] directive not inside an [[$IF]] (or [[$ELSEIF]]) block is useless because the program will never compile.
* An '''$ERROR''' directive not inside an conditional [[$IF]] (or [[$ELSEIF]]) block is useless because the program will '''never''' compile in that case.
{{PageExamples}}
@ -24,7 +24,7 @@ The [[$ERROR]] metacommand triggers a compilation error.
{{Cl|$ERROR}} Requires Windows QB64 version 2.1 or above
{{Cl|$END IF}}
{{CodeEnd}}
''Output'': Compilation check failed: REQUIRES WINDOWS QB64 VERSION 2.1 OR ABOVE on line 2 (assuming your version of QB64 doesn't meet those requirements).
;Output (IDE Status Area):Compilation check failed: REQUIRES WINDOWS QB64 VERSION 2.1 OR ABOVE on line 2 (assuming your version of QB64 doesn't meet those requirements).
{{PageSeeAlso}}
@ -34,3 +34,4 @@ The [[$ERROR]] metacommand triggers a compilation error.
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:10}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:41}}
'''$EXEICON''' pre-compiler metacommand embeds a designated icon file into the compiled EXE file to be viewed in Windows Explorer.
@ -7,7 +7,7 @@
: [[$EXEICON]]:'{{Parameter|iconfile.ico}}'
{{Parameters}}
{{PageParameters}}
* '{{Parameter|iconfile.ico}}' is a valid [https://en.wikipedia.org/wiki/ICO_(file_format) ICO file]
@ -21,7 +21,7 @@
{{PageExamples}}
''Example:'' Embeds a designated icon file into the compiled EXE which can be viewed in Windows Explorer folders.
{{CodeStart}}
{{Cl|$EXEICON}}:'myexe.ico'
{{Cl|$EXEICON}}:'mush.ico'
{{Cl|_ICON}}
{{CodeEnd}}{{small|Code and command by Fellippe Heitor}}
@ -34,3 +34,4 @@
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:38}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:38:06}}
'''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing.
@ -13,12 +13,20 @@
:[[$END IF]]
{{PageDescription}}
* $IF is the start of a precompiler code block which includes or excludes sections of code from being compiled.
* There is no single line $IF statement. $IF must be in a valid $IF THEN...$END IF block to work properly.
* Like all other metacommands, you can not use more than one metacommand per line. '''Use of : to separate statements in a single line is not allowed.'''
* Variable names can contain numbers, letters, and periods -- in any order.
* Expressions can contain one set of leading and/or trailing quotes; and any number of numbers, letters, and periods, in any order.
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude for us. These are: '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment. '''LINUX''' if the user is running QB64 in a Linux environment. '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment. '''32BIT''' if the user is running a 32-bit version of QB64. '''64BIT''' if the user is running a 64-bit version of QB64.
* Variable names can contain numbers, letters and periods, in any order.
* Expressions can contain one set of leading and/or trailing quotes; and any number of numbers, letters and periods, in any order.
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude. These are:
** '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment.
** '''LINUX''' if the user is running QB64 in a Linux environment.
** '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment.
** '''32BIT''' if the user is running a 32-bit version of QB64.
** '''64BIT''' if the user is running a 64-bit version of QB64.
** '''VERSION''', which is set to the version of the QB64 compiler. This is a number and can be ordered, see example below.
* Special values '''DEFINED''' and '''UNDEFINED''' can be used to check whether a precompiler variable has already been assigned a value. Useful for code in libraries which may be repeated.
* [[$END IF]] denotes the end of a valid precompiler $IF block.
* [[$ELSEIF]] must follow a valid $IF or $ELSEIF statement.
* If [[$ELSE]] is used, it must be used as the last conditional check before $END IF. $ELSEIF cannot come after $ELSE.
@ -60,10 +68,22 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall
''Explanation:'' For the above, the CONST slash is defined by the automatic internal flags which returns what operating system is being used at compile time. On a Windows PC, the Slash will be the backslash; for any other OS it will be the forward slash.
''Example 3:''
{{CodeStart}}
{{Cl|$IF}} VERSION < 1.5 THEN
{{Cl|$ERROR}} Requires QB64 version 1.5 or greater
{{Cl|$END IF}}
{{CodeEnd}}
''Explanation:'' VERSION is a predefined variable that holds the QB64 compiler version. If we know our program needs features only available above a certain version, we can check for that and give the user a helpful error message instead of a confusing error elsewhere in the program.
{{PageSeeAlso}}
* [[$LET]]
* [[$ERROR]]
* [[Metacommand]]s
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,10 +1,10 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:39}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:37}}
[[$INCLUDE]] is a metacommand that is used to insert a source code file into your program which is then executed at the point of the insertion.
{{PageSyntax}}
: {[[REM]] | [[REM|']] } $INCLUDE: '{{Parameter|sourceFile}}'
: {[[REM]] | [[apostrophe|']] } [[$INCLUDE]]''':''' '{{Parameter|sourceFile}}'
{{PageDescription}}
@ -43,3 +43,4 @@
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,6 +1,6 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:51}}
[[$LET]] is precompiler command, which is now usable by modern day [[cavemen]] to help include and exclude which sections of code compiles in their program based on OS/bit-size or other predefined conditions.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:38:18}}
[[$LET]] is a precompiler command, which helps to include and/or exclude sections of code in a program based on OS/bit-size or other predefined conditions.
{{PageSyntax}}
@ -10,8 +10,15 @@
{{PageDescription}}
* Unlike [[LET]], [[$LET]] is not optional.
* $LET a = 12 sets a precompiler variable "a" to the value of 12. This variable is only valid for the precompiler itself and does nothing to affect the values of any variable/constant which might also be called "a" in the program.
* Variable names can contain numbers, letters, and periods in any order. [[$LET]] '''3.2 = TRUE''' is a perfectly valid variable and expression.
* Expressions can contain one set of leading and/or trailing quotes; and any number of numbers, letters, and periods, in any order. [[$LET]] '''3.2 = "TRUE"''' is also perfectly valid, but [[$LET]] '''3.2 = ""TRUE""''' will error because of the double quotes.
* Variable names must follow QB64's variable naming conventions.
* You can check a precompiler variable against special values '''DEFINED''' and '''UNDEFINED''', in order to assess whether the variable has already been assigned a value. Useful for code in libraries which may be repeated.
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude. These are:
** '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment.
** '''LINUX''' if the user is running QB64 in a Linux environment.
** '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment.
** '''32BIT''' if the user is running a 32-bit version of QB64.
** '''64BIT''' if the user is running a 64-bit version of QB64.
** '''VERSION''', which is set to the version of the QB64 compiler.
{{PageExamples}}
@ -23,8 +30,8 @@
* [[$ELSE]]
* [[$ELSEIF]]
* [[$END IF]]
* [[Cavemen]]
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:09:37}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:39:01}}
The [[$NOPREFIX]] metacommand allows all QB64 functions and statements to be used without the leading underscore (_).
@ -13,7 +13,8 @@ The [[$NOPREFIX]] metacommand allows all QB64 functions and statements to be use
* If you are writing new code with QB64, and not importing code from QBasic/QuickBASIC 4.5, [[$NOPREFIX]] allows you to reduce typing by not having to use underscores in modern keywords.
* '''SUB _GL''' still must be prefixed.
* When [[$NOPREFIX]] is used, QB64 keywords can be used both with or without the leading underscore, so that both [[_DISPLAY]] and [[_DISPLAY|DISPLAY]] are valid in the same program, for example.
* [[$NOPREFIX]] must be the first line in a program.
* [[$NOPREFIX]] must be the first non-comment and non-whitespace line in a program.
** Since QB64 2.0 respectively QBPE 0.5 [[$NOPREFIX]] can be placed anywhere in a program.
{{PageAvailability}}
@ -28,3 +29,4 @@ The [[$NOPREFIX]] metacommand allows all QB64 functions and statements to be use
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:10:13}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:39:36}}
The [[$RESIZE]] [[Metacommand|metacommand]] determines if a program window can be resized by the user.
@ -14,8 +14,9 @@ The [[$RESIZE]] [[Metacommand|metacommand]] determines if a program window can b
* $RESIZE:SMOOTH the screen will be stretched also, but with linear filtering applied to the pixels.
==Availability==
* '''Version 1.000 and up'''.
{{PageAvailability}}
* '''QB64 1.0 and up''' (QB64 Team)
* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
{{PageExamples}}
@ -115,3 +116,4 @@ DO
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:10:28}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:39:49}}
The [[$SCREENHIDE]] [[Metacommand|metacommand]] can be used to hide the main program window throughout a program.
@ -26,7 +26,7 @@ The [[$SCREENHIDE]] [[Metacommand|metacommand]] can be used to hide the main pro
{{Cl|DIM}} s1 {{Cl|AS}} {{Cl|STRING}}
s0 = "Text" + {{Cl|CHR$}}(0)
s1 = "Caption" + {{Cl|CHR$}}(0)
ExitProcess MessageBoxA(0, {{Cl|_OFFSET (function)|_OFFSET}}(s0), {{Cl|_OFFSET(function)|_OFFSET}}(s1), 0)
ExitProcess MessageBoxA(0, {{Cl|_OFFSET (function)|_OFFSET}}(s0), {{Cl|_OFFSET (function)|_OFFSET}}(s1), 0)
{{CodeEnd}}{{small|Code by Michael Calkins}}
@ -38,3 +38,4 @@ ExitProcess MessageBoxA(0, {{Cl|_OFFSET (function)|_OFFSET}}(s0), {{Cl|_OFFSET(f
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,21 +1,25 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:10:36}}
{{DISPLAYTITLE:_SCREENSHOW}}
The [[_SCREENSHOW]] statement can be used to display the main program window in a section of code.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:39:56}}
The [[$SCREENSHOW]] [[Metacommand|metacommand]] can be used to display the main program window throughout the program.
{{PageSyntax}}
: [[_SCREENSHOW]]
: $SCREENSHOW
{{PageDescription}}
* [[_SCREENHIDE]] or [[$SCREENHIDE]] must be used before _SCREENSHOW or [[$SCREENSHOW]] can be used!
* The metacommand is intended to be used in a modular program when a screen surface is necessary in one or more modules.
* $SCREENSHOW can only be used after [[$SCREENHIDE]] or [[_SCREENHIDE]] have been used in another program module.
* If [[$SCREENHIDE]] and then [[$SCREENSHOW]] are used in the same program module the window will not be hidden.
* '''QB64 [[Metacommand|metacommand]]s cannot be commented out with [[apostrophe]] or [[REM]].'''
{{PageSeeAlso}}
* [[$SCREENHIDE]], [[$SCREENSHOW]], [[$CONSOLE]] (QB64 [[Metacommand]]s)
* [[_SCREENHIDE]], [[_CONSOLE]]
* [[$CONSOLE]], [[$SCREENHIDE]] (QB64 [[Metacommand]]s)
* [[_SCREENHIDE]], [[_SCREENSHOW]]
* [[_CONSOLE]]
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,20 +1,21 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:16:45}}
The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) arrays.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:45:04}}
The [[$STATIC]] [[Metacommand|metacommand]] allows the creation of static (unresizable) arrays.
{{PageSyntax}}
::: REM '''$STATIC'''
:{[[REM]] | [[apostrophe|']] } [[$STATIC]]
{{PageDescription}}
* QBasic [[Metacommand]]s require a REM or apostrophy (') before them and are normally placed at the start of the main module.
* Static arrays cannot be resized. If a variable is used to size any array, it becomes [[$DYNAMIC]].
* A [[REDIM]] statement has no effect on [[$STATIC]] arrays except perhaps a [[ERROR Codes|duplicate definition error]] at the [[REDIM]] code.
* A [[REDIM]] statement has no effect on [[$STATIC]] arrays except perhaps a [[ERROR Codes|duplicate definition error]] at the [[REDIM]] statement.
* The array's type cannot be changed once [[DIM]] and a literal value sets the dimensions and element size.
* [[$STATIC]] defined program [[arrays]] cannot be [[REDIM|re-sized]] or use [[_PRESERVE]].
{{PageExamples}}
''Example:'' When a variable is used, the array can be resized despite $STATIC. The array becomes [[$DYNAMIC]].
{{CodeStart}}
'{{Cl|$STATIC}}
@ -29,10 +30,11 @@ The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) array
: ''Note:'' [[DIM]] using a literal numerical size will create a Duplicate definition error.
''See also:''
{{PageSeeAlso}}
* [[$DYNAMIC]], [[STATIC]]
* [[Arrays]], [[Metacommand]]
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,6 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:32}}
{{DISPLAYTITLE:$VERSIONINFO}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:46}}
The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resulting executable for identification purposes across the OS. Windows-only.
@ -8,15 +7,16 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul
: [[$VERSIONINFO]]:{{Parameter|key}}={{Parameter|value}}
{{Parameters}}
{{PageParameters}}
* Text ''keys'' can be: '''Comments, CompanyName, FileDescription, FileVersion, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, ProductVersion, Web'''
* Numeric {{Parameter|keys}} can be:'''FILEVERSION#''' and '''PRODUCTVERSION#'''
**When provided, the numerical keys '''FILEVERSION#''' and '''PRODUCTVERSION#''' will also provide values to the text keys '''FileVersion''' and '''ProductVersion,''' if the text versions are not provided separately. (Phoenix Edition v0.6.0 and above)
**When provided, the numerical keys '''FILEVERSION#''' and '''PRODUCTVERSION#''' will also provide values to the text keys '''FileVersion''' and '''ProductVersion,''' if the text versions are not provided separately. (QBPE 0.6 and up (QB64 Phoenix Edition))
{{PageDescription}}
* Text and numerical values are string literals without quotes entered by programmer. '''No variables are accepted.''' (variable names would be interpreted as literals).
* Numeric key=''value'' must be 4 comma-separated numerical text values entered by programmer which usually stand for major, minor, revision and build numbers).
* A manifest file is automatically embedded into the resulting .exe file so that Common Controls v6.0 gets linked at runtime, if required.
* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
@ -42,3 +42,4 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,29 +1,31 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:34}}
{{DISPLAYTITLE:$VIRTUALKEYBOARD}}
[DEPRACATED] The [[$VIRTUALKEYBOARD]] [[Metacommand|metacommand]] turns the virtual keyboard ON or OFF.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:48}}
The ({{Text|now deprecated|red}}) '''$VIRTUALKEYBOARD''' [[metacommand]] did turn the virtual keyboard ON or OFF.
{{PageSyntax}}
: [[$VIRTUALKEYBOARD]]:{ON|OFF}
: '''$VIRTUALKEYBOARD:ON'''
: '''$VIRTUALKEYBOARD:OFF'''
{{PageDescription}}
* Places a virtual keyboard on screen, which can be used in touch-enabled devices like Windows tablets.
* Depracated.
* This metacommand did not require a comment ''[[Apostrophe|']]'' or [[REM]] before it. There was no space between the metacommand name, the colon and the ON/OFF parameter.
* It placed a virtual keyboard on screen, which could be used in touch-enabled devices like Windows tablets.
* {{Text|Deprecated|red}}, in all current versions of QB64 it just generates a warning now, but has no other effect anymore.
{{PageExamples}}
{{CodeStart}}
{{Cl|$VIRTUALKEYBOARD}}:ON
{{Cl|$VIRTUALKEYBOARD|$VIRTUALKEYBOARD:ON}}
{{Cl|DO}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
{{CodeEnd}}
{{PageSeeAlso}}
* [[Metacommand]]s
* [[Metacommand]]
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,141 +1,59 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:48}}
The '''&B''' prefix denotes that an integer value is expressed in a binary base 2 format using '''QB64''' only.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:02}}
The [[&B]] prefix denotes that an integer value is expressed in a Binary base 2 format. Every 8 digits represent a [[_BYTE]].
{{PageSyntax}}
:::: a& = '''&B1110110000111111'''
{{PageSyntax}}
: {{Parameter|a&}} = [[&B]]10010110
* The base 2 numbering system uses binary digit values of 1 or 0, or bits on or bits off in computer register switches or memory.
* Leading zero values '''can''' be omitted as they add nothing to the byte return value.
* Eight binary digits would represent a one byte value ranging from 0 to 255. Four digit values("nibbles") range from 0 to 15.
* Decimal values returned can be any '''signed''' [[INTEGER]], [[LONG]] integer, or [[_INTEGER64]] value so use those type of variables when converting directly as shown in the Syntax. The program [[ERROR Codes|"overflow"]] error limits are listed as:
** [[INTEGER]]: 16 binary digits or a decimal value range from -32,768 to 32,767
** [[LONG]]: 32 binary digits or a decimal value range from -2,147,483,648 to 2,147,483,647
** [[_INTEGER64]]: 64 binary digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
* [[LONG]] values can be returned by appending the & or ~%([[_UNSIGNED]] [[INTEGER]]) symbols after the binary number.
* [[VAL]] can be used to convert "&B" prefixed string values to decimal.
<center>'''[[_BIT|BITS]]'''</center>
* The '''MSB''' is the most significant(largest) bit value and '''LSB''' is the least significant bit of a binary or register memory address value. The order in which the bits are read determines the binary or decimal byte value. There are two common ways to read a byte:
:* '''"Big-endian"''': MSB is the first bit encountered, decreasing to the LSB as the last bit by position, memory address or time.
:* '''"Little-endian"''': LSB is the first bit encountered, increasing to the MSB as the last bit by position, memory address or time.
{{WhiteStart}}
'''Offset or Position: 0 1 2 3 4 5 6 7 Example: 11110000'''
---------------------------------- --------
'''Big-Endian Bit On Value:''' 128 64 32 16 8 4 2 1 240
'''Little-Endian Bit On Value:''' 1 2 4 8 16 32 64 128 15
{{WhiteEnd}}
::The big-endian method compares exponents of 2<sup>7</sup> down to 2<sup>0</sup> while the little-endian method does the opposite.
<center>'''[[_BYTE|BYTES]]'''</center>
* [[INTEGER]] values consist of 2 bytes called the '''HI''' and '''LO''' bytes. Anytime that the number of binary digits is a multiple of 16 (2bytes, 4 bytes, etc.) and the HI byte's MSB is on(1), the value returned will be negative. Even with [[SINGLE]] or [[DOUBLE]] values!
{{WhiteStart}} '''16 BIT INTEGER OR REGISTER'''
'''AH (High Byte Bits) AL (Low Byte Bits)'''
BIT: 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0
---------------------------------------|--------------------------------------
HEX: 8000 4000 2000 1000 800 400 200 100 | 80 40 20 10 8 4 2 1
|
DEC: -32768 16384 8192 4096 2048 1024 512 256 | 128 64 32 16 8 4 2 1
{{WhiteEnd}}
::The HI byte's '''MSB''' is often called the '''sign''' bit! When all 16 of the integer binary bits are on, the decimal return is -1.
{{PageDescription}}
* The base 2 numbering system uses binary digit values of 0 and 1 only.
* Leading zero values can be omitted just like in decimal values as they add nothing to the return value.
* Decimal values returned can be any '''signed''' [[INTEGER]], [[LONG]] integer, or [[_INTEGER64]] value so use those type of variables when converting directly as shown above in the Syntax. The program [[ERROR Codes|"overflow"]] error limits are listed as:
:* [[_BYTE]]: 8 binary digits or a decimal value range from -128 to 127. [[_UNSIGNED]]: 0 to 255.
:* [[INTEGER]]: 16 binary digits or a decimal value range from -32,768 to 32,767. [[_UNSIGNED]]: 0 to 65535.
:* [[LONG]]: 32 binary digits or a decimal value range from -2,147,483,648 to 2,147,483,647. [[_UNSIGNED]]: 0 to 4294967295.
:* [[_INTEGER64]]: 64 binary digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
:* [[_UNSIGNED]] [[_INTEGER64]]: 0 to 18446744073709551615.
* The maximum binary value for each numerical type is the maximum number of digits listed above, each valued at '''1'''.
* Convert binary to [[LONG]] values by appending the values with the suffix '''&'''. Example: [[&B]]1000000000000000 = -32768: [[&B]]1000000000000000'''&''' = 32768
* To convert binary strings returned from [[_BIN$]] with [[VAL]] you need to prefix the string with [[&B]] (for example, if the string is "1101" you should do {{InlineCode}}{{Cl|VAL}}("&B1101"){{InlineCodeEnd}} or {{InlineCode}}{{Cl|VAL}}("&B" + binvalue$){{InlineCodeEnd}}.
{{TextStart}} '''Comparing the Base Numbering Systems'''
'''Decimal (base 10) Binary (base 2) Hexadecimal (base 16) Octal (base 8)'''
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7 -- maxed
8 1000 8 10
maxed-- 9 1001 9 11
10 1010 A 12
11 1011 B 13
12 1100 C 14
13 1101 D 15
14 1110 E 16
15 ------------- 1111 <--- Match ---> F ---------------- 17 -- max 2
16 10000 10 20
When the Decimal value is 15, the other 2 base systems are all maxed out!
The Binary values can be compared to all of the HEX value digit values so
it is possible to convert between the two quite easily. To convert a HEX
value to Binary just add the 4 binary digits for each HEX digit place so:
F A C E
&HFACE = 1111 + 1010 + 1100 + 1101 = &B1111101011001101
To convert a Binary value to HEX you just need to divide the number into
sections of four digits starting from the right(LSB) end. If one has less
than 4 digits on the left end you could add the leading zeros like below:
&B101011100010001001 = 0010 1011 1000 1000 1001
hexadecimal = 2 + B + 8 + 8 + 9 = &H2B889
See the Decimal to Binary conversion function that uses '''[[HEX$]]''' on the '''[[&H]]''' page.
{{TextEnd}}
''Example 1:'' A Decimal to Binary [[STRING]] function that does not return leading zeroes.
{{PageExamples}}
;Example 1:The maximum binary values of decimal value -1 in each numerical type are:
{{CodeStart}}
{{Cl|PRINT}} BIN$(255) '1 byte(8 bits) maximum
{{Cl|PRINT}} BIN$(32767) 'integer(2 byte, 15 bits) maximum
{{Cl|PRINT}} BIN$(-32768) 'integer(2 byte, 16 bits) minimum
{{Cl|PRINT}} BIN$(-1) 'all 16 bits on
{{Cl|FUNCTION}} BIN$ (n%)
max% = 8 * {{Cl|LEN}}(n%) ': MSB% = 1 'uncomment for 16 (32 or 64) bit returns
{{Cl|FOR...NEXT|FOR}} i = max% - 1 {{Cl|TO}} 0 {{Cl|STEP}} -1 'read as big-endian MSB to LSB
{{Cl|IF...THEN|IF}} (n% {{Cl|AND (boolean)|AND}} 2 ^ i) {{Cl|THEN}} MSB% = 1: B$ = B$ + "1" {{Cl|ELSE}} {{Cl|IF...THEN|IF}} MSB% {{Cl|THEN}} B$ = B$ + "0"
{{Cl|NEXT}}
{{Cl|IF...THEN|IF}} B$ = "" {{Cl|THEN}} BIN$ = "0" {{Cl|ELSE}} BIN$ = B$ 'check for empty string
{{Cl|END FUNCTION}}
{{CodeEnd}}
{{small|Code by Ted Weissgerber}}
{{OutputStart}}
11111111
111111111111111
1000000000000000
1111111111111111
{{OutputEnd}}
''Note:'' The The MSB% flag allows zeroes to be added. Uncomment the MSB% = 1 statement for returns with leading zeroes.
''Example 2:'' QB64 converts the binary values from the example above to [[INTEGER]] decimal values automatically.
{{CodeStart}}
{{Cl|DEFLNG}} A-Z
a = &B11111111
b = &B111111111111111
c = &B1000000000000000 '& 'or ~%
d = &B1111111111111111 '& 'or ~%
{{Cl|PRINT}} a, b, c, d
c&& = -1: d& = -1: e% = -1: f%% = -1
bi$ = {{Cl|_BIN$}}(f%%)
{{Cl|PRINT}} "Max binary {{Cl|_BYTE}} = "; bi$; " with"; {{Cl|LEN}}(bi$); "digits ="; {{Cl|VAL}}("{{Cl|&B}}" + bi$)
bi$ = {{Cl|_BIN$}}(e%)
{{Cl|PRINT}} "Max binary {{Cl|INTEGER}} = "; bi$; " with"; {{Cl|LEN}}(bi$); "digits ="; {{Cl|VAL}}("{{Cl|&B}}" + bi$)
bi$ = {{Cl|_BIN$}}(d&)
{{Cl|PRINT}} "Max binary {{Cl|LONG}} = "; bi$; " with"; {{Cl|LEN}}(bi$); "digits ="; {{Cl|VAL}}("{{Cl|&B}}" + bi$)
bi$ = {{Cl|_BIN$}}(c&&)
{{Cl|PRINT}} "Max binary {{Cl|_INTEGER64}} = "; bi$; " with"; {{Cl|LEN}}(bi$); "digits ="; {{Cl|VAL}}("{{Cl|&B}}" + bi$)
bi$ = {{Cl|_BIN$}}(9223372036854775807)
{{Cl|PRINT}} "Max {{Cl|_INTEGER64}} value = "; bi$; " with"; {{Cl|LEN}}(bi$); "digits"
bi$ = {{Cl|_BIN$}}(-9223372036854775808)
{{Cl|PRINT}} "Min {{Cl|_INTEGER64}} value = "; bi$; " with"; {{Cl|LEN}}(bi$); "digits"
{{CodeEnd}}
{{OutputStart}}
255 32767 -32768 -1
Max binary _BYTE = 11111111 with 8 digits = 255
Max binary INTEGER = 1111111111111111 with 16 digits = 65535
Max binary LONG = 11111111111111111111111111111111 with 32 digits = 4294967295
Max binary _INTEGER64 = 1111111111111111111111111111111111111111111111111111111111111111 with 64 digits =-1
Max _INTEGER64 value = 111111111111111111111111111111111111111111111111111111111111111 with 63 digits
Min _INTEGER64 value = 1000000000000000000000000000000000000000000000000000000000000000 with 64 digits
{{OutputEnd}}
:''Bonus example:'' Add an '''&''' symbol after the negative binary numbers to see the [[LONG]] decimal values below.
{{OutputStart}}
255 32767 32768 65535
{{OutputEnd}}
: ''Note:'' The [[LONG]] values returned are the same as the values you can get using [[_UNSIGNED]] [[INTEGER]] (~%).
{{PageSeeAlso}}
* [[_BIT]], [[_BYTE]]
* [[_SHL]], [[_SHR]]
* [[OCT$]], [[&O]] {{text|(octal)}}
* [[HEX$]], [[&H]] {{text|(hexadecimal)}}
* [[_BIN$]], [[HEX$]], [[OCT$]], [[STR$]]
* [[&H]] (hexadecimal), [[&O]] (octal), [[VAL]]
* [[Base Comparisons]]
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,29 +1,31 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:51}}
The '''&H''' prefix denotes that an integer value is expressed in a Hexadecimal base 16 format. Every 2 digits represent a [[_BYTE]].
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:05}}
The [[&H]] prefix denotes that an integer value is expressed in a Hexadecimal base 16 format. Every 2 digits represent a [[_BYTE]].
{{PageSyntax}}
:::: a& = &HFACE
{{PageSyntax}}
: {{Parameter|a&}} = [[&H]]C0DEBA5E
* The base 16 numbering system uses hexadecimal digit values of 0 to F. A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
{{PageDescription}}
* The base 16 numbering system uses hexadecimal digit values of 0 to F, where '''A''' = 10, '''B''' = 11, '''C''' = 12, '''D''' = 13, '''E''' = 14 and '''F''' = 15.
* Leading zero values can be omitted just like in decimal values as they add nothing to the return value.
* Decimal values returned can be any '''signed''' [[INTEGER]], [[LONG]] integer, or [[_INTEGER64]] value so use those type of variables when converting directly as shown above in the Syntax. The program [[ERROR Codes|"overflow"]] error limits are listed as:
::* [[_BYTE]]: 2 hex digits or a decimal value range from -128 to 127. [[_UNSIGNED]]: 0 to 255.
::* [[INTEGER]]: 4 hex digits or a decimal value range from -32,768 to 32,767. [[_UNSIGNED]]: 0 to 65535.
::* [[LONG]]: 8 hex digits or a decimal value range from -2,147,483,648 to 2,147,483,647. [[_UNSIGNED]]: 0 to 4294967295.
::* [[_INTEGER64]]: 16 hex digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
::* [[_UNSIGNED]] [[_INTEGER64]]: 0 to 18446744073709551615.
* The maximum hexadecimal value for each numerical type is the maximum number of digits listed above, each valued at F.
* Convert hexadecimal to [[LONG]] values by appending the values with &. Example: &H8000 = -32768: &H8000& = 32768
* [[LONG]] 32 bit [[_RGB]] values can be made using hexadecimal values from '''&HFF{{text|00|red}}{{text|00|green}}{{text|00|blue}}''' to '''&HFF{{text|FF|red}}{{text|FF|green}}{{text|FF|blue}}''' with full [[_ALPHA]] only.
* [[LONG]] 32 bit [[_RGBA]] values can be made using hexadecimal values from '''&H00{{text|00|red}}{{text|00|green}}{{text|00|blue}}''' to '''&HFF{{text|FF|red}}{{text|FF|green}}{{text|FF|blue}}''' with any [[_ALPHA]].
* Hexadecimal '''0x''' is often used to prefix [[HEX$]] port addresses in documentation. Replace 0x with [[&H]] in QB64 or QBasic.
* To convert hex strings returned from [[HEX$]] with [[VAL]] you need to prefix the string with &H (for example; if the string is "FF" you should do VAL("&HFF") or VAL("&H" + hexvalue$).
:* [[_BYTE]]: 2 hex digits or a decimal value range from -128 to 127. [[_UNSIGNED]]: 0 to 255.
:* [[INTEGER]]: 4 hex digits or a decimal value range from -32,768 to 32,767. [[_UNSIGNED]]: 0 to 65535.
:* [[LONG]]: 8 hex digits or a decimal value range from -2,147,483,648 to 2,147,483,647. [[_UNSIGNED]]: 0 to 4294967295.
:* [[_INTEGER64]]: 16 hex digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
:* [[_UNSIGNED]] [[_INTEGER64]]: 0 to 18446744073709551615.
* The maximum hexadecimal value for each numerical type is the maximum number of digits listed above, each valued at '''F'''.
* Convert hexadecimal to [[LONG]] values by appending the values with the suffix '''&'''. Example: [[&H]]8000 = -32768: [[&H]]8000'''&''' = 32768
* [[LONG]] 32 bit [[_RGB]] values can be made using hexadecimal values from '''&HFF{{Text|00|red}}{{Text|00|green}}{{Text|00|blue}}''' to '''&HFF{{Text|FF|red}}{{Text|FF|green}}{{Text|FF|blue}}''' with full [[_ALPHA]] only.
* [[LONG]] 32 bit [[_RGBA]] values can be made using hexadecimal values from '''&H00{{Text|00|red}}{{Text|00|green}}{{Text|00|blue}}''' to '''&HFF{{Text|FF|red}}{{Text|FF|green}}{{Text|FF|blue}}''' with any [[_ALPHA]].
* Hexadecimal '''0x''' is often used to prefix [[HEX$]] port addresses in documentation. Replace '''0x''' with [[&H]] in QB64 or QBasic.
* To convert hexadecimal strings returned from [[HEX$]] with [[VAL]] you need to prefix the string with [[&H]] (for example, if the string is "FF" you should do {{InlineCode}}{{Cl|VAL}}("&HFF"){{InlineCodeEnd}} or {{InlineCode}}{{Cl|VAL}}("&H" + hexvalue$){{InlineCodeEnd}}.
''Example 1:'' The maximum octal values of decimal value -1 in each numerical type are:
{{PageExamples}}
;Example 1:The maximum hexadecimal values of decimal value -1 in each numerical type are:
{{CodeStart}}
c&& = -1: d& = -1: e% = -1: f%% = -1
hx$ = {{Cl|HEX$}}(f%%)
@ -37,9 +39,10 @@ hx$ = {{Cl|HEX$}}(c&&)
hx$ = {{Cl|HEX$}}(9223372036854775807)
{{Cl|PRINT}} "Max {{Cl|_INTEGER64}} value = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits"
hx$ = {{Cl|HEX$}}(-9223372036854775808)
{{Cl|PRINT}} "Min {{Cl|_INTEGER64}} value = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits"
{{Cl|PRINT}} "Min {{Cl|_INTEGER64}} value = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits"
{{CodeEnd}}
{{OutputStart}}Max hex _BYTE = FF with 2 digits = 255
{{OutputStart}}
Max hex _BYTE = FF with 2 digits = 255
Max hex INTEGER = FFFF with 4 digits = 65535
Max hex LONG = FFFFFFFF with 8 digits = 4294967295
Max hex _INTEGER64 = FFFFFFFFFFFFFFFF with 16 digits =-1
@ -48,43 +51,46 @@ Min _INTEGER64 value = 8000000000000000 with 16 digits
{{OutputEnd}}
''Example 2:'' Converting a decimal number to a binary string value using [[HEX$]].
;Example 2:Converting a decimal number to a binary string value using [[HEX$]].
{{CodeStart}}
FUNCTION BIN$ (n&)
{{Cl|FUNCTION}} BIN$ (n&)
h$ = {{Cl|HEX$}}(n&) 'get hexadecimal string value
FOR i = 1 TO {{Cl|LEN}}(h$) 'scan the HEX$ digits
SELECT CASE {{Cl|MID$}}(h$, i, 1) 'read each HEX$ digit
CASE "0": b$ = b$ + "0000"
CASE "1": b$ = b$ + "0001"
CASE "2": b$ = b$ + "0010"
CASE "3": b$ = b$ + "0011"
CASE "4": b$ = b$ + "0100"
CASE "5": b$ = b$ + "0101"
CASE "6": b$ = b$ + "0110"
CASE "7": b$ = b$ + "0111"
CASE "8": b$ = b$ + "1000"
CASE "9": b$ = b$ + "1001"
CASE "A": b$ = b$ + "1010"
CASE "B": b$ = b$ + "1011"
CASE "C": b$ = b$ + "1100"
CASE "D": b$ = b$ + "1101"
CASE "E": b$ = b$ + "1110"
CASE "F": b$ = b$ + "1111"
END SELECT
NEXT i
b$ = {{Cl|RIGHT$}}(b$, LEN(b$) - {{Cl|INSTR}}(b$, "1") + 1) 'eliminate leading zeroes
IF {{Cl|VAL}}(b$) THEN BIN$ = b$ ELSE BIN$ = "0" 'return zero if n& = 0
END FUNCTION
{{Cl|FOR}} i = 1 {{Cl|TO}} {{Cl|LEN}}(h$) 'scan the HEX$ digits
{{Cl|SELECT CASE}} {{Cl|MID$}}(h$, i, 1) 'read each HEX$ digit
{{Cl|CASE}} "0": b$ = b$ + "0000"
{{Cl|CASE}} "1": b$ = b$ + "0001"
{{Cl|CASE}} "2": b$ = b$ + "0010"
{{Cl|CASE}} "3": b$ = b$ + "0011"
{{Cl|CASE}} "4": b$ = b$ + "0100"
{{Cl|CASE}} "5": b$ = b$ + "0101"
{{Cl|CASE}} "6": b$ = b$ + "0110"
{{Cl|CASE}} "7": b$ = b$ + "0111"
{{Cl|CASE}} "8": b$ = b$ + "1000"
{{Cl|CASE}} "9": b$ = b$ + "1001"
{{Cl|CASE}} "A": b$ = b$ + "1010"
{{Cl|CASE}} "B": b$ = b$ + "1011"
{{Cl|CASE}} "C": b$ = b$ + "1100"
{{Cl|CASE}} "D": b$ = b$ + "1101"
{{Cl|CASE}} "E": b$ = b$ + "1110"
{{Cl|CASE}} "F": b$ = b$ + "1111"
{{Cl|END SELECT}}
{{Cl|NEXT}} i
b$ = {{Cl|RIGHT$}}(b$, {{Cl|LEN}}(b$) - {{Cl|INSTR}}(b$, "1") + 1) 'eliminate leading zeroes
{{Cl|IF}} {{Cl|VAL}}(b$) {{Cl|THEN}} BIN$ = b$ {{Cl|ELSE}} BIN$ = "0" 'return zero if n& = 0
{{Cl|END FUNCTION}}
{{CodeEnd}}
{{small|Code by CodeGuy}}
:''Explanation:'' Hexadecimal digits can be any value up to 15 which also corresponds to all four bits on in binary. The function above just adds every four bit binary string value together to return the binary value. After they are concatenated, the leading bit on is found by [[INSTR]] and everything from that point is kept removing the leading "0"'s.
;Explanation: Hexadecimal digits can be any value up to 15 which also corresponds to all four bits on in binary. The function above just adds every four bit binary string value together to return the binary value. After they are concatenated, the leading bit on is found by [[INSTR]] and everything from that point is kept removing the leading "0"'s.
;Note: Since QB64 2.1 (QB64 Team) respectively QBPE 0.5 (QB64 Phoenix Edition) the built-in [[_BIN$]] function should be used instead.
''See also:''
* [[HEX$]], [[OCT$]]
* [[&B]] {{text|(binary)}}, [[&O]] {{text|(octal)}}
{{PageSeeAlso}}
* [[_BIN$]], [[HEX$]], [[OCT$]], [[STR$]]
* [[&B]] (binary), [[&O]] (octal), [[VAL]]
* [[Base Comparisons]]
* [[HEX$ 32 Bit Values]]
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,22 +1,29 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:49}}
The '''&O''' prefix denotes that a integer value is expressed in an Octal base 8 format.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:03}}
The [[&O]] prefix denotes that an integer value is expressed in a Octal base 8 format.
{{PageSyntax}}
:::: a& = &O12345671234
: {{Parameter|a&}} = [[&O]]377
* The base eight numbering system only uses octal digit values of 0 to 7.
* Leading zero values '''can''' be omitted as they add nothing to the return value.
* Decimal values returned can be any '''signed''' [[INTEGER]], [[LONG]] integer, or [[_INTEGER64]] value so use those type of variables when converting directly as shown above. The program [[ERROR Codes|"overflow"]] error limits are listed as:
:: * [[INTEGER]]: 6 octal digits or a decimal value range from -32,768 to 32,767
:: * [[LONG]]: 11 octal digits or a decimal value range from -2,147,483,648 to 2,147,483,647
:: * [[_INTEGER64]]: 22 octal digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
* [[LONG]] Octal values can be expressed by appending & after the number. Example: &O100000& = 32768
{{PageDescription}}
* The base 8 numbering system uses octal digit values of 0 to 7 only.
* Leading zero values can be omitted just like in decimal values as they add nothing to the return value.
* Decimal values returned can be any '''signed''' [[INTEGER]], [[LONG]] integer, or [[_INTEGER64]] value so use those type of variables when converting directly as shown above in the Syntax. The program [[ERROR Codes|"overflow"]] error limits are listed as:
:* [[_BYTE]]: 3 octal digits or a decimal value range from -128 to 127. [[_UNSIGNED]]: 0 to 255.
:* [[INTEGER]]: 6 octal digits or a decimal value range from -32,768 to 32,767. [[_UNSIGNED]]: 0 to 65535.
:* [[LONG]]: 11 octal digits or a decimal value range from -2,147,483,648 to 2,147,483,647. [[_UNSIGNED]]: 0 to 4294967295.
:* [[_INTEGER64]]: 22 octal digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
:* [[_UNSIGNED]] [[_INTEGER64]]: 0 to 18446744073709551615.
* The maximum octal value for each numerical type is the maximum number of digits listed above, each valued at '''7''' (except the first digit).
** If the maximum number of digits is used, then the first digit (usually the highest significant position) may not be maxed out to '''7''', but only up to '''3''' ([[_BYTE]] and [[LONG]]) and up to '''1''' ([[INTEGER]] and [[_INTEGER64]]).
* Convert octal to [[LONG]] values by appending the values with the suffix '''&'''. Example: [[&O]]100000 = -32768: [[&O]]100000'''&''' = 32768
* To convert octal strings returned from [[OCT$]] with [[VAL]] you need to prefix the string with [[&O]] (for example, if the string is "377" you should do {{InlineCode}}{{Cl|VAL}}("&O377"){{InlineCodeEnd}} or {{InlineCode}}{{Cl|VAL}}("&O" + octvalue$){{InlineCodeEnd}}.
''Example:'' The maximum octal values of decimal value -1 in each numerical type are:
{{PageExamples}}
;Example 1:The maximum octal values of decimal value -1 in each numerical type are:
{{CodeStart}}
c&& = -1: d& = -1: e% = -1: f%% = -1
oc$ = {{Cl|OCT$}}(f%%)
@ -26,20 +33,28 @@ oc$ = {{Cl|OCT$}}(e%)
oc$ = {{Cl|OCT$}}(d&)
{{Cl|PRINT}} "Max octal {{Cl|LONG}} = "; oc$; " with"; {{Cl|LEN}}(oc$); "digits ="; {{Cl|VAL}}("{{Cl|&O}}" + oc$)
oc$ = {{Cl|OCT$}}(c&&)
{{Cl|PRINT}} "Max octal {{Cl|_INTEGER64}} = "; oc$; " with"; {{Cl|LEN}}(oc$); "digits ="; {{Cl|VAL}}("{{Cl|&O}}" + oc$)
{{Cl|PRINT}} "Max octal {{Cl|_INTEGER64}} = "; oc$; " with"; {{Cl|LEN}}(oc$); "digits ="; {{Cl|VAL}}("{{Cl|&O}}" + oc$)
oc$ = {{Cl|OCT$}}(9223372036854775807)
{{Cl|PRINT}} "Max {{Cl|_INTEGER64}} value = "; oc$; " with"; {{Cl|LEN}}(oc$); "digits"
oc$ = {{Cl|OCT$}}(-9223372036854775808)
{{Cl|PRINT}} "Min {{Cl|_INTEGER64}} value = "; oc$; " with"; {{Cl|LEN}}(oc$); "digits"
{{CodeEnd}}
{{OutputStart}}Max octal _BYTE = 377 with 3 digits = 255
{{OutputStart}}
Max octal _BYTE = 377 with 3 digits = 255
Max octal INTEGER = 177777 with 6 digits = 65535
Max octal LONG = 37777777777 with 11 digits = 4294967295
Max octal _INTEGER64 = 1777777777777777777777 with 22 digits =-1
Max _INTEGER64 value = 777777777777777777777 with 21 digits
Min _INTEGER64 value = 1000000000000000000000 with 22 digits
{{OutputEnd}}
''See also:''
* [[OCT$]], [[HEX$]], [[VAL]]
* [[&B]] (binary), [[&H]] (hexadecimal)
{{PageSeeAlso}}
* [[_BIN$]], [[HEX$]], [[OCT$]], [[STR$]]
* [[&B]] (binary), [[&H]] (hexadecimal), [[VAL]]
* [[Base Comparisons]]
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,25 +1,23 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:53}}
The '''*''' mathematical operator performs the multiplication of two values.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:07}}
The [[*]] mathematical operator performs the multiplication of two values.
''Syntax:'' return_value = number1 * number2
{{PageSyntax}}
: {{Parameter|return_value}} = {{Parameter|number1}} [[*]] {{Parameter|number2}}
{{PageDescription}}
* Multiplication can use any two literal or variable numerical type values.
* Multiplication of two negative numbers returns a positive result. One negative number will always return a negative value.
* Multiplication of two negative numbers returns a positive result. One negative number will always return a negative value.
* Return values may exceed certain numerical variable type limits creating an [[ERROR Codes|"Overflow" error.]]
* Division and multiplication operations are performed before addition and subtraction in QBasic's order of operations.
''See also:''
[[Mathematical Operations]]
{{PageSeeAlso}}
* [[Mathematical Operations]]
{{PageNavigation}}
[[Category:Final]]

30
internal/help/%2B_%21.txt Normal file
View file

@ -0,0 +1,30 @@
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:00}}
The '''+''' plus mathematical operator performs addition on two numerical values or [[concatenation|concatenate]] [[STRING]] values.
''Syntax:'' return_value = number1 + number2
{{PageDescription}}
* A [[+]] sign also can indicate a positive numerical value, but it is not required.
* Numbers used can be any literal or variable numerical value type.
* Adding one negative value will actually perform subtraction on the other value.
* Adding two negative values will make the return value more negative.
* Addition and subtraction are the last operations performed in QBasic's normal order of operations.
* The [[+|plus(+)]] operator can also be used to add ([[concatenation|concatenate]]) literal or variable [[STRING]] values.
* [[PRINT]] can also use + operations on string values ONLY! Numerical values will need to be converted to strings first or be included using [[semicolon]]s or [[comma]]s instead.
''See also:''
[[-|- minus]] (subtraction or [[negation]] operator)
[[Mathematical Operations]]
{{PageNavigation}}

View file

@ -1,30 +1,24 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:54}}
The '''/''' mathematical operator performs decimal point division on a numerical value.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:08}}
The [[/]] mathematical operator performs decimal point division on a numerical value.
{{PageSyntax}}
::: return_value = number '''/''' divisor
: {{Parameter|return_value}} = {{Parameter|number}} [[/]] {{Parameter|divisor}}
{{PageDescription}}
* Number value can be any literal or variable numerical type.
* '''Divisor (second value) must not be a value of 0 to .5'''. This will create a [[ERROR Codes|"Division by zero" error!]] due to [[CINT]] rounding.
* Return values can be any literal or variable numerical type, but [[SINGLE]] or [[DOUBLE]] type decimal point returns are likely.
* Values returned may be expressed using exponential or [[scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision.
* Use the [[\|\ integer division]] operator to guarantee [[INTEGER]] or [[LONG]] return values.
* Division and multiplication operations are performed before addition and subtraction in Qbasic's order of operations.
* Division and multiplication operations are performed before addition and subtraction in QBasic's order of operations.
''See also:''
* [[MOD|MOD (remainder division operator)]]
* [[\|\ (integer division operator)]]
* [[INT]], [[CINT]], [[FIX]], [[_ROUND]]
{{PageSeeAlso}}
* [[Mathematical Operations]]
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,25 +1,23 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:56}}
The '''\''' mathematical operator performs [[INTEGER]] division on a numerical value.
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:09}}
The [[\]] mathematical operator performs [[INTEGER]] division on a numerical value.
{{PageSyntax}}
::: return_value = number '''\''' divisor
: {{Parameter|return_value}} = {{Parameter|number}} [[\]] {{Parameter|divisor}}
{{PageDescription}}
* Number value can be any literal or variable numerical type.
* '''Divisor (second value) must not be a value of 0 to .5'''. This will create a [[ERROR Codes|"Division by zero" error!]] due to [[CINT]] rounding.
* Return values will be [[INTEGER]] or [[LONG]] value types only.
* Rounding is done to the closest EVEN [[INTEGER|integer]] or [[LONG|long integer]] value.
* Use the [[/]] integer division operator for [[SINGLE]] or [[DOUBLE]] floating decimal point return values.
* Use the [[/|/ normal division]] operator for [[SINGLE]] or [[DOUBLE]] floating decimal point return values.
* Division and multiplication operations are performed before addition and subtraction in QBasic's order of operations.
''Example:'' Displays how floating decimal point values are rounded to the closest even [[INTEGER|integer]] value.
{{PageExamples}}
;Example:Displays how floating decimal point values are rounded to the closest even [[INTEGER|integer]] value.
{{CodeStart}}
{{Cl|PRINT}} 0.5 \ 1
{{Cl|PRINT}} 1.5 \ 1
@ -37,12 +35,10 @@ The '''\''' mathematical operator performs [[INTEGER]] division on a numerical v
{{OutputEnd}}
''See also:''
* [[MOD|MOD (remainder division operator)]]
* [[/|/ (normal division operator)]]
* [[INT]], [[CINT]], [[FIX]], [[_ROUND]]
{{PageSeeAlso}}
* [[Mathematical Operations]]
{{PageNavigation}}
[[Category:Final]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:52}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:54:06}}
The '''-''' mathematical operator performs subtraction on two numerical values or [[negation|negates]] a single value.
@ -27,4 +27,3 @@ The '''-''' mathematical operator performs subtraction on two numerical values o
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:40}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:54}}
The [[ABS]] function returns the unsigned numerical value of a variable or literal value.
@ -38,3 +38,4 @@ c = {{Cl|ABS}}(c)
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:42}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:56}}
The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output.
@ -161,4 +161,3 @@ It was overwritten with this and deleted.
{{PageNavigation}}

View file

@ -1,4 +1,3 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:44}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:57}}
See page [[DECLARE LIBRARY]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:46}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:59}}
The [[AND (boolean)|AND]] conditonal operator is used to include another evaluation in an [[IF...THEN]] or [[Boolean]] statement.
@ -17,7 +17,7 @@ The [[AND (boolean)|AND]] conditonal operator is used to include another evaluat
* Not to be confused with the [[AND]] and [[OR]] numerical operations.
{{Template:RelationalTable}}
{{RelationalTable}}
{{PageExamples}}
@ -63,4 +63,3 @@ True
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:45}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:58}}
The logical [[AND]] numerical operator compares two values in respect of their bits. If both bits at a certain position in both values are set, then that bit position is set in the result.
@ -15,7 +15,7 @@ The logical [[AND]] numerical operator compares two values in respect of their b
* Can turn off a bit by subtracting the bit on value from 255 and using that value to AND a byte value.
{{Template:LogicalTruthTable}}
{{LogicalTruthTable}}
{{PageExamples}}
@ -76,4 +76,3 @@ The logical [[AND]] numerical operator compares two values in respect of their b
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:47}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:03}}
The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output.
@ -161,4 +161,3 @@ It was overwritten with this and deleted.
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:51}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:06}}
The [[ASC (statement)|ASC]] statement allows a '''QB64''' program to change a character at any position of a [[STRING]] variable.
@ -46,3 +46,4 @@ The [[ASC (statement)|ASC]] statement allows a '''QB64''' program to change a ch
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:50}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:05}}
The [[ASC]] function returns the [[ASCII]] code number of a certain [[STRING]] text character or a keyboard press.
@ -7,11 +7,11 @@ The [[ASC]] function returns the [[ASCII]] code number of a certain [[STRING]] t
: {{Parameter|code%}} = [[ASC]]({{Parameter|text$}}[, {{Parameter|position%}}])
* {{Parameter|text$}} [[STRING|string]] character parameter must have a length of at least 1 byte or an error occurs.
* {{Parameter|text$}} [[STRING|string]] character parameter must have a length of at least 1 byte or an error occurs.
* '''In QB64''' the optional byte {{Parameter|position%}} [[INTEGER]] parameter greater than 0 can specify the ASCII code of any character in a string to be returned.
* If the optional {{Parameter|position%}} parameter is omitted, ASC will return the [[ASCII]] code of the first [[STRING]] character.
* [[ASCII]] code [[INTEGER]] or [[_UNSIGNED]] [[_BYTE]] values returned range from 0 to 255.
* ASC returns 0 when reading [[ASCII]] 2 byte codes returned by [[INKEY$]] when the arrow, function, Home/Page keys are used.
* [[ASCII]] code [[INTEGER]] or [[_UNSIGNED]] [[_BYTE]] values returned range from 0 to 255.
* ASC returns 0 when reading [[ASCII]] 2 byte codes returned by [[INKEY$]] when the arrow, function, Home/Page keys are used.
** Use QB64's {{Parameter|position%}} parameter to read the second byte if necessary. {{Text|IF ASC(key$) <nowiki>=</nowiki> 0 THEN byte2 <nowiki>=</nowiki> ASC(key$, 2)|green}}
* In '''QB64''' ASC string byte position reads are about '''5 times faster''' than [[MID$]] when parsing strings. See [[MID$]] ''Example 2''.
@ -23,34 +23,34 @@ The [[ASC]] function returns the [[ASCII]] code number of a certain [[STRING]] t
{{WhiteStart}}' '''ASCII Keyboard Codes'''
'
'''' Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Sys ScL Pause'''
'''' Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Sys ScL Pause'''
' 27 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +133 +134 - - -
'''' `~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSp Ins Hme PUp NumL / * -'''
'''' `~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSp Ins Hme PUp NumL / * -'''
' 126 33 64 35 36 37 94 38 42 40 41 95 43 8 +82 +71 +73 - 47 42 45
''' 96 49 50 51 52 53 54 55 56 57 48 45 61''
'''' Tab Q W E R T Y U I O P [{ ]} \| Del End PDn 7Hme 8/▲ 9PU + '''
' 9 81 87 69 82 84 89 85 73 79 80 123 125 124 +83 +79 +81 +71 +72 +73 43
''' 113 119 101 114 116 121 117 105 111 112 91 93 92 55 56 57 ''
'''' CapL A S D F G H J K L ;: '" Enter 4/◄- 5 6/-►
'''' CapL A S D F G H J K L ;: '" Enter 4/◄- 5 6/-►
' - 65 83 68 70 71 72 74 75 76 58 34 13 +75 +76 +77 '''E'''
''' 97 115 100 102 103 104 106 107 108 59 39 52 53 54 '' '''n'''
''' 97 115 100 102 103 104 106 107 108 59 39 52 53 54 '' '''n'''
'''' Shift Z X C V B N M ,< .> /? Shift ▲ 1End 2/▼ 3PD t'''
' * 90 88 67 86 66 78 77 60 62 63 * +72 +79 +80 +81 '''e'''
''' 122 120 99 118 98 110 109 44 46 47 49 50 51 '' '''r'''
'''' Ctrl Win Alt Spacebar Alt Win Menu Ctrl ◄- ▼ -► 0Ins .Del '''
' * - * 32 * - - * +75 +80 +77 +82 +83 13
' * - * 32 * - - * +75 +80 +77 +82 +83 13
' '' 48 46''
'
' ''' ''Italics'' = LCase/NumLock On ____________ + = 2 Byte: CHR$(0) + CHR$(code)'''
'{{small|NOTE: The above commented table can be copied and pasted directly into the QB64 IDE}}
{{WhiteEnd}}
{{WhiteEnd}}
<center>'''[[ASCII#Two_Byte_Codes|Two Byte Ctrl, Alt and Shift + Function key combinations]]'''</center>
{{WhiteStart}} '''Two Byte Characters    Key                 CHR$(0) + "?" '''
CHR$(0) + CHR$(16-50) [Alt] + letter
CHR$(0) + CHR$(16-50) [Alt] + letter
CHR$(0) + CHR$(59) [F1] ";"
CHR$(0) + CHR$(60) [F2] "<"
CHR$(0) + CHR$(61) [F3] "="
@ -75,7 +75,7 @@ The [[ASC]] function returns the [[ASCII]] code number of a certain [[STRING]] t
CHR$(0) + CHR$(84-93) [Shift] + F1-10
CHR$(0) + CHR$(94-103) [Ctrl] + F1-10
CHR$(0) + CHR$(104-113) [Alt] + F1-10
CHR$(0) + CHR$(114-119) [Ctrl] + keypad
CHR$(0) + CHR$(114-119) [Ctrl] + keypad
CHR$(0) + CHR$(120-129) [Alt] + number
CHR$(0) + CHR$(130 or 131) [Alt] + _/- or +/= "é" or "â"
CHR$(0) + CHR$(133) [F11] "à"
@ -93,9 +93,9 @@ The [[ASC]] function returns the [[ASCII]] code number of a certain [[STRING]] t
{{PageExamples}}
''Example 1:'' How ASC can be used to find any ASCII code in a string of characters using QB64.
{{CodeStart}}
{{Cl|PRINT}} ASC("A")
{{Cl|PRINT}} ASC("Be a rockstar")
{{Cl|PRINT}} ASC("QB64 is not only COMPATIBLE, it can find any part of the string!", 18)
{{Cl|PRINT}} {{Cl|ASC}}("A")
{{Cl|PRINT}} {{Cl|ASC}}("Be a rockstar")
{{Cl|PRINT}} {{Cl|ASC}}("QB64 is not only COMPATIBLE, it can find any part of the string!", 18)
{{CodeEnd}}
''Returns:''
@ -116,13 +116,13 @@ The [[ASC]] function returns the [[ASCII]] code number of a certain [[STRING]] t
Q$ = {{Cl|CHR$}}(34) ' quote character
{{Cl|COLOR}} 10: {{Cl|LOCATE}} 5, 22: {{Cl|PRINT}} "Press some keys or combinations!"
{{Cl|COLOR}} 13: {{Cl|LOCATE}} 23, 30: {{Cl|PRINT}} "Escape key Quits"
DO
DO: {{Cl|SLEEP}}: key$ = {{Cl|INKEY$}}: {{Cl|LOOP}} {{Cl|UNTIL}} key$ <> "" ' prevent ASC empty string read error
{{Cl|DO}}
{{Cl|DO}}: {{Cl|SLEEP}}: key$ = {{Cl|INKEY$}}: {{Cl|LOOP}} {{Cl|UNTIL}} key$ <> "" ' prevent ASC empty string read error
code% = {{Cl|ASC}}(key$): {{Cl|COLOR}} 11: {{Cl|LOCATE}} 10, 10
{{Cl|IF...THEN|IF}} code% {{Cl|THEN}} ' ASC returns any value greater than 0
{{Cl|PRINT}} "{{Cl|CHR$}}(" + {{Cl|LTRIM$}}({{Cl|STR$}}(code%)) + ")" + {{Cl|SPACE$}}(13):
{{Cl|PRINT}} "{{Cl|CHR$}}(" + {{Cl|LTRIM$}}({{Cl|STR$}}(code%)) + ")" + {{Cl|SPACE$}}(13):
{{Cl|IF...THEN|IF}} code% > 8 {{Cl|AND (boolean)|AND}} code% < 14 {{Cl|THEN}} code% = 32 ' unprintable control codes
{{Cl|COLOR}} 14: {{Cl|LOCATE}} 10, 50: {{Cl|PRINT}} {{Cl|CHR$}}(code%) + {{Cl|SPACE$}}(13)
{{Cl|COLOR}} 14: {{Cl|LOCATE}} 10, 50: {{Cl|PRINT}} {{Cl|CHR$}}(code%) + {{Cl|SPACE$}}(13)
{{Cl|ELSE}}: {{Cl|PRINT}} "{{Cl|CHR$}}(0) + {{Cl|CHR$}}(" + {{Cl|LTRIM$}}({{Cl|STR$}}({{Cl|ASC}}(key$, 2))) + ")"
{{Cl|COLOR}} 14: {{Cl|LOCATE}} 10, 50: {{Cl|PRINT}} "{{Cl|CHR$}}(0) + " + Q$ + {{Cl|CHR$}}({{Cl|ASC}}(key$, 2)) + Q$
{{Cl|END IF}}
@ -135,22 +135,22 @@ DO
''Example 3:'' Reading only numerical values input by a program user.
{{CodeStart}}
DO: {{Cl|SLEEP}} ' requires a keypress to run loop once
K$ = {{Cl|{{Cl|INKEY$}}}}
{{Cl|DO}}: {{Cl|SLEEP}} ' requires a keypress to run loop once
K$ = {{Cl|INKEY$}}
code = {{Cl|ASC}}(K$)
{{Cl|IF...THEN|IF}} code >= 48 {{Cl|AND (boolean)|AND}} code <= 57 {{Cl|THEN}} entry$ = entry$ + {{Cl|{{Cl|CHR$}}}}(code) ' numbers only
{{Cl|IF...THEN|IF}} code = 46 {{Cl|AND (boolean)|AND}} flag = 0 {{Cl|THEN}}
{{Cl|IF}} code >= 48 {{Cl|AND (boolean)|AND}} code <= 57 {{Cl|THEN}} entry$ = entry$ + {{Cl|CHR$}}(code) ' numbers only
{{Cl|IF}} code = 46 {{Cl|AND (boolean)|AND}} flag = 0 {{Cl|THEN}}
entry$ = entry$ + K$: flag = 1: mark = {{Cl|LEN}}(entry$) ' decimal point
{{Cl|END IF}}
L = {{Cl|{{Cl|LEN}}}}(entry$) ' check entry length for possible backspace
{{Cl|IF...THEN|IF}} code = 8 {{Cl|AND (boolean)|AND}} L > 0 {{Cl|THEN}} ' backspace pressed and entry has a length
entry$ = {{Cl|{{Cl|MID$}}}}(entry$, 1, L - 1) ' remove one character from entry$
{{Cl|IF...THEN|IF}} L - 1 < mark {{Cl|THEN}} flag = 0 ' allow another decimal point if removed.
{{Cl|LOCATE}} 10, {{Cl|POS}}(0) - 1: {{Cl|PRINT}} {{Cl|{{Cl|SPACE$}}}}(1); ' remove character from screen
L = {{Cl|LEN}}(entry$) ' check entry length for possible backspace
{{Cl|IF}} code = 8 {{Cl|AND (boolean)|AND}} L > 0 {{Cl|THEN}} ' backspace pressed and entry has a length
entry$ = {{Cl|MID$}}(entry$, 1, L - 1) ' remove one character from entry$
{{Cl|IF}} L - 1 < mark {{Cl|THEN}} flag = 0 ' allow another decimal point if removed.
{{Cl|LOCATE}} 10, {{Cl|POS}}(0) - 1: {{Cl|PRINT}} {{Cl|SPACE$}}(1); ' remove character from screen
{{Cl|END IF}}
{{Cl|LOCATE}} 10, 10: {{Cl|PRINT}} entry$;
{{Cl|LOCATE}} 10, 10: {{Cl|PRINT}} entry$;
' display present entry to user(semicolon required for correct POS return)
{{Cl|LOOP}} {{Cl|UNTIL}} code = 13 {{Cl|AND}} L
{{Cl|LOOP}} {{Cl|UNTIL}} code = 13 {{Cl|AND}} L
{{CodeEnd}}
''Explanation:'' [[SLEEP]] waits for a keypress allowing background programs to use the processor time. It also keeps the press in the keyboard buffer for [[INKEY$]] to read and guarantees that ASC will not read an empty string value to create an error. Filtered codes 48 to 57 are only number characters. One decimal point is allowed by using the flag. Code 8 is a backspace request which is ignored if the entry has no characters. If it is allowed it removes the last character from the entry and the screen. The loop exits when the user presses the [Enter] key and the entry has a length.
@ -167,3 +167,4 @@ DO
{{PageNavigation}}
[[Category:Latest]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:49}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:04}}
The [[AS]] keyword defines a variable data [[type]].
@ -33,4 +33,3 @@ The [[AS]] keyword defines a variable data [[type]].
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:52}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:08}}
The [[ATN]] or arctangent function returns the angle in radians of a numerical [[TAN|tangent]] value.
@ -88,4 +88,3 @@ DO
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:40}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:53:55}}
The '''apostrophe''' is used to tell the compiler to ignore a statement or programmer comment.
{{PageDescription}}
@ -25,4 +25,3 @@ COLOR 11: PRINT "Print this...." ' PRINT "Don't print this program comment!"
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:54}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:09}}
The [[BEEP]] statement produces a beep sound through the sound card.
@ -24,4 +24,3 @@ The [[BEEP]] statement produces a beep sound through the sound card.
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:55}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:10}}
The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output.
@ -161,4 +161,3 @@ It was overwritten with this and deleted.
{{PageNavigation}}

View file

@ -1,12 +1,12 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:56}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:11}}
[[BLOAD]] loads a binary graphics file created by [[BSAVE]] to an array.
{{PageSyntax}}
: [[BLOAD]] {{Parameter|fileName$}}, [[VARPTR]]({{Parameter|imageArray%({{Parameter|index}})}})
{{PageLegacySupport}}
===Legacy support===
* '''QB64''' can load larger arrays directly from binary files using [[PUT]] # and [[GET]] # without '''BLOAD'''. For that reason, '''BLOAD''' isn't recommended practice anymore and is supported to maintain compatibility with legacy code.
@ -55,4 +55,3 @@
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:57}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:12}}
[[BSAVE]] saves the contents of an image array to a [[BINARY]] file.
@ -7,7 +7,7 @@
: [[BSAVE]] {{Parameter|saveFile$}}, [[VARPTR]]({{Parameter|array(index)}}), {{Parameter|fileSize&}}
{{PageLegacySupport}}
===Legacy support===
* '''QB64''' can save larger arrays directly to binary files using [[PUT]] # and [[GET]] # without '''BSAVE'''. For that reason, '''BSAVE''' isn't recommended practice anymore and is supported to maintain compatibility with legacy code.
@ -104,4 +104,3 @@ K$ = {{Cl|INPUT$}}(1) 'Press any key
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:59}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:14}}
The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]] and [[FUNCTION]] procedures supported by QB64.
@ -102,4 +102,3 @@ MouseMove 200, 200
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:00}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:15}}
[[CALL]] sends code execution to a subroutine procedure in a program. In '''QB64''' the subroutine doesn't need to be declared.
@ -60,8 +60,6 @@ Hello World!
{{PageSeeAlso}}
* [[SUB]], [[FUNCTION]]
* DECLARE, [[DECLARE (non-BASIC statement)]]
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:11:41}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:40:55}}
[[CALL ABSOLUTE]] is used to access interrupts on the computer or execute assembly type procedures.
@ -7,7 +7,7 @@
: [[CALL ABSOLUTE]]([{{Parameter|argumentList}},] {{Parameter|integerOffset}})
{{PageLegacySupport}}
===Legacy support===
* [[CALL ABSOLUTE]] is implemented to support older code and is not recommended practice. To handle mouse input, use [[_MOUSEINPUT]] and related functions.
@ -21,9 +21,7 @@
{{PageSeeAlso}}
* [[SADD]], [[INTERRUPT]]
* [[DECLARE (non-BASIC statement)]]
* [[_MOUSEINPUT]]
{{PageNavigation}}

View file

@ -1,4 +1,3 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:03}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:16}}
See page [[SELECT CASE]]

View file

@ -1,4 +1,3 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:04}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:17}}
See page [[SELECT CASE]]

View file

@ -1,4 +1,3 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:05}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:18}}
See page [[SELECT CASE]]

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:06}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:19}}
[[CDBL]] converts a value to the closest [[DOUBLE]]-precision value.
@ -34,4 +34,3 @@
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:09}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:20}}
[[CHAIN]] is used to change seamlessly from one module to another one in a program.
@ -7,7 +7,7 @@
: [[CHAIN]] {{Parameter|moduleName$}}
{{PageLegacySupport}}
===Legacy support===
* The multi-modular technique goes back to when '''QBasic''' and '''QuickBASIC''' had module size constraints. In '''QB64''' the [[CHAIN]] statement has been implemented so that that older code can still be compiled, though it is advisable to use single modules for a single project (not counting [[$INCLUDE]] libraries), for ease of sharing and also because the module size constraints no longer exist.
@ -43,8 +43,6 @@
* [[RUN]]
* [[COMMON]], [[COMMON SHARED]]
* [[SHARED]]
* [[LINKed or Merged Modules]]
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:10}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:22}}
The [[CHDIR]] statement changes the program's location from one working directory to another by specifying a literal or variable [[STRING]] path.
@ -62,4 +62,3 @@ Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$)) '0 designates
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:12}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:23}}
The [[CHR$]] function returns the character associated with a certain [[ASCII|character code]] as a [[STRING]].
@ -86,4 +86,3 @@ Send$ = ""
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:13}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:24}}
The [[CINT]] function rounds decimal point numbers up or down to the nearest [[INTEGER]] value.
@ -35,4 +35,3 @@ a% = {{Cl|CINT}}(1.49): b% = {{Cl|CINT}}(1.50): c = 11.5
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:14}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:25}}
The [[CIRCLE]] statement is used in graphic [[SCREEN (statement)|SCREEN]] modes to create circles, arcs or ellipses.
@ -144,4 +144,3 @@ previoushour% = hours% 'hold current hour for later use
* [[Alternative circle routine]] {{text|(member-contributed program)}}
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:15}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:27}}
The [[CLEAR]] statement clears all variable and array element values in a program.
@ -38,4 +38,3 @@ array(5) = 23
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:17}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:28}}
The [[CLNG]] function rounds decimal point numbers up or down to the nearest [[LONG]] integer value.
@ -36,4 +36,3 @@ The [[CLNG]] function rounds decimal point numbers up or down to the nearest [[L
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:18}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:29}}
[[CLOSE]] closes an open file or port using the number(s) assigned in an [[OPEN]] statement.
@ -29,4 +29,3 @@
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:19}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:30}}
The [[CLS]] statement clears the [[_DEST|current write page]].
@ -58,4 +58,3 @@ i = {{Cl|_LOADIMAGE}}('''"qb64_trans.png"''') 'see note below examples to get th
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:21}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:31}}
The [[COLOR]] statement is used to change the foreground and background colors for printing text.
{{PageSyntax}}
@ -193,4 +193,3 @@ alpha$ = "FF" 'solid alpha colors only
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:22}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:33}}
The '''COMMAND$''' function returns the command line argument(s) passed when a program is run.
@ -73,4 +73,3 @@ count = count - 1 'save the number of parameters sent to this program when run
{{PageNavigation}}

View file

@ -1,12 +1,12 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:23}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:34}}
[[COMMON]] shares common variable values with other linked or [[CHAIN]]ed modules.
{{PageSyntax}}
: [[COMMON]] [SHARED] variableList
{{PageLegacySupport}}
===Legacy support===
* The multi-modular technique goes back to when '''QBasic''' and '''QuickBASIC''' had module size constraints. In '''QB64''' the [[COMMON]] statement has been implemented so that that older code can still be compiled, though it is advisable to use single modules for a single project (not counting [[$INCLUDE]] libraries), for ease of sharing and also because the module size constraints no longer exist.
@ -25,4 +25,3 @@
* [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]]
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:24}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:35}}
The [[CONST]] statement globally defines one or more named numeric or string values which will not change while the program is running.
@ -71,4 +71,3 @@ Enter the radius of a circle or zero to quit? ''0''
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:25}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:36}}
The [[COS]] function returns the horizontal component or the cosine of an angle measured in radians.
@ -106,4 +106,3 @@ DEGREES% = RADIANS * 180 / PI = 45
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:27}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:37}}
[[CSNG]] converts a numerical value to the closest [[SINGLE]]-precision number.
@ -32,4 +32,3 @@
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:28}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:39}}
The [[CSRLIN]] function returns the current text row position of the [[PRINT]] cursor.
@ -50,4 +50,3 @@ The [[CSRLIN]] function returns the current text row position of the [[PRINT]] c
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:31}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:41}}
The [[CVDMBF]] function decodes an 8-byte [[STRING]] generated by [[MKDMBF$]] (or read from a file) to [[DOUBLE]] numeric values.
@ -39,4 +39,3 @@ The string above, decoded using CVDMBF: 77000.24523213
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:29}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:40}}
The [[CVD]] function decodes an 8-byte [[STRING]] generated by [[MKD$]] (or read from a file) to [[DOUBLE]] numeric values.
@ -50,4 +50,3 @@ The string above, decoded using CVD: 77000.24523213
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:32}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:42}}
The [[CVI]] function decodes a 2-byte [[STRING]] generated by [[MKI$]] (or read from a file) to [[INTEGER]] numeric values.
@ -65,4 +65,3 @@ tmp4$ = " CVI Total = ##### "
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:33}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:43}}
The [[CVL]] function decodes a 4-byte [[STRING]] generated by [[MKL$]] (or read from a file) to [[LONG]] numeric values.
@ -42,4 +42,3 @@ Y& = {{Cl|CVL}}(N$)
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:36}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:47}}
The [[CVDMBF]] function decodes a 4-byte [[STRING]] generated by [[MKSMBF$]] (or read from a file) to [[SINGLE]] numeric values.
@ -37,4 +37,3 @@ The string above, decoded using CVSMBF: 700.2213
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:34}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:46}}
The [[CVS]] function decodes a 4-byte [[STRING]] generated by [[MKS$]] (or read from a file) to [[SINGLE]] numeric values.
@ -37,4 +37,3 @@ The string above, decoded using CVS: 700.2213
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:41}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:53:56}}
A '''colon''' can be used to separate two unrelated procedure statements on the same line.
@ -22,4 +22,3 @@ A '''colon''' can be used to separate two unrelated procedure statements on the
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:37}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:48}}
The [[DATA]] statement creates a line of fixed program information separated by commas. The DATA can be later READ by the program at runtime.
@ -81,4 +81,3 @@ mydata2:
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:38}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:49}}
The [[DATE$]] function returns the current computer date as a string in the format "mm-dd-yyyy".
@ -70,4 +70,3 @@ Today is Wednesday, June 2, 2010
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:07:31}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:08}}
'''DECLARE DYNAMIC LIBRARY''' allows you to dynamically link your program to functions in dynamically linkable libraries. At present, only ''.DLL'' files are supported (support for ''.so'' will be added soon). These libraries are loaded when your program begins.
@ -104,4 +104,3 @@ QuickUTF16toUTF32$ = b$
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:07:30}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:37:06}}
The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]] and [[FUNCTION]] procedures supported by QB64.
@ -102,4 +102,3 @@ MouseMove 200, 200
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:45}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:51}}
The [[DEFDBL]] statement defines all variables with names starting with the specified letter (or letter range) AS [[DOUBLE]] variables instead of the [[SINGLE]] type default.
@ -7,7 +7,7 @@ The [[DEFDBL]] statement defines all variables with names starting with the spec
: [[DEFDBL]] {{Parameter|letter}}[-{{Parameter|range}}], {{Parameter|letter2}}[-{{Parameter|range2}}], [...]
{{PageLegacySupport}}
===Legacy support===
* '''DEF''' statements ([[DEFDBL]], [[DEFSNG]], [[DEFLNG]], [[DEFINT]], [[DEFSTR]]) were used when storage space was a concern in older computers, as their usage could save up typing. Instead of {{InlineCode}}DIM a AS DOUBLE, a2 AS DOUBLE, a3 AS DOUBLE{{InlineCodeEnd}}, simply having {{InlineCode}}DEFDBL A{{InlineCodeEnd}} in the code before using variables starting with letter '''A''' would do the same job.
* For clarity, it is recommended to declare variables with meaningful names.
@ -40,4 +40,3 @@ The [[DEFDBL]] statement defines all variables with names starting with the spec
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:46}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:53}}
The [[DEFINT]] statement defines all variables with names starting with the specified letter (or letter range) AS [[INTEGER]] variables instead of the [[SINGLE]] type default.
@ -7,7 +7,7 @@ The [[DEFINT]] statement defines all variables with names starting with the spec
: [[DEFINT]] {{Parameter|letter}}[-{{Parameter|range}}], {{Parameter|letter2}}[-{{Parameter|range2}}], [...]
{{PageLegacySupport}}
===Legacy support===
* '''DEF''' statements ([[DEFDBL]], [[DEFSNG]], [[DEFLNG]], [[DEFINT]], [[DEFSTR]]) were used when storage space was a concern in older computers, as their usage could save up typing. Instead of {{InlineCode}}DIM a AS INTEGER, a2 AS INTEGER, a3 AS INTEGER{{InlineCodeEnd}}, simply having {{InlineCode}}DEFINT A{{InlineCodeEnd}} in the code before using variables starting with letter '''A''' would do the same job.
* For clarity, it is recommended to declare variables with meaningful names.
@ -41,4 +41,3 @@ The [[DEFINT]] statement defines all variables with names starting with the spec
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:47}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:54}}
The [[DEFLNG]] statement defines all variables with names starting with the specified letter (or letter range) AS [[LONG]] variables instead of the [[SINGLE]] type default.
@ -7,7 +7,7 @@ The [[DEFLNG]] statement defines all variables with names starting with the spec
: [[DEFLNG]] {{Parameter|letter}}[-{{Parameter|range}}], {{Parameter|letter2}}[-{{Parameter|range2}}], [...]
{{PageLegacySupport}}
===Legacy support===
* '''DEF''' statements ([[DEFDBL]], [[DEFSNG]], [[DEFLNG]], [[DEFINT]], [[DEFSTR]]) were used when storage space was a concern in older computers, as their usage could save up typing. Instead of {{InlineCode}}DIM a AS LONG, a2 AS LONG, a3 AS LONG{{InlineCodeEnd}}, simply having {{InlineCode}}DEFLNG A{{InlineCodeEnd}} in the code before using variables starting with letter '''A''' would do the same job.
* For clarity, it is recommended to declare variables with meaningful names.
@ -41,4 +41,3 @@ The [[DEFLNG]] statement defines all variables with names starting with the spec
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:48}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:55}}
The [[DEFSNG]] statement defines all variables with names starting with the specified letter (or letter range) AS [[SINGLE]] variables.
@ -7,7 +7,7 @@ The [[DEFSNG]] statement defines all variables with names starting with the spec
: [[DEFSNG]] {{Parameter|letter}}[-{{Parameter|range}}], {{Parameter|letter2}}[-{{Parameter|range2}}], [...]
{{PageLegacySupport}}
===Legacy support===
* '''DEF''' statements ([[DEFDBL]], [[DEFSNG]], [[DEFLNG]], [[DEFINT]], [[DEFSTR]]) were used when storage space was a concern in older computers, as their usage could save up typing. Instead of {{InlineCode}}DIM a AS SINGLE, a2 AS SINGLE, a3 AS SINGLE{{InlineCodeEnd}}, simply having {{InlineCode}}DEFSNG A{{InlineCodeEnd}} in the code before using variables starting with letter '''A''' would do the same job.
* For clarity, it is recommended to declare variables with meaningful names.
@ -41,4 +41,3 @@ The [[DEFSNG]] statement defines all variables with names starting with the spec
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:49}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:56}}
The [[DEFSTR]] statement defines all variables with names starting with the specified letter (or letter range) AS [[STRING]] variables instead of the [[SINGLE]] type default.
@ -7,7 +7,7 @@ The [[DEFSTR]] statement defines all variables with names starting with the spec
: [[DEFSTR]] {{Parameter|letter}}[-{{Parameter|range}}], {{Parameter|letter2}}[-{{Parameter|range2}}], [...]
{{PageLegacySupport}}
===Legacy support===
* '''DEF''' statements ([[DEFDBL]], [[DEFSNG]], [[DEFLNG]], [[DEFINT]], [[DEFSTR]]) were used when storage space was a concern in older computers, as their usage could save up typing. Instead of {{InlineCode}}DIM a AS STRING, a2 AS STRING, a3 AS STRING{{InlineCodeEnd}}, simply having {{InlineCode}}DEFSTR A{{InlineCodeEnd}} in the code before using variables starting with letter '''A''' would do the same job.
* For clarity, it is recommended to declare variables with meaningful names.
@ -40,4 +40,3 @@ The [[DEFSTR]] statement defines all variables with names starting with the spec
{{PageNavigation}}

View file

@ -1,16 +1,16 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:44}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:50}}
[[DEF SEG]] is used to define the area in memory to access QB64's emulated conventional memory.
{{PageLegacySupport}}
* '''QB64 implements memory access using [[_MEM]] and related functions. For that reason, [[DEF SEG]] isn't recommended practice anymore and is supported to maintain compatibility with legacy code.'''
{{PageSyntax}}
: [[DEF SEG]] [=][{segment|VARSEG(variable}]
===Legacy support===
* '''QB64 implements memory access using [[_MEM]] and related functions. For that reason, [[DEF SEG]] isn't recommended practice anymore and is supported to maintain compatibility with legacy code.'''
{{PageDescription}}
* Used to set the pointer to a memory area of a variable/array or register.
* [[PEEK]] and [[POKE]] require a segment memory address (often just 0) without using VARSEG.
@ -72,4 +72,3 @@ filename = file + {{Cl|CHR$}}(0) 'create zero string name for DOS
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:51}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:57}}
The [[DIM]] statement is used to declare a variable or a list of variables as a specified data type or to dimension [[$STATIC]] or [[$DYNAMIC]] [[Arrays|arrays]].
@ -109,4 +109,3 @@ x = 1 'x is a {{Cl|SINGLE}} variable
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:52}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:41:59}}
'''DO...LOOP''' statements are used in programs to repeat code or return to the start of a procedure.
@ -31,7 +31,7 @@
* If a loop never meets an exit condition requirement, it will never stop.
{{Template:RelationalTable}}
{{RelationalTable}}
{{PageExamples}}
@ -150,4 +150,3 @@ COLOR 14: LOCATE 10, 25
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:53}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:00}}
[[DOUBLE]] type floating point numerical values use 8 bytes per value.
@ -31,4 +31,3 @@
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:54}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:01}}
The [[DRAW]] statement uses a [[STRING]] expression to draw lines on the screen.
@ -168,4 +168,3 @@ k = {{Cl|_RGB}}(80, 255, 80)
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:24:43}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:53:58}}
The '''$''' is used to denote QBasic [[Metacommand]]s or as a [[STRING]] variable type suffix.
@ -20,4 +20,3 @@ The '''$''' is used to denote QBasic [[Metacommand]]s or as a [[STRING]] variabl
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:59}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:05}}
[[ELSEIF]] is used in an [[IF...THEN]] block statement to offer an alternative condition.
@ -24,7 +24,7 @@
* You can use [[SELECT CASE]] when IF blocks have a long list of alterative ELSEIF conditions.
{{Template:RelationalTable}}
{{RelationalTable}}
{{PageExamples}}
@ -55,4 +55,3 @@ END IF
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:12:57}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:03}}
[[ELSE]] is used in [[IF...THEN]] or [[SELECT CASE]] statements to offer an alternative to other conditional statements.
@ -62,4 +62,3 @@ IF a = 3 THEN a = 5 ELSE a = 3
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:00}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:06}}
The [[END]] statement terminates a program without an immediate exit or ends a procedure or statement block.
@ -52,4 +52,3 @@ Press any key to continue...
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:04}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:09}}
The [[ENVIRON$]] function returns a [[STRING]] environmental value from '''Windows'''' environmental settings list.
@ -127,4 +127,3 @@ Q$ = {{Cl|CHR$}}(34) '=== Write URL Shortcut file info.
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:02}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:08}}
The [[ENVIRON]] statement is used to temporarily set or change an environmental string value.
@ -22,4 +22,3 @@ The [[ENVIRON]] statement is used to temporarily set or change an environmental
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:05}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:10}}
The [[EOF]] function indicates that the end of a file has been reached.
@ -24,4 +24,3 @@ The [[EOF]] function indicates that the end of a file has been reached.
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:06}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:11}}
The [[EQV]] operator returns a value based on the ''equivalence'' of two conditions or values.
@ -12,7 +12,7 @@ The [[EQV]] operator returns a value based on the ''equivalence'' of two conditi
* Turns a bit on if both bits are the same, turns a bit off if both bits are different.
{{Template:LogicalTruthTable}}
{{LogicalTruthTable}}
{{PageSeeAlso}}
@ -21,4 +21,3 @@ The [[EQV]] operator returns a value based on the ''equivalence'' of two conditi
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:07}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:13}}
The [[ERASE]] statement is used to clear all data from an array. [[$STATIC]] [[Arrays|array]] dimensions are not affected.
@ -24,4 +24,3 @@ The [[ERASE]] statement is used to clear all data from an array. [[$STATIC]] [[A
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:11}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:14}}
The [[ERL]] function returns the closest previous line number before the last error.
@ -43,4 +43,3 @@ errorfix:
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:14}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:16}}
The [[ERROR]] statement is used to simulate a program error or to troubleshoot error handling procedures.
@ -41,4 +41,3 @@ handler:
{{PageNavigation}}

View file

@ -1,5 +1,5 @@
{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:13}}
{{QBDLDATE:07-31-2022}}
{{QBDLTIME:23:42:15}}
The [[ERR]] function returns the last QBasic error code number.
@ -44,4 +44,3 @@ handler:
{{PageNavigation}}

Some files were not shown because too many files have changed in this diff Show more