diff --git a/.gitignore b/.gitignore index b786cf1ae..72c5a4901 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,12 @@ internal/c/c_compiler -internal/temp* + *.o *.a *.exe *.bas internal/config*.txt internal/config.ini -internal/help + internal/version.txt tempfoldersearch.bin internal/c/mingw32 diff --git a/internal/help/$ASSERTS.txt b/internal/help/$ASSERTS.txt index f42ba38cf..5eb211879 100644 --- a/internal/help/$ASSERTS.txt +++ b/internal/help/$ASSERTS.txt @@ -10,8 +10,8 @@ The [[$ASSERTS]] metacommand enables debug tests with the [[_ASSERT]] macro. * If an error message is passed to the [[_ASSERT]] statement, it is displayed in the console window if [[$ASSERTS|$ASSERTS:CONSOLE]] is used. -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -43,3 +43,4 @@ The [[$ASSERTS]] metacommand enables debug tests with the [[_ASSERT]] macro. {{PageNavigation}} +< diff --git a/internal/help/$CHECKING.txt b/internal/help/$CHECKING.txt index 0fbbaa317..671eb9119 100644 --- a/internal/help/$CHECKING.txt +++ b/internal/help/$CHECKING.txt @@ -24,3 +24,4 @@ The [[$CHECKING]] metacommand turns C++ event checking ON or OFF. {{PageNavigation}} +< diff --git a/internal/help/$COLOR.txt b/internal/help/$COLOR.txt index ec582144c..391ef62ab 100644 --- a/internal/help/$COLOR.txt +++ b/internal/help/$COLOR.txt @@ -10,7 +10,7 @@ * [[$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. -* ''NOTE'': When using [[$NOPREFIX]], the color constants change to '''C_''' (ex: '''Blue''' becomes '''C_Blue'''). +* Not compatible with [[$NOPREFIX]]. {{PageExamples}} @@ -18,7 +18,7 @@ {{CodeStart}} {{Cl|$COLOR}}:0 {{Cl|COLOR}} BrightWhite, Red -{{Cl|PRINT}} "BrightWhite on red." +{{Cl|PRINT}} "Bright white on red." {{CodeEnd}} @@ -31,20 +31,11 @@ {{CodeEnd}} -''Example 3:'' Using [[$COLOR]] with [[$NOPREFIX]]: -{{CodeStart}} -{{Cl|$NOPREFIX}} -{{Cl|$COLOR}}:0 -{{Cl|COLOR}} C_BrightWhite, C_Red -{{Cl|PRINT}} "BrightWhite on Red." - {{CodeEnd}} - - {{PageSeeAlso}} * [[COLOR]], [[SCREEN]] * [[_NEWIMAGE]], [[$INCLUDE]] -* [[$NOPREFIX]] * [[Metacommand]] {{PageNavigation}} +< diff --git a/internal/help/$CONSOLE.txt b/internal/help/$CONSOLE.txt index 675ee91c8..d525ae658 100644 --- a/internal/help/$CONSOLE.txt +++ b/internal/help/$CONSOLE.txt @@ -1,21 +1,19 @@ -The [[$CONSOLE]] [[metacommand]] creates a console window that can be used throughout a QB64 program module. +The [[$CONSOLE]] [[Metacommand]] creates a console window that can be used throughout a QB64 program module. {{PageSyntax}} : [[$CONSOLE]][:ONLY] -{{Description}} * [[_CONSOLE]] '''ON''' or '''OFF''' may be used to show or hide the console window at run time. * The ''':ONLY''' option can be used when only a console window is desired without a program window. -* [[_DEST]] and [[_SOURCE]] are automatically set to [[_CONSOLE]] when the ''':ONLY''' option is used, in order to send screen output to the console window and get input from it too. -** In normal [[$CONSOLE]] mode (dual screen) you have to manually set [[_DEST]] and [[_SOURCE]] to [[_CONSOLE]] in order to work with the console window. +* [[_DEST]] [[_CONSOLE]] may be used to send screen output to the console window. * [[_SCREENHIDE]] and [[_SCREENSHOW]] can be used to hide or show the main program window. * [[_DELAY]] or [[SLEEP]] can be used to allow the console window to be set in front of the main program window. -* [[_CONSOLETITLE]] can be used to change the title of the console window. +* '''QB64 [[Metacommand]]s are not commented out with ' or REM, differently from Qbasic metacommands''' +* Change the title of the [[$CONSOLE]] windows created using [[_CONSOLETITLE]] * '''Note:''' Text can be copied partially or totally from console screens in Windows by highlighting and using the title bar menu. -:: To copy console text output, right click the title bar and select ''Edit'' for ''Mark'' to highlight and repeat to ''Copy'' -* QB64 [[Metacommand]]s are not commented out with ' or REM, differently from QBasic metacommands. +:: To copy console text output, right click the title bar and select ''Edit'' for ''Mark'' to highlight and repeat to ''Copy'' {{PageExamples}} @@ -76,3 +74,4 @@ Max hex _INTEGER64 = FFFFFFFFFFFFFFFF with 16 digits =-1 {{PageNavigation}} +< diff --git a/internal/help/$DEBUG.txt b/internal/help/$DEBUG.txt index 22eddc43a..931841834 100644 --- a/internal/help/$DEBUG.txt +++ b/internal/help/$DEBUG.txt @@ -1,42 +1 @@ -{{DISPLAYTITLE:$DEBUG}} -'''$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. - - -{{PageSyntax}} -:[[$DEBUG]] - - -{{PageDescription}} -* '''$DEBUG''' injects extra code in the resulting binary, allowing the IDE to control the execution flow of your program. -* When '''$DEBUG''' is used, the IDE will connect to your running program using a local TCP/IP connection. -** You may get a prompt from your Operating System regarding this, so it may be necessary to allow the IDE to receive connections. -** No external connections are created, and your running program will only attempt to connect locally to the IDE. -* The default TCP/IP port starts at 9001. Multiple running instances of the IDE will attempt to open ports 9002 and up. -** You can change the base port in the Debug menu. -* The metacommand is supposed to be removed once your program is ready for release, although leaving it in won't have any effect if your program isn't run from the IDE. -** The only drawback of leaving the metacommand in is that your binary will end up being larger than required. - -== $DEBUG Mode Operation == -* To start execution in pause mode, you can use '''F7''' or '''F8'''. -* There will be an arrow next to the line number where execution is paused, indicating the next line that will be run. -* When you enable '''$DEBUG''' mode, you can set breakpoints by clicking the line number at which you wish to stop execution. This can also be achieved by using the '''F9''' key. -** Breakpoints are indicated by a red dot next to the line number. -** To clear all breakpoints, hit '''F10'''. -* To skip a line during execution, shift-click a line number -** Lines marked for skipping are indicated by an exclamation mark next to the line number. -* '''F4''' opens the Variable List dialog, which allows you to add variables to the Watch List. -* During execution, the Variable List dialog also allows you to set the values of variables and also to create Watchpoints. -* Watchpoints halt execution, similarly to breakpoints, but do so when a variable matches the condition you specify. -** You can use relational operators (=, <>, >=, <=, >, <) to create watchpoint conditions. -* After a breakpoint or a watchpoint is reached, '''F5''' can be used to continue execution. -* '''F6''' can be used when the execution pointer is inside a sub/function. When used, execution will proceed until the procedure is ended. -* '''F7''' can be used to run line by line, and can be used to debug code inside subs/functions (Step Into). -* '''F8''' can be used to run line by line without entering sub/function calls (Step Over). -* '''F12''' can be used to show the current call stack (which procedure calls led to the current line). - - -{{PageSeeAlso}} -* [[Metacommand]]s - - -{{PageNavigation}} +< diff --git a/internal/help/$DYNAMIC.txt b/internal/help/$DYNAMIC.txt index db5a69682..e8b529757 100644 --- a/internal/help/$DYNAMIC.txt +++ b/internal/help/$DYNAMIC.txt @@ -1,12 +1,12 @@ -The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (resizable) arrays. +The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (changeable) arrays. {{PageSyntax}} -:{[[REM]] | [[apostrophe|']] } [[$DYNAMIC]] +:{[[REM]] | ' } [[$DYNAMIC]] {{PageDescription}} -* QBasic [[Metacommand|metacommands]] require [[REM]] or [[Apostrophe|apostrophe]] (') before them and are normally placed at the start of the main module. +* QBasic [[Metacommand|metacommands]] require [[REM]] or [[Apostrophe|apostrophe]] (') before them and are always 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. @@ -44,3 +44,4 @@ The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (res {{PageNavigation}} +< diff --git a/internal/help/$ELSE.txt b/internal/help/$ELSE.txt index cc2bd5368..56d67944c 100644 --- a/internal/help/$ELSE.txt +++ b/internal/help/$ELSE.txt @@ -1 +1,67 @@ -#REDIRECT [[$IF]] +'''$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}} +< diff --git a/internal/help/$ELSEIF.txt b/internal/help/$ELSEIF.txt index cc2bd5368..56d67944c 100644 --- a/internal/help/$ELSEIF.txt +++ b/internal/help/$ELSEIF.txt @@ -1 +1,67 @@ -#REDIRECT [[$IF]] +'''$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}} +< diff --git a/internal/help/$END_IF.txt b/internal/help/$END_IF.txt index cc2bd5368..56d67944c 100644 --- a/internal/help/$END_IF.txt +++ b/internal/help/$END_IF.txt @@ -1 +1,67 @@ -#REDIRECT [[$IF]] +'''$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}} +< diff --git a/internal/help/$ERROR.txt b/internal/help/$ERROR.txt index b0b3187d5..931841834 100644 --- a/internal/help/$ERROR.txt +++ b/internal/help/$ERROR.txt @@ -1,30 +1 @@ -The [[$ERROR]] metacommand triggers a compilation error. - - -{{PageSyntax}} -: [[$ERROR]] 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. - -===Details=== -* 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. - -{{PageExamples}} -{{CodeStart}} '' '' -{{Cl|$IF}} VERSION < 2.1 OR WINDOWS = 0 THEN - {{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). - - -{{PageSeeAlso}} -* [[Metacommand]] -* [[$IF]] - - -{{PageNavigation}} +< diff --git a/internal/help/$EXEICON.txt b/internal/help/$EXEICON.txt index d9447d7cc..a92f45f1e 100644 --- a/internal/help/$EXEICON.txt +++ b/internal/help/$EXEICON.txt @@ -5,7 +5,7 @@ : [[$EXEICON]]:'{{Parameter|iconfile.ico}}' -{{PageParameters}} +{{Parameters}} * '{{Parameter|iconfile.ico}}' is a valid [https://en.wikipedia.org/wiki/ICO_(file_format) ICO file] @@ -19,7 +19,7 @@ {{PageExamples}} ''Example:'' Embeds a designated icon file into the compiled EXE which can be viewed in Windows Explorer folders. {{CodeStart}} -{{Cl|$EXEICON}}:'mush.ico' +{{Cl|$EXEICON}}:'myexe.ico' {{Cl|_ICON}} {{CodeEnd}}{{small|Code and command by Fellippe Heitor}} @@ -31,3 +31,4 @@ {{PageNavigation}} +< diff --git a/internal/help/$IF.txt b/internal/help/$IF.txt index 28687b64f..56d67944c 100644 --- a/internal/help/$IF.txt +++ b/internal/help/$IF.txt @@ -14,16 +14,9 @@ * $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. 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. +* 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. @@ -65,20 +58,10 @@ 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}} +< diff --git a/internal/help/$INCLUDE.txt b/internal/help/$INCLUDE.txt index 5acff5f59..9e0a9e794 100644 --- a/internal/help/$INCLUDE.txt +++ b/internal/help/$INCLUDE.txt @@ -2,7 +2,7 @@ {{PageSyntax}} -: {[[REM]] | [[apostrophe|']] } [[$INCLUDE]]: '{{Parameter|sourceFile}}' +: {[[REM]] | [[REM|']] } $INCLUDE: '{{Parameter|sourceFile}}' {{PageDescription}} @@ -40,3 +40,4 @@ {{PageNavigation}} +< diff --git a/internal/help/$LET.txt b/internal/help/$LET.txt index 55345de5c..b307bbb94 100644 --- a/internal/help/$LET.txt +++ b/internal/help/$LET.txt @@ -1,4 +1,4 @@ -[[$LET]] is a 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. +[[$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. {{PageSyntax}} @@ -7,16 +7,9 @@ {{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 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. +* $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. {{PageExamples}} @@ -32,3 +25,4 @@ {{PageNavigation}} +< diff --git a/internal/help/$NOPREFIX.txt b/internal/help/$NOPREFIX.txt index ca3b42f23..873ce7d53 100644 --- a/internal/help/$NOPREFIX.txt +++ b/internal/help/$NOPREFIX.txt @@ -11,11 +11,11 @@ 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]] can be placed anywhere in a program. +* [[$NOPREFIX]] must be the first line in a program. -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageSeeAlso}} @@ -24,3 +24,4 @@ The [[$NOPREFIX]] metacommand allows all QB64 functions and statements to be use {{PageNavigation}} +< diff --git a/internal/help/$RESIZE.txt b/internal/help/$RESIZE.txt index 216446881..7bfd18b7f 100644 --- a/internal/help/$RESIZE.txt +++ b/internal/help/$RESIZE.txt @@ -12,8 +12,8 @@ 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. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up'''. {{PageExamples}} @@ -112,3 +112,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/$SCREENHIDE.txt b/internal/help/$SCREENHIDE.txt index ccae45a05..877c4ef99 100644 --- a/internal/help/$SCREENHIDE.txt +++ b/internal/help/$SCREENHIDE.txt @@ -24,7 +24,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}} @@ -35,3 +35,4 @@ ExitProcess MessageBoxA(0, {{Cl|_OFFSET (function)|_OFFSET}}(s0), {{Cl|_OFFSET ( {{PageNavigation}} +< diff --git a/internal/help/$SCREENSHOW.txt b/internal/help/$SCREENSHOW.txt index d203b9624..9cc0789dc 100644 --- a/internal/help/$SCREENSHOW.txt +++ b/internal/help/$SCREENSHOW.txt @@ -1,21 +1,19 @@ -The [[$SCREENSHOW]] [[Metacommand|metacommand]] can be used to display the main program window throughout the program. +{{DISPLAYTITLE:_SCREENSHOW}} +The [[_SCREENSHOW]] statement can be used to display the main program window in a section of code. {{PageSyntax}} -: $SCREENSHOW +: [[_SCREENSHOW]] {{PageDescription}} -* 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]].''' +* [[_SCREENHIDE]] or [[$SCREENHIDE]] must be used before _SCREENSHOW or [[$SCREENSHOW]] can be used! {{PageSeeAlso}} -* [[$CONSOLE]], [[$SCREENHIDE]] (QB64 [[Metacommand]]s) -* [[_SCREENHIDE]], [[_SCREENSHOW]] -* [[_CONSOLE]] +* [[$SCREENHIDE]], [[$SCREENSHOW]], [[$CONSOLE]] (QB64 [[Metacommand]]s) +* [[_SCREENHIDE]], [[_CONSOLE]] {{PageNavigation}} +< diff --git a/internal/help/$STATIC.txt b/internal/help/$STATIC.txt index 52f629c09..0571d1902 100644 --- a/internal/help/$STATIC.txt +++ b/internal/help/$STATIC.txt @@ -1,19 +1,18 @@ -The [[$STATIC]] [[Metacommand|metacommand]] allows the creation of static (unresizable) arrays. +The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) arrays. + {{PageSyntax}} -:{[[REM]] | [[apostrophe|']] } [[$STATIC]] +::: REM '''$STATIC''' -{{PageDescription}} -* QBasic [[Metacommand]]s require a REM or apostrophy (') before them and are normally placed at the start of the main module. +* 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]] statement. +* A [[REDIM]] statement has no effect on [[$STATIC]] arrays except perhaps a [[ERROR Codes|duplicate definition error]] at the [[REDIM]] code. * 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}} @@ -28,9 +27,10 @@ The [[$STATIC]] [[Metacommand|metacommand]] allows the creation of static (unres : ''Note:'' [[DIM]] using a literal numerical size will create a Duplicate definition error. -{{PageSeeAlso}} +''See also:'' * [[$DYNAMIC]], [[STATIC]] * [[Arrays]], [[Metacommand]] {{PageNavigation}} +< diff --git a/internal/help/$VERSIONINFO.txt b/internal/help/$VERSIONINFO.txt index 2a2041ecd..75df784c8 100644 --- a/internal/help/$VERSIONINFO.txt +++ b/internal/help/$VERSIONINFO.txt @@ -6,7 +6,7 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul : [[$VERSIONINFO]]:{{Parameter|key}}={{Parameter|value}} -{{PageParameters}} +{{Parameters}} * Text ''keys'' can be: '''CompanyName, FileDescription, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, Web, Comments''' * Numeric {{Parameter|keys}} can be:'''FILEVERSION#''' and '''PRODUCTVERSION#''' @@ -14,12 +14,11 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul {{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]]. -{{PageAvailability}} -* Build 20170429/52 and up. +==Availability== +* '''Build 20170429/52 and up'''. {{PageExamples}} @@ -38,3 +37,4 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul {{PageNavigation}} +< diff --git a/internal/help/$VIRTUALKEYBOARD.txt b/internal/help/$VIRTUALKEYBOARD.txt index 9f7fada6b..31c29be79 100644 --- a/internal/help/$VIRTUALKEYBOARD.txt +++ b/internal/help/$VIRTUALKEYBOARD.txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:$VIRTUALKEYBOARD}} -[DEPRECATED] The [[$VIRTUALKEYBOARD]] [[Metacommand|metacommand]] turns the virtual keyboard ON or OFF. +[DEPRACATED] The [[$VIRTUALKEYBOARD]] [[Metacommand|metacommand]] turns the virtual keyboard ON or OFF. {{PageSyntax}} @@ -8,7 +8,7 @@ {{PageDescription}} * Places a virtual keyboard on screen, which can be used in touch-enabled devices like Windows tablets. -* Deprecated. +* Depracated. {{PageExamples}} @@ -24,3 +24,4 @@ {{PageNavigation}} +< diff --git a/internal/help/%26B.txt b/internal/help/%26B.txt index 7d09b0a73..63c2be250 100644 --- a/internal/help/%26B.txt +++ b/internal/help/%26B.txt @@ -136,3 +136,4 @@ d = &B1111111111111111 '& 'or ~% {{PageNavigation}} +< diff --git a/internal/help/%26H.txt b/internal/help/%26H.txt index d1d50e41f..d08c03452 100644 --- a/internal/help/%26H.txt +++ b/internal/help/%26H.txt @@ -48,31 +48,31 @@ Min _INTEGER64 value = 8000000000000000 with 16 digits ''Example 2:'' Converting a decimal number to a binary string value using [[HEX$]]. {{CodeStart}} '' '' -{{Cl|FUNCTION}} BIN$ (n&) +FUNCTION BIN$ (n&) h$ = {{Cl|HEX$}}(n&) 'get hexadecimal string value - {{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}} '' '' + 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 '' '' {{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. @@ -85,3 +85,4 @@ Min _INTEGER64 value = 8000000000000000 with 16 digits {{PageNavigation}} +< diff --git a/internal/help/%26O.txt b/internal/help/%26O.txt index d3fe2809b..4b6863d9a 100644 --- a/internal/help/%26O.txt +++ b/internal/help/%26O.txt @@ -1,7 +1,8 @@ The '''&O''' prefix denotes that a integer value is expressed in an Octal base 8 format. -{{PageSyntax}} a& = &O12345671234 +{{PageSyntax}} +:::: a& = &O12345671234 * The base eight numbering system only uses octal digit values of 0 to 7. @@ -39,3 +40,4 @@ Max octal _INTEGER64 = 1777777777777777777777 with 22 digits =-1 {{PageNavigation}} +< diff --git a/internal/help/%2F.txt b/internal/help/%2F.txt index 0a562e118..fbedbfca7 100644 --- a/internal/help/%2F.txt +++ b/internal/help/%2F.txt @@ -1,24 +1,28 @@ -The [[/]] mathematical operator performs decimal point division on a numerical value. +The '''/''' mathematical operator performs decimal point division on a numerical value. + {{PageSyntax}} -:return_value = number [[/]] divisor +::: return_value = number '''/''' 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. -{{PageSeeAlso}} +''See also:'' * [[MOD|MOD (remainder division operator)]] * [[\|\ (integer division operator)]] -* [[*|* (multiplication operator)]] * [[INT]], [[CINT]], [[FIX]], [[_ROUND]] * [[Mathematical Operations]] {{PageNavigation}} +< diff --git a/internal/help/+.txt b/internal/help/+.txt new file mode 100644 index 000000000..dbfb00653 --- /dev/null +++ b/internal/help/+.txt @@ -0,0 +1,189 @@ + + + + +Bad title - QB64 Phoenix Edition Wiki + + + + + + + + + + + + +
+
+
+ +
+
+
+

Bad title

+
+ +
+
+ +
+ Jump to navigation + Jump to search +

The requested page title is empty or contains only the name of a namespace. +

Return to Main Page.

+ +
+ +
+
+ +
+

Navigation menu

+
+ + +
+ + + + +
+
+ + + + + + +
+
+ +
+ + + + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/internal/help/-.txt b/internal/help/-.txt index 38ac92435..76897ac40 100644 --- a/internal/help/-.txt +++ b/internal/help/-.txt @@ -1,21 +1,28 @@ -The [[-]] mathematical operator performs subtraction on two numerical values or [[negation|negates]] a single value. +The '''-''' mathematical operator performs subtraction on two numerical values or [[negation|negates]] a single value. -{{PageSyntax}} -:return_value = number1 [[-]] number2 + +''Syntax:'' return_value = number1 - number2 + {{PageDescription}} + * Numbers used can be any literal or variable numerical value type. * Subtracting a negative value will actually perform addition with the other value. * Subtracting a negative or [[negation|negated]] value will make the return value more positive. -* Addition and subtraction are the last operations performed in QBasic's normal order of operations. +* Addition and subtraction are the last operations performed in Qbasic's normal order of operations. * Subtraction cannot be performed on [[STRING]] values. -{{PageSeeAlso}} -* [[+|+ positive]] (addition operator) -* [[Mathematical Operations]] + +''See also:'' + +[[+|+ positive]] (addition operator) + +[[Mathematical Operations]] + {{PageNavigation}} +< diff --git a/internal/help/.txt b/internal/help/.txt index 0e69fe2bf..380c28d95 100644 --- a/internal/help/.txt +++ b/internal/help/.txt @@ -1,43 +1,59 @@ -The [[\]] mathematical operator performs [[INTEGER]] division on a numerical value. +==Welcome to the QB64 Wiki== + +QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS. + +[[File:IDE_macos.png|thumb|left|QB64's IDE running on macOS Catalina]] + +{| align="right" + | __TOC__ + |} + +==Getting started== +* Grab the latest version of QB64 from [https://github.com/QB64Team/qb64/releases/latest the releases page]. + +===FAQ=== +* [[QB64 FAQ|Frequently asked questions about QB64]] + +===Get in touch=== +* [https://qb64phoenix.com/forum/index.php QB64 Phoenix Edition Forum] +* [https://discord.com/invite/2t9HTYK Discord invitation] -{{PageSyntax}} -:return_value = number [[\]] divisor +==Keywords== +* [[Keyword Reference - Alphabetical]] +* [[Keyword Reference - By usage]] +* [[Syntax Reference - QB64]] +===Known issues=== +* [[Keywords currently not supported by QB64|Legacy keywords not supported by QB64]] +* [[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords not supported in Linux or macOS versions]] -{{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. -* Division and multiplication operations are performed before addition and subtraction in QBasic's order of operations. - - -{{PageExamples}} -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 -{{Cl|PRINT}} 2.5 \ 1 -{{Cl|PRINT}} 3.5 \ 1 -{{Cl|PRINT}} 4.5 \ 1 -{{Cl|PRINT}} 5.5 \ 1 '' '' -{{CodeEnd}} -{{OutputStart}}0 -2 -2 -4 -4 -6 -{{OutputEnd}} - - -{{PageSeeAlso}} -* [[MOD|MOD (remainder division operator)]] -* [[/|/ (normal division operator)]] -* [[INT]], [[CINT]], [[FIX]], [[_ROUND]] +==Articles and Tutorials== +* [http://www.qb64sourcecode.com Terry Ritchie's QB64 Game Programming] +* [https://www.youtube.com/watch?v=hE-Voij5k5Q&list=PLF6199808BD4901E1 School Freeware series on QB64 (YouTube)] +* [[Arrays]] +* [[ASCII|ASCII Character Codes]] +* [[Binary|Binary Numbers]] +* [[Boolean|Boolean Operations]] +* [[_CLIPBOARD$|Clipboard]] +* [[Converting Bytes to Bits]] +* [[Console Window]] +* [[Controller Devices]] (Keyboard, Mouse, Joystick, Gamepad) +* [[Downloading Files]] (TCP/IP) +* [[Windows Environment|Environment (Windows Registry)]] +* [[Hardware images]] +* [[Images|Image file procedures]] +* [[Keyboard scancodes|Keyboard Scan Codes]] +* [[Libraries]] ([[C Libraries|C++]], [[Windows Libraries|Windows]], [[DLL Libraries|DLL]]) * [[Mathematical Operations]] - - -{{PageNavigation}} +* [[PDS (7.1) Procedures]] +* [[Port Access Libraries]] +* [[QB 4.5 Library Ports For QB64]] +* [[Relational Operations]] +* [[Line numbers]] +* [[Line number|Removing line numbers]] +* [[Resource Table extraction]] {{text|([[Resource_Table_extraction#Extract_Icon|Icon Extraction]])}} +* [[Screen Memory]] +* [[Text Using Graphics|Text, Fonts and Unicode Using Graphics]] +* [[Variable Types]] +< diff --git a/internal/help/ABS.txt b/internal/help/ABS.txt index b76ae5e51..1c6150c22 100644 --- a/internal/help/ABS.txt +++ b/internal/help/ABS.txt @@ -35,3 +35,4 @@ c = {{Cl|ABS}}(c) {{PageNavigation}} +< diff --git a/internal/help/ACCESS.txt b/internal/help/ACCESS.txt index c971c5545..c364960e2 100644 --- a/internal/help/ACCESS.txt +++ b/internal/help/ACCESS.txt @@ -1,27 +1,162 @@ -#REDIRECT [[OPEN#File_ACCESS_and_LOCK_Permissions]] - -The [[ACCESS]] clause is used in an [[OPEN]] statement when working over a network. +The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output. {{PageSyntax}} -:OPEN "file.dat" FOR APPEND ['''ACCESS {READ|WRITE}'''] AS #1 +: [[OPEN]] {{Parameter|fileName$}} ['''FOR''' {{Parameter|mode}}] [{{{KW|ACCESS}}|{{{KW|LOCK}}|SHARED}} [{READ|WRITE}] [[AS]] [#]{{Parameter|fileNumber&}} [LEN = {{Parameter|recordLength}}] + + +===Legacy ''GW-BASIC'' syntax=== +: [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] + + +{{Parameters}} +* The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. +* FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). +* GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. +* {{Parameter|fileNumber&}} can be any '''positive''' [[INTEGER]] or [[LONG]] whole number value or an unused value determined by the [[FREEFILE]] function. +* [[LEN]] = or {{Parameter|recordLength}} is optional to denote the RANDOM file record byte length (default = 128) or sequential (default = 512) load buffer. + {{PageDescription}} -* Valid Options: -**Default: When specified, all other processes are denied file access. -**READ: When specified, read access is denied to other file procedures. -**WRITE: When specified, write access is denied to other file procedures. -**READ WRITE: When specified any access is denied to other file procedures. +* '''QB64''' can open as many files as your computer memory can handle. QBasic could only open about 15 at a time. +* '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' +* {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) +* '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. +* {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. +* Once a file or port is opened, it can be used in any program procedure using the assigned file number. +* The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +: '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. +* [[OPEN COM]] can also be used for serial port access in '''QB64'''. -===Limitations=== -*If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. +{{PageErrors}} +* Illegal '''QB64''' Windows filename characters are ''' " * / \ | ? : < > '''. Multiple dots (periods) are allowed. +* Possible OPEN [[ERROR Codes|errors]] include "Bad file name or number", "Bad File Mode", "File Not Found" or "Path Not Found". +** An OPEN file not found error may occur if [[CHR$]](0) to (31) are used in a Windows file name. +* '''QB64''' does not have DOS file name limitations. -{{PageSeeAlso}} -* [[LOCK]], [[LOCK (access)]] -* [[OPEN]] -* [[ON ERROR]] +==Details== +===File ACCESS and LOCK Permissions=== +* [[ACCESS]] clause limits file access to READ, WRITE or READ WRITE on a network. +* [[LOCK (access)|LOCK]] clause can specify SHARED or a LOCK READ or LOCK WRITE file lock in an OPEN statement working on a network. +* A separate [[LOCK]] statement can lock or [[UNLOCK]] file access on a network using a format that can lock specific records. +* If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. + +===File Access Modes=== +* FOR mode can be: +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. +** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' +** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' +** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. +** '''RANDOM''': Creates a new file when it doesn't exist or reads or writes to an existing random file record. Use [[GET|GET #]] or [[PUT|PUT #]] to read or write to file records. A [[LEN]] = statement can define the byte size of a record (no LEN statement defaults to 128 bytes) +** Modes '''INPUT''', '''BINARY''' and '''RANDOM''' allow a file to be concurrently opened in a different mode and number. + + +====GW-BASIC modes==== +* ''Mode letter'' is a variable or literal [[STRING]] letter value as one of the following: +** "A" = '''APPEND'''. +** "B" = '''BINARY'''. +** "I" = '''INPUT'''. +** "O" = '''OUTPUT'''. +** "R" = '''RANDOM'''. + + +{{PageExamples}} +''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. + +{{CodeStart}} + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% + +{{Cl|FUNCTION}} CheckName% (Filename$) + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} + L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension + {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} + CheckName% = -1: {{Cl|COLOR}} 12: {{Cl|PRINT}} "Illegal format!"; : {{Cl|EXIT FUNCTION}} + {{Cl|END IF}} + {{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} L 'check each filename character" + code% = {{Cl|ASC}}({{Cl|MID$}}(Filename$, i%, 1)): {{Cl|COLOR}} 10 ' see ASCII codes + {{Cl|SELECT CASE}} code% 'check for errors and highlight in red + '{{Cl|CASE}} 34, 42 {{Cl|TO}} 44, 47, 58 {{Cl|TO}} 63, 91 {{Cl|TO}} 93, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QBasic errors''' + {{Cl|CASE}} 34, 42, 47, 58, 60, 62, 92, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QB64 errors''' + {{Cl|CASE}} 46: dot% = dot% + 1: {{Cl|IF...THEN|IF}} dot% > 1 {{Cl|THEN}} E% = E% + 1: {{Cl|COLOR}} 12 + {{Cl|END SELECT}} + {{Cl|PRINT}} {{Cl|CHR$}}(code%); 'use {{Cl|LOCATE}} before {{Cl|FUNCTION}} call to place print + {{Cl|NEXT}} + CheckName% = E% +{{Cl|END FUNCTION}} '' '' +{{CodeEnd}} +''Note: The QBasic character error list is commented out and the function will return invalid filenames under QB64. + +{{OutputStart}} + {{text|Hello|#54FC54}}{{text|,|red}}{{text|~1.mp3|#54FC54}} {{text|Total Errors|yellow}}<nowiki> = </nowiki>{{text|1|yellow}} +{{OutputEnd}} +:''Note:'' The screen output displays filename characters in green except for red comma QBasic error. + + +''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: +{{CodeStart}} '' '' +f% = {{Cl|FREEFILE}} 'should always be 1 at program start +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +g% = {{Cl|FREEFILE}} 'should always be 2 after 1 +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% + +{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 + {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" +NEXT '' '' +{{CodeEnd}}{{small|code by Steve McNeill}} +: ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. + + +''Example 3:'' Showcasing different file modes. +{{CodeStart}} +{{Cl|CLS}} + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst didn't exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "A new file was created named test.tst and then deleted." +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst did exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "It was overwritten with this and deleted." +{{Cl|CLOSE}} #1 + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 +{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1) +{{Cl|INPUT (file statement)|INPUT}} #1, a$ +{{Cl|PRINT}} a$ +{{Cl|LOOP}} +{{Cl|CLOSE}} #1 + +{{Cl|KILL}} "test.tst" + +{{Cl|END}} + +{{CodeEnd}} + +{{OutputStart}} +If test.tst didn't exist: +A new file was created named test.tst and then deleted. +If test.tst did exist: +It was overwritten with this and deleted. +{{OutputEnd}} +:'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. + + +{{PageSeeAlso}} +* [[PRINT (file statement)]], [[INPUT (file statement)]] +* [[GET]], [[PUT]], [[WRITE (file statement)]] +* [[INPUT$]], [[LINE INPUT (file statement)]] +* [[CLOSE]], [[LOF]], [[EOF]], [[LOC]] +* [[SEEK (statement)]], [[SEEK]] +* [[OPEN COM]], [[LEN]], [[RESET]] +* [[FIELD]], [[TYPE]] +* [[_FILEEXISTS]], [[_DIREXISTS]] +* [[_OPENCLIENT]], [[_OPENHOST]], [[_OPENCONNECTION]] {{text|(TCP/IP)}} +* [[_SNDOPEN]], [[_LOADIMAGE]] {{PageNavigation}} +< diff --git a/internal/help/ALIAS.txt b/internal/help/ALIAS.txt index 8dede9d4e..7e69929fa 100644 --- a/internal/help/ALIAS.txt +++ b/internal/help/ALIAS.txt @@ -1,44 +1,2 @@ #REDIRECT [[DECLARE LIBRARY]] - -The [[ALIAS]] clause in a [[DECLARE LIBRARY]] statement block tells the program the name of the procedure used in the external library. - - -{{PageSyntax}} -: SUB ''pseudoname'' [[ALIAS]] ''actualname'' [(''parameters'')] - - -{{PageParameters}} -* The ''pseudo name'' is the name of the [[SUB]] or [[FUNCTION]] the QB64 program will use. -* The ''actual name'' is the same procedure name as it is inside of the DLL library. -* QB64 must use all parameters of imported procedures including optional ones. - - -{{PageDescription}} -* The ALIAS name clause is optional as the original library procedure name can be used. -* The procedure name does not have to be inside of quotes when using [[DECLARE LIBRARY]]. -* QB64 does not support optional parameters. - - -{{PageExamples}} -''Example:'' Instead of creating a SUB with the Library statement inside of it, just rename it: -{{CodeStart}} '' '' -{{Cl|DECLARE LIBRARY}} - {{Cl|SUB}} MouseMove {{Cl|ALIAS}} glutWarpPointer ({{Cl|BYVAL}} xoffset&, {{Cl|BYVAL}} yoffset&) -{{Cl|DECLARE LIBRARY|END DECLARE}} - -{{Cl|DO}} {{Cl|UNTIL}} {{Cl|_SCREENEXISTS}}: {{Cl|LOOP}} -{{Cl|PRINT}} "Hit a key..." -{{Cl|SLEEP}} - -MouseMove 1, 1 -{{CodeEnd}} -:''Explanation:'' When a Library procedure is used to represent another procedure name use ALIAS instead. Saves creating a SUB! Just place your name for the procedure first with the actual Library name after ALIAS. - - -{{PageSeeAlso}} -* [[SUB]], [[FUNCTION]] -* [[DECLARE LIBRARY]], [[BYVAL]] -* [[DECLARE DYNAMIC LIBRARY]] - - -{{PageNavigation}} +< diff --git a/internal/help/AND.txt b/internal/help/AND.txt index a432ca75c..600e9d4a9 100644 --- a/internal/help/AND.txt +++ b/internal/help/AND.txt @@ -74,3 +74,4 @@ The logical [[AND]] numerical operator compares two values in respect of their b {{PageNavigation}} +< diff --git a/internal/help/AND_(boolean).txt b/internal/help/AND_(boolean).txt index 8f989968c..37c4b2aac 100644 --- a/internal/help/AND_(boolean).txt +++ b/internal/help/AND_(boolean).txt @@ -61,3 +61,4 @@ True {{PageNavigation}} +< diff --git a/internal/help/APPEND.txt b/internal/help/APPEND.txt index a07f1e4b2..c364960e2 100644 --- a/internal/help/APPEND.txt +++ b/internal/help/APPEND.txt @@ -1,20 +1,162 @@ -#REDIRECT [[OPEN#File_Access_Modes]] - -[[APPEND]] is used in an output type [[OPEN]] statement to add data to the end of a file. +The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output. {{PageSyntax}} -: [[OPEN]] {{Parameter|fileName$}} '''FOR APPEND''' AS #1 +: [[OPEN]] {{Parameter|fileName$}} ['''FOR''' {{Parameter|mode}}] [{{{KW|ACCESS}}|{{{KW|LOCK}}|SHARED}} [{READ|WRITE}] [[AS]] [#]{{Parameter|fileNumber&}} [LEN = {{Parameter|recordLength}}] + + +===Legacy ''GW-BASIC'' syntax=== +: [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] + + +{{Parameters}} +* The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. +* FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). +* GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. +* {{Parameter|fileNumber&}} can be any '''positive''' [[INTEGER]] or [[LONG]] whole number value or an unused value determined by the [[FREEFILE]] function. +* [[LEN]] = or {{Parameter|recordLength}} is optional to denote the RANDOM file record byte length (default = 128) or sequential (default = 512) load buffer. {{PageDescription}} -* Creates an empty file using the filename if none exists. -* Mode places new data after the previous data in the file. -* Mode can use [[PRINT (file statement)]], [[WRITE (file statement)]] or [[PRINT USING (file statement)]] to output file data or text. +* '''QB64''' can open as many files as your computer memory can handle. QBasic could only open about 15 at a time. +* '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' +* {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) +* '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. +* {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. +* Once a file or port is opened, it can be used in any program procedure using the assigned file number. +* The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +: '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. +* [[OPEN COM]] can also be used for serial port access in '''QB64'''. -{{PageSeeAlso}} -[[OUTPUT]], [[RANDOM]], [[INPUT (file mode)]], [[BINARY]] +{{PageErrors}} +* Illegal '''QB64''' Windows filename characters are ''' " * / \ | ? : < > '''. Multiple dots (periods) are allowed. +* Possible OPEN [[ERROR Codes|errors]] include "Bad file name or number", "Bad File Mode", "File Not Found" or "Path Not Found". +** An OPEN file not found error may occur if [[CHR$]](0) to (31) are used in a Windows file name. +* '''QB64''' does not have DOS file name limitations. + + +==Details== +===File ACCESS and LOCK Permissions=== +* [[ACCESS]] clause limits file access to READ, WRITE or READ WRITE on a network. +* [[LOCK (access)|LOCK]] clause can specify SHARED or a LOCK READ or LOCK WRITE file lock in an OPEN statement working on a network. +* A separate [[LOCK]] statement can lock or [[UNLOCK]] file access on a network using a format that can lock specific records. +* If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. + +===File Access Modes=== +* FOR mode can be: +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. +** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' +** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' +** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. +** '''RANDOM''': Creates a new file when it doesn't exist or reads or writes to an existing random file record. Use [[GET|GET #]] or [[PUT|PUT #]] to read or write to file records. A [[LEN]] = statement can define the byte size of a record (no LEN statement defaults to 128 bytes) +** Modes '''INPUT''', '''BINARY''' and '''RANDOM''' allow a file to be concurrently opened in a different mode and number. + + +====GW-BASIC modes==== +* ''Mode letter'' is a variable or literal [[STRING]] letter value as one of the following: +** "A" = '''APPEND'''. +** "B" = '''BINARY'''. +** "I" = '''INPUT'''. +** "O" = '''OUTPUT'''. +** "R" = '''RANDOM'''. + + +{{PageExamples}} +''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. + +{{CodeStart}} + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% + +{{Cl|FUNCTION}} CheckName% (Filename$) + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} + L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension + {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} + CheckName% = -1: {{Cl|COLOR}} 12: {{Cl|PRINT}} "Illegal format!"; : {{Cl|EXIT FUNCTION}} + {{Cl|END IF}} + {{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} L 'check each filename character" + code% = {{Cl|ASC}}({{Cl|MID$}}(Filename$, i%, 1)): {{Cl|COLOR}} 10 ' see ASCII codes + {{Cl|SELECT CASE}} code% 'check for errors and highlight in red + '{{Cl|CASE}} 34, 42 {{Cl|TO}} 44, 47, 58 {{Cl|TO}} 63, 91 {{Cl|TO}} 93, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QBasic errors''' + {{Cl|CASE}} 34, 42, 47, 58, 60, 62, 92, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QB64 errors''' + {{Cl|CASE}} 46: dot% = dot% + 1: {{Cl|IF...THEN|IF}} dot% > 1 {{Cl|THEN}} E% = E% + 1: {{Cl|COLOR}} 12 + {{Cl|END SELECT}} + {{Cl|PRINT}} {{Cl|CHR$}}(code%); 'use {{Cl|LOCATE}} before {{Cl|FUNCTION}} call to place print + {{Cl|NEXT}} + CheckName% = E% +{{Cl|END FUNCTION}} '' '' +{{CodeEnd}} +''Note: The QBasic character error list is commented out and the function will return invalid filenames under QB64. + +{{OutputStart}} + {{text|Hello|#54FC54}}{{text|,|red}}{{text|~1.mp3|#54FC54}} {{text|Total Errors|yellow}}<nowiki> = </nowiki>{{text|1|yellow}} +{{OutputEnd}} +:''Note:'' The screen output displays filename characters in green except for red comma QBasic error. + + +''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: +{{CodeStart}} '' '' +f% = {{Cl|FREEFILE}} 'should always be 1 at program start +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +g% = {{Cl|FREEFILE}} 'should always be 2 after 1 +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% + +{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 + {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" +NEXT '' '' +{{CodeEnd}}{{small|code by Steve McNeill}} +: ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. + + +''Example 3:'' Showcasing different file modes. +{{CodeStart}} +{{Cl|CLS}} + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst didn't exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "A new file was created named test.tst and then deleted." +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst did exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "It was overwritten with this and deleted." +{{Cl|CLOSE}} #1 + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 +{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1) +{{Cl|INPUT (file statement)|INPUT}} #1, a$ +{{Cl|PRINT}} a$ +{{Cl|LOOP}} +{{Cl|CLOSE}} #1 + +{{Cl|KILL}} "test.tst" + +{{Cl|END}} + +{{CodeEnd}} + +{{OutputStart}} +If test.tst didn't exist: +A new file was created named test.tst and then deleted. +If test.tst did exist: +It was overwritten with this and deleted. +{{OutputEnd}} +:'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. + + +{{PageSeeAlso}} +* [[PRINT (file statement)]], [[INPUT (file statement)]] +* [[GET]], [[PUT]], [[WRITE (file statement)]] +* [[INPUT$]], [[LINE INPUT (file statement)]] +* [[CLOSE]], [[LOF]], [[EOF]], [[LOC]] +* [[SEEK (statement)]], [[SEEK]] +* [[OPEN COM]], [[LEN]], [[RESET]] +* [[FIELD]], [[TYPE]] +* [[_FILEEXISTS]], [[_DIREXISTS]] +* [[_OPENCLIENT]], [[_OPENHOST]], [[_OPENCONNECTION]] {{text|(TCP/IP)}} +* [[_SNDOPEN]], [[_LOADIMAGE]] {{PageNavigation}} +< diff --git a/internal/help/AS.txt b/internal/help/AS.txt index e75c33aeb..6fa4f16a5 100644 --- a/internal/help/AS.txt +++ b/internal/help/AS.txt @@ -1,9 +1,9 @@ -The [[AS]] keyword defines a variable data [[Variable Types|type]]. +The [[AS]] keyword defines a variable data [[type]]. {{PageDescription}} * AS defines the variable or array type AS [[_BIT]], [[_BYTE]], [[INTEGER]], [[LONG]], [[_INTEGER64]], [[SINGLE]], [[DOUBLE]], [[_FLOAT]] or [[STRING]]. -* Specifies a variable's [[Variable Types|type]] in a declarative statement or parameter list using: +* Specifies a variable's [[type]] in a declarative statement or parameter list using: ** [[DIM]] or [[REDIM]] ** [[DECLARE LIBRARY]] ** [[SUB]] @@ -15,7 +15,7 @@ The [[AS]] keyword defines a variable data [[Variable Types|type]]. ===Details=== -* Specifies a '''[[parameter]]''' variable's type in a [[SUB]] or [[FUNCTION]] procedure. '''Cannot be used to define a function's [[Variable Types|type]]''' +* Specifies a '''[[parameter]]''' variable's type in a [[SUB]] or [[FUNCTION]] procedure. '''Cannot be used to define a function's [[type]]''' * Specifies an element's type in a user-defined data [[TYPE]]. * Assigns a file number to a file or device in an [[OPEN]] statement. * Specifies a field name in a random-access record (see [[FIELD]]) @@ -31,3 +31,4 @@ The [[AS]] keyword defines a variable data [[Variable Types|type]]. {{PageNavigation}} +< diff --git a/internal/help/ASC.txt b/internal/help/ASC.txt index 329dcf874..8da125c00 100644 --- a/internal/help/ASC.txt +++ b/internal/help/ASC.txt @@ -91,9 +91,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}} {{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) '' '' + {{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) '' '' {{CodeEnd}} ''Returns:'' @@ -114,8 +114,8 @@ 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" -{{Cl|DO}} - {{Cl|DO}}: {{Cl|SLEEP}}: key$ = {{Cl|INKEY$}}: {{Cl|LOOP}} {{Cl|UNTIL}} key$ <> "" ' prevent ASC empty string read error +DO + 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): @@ -133,18 +133,18 @@ Q$ = {{Cl|CHR$}}(34) ' quote character ''Example 3:'' Reading only numerical values input by a program user. {{CodeStart}} - {{Cl|DO}}: {{Cl|SLEEP}} ' requires a keypress to run loop once - K$ = {{Cl|INKEY$}} + DO: {{Cl|SLEEP}} ' requires a keypress to run loop once + K$ = {{Cl|{{Cl|INKEY$}}}} code = {{Cl|ASC}}(K$) - {{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}} + {{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}} entry$ = entry$ + K$: flag = 1: mark = {{Cl|LEN}}(entry$) ' decimal point {{Cl|END IF}} - 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 + 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 {{Cl|END IF}} {{Cl|LOCATE}} 10, 10: {{Cl|PRINT}} entry$; ' display present entry to user(semicolon required for correct POS return) @@ -164,3 +164,4 @@ Q$ = {{Cl|CHR$}}(34) ' quote character {{PageNavigation}} +< diff --git a/internal/help/ASC_(statement).txt b/internal/help/ASC_(statement).txt index e893a9594..8c26e7c85 100644 --- a/internal/help/ASC_(statement).txt +++ b/internal/help/ASC_(statement).txt @@ -43,3 +43,4 @@ The [[ASC (statement)|ASC]] statement allows a '''QB64''' program to change a ch {{PageNavigation}} +< diff --git a/internal/help/ATN.txt b/internal/help/ATN.txt index a299716e3..3daae6d6f 100644 --- a/internal/help/ATN.txt +++ b/internal/help/ATN.txt @@ -5,7 +5,7 @@ The [[ATN]] or arctangent function returns the angle in radians of a numerical [ : {{Parameter|radianAngle}} = [[ATN]]({{Parameter|tangent!}}) -{{PageParameters}} +{{Parameters}} * The return is the {{Parameter|tangent!}}'s angle in '''radians'''. * {{Parameter|tangent!}} [[SINGLE]] or [[DOUBLE]] values are used by the function. EX:'''{{text|Pi <nowiki>=</nowiki> 4 * ATN(1)|green}}''' @@ -30,7 +30,7 @@ y = 100 * {{Cl|SIN}}({{Cl|ATN}}(1)) {{CodeStart}} '' '' Pi = 4 * {{Cl|ATN}}(1) '{{Cl|SINGLE}} precision Pi# = 4 * {{Cl|ATN}}(1#) '{{Cl|DOUBLE}} precision -{{Cl|PRINT}} Pi, Pi# '' '' +PRINT Pi, Pi# '' '' {{CodeEnd}} :''Note:'' You can use QB64's native [[_PI]] function. @@ -41,38 +41,38 @@ Pi# = 4 * {{Cl|ATN}}(1#) '{{Cl|DOUBLE}} precision x1! = 320 y1! = 240 -{{Cl|DO}} - {{Cl|PRESET}} (x1!, y1!), {{Cl|_RGB}}(255, 255, 255) - dummy% = {{Cl|_MOUSEINPUT}} - x2! = {{Cl|_MOUSEX}} - y2! = {{Cl|_MOUSEY}} - {{Cl|LINE}} (x1, y1)-(x2, y2), {{Cl|_RGB}}(255, 0, 0) - {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} getangle(x1!, y1!, x2!, y2!) - {{Cl|_DISPLAY}} - {{Cl|_LIMIT}} 200 - {{Cl|CLS}} +DO + {{Cl|PRESET}} (x1!, y1!), {{Cl|_RGB}}(255, 255, 255) + dummy% = {{Cl|_MOUSEINPUT}} + x2! = {{Cl|_MOUSEX}} + y2! = {{Cl|_MOUSEY}} + {{Cl|LINE}} (x1, y1)-(x2, y2), {{Cl|_RGB}}(255, 0, 0) + {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} getangle(x1!, y1!, x2!, y2!) + {{Cl|_DISPLAY}} + {{Cl|_LIMIT}} 200 + {{Cl|CLS}} {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" {{Cl|END}} {{Cl|FUNCTION}} getangle# (x1#, y1#, x2#, y2#) 'returns 0-359.99... - {{Cl|IF...THEN|IF}} y2# = y1# {{Cl|THEN}} - {{Cl|IF...THEN|IF}} x1# = x2# {{Cl|THEN}} {{Cl|EXIT FUNCTION}} - {{Cl|IF...THEN|IF}} x2# > x1# {{Cl|THEN}} getangle# = 90 {{Cl|ELSE}} getangle# = 270 - {{Cl|EXIT FUNCTION}} - {{Cl|END IF}} - {{Cl|IF...THEN|IF}} x2# = x1# {{Cl|THEN}} - {{Cl|IF...THEN|IF}} y2# > y1# {{Cl|THEN}} getangle# = 180 - {{Cl|EXIT FUNCTION}} - {{Cl|END IF}} - {{Cl|IF...THEN|IF}} y2# < y1# {{Cl|THEN}} - {{Cl|IF...THEN|IF}} x2# > x1# {{Cl|THEN}} - getangle# = {{Cl|ATN}}((x2# - x1#) / (y2# - y1#)) * -57.2957795131 - {{Cl|ELSE}} - getangle# = {{Cl|ATN}}((x2# - x1#) / (y2# - y1#)) * -57.2957795131 + 360 - {{Cl|END IF}} - {{Cl|ELSE}} - getangle# = {{Cl|ATN}}((x2# - x1#) / (y2# - y1#)) * -57.2957795131 + 180 - {{Cl|END IF}} +{{Cl|IF...THEN|IF}} y2# = y1# {{Cl|THEN}} + {{Cl|IF...THEN|IF}} x1# = x2# {{Cl|THEN}} {{Cl|EXIT FUNCTION}} + {{Cl|IF...THEN|IF}} x2# > x1# {{Cl|THEN}} getangle# = 90 {{Cl|ELSE}} getangle# = 270 + {{Cl|EXIT FUNCTION}} +{{Cl|END IF}} +{{Cl|IF...THEN|IF}} x2# = x1# {{Cl|THEN}} + {{Cl|IF...THEN|IF}} y2# > y1# {{Cl|THEN}} getangle# = 180 + {{Cl|EXIT FUNCTION}} +{{Cl|END IF}} +{{Cl|IF...THEN|IF}} y2# < y1# {{Cl|THEN}} + {{Cl|IF...THEN|IF}} x2# > x1# {{Cl|THEN}} + getangle# = {{Cl|ATN}}((x2# - x1#) / (y2# - y1#)) * -57.2957795131 + {{Cl|ELSE}} + getangle# = {{Cl|ATN}}((x2# - x1#) / (y2# - y1#)) * -57.2957795131 + 360 + {{Cl|END IF}} +{{Cl|ELSE}} + getangle# = {{Cl|ATN}}((x2# - x1#) / (y2# - y1#)) * -57.2957795131 + 180 +{{Cl|END IF}} {{Cl|END FUNCTION}} '' '' {{CodeEnd}}{{small|Function by Galleon}} @@ -86,3 +86,4 @@ y1! = 240 {{PageNavigation}} +< diff --git a/internal/help/Apostrophe.txt b/internal/help/Apostrophe.txt index af328db0d..761361fae 100644 --- a/internal/help/Apostrophe.txt +++ b/internal/help/Apostrophe.txt @@ -1,15 +1,10 @@ -The '''apostrophe''' allows explanatory comments, or remarks, to be inserted in a program. These may be included anywhere in the source code and extend to the end of the line. Comments are ignored when the program is run. - -{{PageSyntax}} -:: [[apostrophe|']] this is a comment -:: [[REM]] this is also a comment - +The '''apostrophe''' is used to tell the compiler to ignore a statement or programmer comment. {{PageDescription}} -* [[REM]] can also be used to insert comments but may only be used as the last, or only, statement on a line. -* QBasic [[metacommand]]s like [[$INCLUDE]] must be included in a comment using either [[REM]] or [[apostrophe|']]. -* [[Apostrophe]] comments, unavailable in earlier dialects of the BASIC language, are now generally favored over [[REM]] statements for their greater flexibility. -* Comments are also useful for disabling code for program testing and debugging purposes. +* Allows programmer comments or temporary code removal. +* [[REM]] can also be used to "comment out" a line. +* QBasic [[Metacommand|metacommand]]s must be commented either with an apostrophe or [[REM]]. +* [[$INCLUDE]] requires an apostrophe before and after the included file name. {{PageExamples}} @@ -23,8 +18,9 @@ COLOR 11: PRINT "Print this...." ' PRINT "Don't print this program comment!" {{PageSeeAlso}} +* [[Comma]], [[Semicolon]] * [[REM]] -* [[$DYNAMIC]], [[$STATIC]], [[$INCLUDE]] {{PageNavigation}} +< diff --git a/internal/help/BEEP.txt b/internal/help/BEEP.txt index 9e10c44a1..2b9394597 100644 --- a/internal/help/BEEP.txt +++ b/internal/help/BEEP.txt @@ -10,7 +10,7 @@ The [[BEEP]] statement produces a beep sound through the sound card. * '''QB64''' produces the actual "beep" sound through the PC's sound card, to emulate QBasic's beeping through the [https://en.wikipedia.org/wiki/PC_speaker PC speaker]. -{{PageQBasic}} +==QBasic/QuickBASIC== * Older programs may attempt to produce a BEEP by printing [[CHR$]](7) to the screen. This is no longer supported in QB64 after '''version 1.000'''. ** You may have to replace instances of PRINT CHR$(7) in older programs to the [[BEEP]] statement to maintain the legacy functionality. @@ -22,3 +22,4 @@ The [[BEEP]] statement produces a beep sound through the sound card. {{PageNavigation}} +< diff --git a/internal/help/BINARY.txt b/internal/help/BINARY.txt index 42b26bbfd..c364960e2 100644 --- a/internal/help/BINARY.txt +++ b/internal/help/BINARY.txt @@ -1,84 +1,162 @@ -#REDIRECT [[OPEN#File_Access_Modes]] - -[[BINARY]] is used in an [[OPEN]] statement to work with the file or port device manipulating its bytes directly. +The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output. {{PageSyntax}} -:[[OPEN]] {{Parameter|fileName$}} [[FOR]] [[BINARY]] [[AS]] {{Parameter|#fileNumber%}} +: [[OPEN]] {{Parameter|fileName$}} ['''FOR''' {{Parameter|mode}}] [{{{KW|ACCESS}}|{{{KW|LOCK}}|SHARED}} [{READ|WRITE}] [[AS]] [#]{{Parameter|fileNumber&}} [LEN = {{Parameter|recordLength}}] + + +===Legacy ''GW-BASIC'' syntax=== +: [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] + + +{{Parameters}} +* The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. +* FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). +* GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. +* {{Parameter|fileNumber&}} can be any '''positive''' [[INTEGER]] or [[LONG]] whole number value or an unused value determined by the [[FREEFILE]] function. +* [[LEN]] = or {{Parameter|recordLength}} is optional to denote the RANDOM file record byte length (default = 128) or sequential (default = 512) load buffer. {{PageDescription}} -* [[OPEN]] FOR BINARY creates the file if the {{Parameter|fileName$}} does not exist. -* {{Parameter|fileName$}} is the name of the file to open, but could also configure a port. -* {{Parameter|#fileNumber%}} is the number that will represent the file when performing file operations. -* BINARY files use [[GET|GET #]] and [[PUT|PUT #]] to read or write the file at any byte position. -* In '''version 1.000 and up''' you can use [[LINE INPUT]] in [[BINARY]] mode for faster access to text file data. -* QBasic's [[BSAVE]] or BINARY save files can be read using BINARY mode. -* BINARY mode ignores any [[LEN]] = recordlength statement in the [[OPEN]] statement. -* Ports can also be opened in [[BINARY]] mode. See: [[OPEN COM]] +* '''QB64''' can open as many files as your computer memory can handle. QBasic could only open about 15 at a time. +* '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' +* {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) +* '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. +* {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. +* Once a file or port is opened, it can be used in any program procedure using the assigned file number. +* The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +: '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. +* [[OPEN COM]] can also be used for serial port access in '''QB64'''. + + +{{PageErrors}} +* Illegal '''QB64''' Windows filename characters are ''' " * / \ | ? : < > '''. Multiple dots (periods) are allowed. +* Possible OPEN [[ERROR Codes|errors]] include "Bad file name or number", "Bad File Mode", "File Not Found" or "Path Not Found". +** An OPEN file not found error may occur if [[CHR$]](0) to (31) are used in a Windows file name. +* '''QB64''' does not have DOS file name limitations. + + +==Details== +===File ACCESS and LOCK Permissions=== +* [[ACCESS]] clause limits file access to READ, WRITE or READ WRITE on a network. +* [[LOCK (access)|LOCK]] clause can specify SHARED or a LOCK READ or LOCK WRITE file lock in an OPEN statement working on a network. +* A separate [[LOCK]] statement can lock or [[UNLOCK]] file access on a network using a format that can lock specific records. +* If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. + +===File Access Modes=== +* FOR mode can be: +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. +** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' +** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' +** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. +** '''RANDOM''': Creates a new file when it doesn't exist or reads or writes to an existing random file record. Use [[GET|GET #]] or [[PUT|PUT #]] to read or write to file records. A [[LEN]] = statement can define the byte size of a record (no LEN statement defaults to 128 bytes) +** Modes '''INPUT''', '''BINARY''' and '''RANDOM''' allow a file to be concurrently opened in a different mode and number. + + +====GW-BASIC modes==== +* ''Mode letter'' is a variable or literal [[STRING]] letter value as one of the following: +** "A" = '''APPEND'''. +** "B" = '''BINARY'''. +** "I" = '''INPUT'''. +** "O" = '''OUTPUT'''. +** "R" = '''RANDOM'''. {{PageExamples}} -''Example 1:'' Shows how a PUT variable value is converted to an [[ASCII]] string [[_MK$]] format in a BINARY file. -{{CodeStart}} '' '' -{{Cl|DIM}} int64 {{Cl|AS}} {{Cl|_INTEGER64}} -{{Cl|DIM}} byte8 {{Cl|AS}} {{Cl|STRING}} * 8 -int64 = 12345678 -{{Cl|PRINT}} int64 +''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. -{{Cl|OPEN}} "temp64.tmp" {{Cl|FOR...NEXT|FOR}} {{Cl|BINARY}} {{Cl|AS}} #1 -{{Cl|PUT}} #1, , int64 'the file size will be 8 bytes -{{Cl|CLOSE}} +{{CodeStart}} + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% -{{Cl|PRINT}} "Press a key to read the file!" -K$ = {{Cl|INPUT$}}(1) - -{{Cl|OPEN}} "temp64.tmp" {{Cl|FOR...NEXT|FOR}} {{Cl|BINARY}} {{Cl|AS}} #1 -{{Cl|GET}} #1, , byte8 'GET the value as a string -{{Cl|PRINT}} "text string: "; byte8 'show that string is in {{Cl|_MK$}} format - -{{Cl|PRINT}} {{Cl|_CV}}({{Cl|_INTEGER64}}, byte8) 'convert to numerical value -{{Cl|CLOSE}} '' '' +{{Cl|FUNCTION}} CheckName% (Filename$) + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} + L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension + {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} + CheckName% = -1: {{Cl|COLOR}} 12: {{Cl|PRINT}} "Illegal format!"; : {{Cl|EXIT FUNCTION}} + {{Cl|END IF}} + {{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} L 'check each filename character" + code% = {{Cl|ASC}}({{Cl|MID$}}(Filename$, i%, 1)): {{Cl|COLOR}} 10 ' see ASCII codes + {{Cl|SELECT CASE}} code% 'check for errors and highlight in red + '{{Cl|CASE}} 34, 42 {{Cl|TO}} 44, 47, 58 {{Cl|TO}} 63, 91 {{Cl|TO}} 93, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QBasic errors''' + {{Cl|CASE}} 34, 42, 47, 58, 60, 62, 92, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QB64 errors''' + {{Cl|CASE}} 46: dot% = dot% + 1: {{Cl|IF...THEN|IF}} dot% > 1 {{Cl|THEN}} E% = E% + 1: {{Cl|COLOR}} 12 + {{Cl|END SELECT}} + {{Cl|PRINT}} {{Cl|CHR$}}(code%); 'use {{Cl|LOCATE}} before {{Cl|FUNCTION}} call to place print + {{Cl|NEXT}} + CheckName% = E% +{{Cl|END FUNCTION}} '' '' {{CodeEnd}} -: ''Note:'' The numerical value does not need to be converted if the file is read using the same numerical variable type as written. +''Note: The QBasic character error list is commented out and the function will return invalid filenames under QB64. + +{{OutputStart}} + {{text|Hello|#54FC54}}{{text|,|red}}{{text|~1.mp3|#54FC54}} {{text|Total Errors|yellow}}<nowiki> = </nowiki>{{text|1|yellow}} +{{OutputEnd}} +:''Note:'' The screen output displays filename characters in green except for red comma QBasic error. -''Example 2:'' A binary file viewer that can view integer values. The type of value can be changed at [[DIM]]. +''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: {{CodeStart}} '' '' -{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(1000, 600, 256) -{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}} -{{Cl|DIM}} value AS {{Cl|INTEGER}} 'value type can be changed -{{Cl|LINE INPUT}} ; "Enter a {{Cl|BINARY}} filename to open: ", file$ -{{Cl|PRINT}} " Press S to restart!" +f% = {{Cl|FREEFILE}} 'should always be 1 at program start +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +g% = {{Cl|FREEFILE}} 'should always be 2 after 1 +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% -{{Cl|IF...THEN|IF}} {{Cl|LEN}}(file$) {{Cl|THEN}} {{Cl|OPEN}} file$ {{Cl|FOR...NEXT|FOR}} {{Cl|BINARY}} {{Cl|AS}} #1 {{Cl|ELSE}} {{Cl|END}} -{{Cl|IF...THEN|IF}} {{Cl|LOF}}(1) = 0 {{Cl|THEN}} {{Cl|PRINT}} "Empty file!": {{Cl|END}} -DO - {{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 16 - x = x + 1 - {{Cl|GET}} #1, , value - {{Cl|IF...THEN|IF}} {{Cl|EOF}}(1) {{Cl|THEN}} {{Cl|EXIT DO}} - {{Cl|PRINT}} value; - {{Cl|NEXT}} - {{Cl|PRINT}} {{Cl|CHR$}}(27); x; "@"; row - K$ = {{Cl|INPUT$}}(1) - {{Cl|IF...THEN|IF}} {{Cl|UCASE$}}(K$) = "S" {{Cl|THEN}} {{Cl|CLS}}: x = 0: row = 0: {{Cl|PRINT}} "Restarted!": {{Cl|SEEK}} 1, 1 - {{Cl|IF...THEN|IF}} x = 256 {{Cl|THEN}} x = 0: row = row + 1: {{Cl|PRINT}} -{{Cl|LOOP}} {{Cl|UNTIL}} K$ = {{Cl|CHR$}}(27) +{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 + {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" +NEXT '' '' +{{CodeEnd}}{{small|code by Steve McNeill}} +: ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. + + +''Example 3:'' Showcasing different file modes. +{{CodeStart}} +{{Cl|CLS}} + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst didn't exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "A new file was created named test.tst and then deleted." +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst did exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "It was overwritten with this and deleted." {{Cl|CLOSE}} #1 -{{Cl|PRINT}} "Press Escape to exit!" -DO: {{Cl|_LIMIT}} 100 -{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) -{{Cl|SYSTEM}} '' '' + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 +{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1) +{{Cl|INPUT (file statement)|INPUT}} #1, a$ +{{Cl|PRINT}} a$ +{{Cl|LOOP}} +{{Cl|CLOSE}} #1 + +{{Cl|KILL}} "test.tst" + +{{Cl|END}} + {{CodeEnd}} +{{OutputStart}} +If test.tst didn't exist: +A new file was created named test.tst and then deleted. +If test.tst did exist: +It was overwritten with this and deleted. +{{OutputEnd}} +:'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. -{{PageSeeAlso}} -* [[OPEN]], [[CLOSE]] -* [[GET]], [[PUT]], [[LINE INPUT]] -* [[SEEK]] (function), [[SEEK (statement)]] -* [[INPUT (file mode)]], [[RANDOM]], [[APPEND]], [[OUTPUT]] -* [[Bitmaps]], [[Binary]] (numbers) + +{{PageSeeAlso}} +* [[PRINT (file statement)]], [[INPUT (file statement)]] +* [[GET]], [[PUT]], [[WRITE (file statement)]] +* [[INPUT$]], [[LINE INPUT (file statement)]] +* [[CLOSE]], [[LOF]], [[EOF]], [[LOC]] +* [[SEEK (statement)]], [[SEEK]] +* [[OPEN COM]], [[LEN]], [[RESET]] +* [[FIELD]], [[TYPE]] +* [[_FILEEXISTS]], [[_DIREXISTS]] +* [[_OPENCLIENT]], [[_OPENHOST]], [[_OPENCONNECTION]] {{text|(TCP/IP)}} +* [[_SNDOPEN]], [[_LOADIMAGE]] {{PageNavigation}} +< diff --git a/internal/help/BLOAD.txt b/internal/help/BLOAD.txt index dd6949260..c2a198fb3 100644 --- a/internal/help/BLOAD.txt +++ b/internal/help/BLOAD.txt @@ -1,6 +1,6 @@ [[BLOAD]] loads a binary graphics file created by [[BSAVE]] to an array. -{{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.''' @@ -8,7 +8,7 @@ : [[BLOAD]] {{Parameter|fileName$}}, [[VARPTR]]({{Parameter|imageArray%({{Parameter|index}})}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|fileName$}} is the name of the file that the image should be [[BSAVE]]d to. * {{Parameter|imageArray%(index)}} is the [[INTEGER]] [[arrays|array]] start index to store the image loaded. @@ -53,3 +53,4 @@ {{PageNavigation}} +< diff --git a/internal/help/BSAVE.txt b/internal/help/BSAVE.txt index f54775e43..76a2cd300 100644 --- a/internal/help/BSAVE.txt +++ b/internal/help/BSAVE.txt @@ -1,15 +1,15 @@ [[BSAVE]] saves the contents of an image array to a [[BINARY]] file. -{{PageLegacySupport}} -* QB64 can save larger arrays directly to binary files using [[PUT]] # and [[GET]] # without [[BSAVE]]. For that reason, use of [[BSAVE]] is no longer recommended practice but is supported to maintain compatibility with legacy code. +==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. {{PageSyntax}} : [[BSAVE]] {{Parameter|saveFile$}}, [[VARPTR]]({{Parameter|array(index)}}), {{Parameter|fileSize&}} -{{PageParameters}} +{{Parameters}} * {{Parameter|saveFile$}} is the STRING file name of the file designated to be created. * {{Parameter|array(index)}} is the image [[arrays|array]] that already holds the [[GET (graphics statement)|GET]] image data. * {{Parameter|fileSize&}} must be a bit over twice the size of the elements used in an [[INTEGER]] [[Arrays|array]]. @@ -65,16 +65,16 @@ {{Cl|GET (graphics statement)|GET}}(0, 0)-{{Cl|STEP}}(10, 10), Graphic%() 'get image to array {{Cl|FOR...NEXT|FOR}} i% = 1000 {{Cl|TO}} 0 {{Cl|STEP}} -1 'reverse read array for size needed - {{Cl|IF...THEN|IF}} Graphic%(i%) <> 0 {{Cl|THEN}} {{Cl|EXIT FOR}} 'find image color not black + {{Cl|IF...THEN|IF}} Graphic%(i%) <> 0 {{Cl|THEN}} {{Cl|EXIT}} {{Cl|FOR...NEXT|FOR}} 'find image color not black {{Cl|NEXT}} size% = i% + 4 'size plus 2 integers(4 bytes) for dimensions {{Cl|REDIM}} {{Cl|_PRESERVE}} Graphic%(size%) 'resize existing array in QB64 only! -{{Cl|OPEN}} "example2.BIN" {{Cl|FOR (file statement)|FOR}} {{Cl|BINARY}} {{Cl|AS}} #1 ' {{Cl|PUT}} to a file +{{Cl|OPEN}} "example2.BIN" {{Cl|FOR...NEXT|FOR}} {{Cl|BINARY}} {{Cl|AS}} #1 ' {{Cl|PUT}} to a file {{Cl|PUT}} #1, , Graphic%() {{Cl|CLOSE}} -{{Cl|OPEN}} "example2.BIN" {{Cl|FOR (file statement)|FOR}} {{Cl|BINARY}} {{Cl|AS}} #2 'GET array and {{Cl|PUT}} to screen +{{Cl|OPEN}} "example2.BIN" {{Cl|FOR...NEXT|FOR}} {{Cl|BINARY}} {{Cl|AS}} #2 'GET array and {{Cl|PUT}} to screen {{Cl|DIM}} CopyBin%({{Cl|LOF}}(2) \ 2) 'create new array sized by half of file size {{Cl|GET}} #2, , CopyBin%() {{Cl|PUT (graphics statement)|PUT}}(100, 100), CopyBin%(), {{Cl|PSET}} @@ -102,3 +102,4 @@ K$ = {{Cl|INPUT$}}(1) 'Press any key {{PageNavigation}} +< diff --git a/internal/help/BYVAL.txt b/internal/help/BYVAL.txt index b276657e9..8bc9ef772 100644 --- a/internal/help/BYVAL.txt +++ b/internal/help/BYVAL.txt @@ -1 +1,103 @@ -#REDIRECT [[DECLARE LIBRARY]] +The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]] and [[FUNCTION]] procedures supported by QB64. + + +{{PageSyntax}} +: '''DECLARE''' [DYNAMIC|CUSTOMTYPE|STATIC] '''LIBRARY''' [{''"Library_filename"''|''"Headerfile"''}] +: {[[SUB]]|[[FUNCTION]]} [''procedure_name'' {{KW|ALIAS}}] ''library_procedure'' ([{{KW|BYVAL}}] ''parameter {{KW|AS}}'', ...) +::. +::. 'other SUBs or Functions as required +::. +: '''END DECLARE''' + + +{{Parameters}} +* The {{Parameter|Library_filename}} is needed if a Library is not already loaded by QB64. Do not include the ''.DLL'', ''LIB'' or ''.H'' file extension. +** It's always a good idea to try declaring Windows API libraries without a {{Parameter|Library_filename}} first, as most Windows headers are already included in QB64 source. +* Begin the {{Parameter|Library_filename}} with '''./''' or '''.\''' to make it relative to the path where your source file is saved, so you can keep all your project files together. +* {{Parameter|Procedure_name}} is any program procedure name you want to designate by using [[ALIAS]] with the {{Parameter|Library_procedure}} name. +* {{Parameter|Library procedure}} is the actual procedure name used inside of the library or header file. + + +===Library Types=== +* '''[[DECLARE DYNAMIC LIBRARY|DYNAMIC]]''' links a program to functions in dynamically linkable libraries. At present, only .DLL files are supported +* '''CUSTOMTYPE''' is already implied when using [[DECLARE DYNAMIC LIBRARY]]. This type of library just allows the same flexibility to apply when referencing STATIC libraries that are used to refer to dynamic libraries. Supports shared object (*.so) libraries. +* '''STATIC''' is the same as [[DECLARE LIBRARY]] except that it prioritizes linking to static libraries (*.a/*.o) over shared object (*.so) libraries, if both exist. As Windows doesn't use shared libraries (DLLs are different) this does not affect Windows users. + + +{{PageDescription}} +* The declaration can be used with C++ sub-procedures, Windows API and QB64 SDL (versions prior to 1.000)/OpenGL (version 1.000 and up) Libraries. +* ''Library filename''s can be listed to combine more than one DLL or Header file name or path into one DECLARE LIBRARY block. +* C procedures can use a header file name. File code must be included with program code. Do not include the ''.h'' extension. +* ''Parameters'' used by the Library procedure must be passed by value ([[BYVAL]]) except for [[STRING]] characters. +* When using a procedure from an '''unsupported''' Dynamic Link Library (DLL file) use [[DECLARE DYNAMIC LIBRARY]]. + +* The [[_OFFSET]] in memory can be used in '''CUSTOMTYPE''', '''STATIC''' and '''DYNAMIC LIBRARY''' declarations. +* Declarations can be made inside of [[SUB]] or [[FUNCTION]] procedures. Declarations do not need to be at program start. +* '''NOTE: It is up to the user to document and determine the suitability of all Libraries and procedures they choose to use! QB64 cannot guarantee that any procedure will work and cannot quarantee any troubleshooting help.''' + + +{{PageExamples}} +''Example 1:'' Using an '''SDL''' library procedure as a program SUB procedure to move the mouse pointer to a coordinate (works in versions prior to 1.000): +{{CodeStart}} '' '' +{{Cl|DECLARE LIBRARY}} + {{Cl|SUB}} SDL_WarpMouse ({{Cl|BYVAL}} column {{Cl|AS}} {{Cl|LONG}}, {{Cl|BYVAL}} row {{Cl|AS}} {{Cl|LONG}}) 'SDL procedure name +{{Cl|DECLARE LIBRARY|END DECLARE}} +{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 256) 'simulate screen 12 with 256 colors +{{Cl|RANDOMIZE}} {{Cl|TIMER}} + +DO + {{Cl|_DELAY}} 1 + x = {{Cl|RND}} * 640: y = {{Cl|RND}} * 480 + {{Cl|LINE}} (x, y)-{{Cl|STEP}}(10, 10), {{Cl|RND}} * 100 + 32, BF + MouseMove x + 5, y + 5 +{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|LEN}}({{Cl|INKEY$}}) 'any keypress quits +{{Cl|END}} + +{{Cl|SUB}} MouseMove (x {{Cl|AS}} {{Cl|LONG}}, y {{Cl|AS}} {{Cl|LONG}}) +SDL_WarpMouse x, y 'call SDL library procedure +{{Cl|END SUB}} '' '' +{{CodeEnd}} +{{small|Code by Galleon}} +:''Explanation:'' The SDL Library is included and loaded with QB64 versions prior to 1.000, so these procedures are directly available for use. + +<center>'''Using [[ALIAS]] to create a program SUB or FUNCTION''' using '''QB64 SDL ONLY'''</center> +{{CodeStart}} '' '' +{{Cl|SCREEN}} 12 +{{Cl|DECLARE LIBRARY}} + {{Cl|SUB}} MouseMove {{Cl|ALIAS}} SDL_WarpMouse ({{Cl|BYVAL}} column&, {{Cl|BYVAL}} row&) +{{Cl|DECLARE LIBRARY|END DECLARE}} + +{{Cl|_DELAY}} 2 +MouseMove 100, 100 +{{Cl|_DELAY}} 2 +MouseMove 200, 200 '' '' +{{CodeEnd}} +:''Explanation:'' When a Library procedure is used to represent another procedure name use [[ALIAS]] instead. Saves creating a SUB! + + +''Example 2:'' Don't know if a C function is defined by C++ or QB64? Try using empty quotes. +{{CodeStart}} '' '' +{{Cl|DECLARE LIBRARY}} "" + {{Cl|FUNCTION}} addone& ({{Cl|BYVAL}} value&) +{{Cl|END}} DECLARE '' '' +{{CodeEnd}} +:''Explanation:'' The C function 'addone' exists in a library QB64 already links to, but it hasn't been defined as a C function or a QB64 function. By using "" we are telling QB64 the function exists in a library which is already linked to and that it must define the C function before calling it, as well as allowing QB64 code to call it. Trying the above code without the "" will fail. + +: '''Note: What libraries are or aren't automatically used in the linking process is not formally defined, nor is it guaranteed to stay that way in future versions of QB64.''' + + +<center>'''QB64 version 1.000 and up produce standalone executables. External DLL files must be distributed with your program.'''</center> +<center>'''Note: QB64 versions prior to 1.000 require all default DLL files to either be with the program or in the C:\WINDOWS\SYSTEM32 folder.'''</center> + + +''See also:'' +* [[DECLARE DYNAMIC LIBRARY]] +* [[SUB]], [[FUNCTION]] +* [[BYVAL]], [[ALIAS]] +* [[C Libraries]], [[DLL Libraries]], [[Windows Libraries]] +* [[Port Access Libraries]] +* [[SQL Client]] + + +{{PageNavigation}} +< diff --git a/internal/help/CALL.txt b/internal/help/CALL.txt index 55c859ff6..02d321cda 100644 --- a/internal/help/CALL.txt +++ b/internal/help/CALL.txt @@ -14,6 +14,12 @@ * To pass parameters by value, instead of by reference, enclose passed variables in parenthesis. +==QBasic/QuickBASIC== +* PDS or Quickbasic 7 up could use [[BYVAL]] to pass variables by values instead of reference. +* QuickBASIC 4.5 could use [[BYVAL]] only for procedures created in Assembly or another language. +* QBasic required [[CALL ABSOLUTE]] only. It did not have to be DECLAREd. + + {{PageExamples}} ''Example:'' How parameters are passed in two [[SUB]] calls, one with CALL using brackets and one without CALL or brackets: {{CodeStart}} '' '' @@ -52,6 +58,8 @@ Hello World! {{PageSeeAlso}} * [[SUB]], [[FUNCTION]] +* DECLARE, [[DECLARE (non-BASIC statement)]] {{PageNavigation}} +< diff --git a/internal/help/CALLS.txt b/internal/help/CALLS.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/CALLS.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/CALL_ABSOLUTE.txt b/internal/help/CALL_ABSOLUTE.txt index 45df91671..f5d328024 100644 --- a/internal/help/CALL_ABSOLUTE.txt +++ b/internal/help/CALL_ABSOLUTE.txt @@ -5,7 +5,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, the '''use [[_MOUSEINPUT]] and related functions'''. @@ -13,13 +13,15 @@ * [[CALL]] and parameter brackets are required in the statement. * {{Parameter|argumentList}} contains the list of arguments passed to the procedure. * {{Parameter|integerOffset}} contains the offset from the current code segment, set by [[DEF SEG]] and [[SADD]], to the starting location of the called procedure. -* '''QB64''' has the ABSOLUTE statement built in and requires no external library, like QuickBASIC did. +* QBasic and '''QB64''' have the ABSOLUTE statement built in and require no library, like QuickBASIC did. * '''NOTE: QB64 does not support INT 33h mouse functions above 3 or [[BYVAL]] in an ABSOLUTE statement. Registers are emulated.''' {{PageSeeAlso}} * [[SADD]], [[INTERRUPT]] +* [[DECLARE (non-BASIC statement)]] * [[_MOUSEINPUT]] {{PageNavigation}} +< diff --git a/internal/help/CASE.txt b/internal/help/CASE.txt index d9e199693..d6c07b136 100644 --- a/internal/help/CASE.txt +++ b/internal/help/CASE.txt @@ -1,65 +1,2 @@ -#REDIRECT [[SELECT CASE#allCASES]] - -[[CASE]] is used within a [[SELECT CASE]] block to specify a conditional value of the compared variable. - - -{{PageSyntax}} -: [[CASE]] {{Parameter|comparisonValues}}[:] {code} - -{{PageDescription}} -*{{Parameter|comparisonValues}} can be any literal string or number, depending on the value specified in the [[SELECT CASE]] statement. -*Code is executed until the next case, so each case can handle multiple lines of code. -*[[CASE]] conditions are normally listed in some logical order going down the page. -*[[CASE]] order can affect the SELECT CASE code execution when more than one CASE can be true. This is specially true when multiple conditional operators, CASE IS or TO ranges are used. -* [[CASE]] lists can also be listed horizontally by using colon separators between cases. -* Supports individual CASE values and ranges or lists of values as below: -** [[CASE]] value -** [[CASE]] value1 [[TO]] value2 -** [[CASE]] value1, value2, value3 -** [[CASE IS]] value1 > value2 -** [[CASE ELSE]] -* The first time a [[CASE]] value matches the compared variable's value, that [[CASE]] code is executed and [[SELECT CASE]] is exited, unless '''EVERYCASE''' is used. - -{{PageExamples}} -{{CodeStart}} -a = 100 -{{Cl|SELECT CASE}} a - {{Cl|CASE}} 1, 3, 5, 7, 9: {{Cl|PRINT}} "Odd values under 10 will be shown." - {{Cl|CASE}} 10: {{Cl|PRINT}} "10 will be shown." - {{Cl|CASE}} 50: {{Cl|PRINT}} "50 will be shown." - {{Cl|CASE}} 100: {{Cl|PRINT}} "This will be shown. (a is 100)" - {{Cl|PRINT}} "(and this)" - {{Cl|CASE}} 150: {{Cl|PRINT}} "150 will be shown." - {{Cl|CASE IS}} < 150: {{Cl|PRINT}} "Less than 150 will be shown. (a which is 100 is under 150)" - {{Cl|CASE}} 50 {{Cl|TO}} 150: {{Cl|PRINT}} "50 to 150 will be shown. (a which is 100 is between 50 TO 150)" -{{Cl|END SELECT}} - -{{CodeEnd}} - -''Returns:'' - -{{OutputStart}} - - This will be shown. (a is 100) - (and this) - -{{OutputEnd}} -: ''Explanation:'' [[SELECT CASE]] compares the variable's value to each descending {{KW|CASE}} until ONE is true, executes the [[CASE]] code and exits the SELECT CASE. [[CASE]] statements should be placed in a increasing or decreasing order for the best results. - -: What happens is that since 5 isn't 100 then the code until the next CASE is ignored, the same obviously goes for 10 and 50 but then comes 100 which is what {{Parameter|a}} is so the code in that [[CASE]] is executed. - -:* A [[CASE]] can list several values separated by commas for the same program option to be executed. - -:* [[CASE IS]] is used when we need to compare the value to a conditional expression range such as a value is "=" equal to, "<" less than, ">" greater than, "<>" not equal to or [[NOT]] a value. - -:* A [[CASE]] range can be specified (in the example; 50 [[TO]] 150) if needed. -<center>''Note:'' A [[SELECT CASE]] block has to end with [[END SELECT]].</center> - - -{{PageSeeAlso}} -* [[CASE ELSE]], [[CASE IS]] -* [[SELECT CASE]], [[END SELECT]] -* [[IF...THEN]] - - -{{PageNavigation}} +#REDIRECT [[SELECT CASE]] +< diff --git a/internal/help/CASE_ELSE.txt b/internal/help/CASE_ELSE.txt index d7226dfc6..d6c07b136 100644 --- a/internal/help/CASE_ELSE.txt +++ b/internal/help/CASE_ELSE.txt @@ -1,62 +1,2 @@ -#REDIRECT [[SELECT CASE#allCASES]] - -[[CASE ELSE]] is used in a [[SELECT CASE]] procedure as an alternative if no other [[CASE]] statements are true. - - -{{PageDescription}} -* [[CASE ELSE]] should be listed at the bottom of the case list as it will supersede any case statements after it. -* Use it as a "safety net" or as an alternative for all values not covered in the [[CASE]] statements. - - -{{PageExamples}} -''Example 1:'' -{{CodeStart}} - -a = 100 -{{Cl|SELECT CASE}} a -{{Cl|CASE}} {{Cl|IS}} < 99: {{Cl|PRINT}} "a is < 99" -{{Cl|CASE}} 99: {{Cl|PRINT}} "a is 99" -{{Cl|CASE}} {{Cl|IS}} > 100: {{Cl|PRINT}} "a is > 100" -{{Cl|CASE ELSE}} -{{Cl|PRINT}} "a is 100" -{{Cl|END SELECT}} - -{{CodeEnd}} - -{{OutputStart}} - -a is 100 - -{{OutputEnd}} - - -''Example 2:'' -{{CodeStart}} - -a = 100 -{{Cl|SELECT CASE}} a -{{Cl|CASE}} 10: {{Cl|PRINT}} "a is 10" -{{Cl|CASE}} 20: {{Cl|PRINT}} "a is 20" -{{Cl|CASE}} 30: {{Cl|PRINT}} "a is 30" -{{Cl|CASE ELSE}}: {{Cl|PRINT}} "a is something other than 10, 20 and 30" -{{Cl|END SELECT}} - -{{CodeEnd}} -{{OutputStart}} - -a is something other than 10, 20 and 30 - - -{{OutputEnd}} - - - - - - -{{PageSeeAlso}} -*[[SELECT CASE]] -*[[IF...THEN]], [[ELSE]] - - -{{PageNavigation}} +#REDIRECT [[SELECT CASE]] +< diff --git a/internal/help/CASE_IS.txt b/internal/help/CASE_IS.txt index 1cac8d544..d6c07b136 100644 --- a/internal/help/CASE_IS.txt +++ b/internal/help/CASE_IS.txt @@ -1,27 +1,2 @@ -#REDIRECT [[SELECT CASE#allCASES]] - -[[CASE IS]] can be used in a [[SELECT CASE]] routine where you need to use relational conditional expressions. - - -{{PageSyntax}} -: [[CASE IS]] '''{=|<|>|<=|>=|<>|[[NOT]]} {{Parameter|expression}}''' - - -{{PageDescription}} -* [[AND (boolean)|AND]] can be used to add extra conditions to a [[CASE IS]] statement evaluation. -* [[OR (boolean)|OR]] can be used to add alternate conditions to a [[CASE IS]] statement evaluation. -* Parenthesis are allowed in [[CASE IS]] statements to clarify an evaluation. -* [[CASE IS]] > 100 uses the greater than expression. -* [[CASE IS]] <= 100 uses the less than or equal to expression. -* [[CASE IS]] <> 100 uses the not equal to expression(same as [[NOT]] 100). - - -{{Template:RelationalTable}} - - -{{PageSeeAlso}} -* [[CASE]], [[CASE ELSE]] -* [[SELECT CASE]] - - -{{PageNavigation}} +#REDIRECT [[SELECT CASE]] +< diff --git a/internal/help/CDBL.txt b/internal/help/CDBL.txt new file mode 100644 index 000000000..e248d6d1d --- /dev/null +++ b/internal/help/CDBL.txt @@ -0,0 +1,35 @@ +[[CDBL]] converts a value to the closest [[DOUBLE]]-precision value. + + + +{{PageSyntax}} +: {{Parameter|doubleValue#}} = [[CDBL]]({{Parameter|expression}}) + + +{{Parameters}} +* {{Parameter|expression}} is any [[TYPE]] of literal or variable numerical value or mathematical calculation. + + +{{PageDescription}} +* Rounds to the closest [[DOUBLE]] floating decimal point value. +* Also can be used to define a value as [[DOUBLE]]-precision up to 15 decimals. + + +{{PageExamples}} +''Example:'' Prints a double-precision version of the single-precision value stored in the variable named A. +{{CodeStart}} + A = 454.67 + {{Cl|PRINT}} A; {{Cl|CDBL}}(A) +{{CodeEnd}} +{{OutputStart}} 454.67 454.6700134277344 +{{OutputEnd}} +: The last 11 numbers in the double-precision number change the value in this example, since A was previously defined to only two-decimal place accuracy. + + +{{PageSeeAlso}} +* [[CINT]], [[CLNG]] +* [[CSNG]], [[_ROUND]] + + +{{PageNavigation}} +< diff --git a/internal/help/CDECL.txt b/internal/help/CDECL.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/CDECL.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/CHAIN.txt b/internal/help/CHAIN.txt index c054e5fb3..9afe04b02 100644 --- a/internal/help/CHAIN.txt +++ b/internal/help/CHAIN.txt @@ -1,14 +1,14 @@ [[CHAIN]] is used to change seamlessly from one module to another one in a program. -{{PageLegacySupport}} +==Legacy support== * The multi-modular technique goes back to when QBasic and QuickBASIC had module size constraints. In QB64 [[CHAIN]] 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.''' {{PageSyntax}} : [[CHAIN]] {{Parameter|moduleName$}} -{{PageParameters}} +{{Parameters}} * {{Parameter|moduleName$}} is a variable or a literal [[STRING]] value in quotation marks with the optional EXE or BAS file name extension. @@ -17,12 +17,16 @@ * In Windows, '''QB64''' will automatically compile a CHAIN referenced BAS file if there is no EXE file found. * CHAIN looks for a file extension that is the same as the invoking module's extension. * The module's filename extension is not required. To save editing at compile time just omit the extensions in the calls. -* To pass data from one module to the other use [[COMMON SHARED]]. The COMMON list should match [[Variable Types|type]]s and names. +* To pass data from one module to the other use [[COMMON SHARED]]. The COMMON list should match [[type]]s and names. * '''QB64 does not retain the [[SCREEN]] mode like QBasic did.''' * Variable data can be passed in files instead of using [[COMMON SHARED]] values. '''QB64''' uses files to pass [[COMMON]] lists. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]'''. +''QBasic/QuickBASIC:'' +* Compiled EXE files had to include BRUN45.EXE in QuickBASIC 4.5 when CHAIN was used with [[COMMON SHARED]]. + + {{PageExamples}} ''Example:'' CHAIN looks for same file type extension as program module (BAS or EXE). {{CodeStart}} '' '' @@ -36,6 +40,8 @@ * [[RUN]] * [[COMMON]], [[COMMON SHARED]] * [[SHARED]] +* [[LINKed or Merged Modules]] {{PageNavigation}} +< diff --git a/internal/help/CHDIR.txt b/internal/help/CHDIR.txt index 6b4e5b4c0..8de0f93af 100644 --- a/internal/help/CHDIR.txt +++ b/internal/help/CHDIR.txt @@ -60,3 +60,4 @@ Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$)) '0 designates {{PageNavigation}} +< diff --git a/internal/help/CHR$.txt b/internal/help/CHR$.txt index c3b73254b..6d2397d2e 100644 --- a/internal/help/CHR$.txt +++ b/internal/help/CHR$.txt @@ -84,3 +84,4 @@ Send$ = "" {{PageNavigation}} +< diff --git a/internal/help/CINT.txt b/internal/help/CINT.txt index 18805aa6d..3f515d7bd 100644 --- a/internal/help/CINT.txt +++ b/internal/help/CINT.txt @@ -5,7 +5,7 @@ The [[CINT]] function rounds decimal point numbers up or down to the nearest [[I : {{Parameter|value%}} = [[CINT]]({{Parameter|expression}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|expression}} is any [[TYPE]] of literal or variable numerical value or mathematical calculation. @@ -33,3 +33,4 @@ a% = {{Cl|CINT}}(1.49): b% = {{Cl|CINT}}(1.50): c = 11.5 {{PageNavigation}} +< diff --git a/internal/help/CIRCLE.txt b/internal/help/CIRCLE.txt index 8f2bb55c8..b8c4afb56 100644 --- a/internal/help/CIRCLE.txt +++ b/internal/help/CIRCLE.txt @@ -5,7 +5,7 @@ The [[CIRCLE]] statement is used in graphic [[SCREEN (statement)|SCREEN]] modes : [[CIRCLE]] [{{KW|STEP}}]'''('''{{Parameter|column}}''',''' {{Parameter|row}}'''),''' {{Parameter|radius%}}''',''' [{{Parameter|drawColor%}}][, {{Parameter|startRadian!}}, {{Parameter|stopRadian!}}] [, {{Parameter|aspect!}}] -{{PageParameters}} +{{Parameters}} * Can use [[STEP]] for relative coordinate moves from the previous graphic coordinates. * Coordinates designate the center position of the circle. Can be partially drawn offscreen. * {{Parameter|radius%}} is an [[INTEGER]] value for half of the total circle diameter. @@ -143,3 +143,4 @@ previoushour% = hours% 'hold current hour for later use * [[Alternative circle routine]] {{text|(member-contributed program)}} {{PageNavigation}} +< diff --git a/internal/help/CLEAR.txt b/internal/help/CLEAR.txt index 966abf1b6..04e0e6a61 100644 --- a/internal/help/CLEAR.txt +++ b/internal/help/CLEAR.txt @@ -36,3 +36,4 @@ array(5) = 23 {{PageNavigation}} +< diff --git a/internal/help/CLNG.txt b/internal/help/CLNG.txt index 5e04617c2..3b465f638 100644 --- a/internal/help/CLNG.txt +++ b/internal/help/CLNG.txt @@ -5,7 +5,7 @@ The [[CLNG]] function rounds decimal point numbers up or down to the nearest [[L : {{Parameter|value&}} = [[CLNG]]({{Parameter|expression}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|expression}} is any [[TYPE]] of literal or variable numerical value or mathematical calculation. @@ -34,3 +34,4 @@ The [[CLNG]] function rounds decimal point numbers up or down to the nearest [[L {{PageNavigation}} +< diff --git a/internal/help/CLOSE.txt b/internal/help/CLOSE.txt index f536f4ae0..54c7fc087 100644 --- a/internal/help/CLOSE.txt +++ b/internal/help/CLOSE.txt @@ -5,7 +5,7 @@ : [[CLOSE]] [{{Parameter|fileNumber}}[, ...]] -{{PageParameters}} +{{Parameters}} * {{Parameter|fileNumber}} indicates the file or list of file numbers to close. When not specified, all open files are closed. @@ -27,3 +27,4 @@ {{PageNavigation}} +< diff --git a/internal/help/CLS.txt b/internal/help/CLS.txt index 82ca19754..55029ce6c 100644 --- a/internal/help/CLS.txt +++ b/internal/help/CLS.txt @@ -5,9 +5,9 @@ The [[CLS]] statement clears the [[_DEST|current write page]]. : [[CLS]] [{{Parameter|method%}}] [, {{Parameter|bgColor&}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|method%}} specifies which parts of the page to clear, and can have one of the following values: -** CLS - clears the active graphics or text viewport or the entire text screen and refreshes bottom function [[KEY LIST|KEY ON]] line. +** CLS - clears the active graphics or text viewport or the entire text screen and refreshes bottom function [[KEY LIST|KEY ON]] line. ** CLS 0 - Clears the entire page of text and graphics. Print cursor is moved to row 1 at column 1. ** CLS 1 - Clears only the graphics view port. Has no effect for text mode. ** CLS 2 - Clears only the text view port. The print cursor is moved to the top row of the text view port at column 1. @@ -31,7 +31,7 @@ The [[CLS]] statement clears the [[_DEST|current write page]]. {{Cl|CLS}} , 15 {{Cl|_PRINTMODE }} _KEEPBACKGROUND 'keeps the text background visible {{Cl|COLOR}} 0: {{Cl|PRINT}} "This is black text on a white background!" -K$ = {{Cl|INPUT$}}(1) +K$ = {{Cl|INPUT$}}(1 {{CodeEnd}} :''Explanation:'' [[_PRINTMODE]] can be used with [[PRINT]] or [[_PRINTSTRING]] to make the text or the text background transparent. @@ -56,3 +56,4 @@ i = {{Cl|_LOADIMAGE}}('''"qb64_trans.png"''') 'see note below examples to get th {{PageNavigation}} +< diff --git a/internal/help/COLOR.txt b/internal/help/COLOR.txt index e61b64c4b..f567c1eda 100644 --- a/internal/help/COLOR.txt +++ b/internal/help/COLOR.txt @@ -10,8 +10,6 @@ The [[COLOR]] statement is used to change the foreground and background colors f * To change the {{Parameter|background&}} color only, use a comma and the desired color. Ex: [[COLOR]] , {{Parameter|background&}} * Graphic drawing statements like [[PSET]], [[PRESET]], [[LINE]], etc, also use the colors set by the [[COLOR]] statement if no color is passed when they are called. * The [[$COLOR]] metacommand adds named color constants for both text and 32-bit modes. -* [[COLOR]] works when outputting text to [[$CONSOLE]]. -** On macOS, colors in console mode will not match the VGA palette. See [https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit 8-bit ANSI colors] ==Screen Mode Attributes== @@ -139,7 +137,7 @@ alpha$ = "FF" 'solid alpha colors only {{Cl|SCREEN}} 0: {{Cl|_FULLSCREEN}} ' used for fullscreen instead of window {{Cl|COLOR}} 30, 6: {{Cl|LOCATE}} 12, 4: {{Cl|PRINT}} "Hello!" '' '' {{CodeEnd}} -:''Result:'' Hello! is printed in flashing high intensity yellow with brown background behind text only when in QBasic [[_FULLSCREEN|fullscreen]]. +:''Result:'' Hello! is printed in flashing high intensity yellow with brown background behind text only when in Qbasic [[_FULLSCREEN|fullscreen]]. ''Example 4:'' Using [[CLS]] after setting the background color in SCREEN 0 to make the color cover the entire screen. @@ -238,3 +236,4 @@ K$ = {{Cl|INPUT$}}(1) {{PageNavigation}} +< diff --git a/internal/help/COMMAND$.txt b/internal/help/COMMAND$.txt index b565800c5..f184710bd 100644 --- a/internal/help/COMMAND$.txt +++ b/internal/help/COMMAND$.txt @@ -71,3 +71,4 @@ count = count - 1 'save the number of parameters sent to this program when run {{PageNavigation}} +< diff --git a/internal/help/COMMON.txt b/internal/help/COMMON.txt index f3a7a0c31..8d0b3f91e 100644 --- a/internal/help/COMMON.txt +++ b/internal/help/COMMON.txt @@ -1,6 +1,6 @@ [[COMMON]] shares common variable values with other linked or [[CHAIN]]ed modules. -{{PageLegacySupport}} +==Legacy support== * The multi-modular technique goes back to when QBasic and QuickBASIC had module size constraints. In QB64 [[COMMON]] 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.''' @@ -23,3 +23,4 @@ * [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]] {{PageNavigation}} +< diff --git a/internal/help/CONST.txt b/internal/help/CONST.txt index 1c5a875e3..23ba5776b 100644 --- a/internal/help/CONST.txt +++ b/internal/help/CONST.txt @@ -5,7 +5,7 @@ The [[CONST]] statement globally defines one or more named numeric or string val : [[CONST]] {{Parameter|constantName}} = {{Parameter|value}}[, ...] -{{PageParameters}} +{{Parameters}} * {{Parameter|constantName}} is the constant name or list of names assigned by the programmer. * {{Parameter|value}} is the value to initialize the global constant which cannot change once defined. ** If {{Parameter|constantName}} specifies a numeric type, {{Parameter|value}} must be a numeric expression containing literals and other constants. @@ -14,8 +14,8 @@ The [[CONST]] statement globally defines one or more named numeric or string val {{PageDescription}} * The {{Parameter|constantName}} does not have to include a type suffix. The datatype is automatically infered by the compiler using the {{Parameter|value}}. -* Constant values cannot reference a variable or [[FUNCTION]] return values. -** The exception to the above are the internal functions: [[_PI]], [[_ACOS]], [[_ASIN]], [[_ARCSEC]], [[_ARCCSC]], [[_ARCCOT]], [[_SECH]], [[_CSCH]], [[_COTH]], [[COS]], [[SIN]], [[TAN]], [[LOG]], [[EXP]], [[ATN]], [[_D2R]], [[_D2G]], [[_R2D]], [[_R2G]], [[_G2D]], [[_G2R]], [[ABS]], [[SGN]], [[INT]], [[_ROUND]], [[_CEIL]], [[FIX]], [[_SEC]], [[_CSC]], [[_COT]], [[ASC]], [[_RGB32]], [[_RGBA32]], [[_RGB]], [[_RGBA]], [[_RED32]], [[_GREEN32]], [[_BLUE32]], [[_ALPHA32]], [[_RED]], [[_GREEN]], [[_BLUE]], [[_ALPHA]] (See Example 2 below). +* Constant values cannot reference a variable, [[SUB]] or [[FUNCTION]] return values when defined. +** The exception to the above are color functions [[_RGB32]] and [[_RGBA32]], which can be used in a CONST statement. See ''Example 2'' below. * Constants cannot be reassigned values. They retain the same value throughout all of the program procedures. * Constants defined in module-level code have [[SHARED|shared]] scope, so they can also be used in [[SUB]] or [[FUNCTION]] procedures. * Constants defined in [[SUB]] or [[FUNCTION]] procedures are local to those procedures. @@ -69,3 +69,4 @@ Enter the radius of a circle or zero to quit? ''0'' {{PageNavigation}} +< diff --git a/internal/help/COS.txt b/internal/help/COS.txt index 38b2de221..c790b2f26 100644 --- a/internal/help/COS.txt +++ b/internal/help/COS.txt @@ -5,7 +5,7 @@ The [[COS]] function returns the horizontal component or the cosine of an angle : {{Parameter|value!}} = [[COS]]({{Parameter|radianAngle!}}) -{{PageParameters}} +{{Parameters}} * The {{Parameter|radianAngle!}} must be measured in radians. @@ -104,3 +104,4 @@ DEGREES% = RADIANS * 180 / PI = 45 {{PageNavigation}} +< diff --git a/internal/help/CSNG.txt b/internal/help/CSNG.txt index bfeba50fb..e76c343e2 100644 --- a/internal/help/CSNG.txt +++ b/internal/help/CSNG.txt @@ -5,7 +5,7 @@ : {{Parameter|singleValue!}} = [[CSNG]]({{Parameter|expression}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|expression}} is any [[TYPE]] of literal or variable numerical value or mathematical calculation. @@ -30,3 +30,4 @@ {{PageNavigation}} +< diff --git a/internal/help/CSRLIN.txt b/internal/help/CSRLIN.txt index 910050e30..515ef3646 100644 --- a/internal/help/CSRLIN.txt +++ b/internal/help/CSRLIN.txt @@ -48,3 +48,4 @@ The [[CSRLIN]] function returns the current text row position of the [[PRINT]] c {{PageNavigation}} +< diff --git a/internal/help/CVD.txt b/internal/help/CVD.txt index cd87986f1..52a924641 100644 --- a/internal/help/CVD.txt +++ b/internal/help/CVD.txt @@ -48,3 +48,4 @@ The string above, decoded using CVD: 77000.24523213 {{PageNavigation}} +< diff --git a/internal/help/CVDMBF.txt b/internal/help/CVDMBF.txt index 981f826cd..ef0f1fed8 100644 --- a/internal/help/CVDMBF.txt +++ b/internal/help/CVDMBF.txt @@ -37,3 +37,4 @@ The string above, decoded using CVDMBF: 77000.24523213 {{PageNavigation}} +< diff --git a/internal/help/CVI.txt b/internal/help/CVI.txt index 52b86b7e1..faa62372b 100644 --- a/internal/help/CVI.txt +++ b/internal/help/CVI.txt @@ -63,3 +63,4 @@ tmp4$ = " CVI Total = ##### " {{PageNavigation}} +< diff --git a/internal/help/CVL.txt b/internal/help/CVL.txt index 93570f9f9..7d1316a54 100644 --- a/internal/help/CVL.txt +++ b/internal/help/CVL.txt @@ -40,3 +40,4 @@ Y& = {{Cl|CVL}}(N$) '' '' {{PageNavigation}} +< diff --git a/internal/help/CVS.txt b/internal/help/CVS.txt index eb92a480c..e6f3bbf13 100644 --- a/internal/help/CVS.txt +++ b/internal/help/CVS.txt @@ -35,3 +35,4 @@ The string above, decoded using CVS: 700.2213 {{PageNavigation}} +< diff --git a/internal/help/CVSMBF.txt b/internal/help/CVSMBF.txt index 58711f7b4..e35259d1c 100644 --- a/internal/help/CVSMBF.txt +++ b/internal/help/CVSMBF.txt @@ -35,3 +35,4 @@ The string above, decoded using CVSMBF: 700.2213 {{PageNavigation}} +< diff --git a/internal/help/Colon.txt b/internal/help/Colon.txt index 8e5dcda5f..6b56527c0 100644 --- a/internal/help/Colon.txt +++ b/internal/help/Colon.txt @@ -20,3 +20,4 @@ A '''colon''' can be used to separate two unrelated procedure statements on the {{PageNavigation}} +< diff --git a/internal/help/DATA.txt b/internal/help/DATA.txt index 6dc6cd064..4398a0145 100644 --- a/internal/help/DATA.txt +++ b/internal/help/DATA.txt @@ -79,3 +79,4 @@ mydata2: {{PageNavigation}} +< diff --git a/internal/help/DATE$.txt b/internal/help/DATE$.txt index 64201fe8a..5288e348a 100644 --- a/internal/help/DATE$.txt +++ b/internal/help/DATE$.txt @@ -62,9 +62,10 @@ Today is Wednesday, June 2, 2010 {{PageSeeAlso}} -* [[TIME$]] +* [[DATE$ (statement)]], [[TIME$]], [[TIME$ (statement)]] * [[VAL]], [[STR$]], [[MID$]], [[LEFT$]], [[IF...THEN]] {{PageNavigation}} +< diff --git a/internal/help/DATE$_(statement).txt b/internal/help/DATE$_(statement).txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/DATE$_(statement).txt @@ -0,0 +1 @@ +< diff --git a/internal/help/DECLARE_(non-BASIC_statement).txt b/internal/help/DECLARE_(non-BASIC_statement).txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/DECLARE_(non-BASIC_statement).txt @@ -0,0 +1 @@ +< diff --git a/internal/help/DECLARE_DYNAMIC_LIBRARY.txt b/internal/help/DECLARE_DYNAMIC_LIBRARY.txt index f58b715a9..77d1d9cc9 100644 --- a/internal/help/DECLARE_DYNAMIC_LIBRARY.txt +++ b/internal/help/DECLARE_DYNAMIC_LIBRARY.txt @@ -18,7 +18,7 @@ * ''Procedure_name'' is any procedure name you want to designate by using [[ALIAS]] with the ''Library_procedure'' name following. * ''Parameters'' used by the Library procedure must be passed by value ([[BYVAL]]) except for [[STRING]] values. * '''''.h'' header files cannot be used with DECLARE DYNAMIC LIBRARY. Existence of any ''.h'' file of the same name as the ''.DLL'' file will cause DECLARE DYNAMIC LIBRARY to fail.''' -* '''IMPORTANT:''' [[DECLARE DYNAMIC LIBRARY]] let's you specify any SUB/FUNCTION calling with the format you wish, but '''if the size of the parameter list does not match the size expected within the library, then your code will probably cause a GPF (General Protection Fault). +* '''IMPORTANT:''' [[DECLARE DYNAMIC LIBRARY]] let's you specify any SUB/FUNCTION calling format you wish, but '''if the size of the parameters does not match, the size expected within the library your code will probably cause a GPF (General Protection Fault).''' It is important to understand that you are creating a 32-bit program (even under 64-bit Windows) so '''pointers (if required) will be 32-bits in size, the equivalent of a [[LONG]].''' * '''STATIC''' is the same as [[DECLARE LIBRARY]] except that it prioritizes linking to static libraries (*.a/*.o) over shared object (*.so) libraries, if both exist. As Windows doesn't really use shared libraries (DLLs are a bit different) this does not affect Windows users. * The [[_OFFSET]] in memory can be used in '''CUSTOMTYPE''', '''STATIC''' and '''DYNAMIC LIBRARY''' declarations. * [[SUB]] procedures using DECLARE CUSTOMTYPE LIBRARY API procedures '''may error'''. Try DYNAMIC with the DLL name. @@ -26,9 +26,10 @@ * '''NOTE: It is up to the user to document and determine the suitability of all Libraries and procedures they choose to use. QB64 cannot guarantee that any procedure will work and cannot quarantee any troubleshooting help.''' -{{PageAvailability}} -* Version 0.923 and up (Windows). -* Version 0.94 and up (Linux and macOS). +==Availability== +* '''Version 0.923 and up (Windows)''' +* '''Version 0.94 and up (Linux and macOS)''' + {{PageExamples}} @@ -96,8 +97,9 @@ QuickUTF16toUTF32$ = b$ * [[SUB]], [[FUNCTION]] * [[BYVAL]], [[ALIAS]] * [[_OFFSET (function)]], [[_OFFSET]] {{text|(variable type)}} -* [[C Libraries]], [[DLL Libraries]], [[Windows Libraries]] +* [[C Libraries]], [[SDL Libraries]], [[DLL Libraries]], [[Windows Libraries]] * [[Port Access Libraries]] {{PageNavigation}} +< diff --git a/internal/help/DECLARE_LIBRARY.txt b/internal/help/DECLARE_LIBRARY.txt index 0ebb3a1d0..8bc9ef772 100644 --- a/internal/help/DECLARE_LIBRARY.txt +++ b/internal/help/DECLARE_LIBRARY.txt @@ -10,7 +10,7 @@ The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]] : '''END DECLARE''' -{{PageParameters}} +{{Parameters}} * The {{Parameter|Library_filename}} is needed if a Library is not already loaded by QB64. Do not include the ''.DLL'', ''LIB'' or ''.H'' file extension. ** It's always a good idea to try declaring Windows API libraries without a {{Parameter|Library_filename}} first, as most Windows headers are already included in QB64 source. * Begin the {{Parameter|Library_filename}} with '''./''' or '''.\''' to make it relative to the path where your source file is saved, so you can keep all your project files together. @@ -33,22 +33,61 @@ The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]] * The [[_OFFSET]] in memory can be used in '''CUSTOMTYPE''', '''STATIC''' and '''DYNAMIC LIBRARY''' declarations. * Declarations can be made inside of [[SUB]] or [[FUNCTION]] procedures. Declarations do not need to be at program start. -* '''NOTE: It is up to the user to document and determine the suitability of all Libraries and procedures they choose to use! QB64 cannot guarantee that any procedure will work and cannot guarantee any troubleshooting help.''' +* '''NOTE: It is up to the user to document and determine the suitability of all Libraries and procedures they choose to use! QB64 cannot guarantee that any procedure will work and cannot quarantee any troubleshooting help.''' {{PageExamples}} -''Example:'' Don't know if a C function is defined by C++ or QB64? Try using empty quotes. +''Example 1:'' Using an '''SDL''' library procedure as a program SUB procedure to move the mouse pointer to a coordinate (works in versions prior to 1.000): +{{CodeStart}} '' '' +{{Cl|DECLARE LIBRARY}} + {{Cl|SUB}} SDL_WarpMouse ({{Cl|BYVAL}} column {{Cl|AS}} {{Cl|LONG}}, {{Cl|BYVAL}} row {{Cl|AS}} {{Cl|LONG}}) 'SDL procedure name +{{Cl|DECLARE LIBRARY|END DECLARE}} +{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 256) 'simulate screen 12 with 256 colors +{{Cl|RANDOMIZE}} {{Cl|TIMER}} + +DO + {{Cl|_DELAY}} 1 + x = {{Cl|RND}} * 640: y = {{Cl|RND}} * 480 + {{Cl|LINE}} (x, y)-{{Cl|STEP}}(10, 10), {{Cl|RND}} * 100 + 32, BF + MouseMove x + 5, y + 5 +{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|LEN}}({{Cl|INKEY$}}) 'any keypress quits +{{Cl|END}} + +{{Cl|SUB}} MouseMove (x {{Cl|AS}} {{Cl|LONG}}, y {{Cl|AS}} {{Cl|LONG}}) +SDL_WarpMouse x, y 'call SDL library procedure +{{Cl|END SUB}} '' '' +{{CodeEnd}} +{{small|Code by Galleon}} +:''Explanation:'' The SDL Library is included and loaded with QB64 versions prior to 1.000, so these procedures are directly available for use. + +<center>'''Using [[ALIAS]] to create a program SUB or FUNCTION''' using '''QB64 SDL ONLY'''</center> +{{CodeStart}} '' '' +{{Cl|SCREEN}} 12 +{{Cl|DECLARE LIBRARY}} + {{Cl|SUB}} MouseMove {{Cl|ALIAS}} SDL_WarpMouse ({{Cl|BYVAL}} column&, {{Cl|BYVAL}} row&) +{{Cl|DECLARE LIBRARY|END DECLARE}} + +{{Cl|_DELAY}} 2 +MouseMove 100, 100 +{{Cl|_DELAY}} 2 +MouseMove 200, 200 '' '' +{{CodeEnd}} +:''Explanation:'' When a Library procedure is used to represent another procedure name use [[ALIAS]] instead. Saves creating a SUB! + + +''Example 2:'' Don't know if a C function is defined by C++ or QB64? Try using empty quotes. {{CodeStart}} '' '' {{Cl|DECLARE LIBRARY}} "" {{Cl|FUNCTION}} addone& ({{Cl|BYVAL}} value&) -{{Cl|END DECLARE}} '' '' +{{Cl|END}} DECLARE '' '' {{CodeEnd}} :''Explanation:'' The C function 'addone' exists in a library QB64 already links to, but it hasn't been defined as a C function or a QB64 function. By using "" we are telling QB64 the function exists in a library which is already linked to and that it must define the C function before calling it, as well as allowing QB64 code to call it. Trying the above code without the "" will fail. -: '''Note: Which libraries are or aren't automatically used in the linking process is not formally defined, nor is it guaranteed to stay that way in future versions of QB64.''' +: '''Note: What libraries are or aren't automatically used in the linking process is not formally defined, nor is it guaranteed to stay that way in future versions of QB64.''' <center>'''QB64 version 1.000 and up produce standalone executables. External DLL files must be distributed with your program.'''</center> +<center>'''Note: QB64 versions prior to 1.000 require all default DLL files to either be with the program or in the C:\WINDOWS\SYSTEM32 folder.'''</center> ''See also:'' @@ -61,3 +100,4 @@ The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]] {{PageNavigation}} +< diff --git a/internal/help/DEFDBL.txt b/internal/help/DEFDBL.txt index e96f5d05c..b1abe8db4 100644 --- a/internal/help/DEFDBL.txt +++ b/internal/help/DEFDBL.txt @@ -1,7 +1,7 @@ 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. -{{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'''. @@ -14,11 +14,11 @@ The [[DEFDBL]] statement defines all variables with names starting with the spec * {{Parameter|letter}} (or {{Parameter|range}}) can be from A-Z or any other range, like '''G-M'''. * You can also use commas for specific undefined variable first letters. * Variables [[DIM]]ensioned as another variable type or that use type suffixes are not affected by [[DEFDBL]]. -* [[DEFDBL]] sets the [[Variable Types|type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). +* [[DEFDBL]] sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). * '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix.''' -{{PageQBasic}} +==QBasic/QuickBASIC== * QBasic's IDE would add DEF statements before any [[SUB]] or [[FUNCTION]]. QB64 (like QBasic) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. May also affect [[$INCLUDE]] procedures. @@ -38,3 +38,4 @@ The [[DEFDBL]] statement defines all variables with names starting with the spec {{PageNavigation}} +< diff --git a/internal/help/DEFINT.txt b/internal/help/DEFINT.txt index 4fe9262a9..034e6d3da 100644 --- a/internal/help/DEFINT.txt +++ b/internal/help/DEFINT.txt @@ -1,7 +1,7 @@ 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. -{{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'''. @@ -14,12 +14,12 @@ The [[DEFINT]] statement defines all variables with names starting with the spec * {{Parameter|letter}} (or {{Parameter|range}}) can be from A-Z or any other range, like '''G-M'''. * You can also use commas for specific undefined variable first letters. * Variables [[DIM]]ensioned as another variable type or that use type suffixes are not affected by [[DEFINT]]. -* [[DEFINT]] sets the [[Variable Types|type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). +* [[DEFINT]] sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). * For [[_UNSIGNED]] [[INTEGER]], use [[_DEFINE]] * '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix.''' -{{PageQBasic}} +==QBasic/QuickBASIC== * QBasic's IDE would add DEF statements before any [[SUB]] or [[FUNCTION]]. QB64 (like QBasic) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. May also affect [[$INCLUDE]] procedures. @@ -39,3 +39,4 @@ The [[DEFINT]] statement defines all variables with names starting with the spec {{PageNavigation}} +< diff --git a/internal/help/DEFLNG.txt b/internal/help/DEFLNG.txt index 803ae5e29..f6b60e962 100644 --- a/internal/help/DEFLNG.txt +++ b/internal/help/DEFLNG.txt @@ -1,7 +1,7 @@ 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. -{{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'''. @@ -14,12 +14,12 @@ The [[DEFLNG]] statement defines all variables with names starting with the spec * {{Parameter|letter}} (or {{Parameter|range}}) can be from A-Z or any other range, like '''G-M'''. * You can also use commas for specific undefined variable first letters. * Variables [[DIM]]ensioned as another variable type or that use type suffixes are not affected by [[DEFLNG]]. -* [[DEFLNG]] sets the [[Variable Types|type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). +* [[DEFLNG]] sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). * For [[_UNSIGNED]] [[LONG]], use [[_DEFINE]] * '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix.''' -{{PageQBasic}} +==QBasic/QuickBASIC== * QBasic's IDE would add DEF statements before any [[SUB]] or [[FUNCTION]]. QB64 (like QBasic) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. May also affect [[$INCLUDE]] procedures. @@ -39,3 +39,4 @@ The [[DEFLNG]] statement defines all variables with names starting with the spec {{PageNavigation}} +< diff --git a/internal/help/DEFSNG.txt b/internal/help/DEFSNG.txt index aef84bfc5..b3c955050 100644 --- a/internal/help/DEFSNG.txt +++ b/internal/help/DEFSNG.txt @@ -1,7 +1,7 @@ The [[DEFSNG]] statement defines all variables with names starting with the specified letter (or letter range) AS [[SINGLE]] variables. -{{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'''. @@ -15,11 +15,11 @@ The [[DEFSNG]] statement defines all variables with names starting with the spec * {{Parameter|letter}} (or {{Parameter|range}}) can be from A-Z or any other range, like '''G-M'''. * You can also use commas for specific undefined variable first letters. * Variables [[DIM]]ensioned as another variable type or that use type suffixes are not affected by [[DEFSNG]]. -* [[DEFSNG]] sets the [[Variable Types|type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). +* [[DEFSNG]] sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). * '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix.''' -{{PageQBasic}} +==QBasic/QuickBASIC== * QBasic's IDE would add DEF statements before any [[SUB]] or [[FUNCTION]]. QB64 (like QBasic) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. May also affect [[$INCLUDE]] procedures. @@ -39,3 +39,4 @@ The [[DEFSNG]] statement defines all variables with names starting with the spec {{PageNavigation}} +< diff --git a/internal/help/DEFSTR.txt b/internal/help/DEFSTR.txt index fb01898a8..c5a8cf29f 100644 --- a/internal/help/DEFSTR.txt +++ b/internal/help/DEFSTR.txt @@ -1,7 +1,7 @@ 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. -{{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'''. @@ -14,11 +14,11 @@ The [[DEFSTR]] statement defines all variables with names starting with the spec * {{Parameter|letter}} (or {{Parameter|range}}) can be from A-Z or any other range, like '''G-M'''. * You can also use commas for specific undefined variable first letters. * Variables [[DIM]]ensioned as another variable type or that use type suffixes are not affected by [[DEFSTR]]. -* [[DEFSTR]] sets the [[Variable Types|type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). +* [[DEFSTR]] sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). * '''Warning: QBasic keyword names can only be used as string variable names when they are followed by the string type suffix ($).''' -{{PageQBasic}} +==QBasic/QuickBASIC== * QBasic's IDE would add DEF statements before any [[SUB]] or [[FUNCTION]]. QB64 (like QBasic) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. May also affect [[$INCLUDE]] procedures. @@ -38,3 +38,4 @@ The [[DEFSTR]] statement defines all variables with names starting with the spec {{PageNavigation}} +< diff --git a/internal/help/DEF_SEG.txt b/internal/help/DEF_SEG.txt index 7717f2caf..c13e3ec7b 100644 --- a/internal/help/DEF_SEG.txt +++ b/internal/help/DEF_SEG.txt @@ -1,7 +1,7 @@ [[DEF SEG]] is used to define the area in memory to access QB64's emulated conventional memory. -{{PageLegacySupport}} +==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.''' @@ -19,7 +19,7 @@ <!-- {{PageExamples}} -''Example:'' In a QBasic(ONLY) file delete, '''SEG''' forces the parameter to be passed as a far pointer. +''Example:'' In a Qbasic(ONLY) file delete, '''SEG''' forces the parameter to be passed as a far pointer. {{CodeStart}} '' '' {{Cl|CONST}} file = "trashme.tmp" 'example temporary file name to delete {{Cl|DEFINT}} A-Z @@ -70,3 +70,4 @@ filename = file + {{Cl|CHR$}}(0) 'create zero string name for DOS {{PageNavigation}} +< diff --git a/internal/help/DIM.txt b/internal/help/DIM.txt index 4f0eabfe3..30d5b5bc3 100644 --- a/internal/help/DIM.txt +++ b/internal/help/DIM.txt @@ -2,15 +2,11 @@ The [[DIM]] statement is used to declare a variable or a list of variables as a {{PageSyntax}} -::''To declare variables:'' -:::[[DIM]] [{{KW|SHARED}}] ''variable''[{suffix| {{KW|AS}} [{{KW|_UNSIGNED}}] ''type''}] [, ''variable2''...]] +::''Syntax 1:'' [[DIM]] [{{KW|SHARED}}] ''variable''[{suffix| {{KW|AS}} ''type''}] [, ''variable2''...]] -::''To declare arrays:'' -:::[[DIM]] [{{KW|SHARED}}] ''array([lowest% {{KW|TO}}] highest%])''[{suffix| {{KW|AS}} [{{KW|_UNSIGNED}}] ''type''}] [, ''variable2''...] +::''Syntax 2:'' [[DIM]] [{{KW|SHARED}}] ''array(lowest% [{{KW|TO}}) highest%])''[{suffix| {{KW|AS}} ''type''}] [, ''variable2''...] -::'' '''QB64''' Alternative Syntax:'' -:::[[DIM]] [{{KW|SHARED}}] {{KW|AS}} [{{KW|_UNSIGNED}}] ''type'' ''variable'' [, ''variable2''...] -:::[[DIM]] [{{KW|SHARED}}] {{KW|AS}} [{{KW|_UNSIGNED}}] ''type'' ''array([lowest% {{KW|TO}}] highest%])'' [, ''array2(elements)''...] +:'' '''QB64''' Syntax:'' [[DIM]] [{{KW|SHARED}}] ''variable''[{suffix| {{KW|AS}} [{{KW|_UNSIGNED}}] ''type''}] [, ''variable2''...] {{PageDescription}} @@ -30,8 +26,7 @@ The [[DIM]] statement is used to declare a variable or a list of variables as a ** [[_FLOAT]] (or use variable suffix '''##''') ** [[_OFFSET]] (or use variable suffix '''%&''') ** DIM AS [[_MEM]] (the _MEM type has no type suffix). -* '''Note: When a variable has not been defined or has no type suffix, the type defaults to [[SINGLE]].''' -* When using the '''AS type variable-list''' syntax, type symbols cannot be used. +* '''Note: When a variable has not been defined or has no type suffix, the value defaults to [[SINGLE]].''' * When the [[$DYNAMIC]] metacommand or [[REDIM]] is used, array element sizes are changeable (not [[$STATIC]]). * Use [[REDIM]] instead of DIM to dimension arrays as dynamic without the {{KW|$DYNAMIC}} metacommand. * Use [[REDIM]] [[_PRESERVE]] in '''QB64''' to retain previous array values when changing the size of an array. @@ -89,13 +84,6 @@ x = 1 'x is a {{Cl|SINGLE}} variable : ''Explanation:'' QB64 gives an error because the creation of the new variable would make referring to the existing one impossible. -''Example 8:'' Using QB64's alternative syntax to declare multiple variables/arrays of the same type. -{{CodeStart}} '' '' -{{Cl|DIM}} {{Cl|AS}} {{Cl|LONG}} w, h, id, weight, index 'all of these variables are created as type LONG -{{Cl|DIM}} {{Cl|AS}} {{Cl|SINGLE}} x, y, z 'all of these variables are created as type SINGLE -{{CodeEnd}} '' '' - - {{PageSeeAlso}} * [[_DEFINE]], [[_PRESERVE]] * [[REDIM]], [[TYPE]] @@ -107,3 +95,4 @@ x = 1 'x is a {{Cl|SINGLE}} variable {{PageNavigation}} +< diff --git a/internal/help/DO...LOOP.txt b/internal/help/DO...LOOP.txt index 8708d061d..edfe86000 100644 --- a/internal/help/DO...LOOP.txt +++ b/internal/help/DO...LOOP.txt @@ -25,7 +25,6 @@ ::[[WHILE]] checks if the condition is true before running loop code again. * NOTE: You cannot use a condition after both the DO and LOOP statements at the same time. * Use '''[[EXIT]] DO''' to exit a loop block even before the condition is met. -* Use [[_CONTINUE]] to skip the remaining lines in the iteration without leaving the loop. ** If you don't specify a condition, you must exit the loop block manually using '''[[EXIT]] DO'''. * If a loop never meets an exit condition requirement, it will never stop. @@ -37,9 +36,9 @@ ''Example 1:'' Using WHILE to clear the keyboard buffer. {{CodeStart}} -{{Cl|DO}} {{Cl|WHILE}} {{Cl|INKEY$}} <> "": {{Cl|LOOP}} ' checks evaluation before running loop code +DO WHILE {{Cl|INKEY$}} <> "": LOOP ' checks evaluation before running loop code -{{Cl|DO}}: {{Cl|LOOP}} {{Cl|WHILE}} {{Cl|INKEY$}} <> "" ' checks evaluation after one run of loop code +DO: LOOP WHILE INKEY$ <> "" ' checks evaluation after one run of loop code {{CodeEnd}} @@ -47,9 +46,9 @@ ''Example 2:'' Using UNTIL to clear the keyboard buffer. {{CodeStart}} -{{Cl|DO}} {{Cl|UNTIL}} {{Cl|INKEY$}} = "": {{Cl|LOOP}} ' checks evaluation before running loop code +DO UNTIL {{Cl|INKEY$}} = "": LOOP ' checks evaluation before running loop code -{{Cl|DO}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = "" ' checks evaluation after one run of loop code +DO: LOOP UNTIL {{Cl|INKEY$}} = "" ' checks evaluation after one run of loop code {{CodeEnd}} @@ -65,70 +64,70 @@ CheckScreen filenm$ {{Cl|DEFINT}} A-Z {{Cl|SUB}} CheckScreen (Filename$) 'find Screen mode (12 or 13) and image dimensions - {{Cl|DIM}} Bsv {{Cl|AS}} {{Cl|STRING}} * 1 - {{Cl|DIM}} Header {{Cl|AS}} {{Cl|STRING}} * 6 + DIM Bsv AS {{Cl|STRING}} * 1 + DIM Header AS STRING * 6 Scr = 0: MaxColors = 0 - {{Cl|OPEN}} Filename$ {{Cl|FOR (file statement)|FOR}} {{Cl|BINARY}} {{Cl|AS}} #1 + {{Cl|OPEN}} Filename$ FOR {{Cl|BINARY}} AS #1 {{Cl|GET}} #1, , Bsv '1 check for small 2 character - {{Cl|GET}} #1, , Header '2 - 7 rest of file header + GET #1, , Header '2 - 7 rest of file header - {{Cl|IF}} Bsv <> {{Cl|CHR$}}(253) {{Cl|THEN}} ' small 2 character denotes a {{Cl|BSAVE}} file - {{Cl|COLOR}} 12: {{Cl|LOCATE}} 15, 33: {{Cl|PRINT}} "Not a BSAVE file!": {{Cl|SLEEP}} 3: {{Cl|EXIT SUB}} - {{Cl|END IF}} + IF Bsv <> {{Cl|CHR$}}(253) THEN ' small 2 character denotes a {{Cl|BSAVE}} file + COLOR 12: LOCATE 15, 33: PRINT "Not a BSAVE file!": SLEEP 3: {{Cl|EXIT}} SUB + END IF - {{Cl|GET}} #1, , widN '8 no color info bmp sizes - {{Cl|GET}} #1, , depN '9 " " " + GET #1, , widN '8 no color info bmp sizes + GET #1, , depN '9 " " " -{{Cl|DO}} - {{Cl|IF}} widN > 63 {{Cl|OR}} depN > 63 {{Cl|THEN}} {{Cl|EXIT DO}} ' width and depth already found +DO + IF widN > 63 OR depN > 63 THEN {{Cl|EXIT DO}} ' width and depth already found - {{Cl|FOR}} i = 10 {{Cl|TO}} 55 'check for Screen 12 embedded colors - {{Cl|GET}} #1, , RGB + FOR i = 10 TO 55 'check for Screen 12 embedded colors + GET #1, , RGB tot12& = tot12& + RGB 'PRINT i; RGB; : SOUND 300, 1 'test sound slows loop in QB - {{Cl|IF}} RGB > 63 {{Cl|OR}} RGB < 0 {{Cl|THEN}} {{Cl|EXIT DO}} - {{Cl|IF}} i = 55 {{Cl|AND}} tot12& = 0 {{Cl|THEN}} {{Cl|EXIT DO}} - {{Cl|NEXT}} + IF RGB > 63 OR RGB < 0 THEN {{Cl|EXIT DO}} + IF i = 55 AND tot12& = 0 THEN {{Cl|EXIT DO}} + NEXT - {{Cl|GET}} #1, , wid12 '56 - {{Cl|GET}} #1, , dep12 '57 - {{Cl|IF}} wid12 > 63 {{Cl|OR}} dep12 > 63 {{Cl|THEN}} {{Cl|EXIT DO}} + GET #1, , wid12 '56 + GET #1, , dep12 '57 + IF wid12 > 63 OR dep12 > 63 THEN {{Cl|EXIT DO}} - {{Cl|FOR}} i = 58 TO 775 'check for Screen 13 embedded colors - {{Cl|GET}} #1, , RGB + FOR i = 58 TO 775 'check for Screen 13 embedded colors + GET #1, , RGB tot13& = tot13& + RGB 'PRINT i; RGB; : SOUND 300, 1 'test - {{Cl|IF}} RGB > 63 {{Cl|OR}} RGB < 0 {{Cl|THEN}} {{Cl|EXIT DO}} - {{Cl|IF}} i = 775 {{Cl|AND}} tot13& = 0 {{Cl|THEN}} {{Cl|EXIT DO}} - {{Cl|NEXT}} - {{Cl|GET}} #1, , wid13 '776 - {{Cl|GET}} #1, , dep13 '777 -{{Cl|LOOP}} {{Cl|UNTIL}} 1 = 1 'TRUE statement exits one-time LOOP -{{Cl|CLOSE}} #1 + IF RGB > 63 OR RGB < 0 THEN {{Cl|EXIT DO}} + IF i = 775 AND tot13& = 0 THEN {{Cl|EXIT DO}} + NEXT + GET #1, , wid13 '776 + GET #1, , dep13 '777 +LOOP {{Cl|UNTIL}} 1 = 1 'TRUE statement exits one-time LOOP +CLOSE #1 -{{Cl|COLOR}} 14: {{Cl|LOCATE}} 10, 25 +COLOR 14: LOCATE 10, 25 {{Cl|SELECT CASE}} i {{Cl|CASE IS}} < 56: - {{Cl|IF}} widN > 640 {{Cl|THEN}} + IF widN > 640 THEN Scr = 13: MaxColors = 0 - {{Cl|PRINT}} "Default Screen 13:"; widN \ 8; "X"; depN - {{Cl|ELSE}} - {{Cl|LOCATE}} 10, 15 - {{Cl|PRINT}} "Screen 12 ("; widN; "X"; depN; ") OR 13 ("; widN \ 8; "X"; depN; ")" - {{Cl|DO}}: {{Cl|SOUND}} 600, 4 - {{Cl|COLOR}} 13: {{Cl|LOCATE}} 12, 23 'ask if no data found. Prevents ERROR opening in wrong mode + PRINT "Default Screen 13:"; widN \ 8; "X"; depN + ELSE + LOCATE 10, 15 + PRINT "Screen 12 ("; widN; "X"; depN; ") OR 13 ("; widN \ 8; "X"; depN; ")" + DO: SOUND 600, 4 + COLOR 13: LOCATE 12, 23 'ask if no data found. Prevents ERROR opening in wrong mode {{Cl|INPUT}} "Enter a Screen mode 12 or 13 : ", Scrn$ - Scr = {{Cl|VAL}}(Scrn$) - {{Cl|LOOP}} {{Cl|UNTIL}} Scr = 12 {{Cl|OR}} Scr = 13 - {{Cl|END IF}} - {{Cl|IF}} Scr = 12 {{Cl|THEN}} MaxColors = 0: PWidth = widN: PDepth = depN - {{Cl|IF}} Scr = 13 {{Cl|THEN}} MaxColors = 0: PWidth = widN \ 8: PDepth = depN + Scr = VAL(Scrn$) + LOOP UNTIL Scr = 12 OR Scr = 13 + END IF + IF Scr = 12 THEN MaxColors = 0: PWidth = widN: PDepth = depN + IF Scr = 13 THEN MaxColors = 0: PWidth = widN \ 8: PDepth = depN {{Cl|CASE}} 56 TO 775 - {{Cl|PRINT}} "Custom Screen 12:"; wid12; "X"; dep12 + PRINT "Custom Screen 12:"; wid12; "X"; dep12 Scr = 12: MaxColors = 16: PWidth = wid12: PDepth = dep12 - {{Cl|CASE}} 776: {{Cl|PRINT}} "Custom Screen 13:"; wid13 \ 8; "X"; dep13 + {{Cl|CASE}} 776: PRINT "Custom Screen 13:"; wid13 \ 8; "X"; dep13 Scr = 13: MaxColors = 256: PWidth = wid13 \ 8: PDepth = dep13 {{Cl|END SELECT}} @@ -149,3 +148,4 @@ CheckScreen filenm$ {{PageNavigation}} +< diff --git a/internal/help/DOUBLE.txt b/internal/help/DOUBLE.txt index da87db111..00bbe600f 100644 --- a/internal/help/DOUBLE.txt +++ b/internal/help/DOUBLE.txt @@ -16,7 +16,7 @@ * '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix.''' -{{PageQBasic}} +==QBasic/QuickBASIC== * Results of mathematical calculations may be approximate or slow in QuickBASIC 4.5. @@ -29,3 +29,4 @@ {{PageNavigation}} +< diff --git a/internal/help/DRAW.txt b/internal/help/DRAW.txt index 0e8e698a6..a8a7a7f89 100644 --- a/internal/help/DRAW.txt +++ b/internal/help/DRAW.txt @@ -166,3 +166,4 @@ k = {{Cl|_RGB}}(80, 255, 80) {{PageNavigation}} +< diff --git a/internal/help/Dollar_Sign.txt b/internal/help/Dollar_Sign.txt index 6c56794eb..d59d756ea 100644 --- a/internal/help/Dollar_Sign.txt +++ b/internal/help/Dollar_Sign.txt @@ -1,4 +1,4 @@ -The '''$''' is used to denote QBasic [[Metacommand]]s or as a [[STRING]] variable type suffix. +The '''$''' is used to denote Qbasic [[Metacommand]]s or as a [[STRING]] variable type suffix. @@ -7,7 +7,7 @@ The '''$''' is used to denote QBasic [[Metacommand]]s or as a [[STRING]] variabl * [[$STATIC]] denotes that all arrays can only be dimensioned once using [[DIM]]. * [[$DYNAMIC]] denotes that all arrays can be redimensioned using [[REDIM]] ONLY. -* [[$INCLUDE]] includes a BI file or QBasic Library in a program. The file name requires a comment before and after the name. +* [[$INCLUDE]] includes a BI file or Qbasic Library in a program. The file name requires a comment before and after the name. * The [[STRING|string]] variable suffix MUST be used if the variable is not dimensioned in a DIM statement. The statement can also set a fixed string [[LEN|length]]. @@ -18,3 +18,4 @@ The '''$''' is used to denote QBasic [[Metacommand]]s or as a [[STRING]] variabl {{PageNavigation}} +< diff --git a/internal/help/ELSE.txt b/internal/help/ELSE.txt index 7eba6ed4a..e0e9fbe53 100644 --- a/internal/help/ELSE.txt +++ b/internal/help/ELSE.txt @@ -60,3 +60,4 @@ IF a = 3 THEN a = 5 ELSE a = 3 {{PageNavigation}} +< diff --git a/internal/help/ELSEIF.txt b/internal/help/ELSEIF.txt index b2f773921..cd342b27f 100644 --- a/internal/help/ELSEIF.txt +++ b/internal/help/ELSEIF.txt @@ -53,3 +53,4 @@ END IF {{PageNavigation}} +< diff --git a/internal/help/END.txt b/internal/help/END.txt index 2de6be5eb..69e98ab84 100644 --- a/internal/help/END.txt +++ b/internal/help/END.txt @@ -50,3 +50,4 @@ Press any key to continue... {{PageNavigation}} +< diff --git a/internal/help/ENVIRON$.txt b/internal/help/ENVIRON$.txt index 76841b7fe..1c36ab1ca 100644 --- a/internal/help/ENVIRON$.txt +++ b/internal/help/ENVIRON$.txt @@ -1,4 +1,4 @@ -The [[ENVIRON$]] function returns a [[STRING]] environmental value from the Operating System's environmental settings list. +The [[ENVIRON$]] function returns a [[STRING]] environmental value from '''Windows'''' environmental settings list. {{PageSyntax}} @@ -8,7 +8,7 @@ The [[ENVIRON$]] function returns a [[STRING]] environmental value from the Oper {{PageDescription}} * The function can use an [[INTEGER]] {{Parameter|listIndex%}} value or [[STRING]] {{Parameter|systemID$}} parameter. * {{Parameter|listIndex%}} refers to the number order of the environmental list. Returns are not in any particular numerical order. -* {{Parameter|systemID$}} is the specific [[STRING]] parameter requested. Returns only the specified environmental [[STRING]] setting (examples based on Windows): +* {{Parameter|systemID$}} is the specific [[STRING]] parameter requested. Returns only the specified environmental [[STRING]] setting: ** "BLASTER" = current Sound Blaster settings if installed. ** "COMPUTERNAME" or "USERDOMAIN" = OEM PC serial number or the computer name assigned by owner. ** "HOMEDRIVE" or "SystemDrive" = Windows root drive, normally C: on single partition drives. @@ -117,7 +117,7 @@ Q$ = {{Cl|CHR$}}(34) '=== Write URL Shortcut file info. ''See also:'' -* [[ENVIRON]] (statement), [[_ENVIRONCOUNT]] +* [[ENVIRON]] (statement) * [[_DEVICES]], [[_DEVICE$]] * [[_LASTBUTTON]], [[_OS$]] * [[Windows Environment]] @@ -125,3 +125,4 @@ Q$ = {{Cl|CHR$}}(34) '=== Write URL Shortcut file info. {{PageNavigation}} +< diff --git a/internal/help/ENVIRON.txt b/internal/help/ENVIRON.txt index dc175f62e..29dc4508c 100644 --- a/internal/help/ENVIRON.txt +++ b/internal/help/ENVIRON.txt @@ -11,13 +11,13 @@ The [[ENVIRON]] statement is used to temporarily set or change an environmental ** Using a space: [[ENVIRON]] "parameterID setting" * If the parameter ID did not previously exist in the environmental string table, it is appended to the end of the table. * If a parameter ID did exist, it is deleted and the new value is appended to end of the list. -* The [[_ENVIRONCOUNT]] function returns the number of key/value pairs that currently exist. * Any changes made at runtime are discarded when your program ends. {{PageSeeAlso}} -* [[ENVIRON$]], [[_ENVIRONCOUNT]] +* [[ENVIRON$]] * [[Windows Environment]] {{PageNavigation}} +< diff --git a/internal/help/EOF.txt b/internal/help/EOF.txt index e1f9673fb..1af62090f 100644 --- a/internal/help/EOF.txt +++ b/internal/help/EOF.txt @@ -22,3 +22,4 @@ The [[EOF]] function indicates that the end of a file has been reached. {{PageNavigation}} +< diff --git a/internal/help/EQV.txt b/internal/help/EQV.txt index 13cce0c7a..d8c27f721 100644 --- a/internal/help/EQV.txt +++ b/internal/help/EQV.txt @@ -19,3 +19,4 @@ The [[EQV]] operator returns a value based on the ''equivalence'' of two conditi {{PageNavigation}} +< diff --git a/internal/help/ERASE.txt b/internal/help/ERASE.txt index fe407fc78..881034c87 100644 --- a/internal/help/ERASE.txt +++ b/internal/help/ERASE.txt @@ -22,3 +22,4 @@ The [[ERASE]] statement is used to clear all data from an array. [[$STATIC]] [[A {{PageNavigation}} +< diff --git a/internal/help/ERDEV$.txt b/internal/help/ERDEV$.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/ERDEV$.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/ERDEV.txt b/internal/help/ERDEV.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/ERDEV.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/ERL.txt b/internal/help/ERL.txt index 67d93cdf0..fb77eb770 100644 --- a/internal/help/ERL.txt +++ b/internal/help/ERL.txt @@ -36,8 +36,9 @@ errorfix: * [[ERR]] * [[ERROR]] * [[ON ERROR]] -* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]] +* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]] * [[ERROR Codes]] {{PageNavigation}} +< diff --git a/internal/help/ERR.txt b/internal/help/ERR.txt index 382510cea..1e40cc27e 100644 --- a/internal/help/ERR.txt +++ b/internal/help/ERR.txt @@ -36,9 +36,10 @@ handler: {{PageSeeAlso}} * [[ON ERROR]], [[RESUME]] * [[ERL]] -* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]] +* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]] * [[ERROR]] * [[ERROR Codes]] {{PageNavigation}} +< diff --git a/internal/help/ERROR.txt b/internal/help/ERROR.txt index 6747c621b..1afbe43c2 100644 --- a/internal/help/ERROR.txt +++ b/internal/help/ERROR.txt @@ -34,9 +34,9 @@ handler: {{PageSeeAlso}} *[[ON ERROR]] *[[ERR]], [[ERL]] -*[[_ERRORLINE]], [[_ERRORMESSAGE$]] -*[[_INCLERRORLINE]], [[_INCLERRORFILE$]] +*[[_ERRORLINE]] *[[ERROR Codes]] (list) {{PageNavigation}} +< diff --git a/internal/help/EXIT.txt b/internal/help/EXIT.txt index 67d05e73c..18cfe144e 100644 --- a/internal/help/EXIT.txt +++ b/internal/help/EXIT.txt @@ -19,8 +19,8 @@ The [[EXIT]] statement is used to exit certain QBasic procedures. * To exit the program immediately, use [[SYSTEM]]. -{{PageAvailability}} -* '''EXIT SELECT/CASE''' available with version 1.5. +== Availability == +* '''EXIT SELECT/CASE''' available with v1.5. * All other variants available in all versions of QB64. @@ -31,3 +31,4 @@ The [[EXIT]] statement is used to exit certain QBasic procedures. {{PageNavigation}} +< diff --git a/internal/help/EXP.txt b/internal/help/EXP.txt index e2f3c2c4d..f5e47932e 100644 --- a/internal/help/EXP.txt +++ b/internal/help/EXP.txt @@ -17,6 +17,8 @@ The [[EXP]] math function calculates the exponential function ('''e''' raised to {{PageSeeAlso}} *[[LOG]] *[[Mathematical Operations]] +*[[Mathematical Operations#Derived Mathematical Functions|Derived Trigonometric Functions]] {{PageNavigation}} +< diff --git a/internal/help/Equal.txt b/internal/help/Equal.txt index 542453fa3..d91767834 100644 --- a/internal/help/Equal.txt +++ b/internal/help/Equal.txt @@ -1,7 +1,18 @@ + + +View source for Equal +← Equal +Jump to navigationJump to search +You do not have permission to edit this page, for the following reason: + +The action you have requested is limited to users in the group: Users. + +You can view and copy the source of this page. + The '''=''' condition symbol denotes that a value must equal another value for the condition to be True. -''Example usage:'' IF x [[=]] 320 THEN PRINT "Center of screen" +''Example usage:'' IF x = 320 THEN PRINT "Center of screen" * Statements will evaluate as True or -1 when two values are equal or False or 0 when not equal. @@ -18,3 +29,23 @@ The '''=''' condition symbol denotes that a value must equal another value for t {{PageNavigation}} + +Template used on this page: + +Template:PageNavigation (view source) +Return to Equal. + +Navigation menu +Log inPageDiscussionReadView sourceView historySearch +Search QB64 Wiki +Main page +Recent changes +Random page +Help about MediaWiki +Tools +What links here +Related changes +Special pages +Page information +Privacy policyAbout QB64 WikiDisclaimersPowered by MediaWiki +< diff --git a/internal/help/FIELD.txt b/internal/help/FIELD.txt index 7d99cc3fd..37f6f75bb 100644 --- a/internal/help/FIELD.txt +++ b/internal/help/FIELD.txt @@ -88,3 +88,4 @@ Demo using the FIELD statement to read the file: {{PageNavigation}} +< diff --git a/internal/help/FILEATTR.txt b/internal/help/FILEATTR.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/FILEATTR.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/FILES.txt b/internal/help/FILES.txt index 5c59b6aba..542771f22 100644 --- a/internal/help/FILES.txt +++ b/internal/help/FILES.txt @@ -15,7 +15,7 @@ The [[FILES]] statement is used to print a list of files in the current director * FILES lists can make the screen roll up. Try using SHELL "DIR" with the /P option. [http://www.computerhope.com/dirhlp.htm DIR command]. -{{PageQBasic}} +==QBasic/QuickBASIC== * Illegal filename characters in QBasic included '''* ? , > < ; : " | \ / + [ ]''' and more than one dot extension in [http://www.computerhope.com/issues/ch000209.htm DOS]. @@ -94,8 +94,9 @@ DIR$ = DirList$(Index%) ''Alternative 2:'' -* The member-contributed [[FILELIST$]] function uses the mouse and does not affect your program screens. It can verify that a file name exists or display a list of long and short file names to choose from. It also avoids program errors when a file name does not exist. +* The member-contributed [[FILELIST$]] function uses the mouse and does not affect your program screens. It can verify that a file name exists or display a list of long and short file names to choose from. It also avoids program errors when a file name does not exist. <!-- broken link: [http://i301.photobucket.com/albums/nn53/burger2227/FILE-ss2.jpg FILELIST$ function screenshot] --> +<!-- The referenced library is not present in this link anymore ''See Library:'' File Exist C++ Function that does not create a temp file. [http://qb64.net/wiki/index.php?title=C_Libraries#File_Exist FileExist Function] --> {{PageSeeAlso}} * [[SHELL]], [[SCREEN (function)]] {{text|(See Example 3)}} @@ -109,3 +110,4 @@ DIR$ = DirList$(Index%) {{PageNavigation}} +< diff --git a/internal/help/FIX.txt b/internal/help/FIX.txt index 9b34f40bb..9b1039c52 100644 --- a/internal/help/FIX.txt +++ b/internal/help/FIX.txt @@ -5,7 +5,7 @@ The [[FIX]] function rounds a numerical value to the next whole number closest t : {{Parameter|result}} = [[FIX]]({{Parameter|expression}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|expression}} is any [[Data types|type]] of literal or variable numerical value or mathematical calculation. @@ -57,3 +57,4 @@ The [[FIX]] function rounds a numerical value to the next whole number closest t {{PageNavigation}} +< diff --git a/internal/help/FOR...NEXT.txt b/internal/help/FOR...NEXT.txt index 5c7767f12..21536c959 100644 --- a/internal/help/FOR...NEXT.txt +++ b/internal/help/FOR...NEXT.txt @@ -8,7 +8,7 @@ The [[FOR]] statement creates a counter loop using specified start and stop nume : [[NEXT]] [{{Parameter|counterVariable}}] -{{PageParameters}} +{{Parameters}} * The [[FOR]] {{Parameter|counterVariable}} name is required to define the counter span and may also be used after the NEXT keyword. * The {{Parameter|startValue}} [[TO]] {{Parameter|stopValue}} can be any literal or variable numerical type. Both values are required. * [[STEP]] can be used for a loop {{Parameter|increment}} other than the default ''plus 1 and can be any positive or negative literal or variable numerical value as long as the STEP value corresponds to the loop's {{Parameter|startValue}} and {{Parameter|stopValue}}. @@ -24,7 +24,6 @@ The [[FOR]] statement creates a counter loop using specified start and stop nume ** If {{Parameter|startValue}} is more than {{Parameter|stopValue}}, use a negative [[STEP]] interval or the loop will not be executed. ** The [[STEP]] {{Parameter|increment}} value cannot be changed inside of the loop. * Use '''[[EXIT]] FOR''' to leave a FOR loop early when a certain condition is met inside of the loop. -* Use [[_CONTINUE]] to skip the remaining lines in the current iteration of a FOR/NEXT block without leaving the loop. * The [[NEXT]] counter variable name is not required. NEXT loop increments can be separated by colons in nested FOR loops. * '''NOTE: When the FOR loop is exited after the {{Parameter|stopValue}} is reached, the {{Parameter|counterVariable}}'s value will be {{Parameter|stopValue}} + 1 (or {{Parameter|stopValue}} + {{Parameter|increment}}) * '''Beware of FOR loop counts that exceed the {{Parameter|counterVariable}} type limits and may repeat without error in QB64.''' @@ -40,7 +39,7 @@ FOR i = 10 TO 0 {{Cl|STEP}} -2 NEXT PRINT "After loop, i ="; i '' '' {{CodeEnd}} -{{OutputStart}}10 18 24 28 30 30 After loop, i = -2 +{{OutputStart}}10 18 24 28 30 30 After loop, i = -2 {{OutputEnd}} :''Explanation:'' The loop counts down from 10 to every even value below it. The counter keeps stepping down until the FOR stop limit is reached or exceeded. Note that the value of i is -2 after the loop is exited. [[NEXT]] always increments the counter one last time. @@ -59,11 +58,15 @@ PRINT "After loop, i ="; i '' '' bye {{OutputEnd}} +<!-- removed redundant example as Example 2 above shows exactly the same technique +''See Example:'' +* [http://qb64.net/wiki/index.php?title=Controller_Devices#Example Example that shows how ignoring bad FOR loops can work to a program's advantage without errors.] --> + {{PageSeeAlso}} * [[STEP]] * [[DO...LOOP]], [[WHILE...WEND]] -* [[EXIT]], [[_CONTINUE]] {{PageNavigation}} +< diff --git a/internal/help/FOR_(file_statement).txt b/internal/help/FOR_(file_statement).txt index 0ed1a3411..c364960e2 100644 --- a/internal/help/FOR_(file_statement).txt +++ b/internal/help/FOR_(file_statement).txt @@ -1,26 +1,119 @@ -#REDIRECT [[OPEN#File_Access_Modes]] - -[[FOR (file statement)|FOR]] is used in a [[OPEN]] statement to indicate the file mode with which to open a file. +The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output. {{PageSyntax}} -: [[OPEN]] ... [[FOR (file statement)|FOR]] {APPEND|BINARY|INPUT|OUTPUT|RANDOM} +: [[OPEN]] {{Parameter|fileName$}} ['''FOR''' {{Parameter|mode}}] [{{{KW|ACCESS}}|{{{KW|LOCK}}|SHARED}} [{READ|WRITE}] [[AS]] [#]{{Parameter|fileNumber&}} [LEN = {{Parameter|recordLength}}] + + +===Legacy ''GW-BASIC'' syntax=== +: [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] + + +{{Parameters}} +* The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. +* FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). +* GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. +* {{Parameter|fileNumber&}} can be any '''positive''' [[INTEGER]] or [[LONG]] whole number value or an unused value determined by the [[FREEFILE]] function. +* [[LEN]] = or {{Parameter|recordLength}} is optional to denote the RANDOM file record byte length (default = 128) or sequential (default = 512) load buffer. {{PageDescription}} -* If [[FOR (file statement)|FOR]] isn't used in an [[OPEN]] statement, the default file mode {{KW|RANDOM}} is used. -** {{KW|APPEND}} - Keeps the information of the file intact while you can insert information at the end of it, writing permission only. -** {{KW|BINARY}} - Opens the file in binary mode, use this with binary files. -** {{KW|INPUT (file mode)|INPUT}} - Opens the file for viewing only. -** {{KW|OUTPUT}} - The entire contents of the file is erased while you can put new information inside it, writing permission only. -** {{KW|RANDOM}} - The default, you can get/put records defined by a record length (the variables type or LEN=length). +* '''QB64''' can open as many files as your computer memory can handle. QBasic could only open about 15 at a time. +* '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' +* {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) +* '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. +* {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. +* Once a file or port is opened, it can be used in any program procedure using the assigned file number. +* The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +: '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. +* [[OPEN COM]] can also be used for serial port access in '''QB64'''. + + +{{PageErrors}} +* Illegal '''QB64''' Windows filename characters are ''' " * / \ | ? : < > '''. Multiple dots (periods) are allowed. +* Possible OPEN [[ERROR Codes|errors]] include "Bad file name or number", "Bad File Mode", "File Not Found" or "Path Not Found". +** An OPEN file not found error may occur if [[CHR$]](0) to (31) are used in a Windows file name. +* '''QB64''' does not have DOS file name limitations. + + +==Details== +===File ACCESS and LOCK Permissions=== +* [[ACCESS]] clause limits file access to READ, WRITE or READ WRITE on a network. +* [[LOCK (access)|LOCK]] clause can specify SHARED or a LOCK READ or LOCK WRITE file lock in an OPEN statement working on a network. +* A separate [[LOCK]] statement can lock or [[UNLOCK]] file access on a network using a format that can lock specific records. +* If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. + +===File Access Modes=== +* FOR mode can be: +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. +** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' +** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' +** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. +** '''RANDOM''': Creates a new file when it doesn't exist or reads or writes to an existing random file record. Use [[GET|GET #]] or [[PUT|PUT #]] to read or write to file records. A [[LEN]] = statement can define the byte size of a record (no LEN statement defaults to 128 bytes) +** Modes '''INPUT''', '''BINARY''' and '''RANDOM''' allow a file to be concurrently opened in a different mode and number. + + +====GW-BASIC modes==== +* ''Mode letter'' is a variable or literal [[STRING]] letter value as one of the following: +** "A" = '''APPEND'''. +** "B" = '''BINARY'''. +** "I" = '''INPUT'''. +** "O" = '''OUTPUT'''. +** "R" = '''RANDOM'''. {{PageExamples}} -'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. +''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. {{CodeStart}} + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% +{{Cl|FUNCTION}} CheckName% (Filename$) + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} + L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension + {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} + CheckName% = -1: {{Cl|COLOR}} 12: {{Cl|PRINT}} "Illegal format!"; : {{Cl|EXIT FUNCTION}} + {{Cl|END IF}} + {{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} L 'check each filename character" + code% = {{Cl|ASC}}({{Cl|MID$}}(Filename$, i%, 1)): {{Cl|COLOR}} 10 ' see ASCII codes + {{Cl|SELECT CASE}} code% 'check for errors and highlight in red + '{{Cl|CASE}} 34, 42 {{Cl|TO}} 44, 47, 58 {{Cl|TO}} 63, 91 {{Cl|TO}} 93, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QBasic errors''' + {{Cl|CASE}} 34, 42, 47, 58, 60, 62, 92, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QB64 errors''' + {{Cl|CASE}} 46: dot% = dot% + 1: {{Cl|IF...THEN|IF}} dot% > 1 {{Cl|THEN}} E% = E% + 1: {{Cl|COLOR}} 12 + {{Cl|END SELECT}} + {{Cl|PRINT}} {{Cl|CHR$}}(code%); 'use {{Cl|LOCATE}} before {{Cl|FUNCTION}} call to place print + {{Cl|NEXT}} + CheckName% = E% +{{Cl|END FUNCTION}} '' '' +{{CodeEnd}} +''Note: The QBasic character error list is commented out and the function will return invalid filenames under QB64. + +{{OutputStart}} + {{text|Hello|#54FC54}}{{text|,|red}}{{text|~1.mp3|#54FC54}} {{text|Total Errors|yellow}}<nowiki> = </nowiki>{{text|1|yellow}} +{{OutputEnd}} +:''Note:'' The screen output displays filename characters in green except for red comma QBasic error. + + +''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: +{{CodeStart}} '' '' +f% = {{Cl|FREEFILE}} 'should always be 1 at program start +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +g% = {{Cl|FREEFILE}} 'should always be 2 after 1 +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% + +{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 + {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" +NEXT '' '' +{{CodeEnd}}{{small|code by Steve McNeill}} +: ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. + + +''Example 3:'' Showcasing different file modes. +{{CodeStart}} {{Cl|CLS}} {{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 @@ -49,10 +142,21 @@ A new file was created named test.tst and then deleted. If test.tst did exist: It was overwritten with this and deleted. {{OutputEnd}} +:'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. -{{PageSeeAlso}} -* [[OPEN]] +{{PageSeeAlso}} +* [[PRINT (file statement)]], [[INPUT (file statement)]] +* [[GET]], [[PUT]], [[WRITE (file statement)]] +* [[INPUT$]], [[LINE INPUT (file statement)]] +* [[CLOSE]], [[LOF]], [[EOF]], [[LOC]] +* [[SEEK (statement)]], [[SEEK]] +* [[OPEN COM]], [[LEN]], [[RESET]] +* [[FIELD]], [[TYPE]] +* [[_FILEEXISTS]], [[_DIREXISTS]] +* [[_OPENCLIENT]], [[_OPENHOST]], [[_OPENCONNECTION]] {{text|(TCP/IP)}} +* [[_SNDOPEN]], [[_LOADIMAGE]] {{PageNavigation}} +< diff --git a/internal/help/FRE.txt b/internal/help/FRE.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/FRE.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/FREEFILE.txt b/internal/help/FREEFILE.txt index 2a84dcf66..60484bd72 100644 --- a/internal/help/FREEFILE.txt +++ b/internal/help/FREEFILE.txt @@ -19,3 +19,4 @@ The [[FREEFILE]] function returns a [[LONG]] value that is an unused file access {{PageNavigation}} +< diff --git a/internal/help/FUNCTION.txt b/internal/help/FUNCTION.txt index 8a6f0bafb..b917bf364 100644 --- a/internal/help/FUNCTION.txt +++ b/internal/help/FUNCTION.txt @@ -24,14 +24,31 @@ A [[FUNCTION]] block statement is used to create a function procedure to return * The IDE can create the FUNCTION and END FUNCTION lines for you. Use the ''New FUNCTION...'' option in the Edit Menu. A box will come up for you to enter a name for the FUNCTION. Enter all code between the FUNCTION and [[END FUNCTION]] lines. -{{PageQBasic}} +==QBasic/QuickBASIC== * Once a FUNCTION was created and used, the QBasic IDE would DECLARE it when the file was saved. '''QB64 doesn't need these declarations.''' * QBasic's IDE could place a [[DEFINT]], [[DEFSNG]], [[DEFLNG]], [[DEFDBL]] or [[DEFSTR]] statement before the FUNCTION line if it is used in the main module. It may even be the wrong variable type needed. * QBasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures. {{PageExamples}} -''Example 1:'' Returns a [[LONG]] array byte size required for a certain sized graphics screen pixel area [[GET (graphics statement)|GET]]. +''Example 1:'' A simple function that returns the current path. Place [[FUNCTION]] or [[SUB]] procedures after the program [[END]]. +{{CodeStart}} '' '' +{{Cl|PRINT}} "Current path = "; PATH$ +{{Cl|END}} + +{{Cl|FUNCTION}} PATH$ + f% = {{Cl|FREEFILE}} + file$ = "D0Spath.inf" 'file name uses a zero to prevent an overwrite of existing file name + {{Cl|SHELL}} {{Cl|_HIDE}} "CD > " + file$ 'send screen information to a created text file + {{Cl|OPEN}} file$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #f% 'file should exist with one line of text + {{Cl|LINE INPUT (file statement)|LINE INPUT}} #f%, PATH$ 'read file path text to function name + {{Cl|CLOSE}} #f% + {{Cl|KILL}} file$ +{{Cl|END FUNCTION}} '' '' +{{CodeEnd}} + + +''Example 2:'' Returns a [[LONG]] array byte size required for a certain sized graphics screen pixel area [[GET (graphics statement)|GET]]. {{CodeStart}} '' '' {{Cl|INPUT}} "Enter a screen mode: ", mode% {{Cl|INPUT}} "Enter image width: ", wide& @@ -63,3 +80,4 @@ IntegerArray& = ImageBufferSize&(wide&, deep&, mode%) \ 2 ' retu {{PageNavigation}} +< diff --git a/internal/help/GET.txt b/internal/help/GET.txt index de7b66b9a..674d87848 100644 --- a/internal/help/GET.txt +++ b/internal/help/GET.txt @@ -106,3 +106,4 @@ showme 'display array after transfer from file {{PageNavigation}} +< diff --git a/internal/help/GET_(TCP%2FIP_statement).txt b/internal/help/GET_(TCP%2FIP_statement).txt index dc664b1be..2f8942ee9 100644 --- a/internal/help/GET_(TCP%2FIP_statement).txt +++ b/internal/help/GET_(TCP%2FIP_statement).txt @@ -48,3 +48,4 @@ {{PageNavigation}} +< diff --git a/internal/help/GET_(graphics_statement).txt b/internal/help/GET_(graphics_statement).txt index 20b9b499e..1d933ed84 100644 --- a/internal/help/GET_(graphics_statement).txt +++ b/internal/help/GET_(graphics_statement).txt @@ -1,6 +1,6 @@ The [[GET (graphics statement)|GET]] statement is used in graphics to store a box area image of the screen into an [[INTEGER]] array. -{{PageLegacySupport}} +==Legacy support== * '''QB64 can manipulate parts of an image using [[_PUTIMAGE]]. For that reason, GET isn't recommended practice anymore and is supported to maintain compatibility with legacy code.''' @@ -8,7 +8,7 @@ The [[GET (graphics statement)|GET]] statement is used in graphics to store a bo : [[GET]] [STEP] ({{Parameter|column1}}, {{Parameter|row1}})-[STEP]({{Parameter|column2}}, {{Parameter|row2}}), {{Parameter|array}}([{{Parameter|index}}])[, {{Parameter|offscreenColor}}] -{{PageParameters}} +{{Parameters}} * ''column'' and ''row'' [[INTEGER]] coordinates for the box area must be on the screen except when using an ''offscreenColor''. * [[INTEGER]] array sizes must be large enough (use width * height of the box area + 4) to hold the data or an error will occur. * The [[arrays|array]] ''index'' offset is optional. If the offset is zero the brackets may be empty. @@ -30,7 +30,7 @@ The [[GET (graphics statement)|GET]] statement is used in graphics to store a bo * '''[[PUT]] and [[GET]] file statements can also write and read image array data using [[BINARY]] files instead of using [[BSAVE]] or [[BLOAD]].''' -{{PageQBasic}} +==QBasic/QuickBASIC== * SCREEN 12 could only GET 1/3 of a full SCREEN 12 image. Rows would increment 160 each GET. '''QB64''' can save entire screen at once. @@ -107,3 +107,4 @@ a& = {{Cl|_NEWIMAGE}}(800, 600, 13) 'larger surface a& emulates scre {{PageNavigation}} +< diff --git a/internal/help/GOSUB.txt b/internal/help/GOSUB.txt index 6ce672c65..a170b41d5 100644 --- a/internal/help/GOSUB.txt +++ b/internal/help/GOSUB.txt @@ -11,7 +11,7 @@ * GOSUB and GOTO can be used '''within''' [[SUB]] or [[FUNCTION]] procedures, but cannot refer to a label located outside the procedure. -{{PageQBasic}} +==QBasic/QuickBASIC== * Too many GOSUBs without a [[RETURN]] can eventually cause "Out of Stack Errors" in QBasic as each GOSUB uses memory to store the location to return to. Each [[RETURN]] frees the memory of the GOSUB it returns to. @@ -75,3 +75,4 @@ It returned to IF a = 1 {{PageNavigation}} +< diff --git a/internal/help/GOTO.txt b/internal/help/GOTO.txt index 950aad0b7..38f351bd3 100644 --- a/internal/help/GOTO.txt +++ b/internal/help/GOTO.txt @@ -5,10 +5,8 @@ The [[GOTO]] statement sends the procedure to a line label or a line number in t : [[GOTO]] {''lineNumber''|''lineLabel''} -[[IF]] Syntax:'' +'''''IF''' Syntax:'' : IF condition [[GOTO]] {''lineNumber''|''lineLabel''} -: IF condition THEN [[GOTO]] {''lineNumber''|''lineLabel''} -: IF condition THEN ''lineNumber'' ' GOTO may be omitted when line numbers are used {{PageDescription}} @@ -21,7 +19,7 @@ The [[GOTO]] statement sends the procedure to a line label or a line number in t {{PageExamples}} ''Example:'' {{CodeStart}} '' '' -1 {{Cl|PRINT}} "first line" : {{Cl|GOTO}} gohere +1 {{Cl|PRINT}} "first line": {{Cl|GOTO}} gohere 2 {{Cl|PRINT}} "second line": {{Cl|GOTO}} 3 gohere: @@ -48,3 +46,4 @@ second line {{PageNavigation}} +< diff --git a/internal/help/Greater_Than.txt b/internal/help/Greater_Than.txt index e64326056..b1bd5eb7b 100644 --- a/internal/help/Greater_Than.txt +++ b/internal/help/Greater_Than.txt @@ -17,3 +17,4 @@ The '''>''' condition symbol denotes that a value must be greater than another v {{PageNavigation}} +< diff --git a/internal/help/Greater_Than_Or_Equal.txt b/internal/help/Greater_Than_Or_Equal.txt index 58fd7458e..6b5e61f1e 100644 --- a/internal/help/Greater_Than_Or_Equal.txt +++ b/internal/help/Greater_Than_Or_Equal.txt @@ -13,3 +13,4 @@ The '''>=''' condition symbol denotes that a value must be greater than or equal {{PageNavigation}} +< diff --git a/internal/help/HEX$.txt b/internal/help/HEX$.txt index 0efa38027..1f9da8461 100644 --- a/internal/help/HEX$.txt +++ b/internal/help/HEX$.txt @@ -67,3 +67,4 @@ Converting Hex value to Decimal: 255 {{PageNavigation}} +< diff --git a/internal/help/IF...THEN.txt b/internal/help/IF...THEN.txt index 4b077636c..1a7d2a540 100644 --- a/internal/help/IF...THEN.txt +++ b/internal/help/IF...THEN.txt @@ -96,17 +96,17 @@ ''Example 5:'' Using multiple IF options in a one line statement. {{CodeStart}} '' '' {{Cl|INPUT}} "Enter a number over or under 200: ", x -{{Cl|IF...THEN|IF}} x > 200 {{Cl|THEN}} {{Cl|PRINT}} "High" {{Cl|ELSEIF}} x < 0 {{Cl|THEN}} {{Cl|PRINT}} "Low" {{Cl|ELSE}} {{Cl|PRINT}} "OK" +{{Cl|IF...THEN|IF}} x > 200 {{Cl|THEN}} {{Cl|PRINT}} "High" {{Cl|{{Cl|ELSEIF}}}} x < 0 {{Cl|THEN}} {{Cl|PRINT}} "Low" {{Cl|{{Cl|ELSE}}}} {{Cl|PRINT}} "OK" '' '' {{CodeEnd}} ''Example 6:'' [[STRING]] values can be compared using greater than, less than, not equal to or equal to operators only. {{CodeStart}} '' '' -{{Cl|PRINT}} "Press a letter key: "; +PRINT "Press a letter key: "; Key$ = {{Cl|INPUT$}}(1) -{{Cl|PRINT}} Key$ -{{Cl|IF}} Key$ >= {{Cl|CHR$}}(65) {{Cl|AND}} Key$ <= {{Cl|CHR$}}(90) {{Cl|THEN}} {{Cl|PRINT}} "A to Z" +PRINT Key$ +IF Key$ >= {{Cl|CHR$}}(65) AND Key$ <= {{Cl|CHR$}}(90) THEN PRINT "A to Z" {{CodeEnd}} : ''Explanation:'' Long [[STRING]] expression values are compared by their cumulative [[ASCII]] code values. @@ -133,3 +133,4 @@ z# = x# + y# {{PageNavigation}} +< diff --git a/internal/help/IMP.txt b/internal/help/IMP.txt index c9e71f338..dbdd26a46 100644 --- a/internal/help/IMP.txt +++ b/internal/help/IMP.txt @@ -21,3 +21,4 @@ The [[IMP]] logical operator converts the result of two comparative values and r {{PageNavigation}} +< diff --git a/internal/help/INKEY$.txt b/internal/help/INKEY$.txt index 57e0c07dc..d04efd9f3 100644 --- a/internal/help/INKEY$.txt +++ b/internal/help/INKEY$.txt @@ -230,3 +230,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/INP.txt b/internal/help/INP.txt index 2d576acd9..07d90db66 100644 --- a/internal/help/INP.txt +++ b/internal/help/INP.txt @@ -15,11 +15,11 @@ {{PageExamples}} ''Example 1:'' Reading the current RGB color settings used in a bitmap to an array. {{CodeStart}} '' '' - {{Cl|SCREEN}} 12 + SCREEN 12 {{Cl|DIM}} Colors%(47) {{Cl|OUT}} &H3C7, 0 ' set color port for INP reads at attribute 0 to start {{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} 47 - Colors%(i) = {{Cl|INP}}(&H3C9) ' moves to next color attribute every 3 loops + Colors%(i) = {{Cl|INP}}(&H3C9) ' moves to next color attribute every 3 loops {{Cl|NEXT}} '' '' {{CodeEnd}} @@ -38,9 +38,9 @@ {{CodeStart}} '' '' {{Cl|DEFINT}} A-Z {{Cl|SCREEN}} 12 -{{Cl|DIM}} ball%(100) ' Set aside enough space to hold the ball sprite +{{Cl|DIM}} ball%(100) ' Set aside enough space to hold the ball sprite {{Cl|CIRCLE}} (4, 3), 4, 4 -{{Cl|PAINT}} (4, 3), 12, 4 ' Draw a filled circle and fill for ball +{{Cl|PAINT}} (4, 3), 12, 4 ' Draw a filled circle and fill for ball {{Cl|GET (graphics statement)|GET}} (0, 0)-(8, 7), ball%(0) ' Get the sprite into the Ball% array begin: @@ -50,56 +50,56 @@ x = 25: y = 25 dx = 1: dy = 1 LTpos = 50: RTpos = 50 -{{Cl|DO}}: {{Cl|_LIMIT}} 100 'adjust higher for faster - {{Cl|CLS}} - {{Cl|IF...THEN|IF}} ScanKey%(17) {{Cl|THEN}} LTpos = LTpos - 1 - {{Cl|IF...THEN|IF}} ScanKey%(31) {{Cl|THEN}} LTpos = LTpos + 1 - {{Cl|IF...THEN|IF}} ScanKey%(72) {{Cl|THEN}} RTpos = RTpos - 1 - {{Cl|IF...THEN|IF}} ScanKey%(80) {{Cl|THEN}} RTpos = RTpos + 1 +DO: {{Cl|_LIMIT}} 100 'adjust higher for faster +{{Cl|CLS}} +{{Cl|IF...THEN|IF}} ScanKey%(17) {{Cl|THEN}} LTpos = LTpos - 1 +{{Cl|IF...THEN|IF}} ScanKey%(31) {{Cl|THEN}} LTpos = LTpos + 1 +{{Cl|IF...THEN|IF}} ScanKey%(72) {{Cl|THEN}} RTpos = RTpos - 1 +{{Cl|IF...THEN|IF}} ScanKey%(80) {{Cl|THEN}} RTpos = RTpos + 1 - {{Cl|PRINT}} "Player 1 : "; ponescore; " Player 2 : "; ptwoscore +{{Cl|PRINT}} "Player 1 : "; ponescore; " Player 2 : "; ptwoscore - {{Cl|IF...THEN|IF}} x > xmax - 15 {{Cl|AND (boolean)|AND}} y >= RTpos {{Cl|AND (boolean)|AND}} y <= RTpos + 100 {{Cl|THEN}} - dx = -1 - {{Cl|ELSEIF}} x > xmax {{Cl|THEN}} - ponescore = ponescore + 1 - {{Cl|GOSUB}} begin - {{Cl|END IF}} +{{Cl|IF...THEN|IF}} x > xmax - 15 {{Cl|AND (boolean)|AND}} y >= RTpos {{Cl|AND (boolean)|AND}} y <= RTpos + 100 {{Cl|THEN}} +dx = -1 +{{Cl|ELSEIF}} x > xmax {{Cl|THEN}} +ponescore = ponescore + 1 +{{Cl|GOSUB}} begin +{{Cl|END IF}} - {{Cl|IF}} x < xmin + 15 {{Cl|AND (boolean)|AND}} y >= LTpos {{Cl|AND (boolean)|AND}} y <= LTpos + 100 {{Cl|THEN}} - dx = 1 - {{Cl|ELSEIF}} x < xmin {{Cl|THEN}} - ptwoscore = ptwoscore + 1 - {{Cl|GOSUB}} begin - {{Cl|END IF}} +{{Cl|IF...THEN|IF}} x < xmin + 15 {{Cl|AND (boolean)|AND}} y >= LTpos {{Cl|AND (boolean)|AND}} y <= LTpos + 100 {{Cl|THEN}} +dx = 1 +{{Cl|ELSEIF}} x < xmin {{Cl|THEN}} +ptwoscore = ptwoscore + 1 +{{Cl|GOSUB}} begin +{{Cl|END IF}} - {{Cl|IF...THEN|IF}} y > ymax - 5 {{Cl|THEN}} dy = -1 - {{Cl|IF...THEN|IF}} y < ymin + 5 {{Cl|THEN}} dy = 1 - ' Display the sprite elsewhere on the screen +{{Cl|IF...THEN|IF}} y > ymax - 5 {{Cl|THEN}} dy = -1 +{{Cl|IF...THEN|IF}} y < ymin + 5 {{Cl|THEN}} dy = 1 +' Display the sprite elsewhere on the screen - x = x + dx - y = y + dy +x = x + dx +y = y + dy - {{Cl|PUT (graphics statement)|PUT}}(x, y), ball%(0) +{{Cl|PUT (graphics statement)|PUT}}(x, y), ball%(0) - {{Cl|LINE}} (20, LTpos)-(20, LTpos + 100) - {{Cl|LINE}} (620, RTpos)-(620, RTpos + 100) +{{Cl|LINE}} (20, LTpos)-(20, LTpos + 100) +{{Cl|LINE}} (620, RTpos)-(620, RTpos + 100) - {{Cl|_DISPLAY}} 'shows completed screen every call +{{Cl|_DISPLAY}} 'shows completed screen every call {{Cl|LOOP}} {{Cl|UNTIL}} ScanKey%(1) {{Cl|END}} {{Cl|FUNCTION}} ScanKey% (scancode%) - {{Cl|STATIC}} Ready%, keyflags%() - {{Cl|IF...THEN|IF}} {{Cl|NOT}} Ready% {{Cl|THEN}} {{Cl|REDIM}} keyflags%(0 {{Cl|TO}} 127): Ready% = -1 - i% = {{Cl|INP}}({{Cl|&H}}60) 'read keyboard states - {{Cl|IF...THEN|IF}} (i% {{Cl|AND (boolean)|AND}} 128) {{Cl|THEN}} keyflags%(i% {{Cl|XOR (boolean)|XOR}} 128) = 0 - {{Cl|IF...THEN|IF}} (i% {{Cl|AND (boolean)|AND}} 128) = 0 {{Cl|THEN}} keyflags%(i%) = -1 - K$ = {{Cl|INKEY$}} - ScanKey% = keyflags%(scancode%) +{{Cl|STATIC}} Ready%, keyflags%() +{{Cl|IF...THEN|IF}} {{Cl|NOT}} Ready% {{Cl|THEN}} {{Cl|REDIM}} keyflags%(0 {{Cl|TO}} 127): Ready% = -1 +i% = {{Cl|INP}}({{Cl|&H}}60) 'read keyboard states +{{Cl|IF...THEN|IF}} (i% {{Cl|AND (boolean)|AND}} 128) {{Cl|THEN}} keyflags%(i% {{Cl|XOR (boolean)|XOR}} 128) = 0 +{{Cl|IF...THEN|IF}} (i% {{Cl|AND (boolean)|AND}} 128) = 0 {{Cl|THEN}} keyflags%(i%) = -1 +K$ = {{Cl|INKEY$}} +ScanKey% = keyflags%(scancode%) {{Cl|END FUNCTION}} '' '' {{CodeEnd}} : ''Note:'' [[_KEYDOWN]] can be used to read multiple keys simultaneously and is the '''recommended practice'''. @@ -118,3 +118,4 @@ LTpos = 50: RTpos = 50 {{PageNavigation}} +< diff --git a/internal/help/INPUT$.txt b/internal/help/INPUT$.txt index 5dcab5284..b66ef3b64 100644 --- a/internal/help/INPUT$.txt +++ b/internal/help/INPUT$.txt @@ -16,7 +16,7 @@ The [[INPUT$]] function is used to receive data from the user's keyboard, an ope * Use [[_DEST]] [[_CONSOLE]] before INPUT$ is used to receive input from a [[$CONSOLE|console]] window. -{{PageQBasic}} +==QBasic/QuickBASIC== * {{Parameter|numberOfBytes%}} could not exceed 32767 in [[BINARY]] files or a QBasic error would occur. * Ctrl + Break would not interrupt the QBasic program until there was a full INPUT$ key entry. In '''QB64''' Ctrl + Break will immediately exit a running program. @@ -56,3 +56,4 @@ IF {{Cl|LOF}}(1) <= 32767 THEN Text$ = {{Cl|INPUT$}}(LOF(1), 1) {{PageNavigation}} +< diff --git a/internal/help/INPUT.txt b/internal/help/INPUT.txt index 01a564372..265612f2b 100644 --- a/internal/help/INPUT.txt +++ b/internal/help/INPUT.txt @@ -6,7 +6,7 @@ The [[INPUT]] statement requests a [[STRING]] or numerical keyboard entry from t : [[INPUT]] ; {{Parameter|variable}}[, ...] -{{PageParameters}} +{{Parameters}} * A [[semicolon]] after the [[INPUT]] keyword keeps the entry on the same row after enter is pressed and prevents the screen contents from rolling up. * The optional prompt "Question or statement text" must be a literal predefined [[STRING|string]]. '''The prompt cannot use a variable.''' * [[Quotation mark]]s are required except when a semicolon follows [[INPUT]]. A question mark will appear before the cursor. @@ -84,3 +84,4 @@ n$ = {{Cl|UCASE$}}(name$) ' convert search name to upper case {{PageNavigation}} +< diff --git a/internal/help/INPUT_(file_mode).txt b/internal/help/INPUT_(file_mode).txt index 583542a90..c364960e2 100644 --- a/internal/help/INPUT_(file_mode).txt +++ b/internal/help/INPUT_(file_mode).txt @@ -1,48 +1,162 @@ -#REDIRECT [[OPEN#File_Access_Modes]] - -The '''INPUT''' file mode in an [[OPEN]] statement opens an existing file for [[INPUT (file statement)|INPUT]]. +The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output. {{PageSyntax}} -: [[OPEN]] {{Parameter|fileName$}} FOR '''INPUT''' AS #filenumber% +: [[OPEN]] {{Parameter|fileName$}} ['''FOR''' {{Parameter|mode}}] [{{{KW|ACCESS}}|{{{KW|LOCK}}|SHARED}} [{READ|WRITE}] [[AS]] [#]{{Parameter|fileNumber&}} [LEN = {{Parameter|recordLength}}] -* If {{Parameter|fileName$}} does not exist, attempting to open it FOR INPUT will create a program [[ERROR Codes|file error]]. Use [[_FILEEXISTS]] to avoid errors. -* The file number can be determined automatically by using a [[FREEFILE]] variable value. -* Mode can use [[INPUT (file statement)|INPUT]] #, [[LINE INPUT (file statement)|LINE INPUT]] # or [[INPUT$]] to read the file data. -* Use the [[EOF]] function to avoid reading data past the end of a file and creating an [[ERROR Codes|INPUT error]]. -* Input file statements will use the same file number as the OPEN statement. -* The INPUT mode allows the same file to be opened in another mode with a different number. -* '''NOTE: [[LINE INPUT (file statement)|LINE INPUT]] will work faster in [[BINARY]] than INPUT mode in QB64 to stay compatible with QBasic.''' +===Legacy ''GW-BASIC'' syntax=== +: [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] + + +{{Parameters}} +* The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. +* FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). +* GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. +* {{Parameter|fileNumber&}} can be any '''positive''' [[INTEGER]] or [[LONG]] whole number value or an unused value determined by the [[FREEFILE]] function. +* [[LEN]] = or {{Parameter|recordLength}} is optional to denote the RANDOM file record byte length (default = 128) or sequential (default = 512) load buffer. + + +{{PageDescription}} +* '''QB64''' can open as many files as your computer memory can handle. QBasic could only open about 15 at a time. +* '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' +* {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) +* '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. +* {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. +* Once a file or port is opened, it can be used in any program procedure using the assigned file number. +* The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +: '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. +* [[OPEN COM]] can also be used for serial port access in '''QB64'''. + + +{{PageErrors}} +* Illegal '''QB64''' Windows filename characters are ''' " * / \ | ? : < > '''. Multiple dots (periods) are allowed. +* Possible OPEN [[ERROR Codes|errors]] include "Bad file name or number", "Bad File Mode", "File Not Found" or "Path Not Found". +** An OPEN file not found error may occur if [[CHR$]](0) to (31) are used in a Windows file name. +* '''QB64''' does not have DOS file name limitations. + + +==Details== +===File ACCESS and LOCK Permissions=== +* [[ACCESS]] clause limits file access to READ, WRITE or READ WRITE on a network. +* [[LOCK (access)|LOCK]] clause can specify SHARED or a LOCK READ or LOCK WRITE file lock in an OPEN statement working on a network. +* A separate [[LOCK]] statement can lock or [[UNLOCK]] file access on a network using a format that can lock specific records. +* If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. + +===File Access Modes=== +* FOR mode can be: +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. +** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' +** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' +** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. +** '''RANDOM''': Creates a new file when it doesn't exist or reads or writes to an existing random file record. Use [[GET|GET #]] or [[PUT|PUT #]] to read or write to file records. A [[LEN]] = statement can define the byte size of a record (no LEN statement defaults to 128 bytes) +** Modes '''INPUT''', '''BINARY''' and '''RANDOM''' allow a file to be concurrently opened in a different mode and number. + + +====GW-BASIC modes==== +* ''Mode letter'' is a variable or literal [[STRING]] letter value as one of the following: +** "A" = '''APPEND'''. +** "B" = '''BINARY'''. +** "I" = '''INPUT'''. +** "O" = '''OUTPUT'''. +** "R" = '''RANDOM'''. {{PageExamples}} -''Example:'' Avoiding an INPUT mode or [[INPUT (file statement)|INPUT #]] read error using a FileExist function. QB64 can use the [[_FILEEXISTS]] function. +''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. -{{CodeStart}} '' '' - DIM Fdata$(100) - INPUT "Enter data file name: ", datafile$ - IF _FILEEXISTS(datafile$) THEN - D% = {{Cl|FREEFILE}}: count = 0 - {{Cl|OPEN}} datafile$ FOR {{Cl|INPUT (file mode)|INPUT}} AS #D% - DO UNTIL {{Cl|EOF}}(D%) - count = count + 1 - {{Cl|INPUT (file statement)|LINE INPUT}} #D%, Fdata$(count) - IF count = 100 THEN {{Cl|EXIT}} DO ' don't exceed {{Cl|Arrays|array}} size! - LOOP - {{Cl|CLOSE}} #D% - ELSE : PRINT "File not found!" - END IF +{{CodeStart}} + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% + +{{Cl|FUNCTION}} CheckName% (Filename$) + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} + L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension + {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} + CheckName% = -1: {{Cl|COLOR}} 12: {{Cl|PRINT}} "Illegal format!"; : {{Cl|EXIT FUNCTION}} + {{Cl|END IF}} + {{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} L 'check each filename character" + code% = {{Cl|ASC}}({{Cl|MID$}}(Filename$, i%, 1)): {{Cl|COLOR}} 10 ' see ASCII codes + {{Cl|SELECT CASE}} code% 'check for errors and highlight in red + '{{Cl|CASE}} 34, 42 {{Cl|TO}} 44, 47, 58 {{Cl|TO}} 63, 91 {{Cl|TO}} 93, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QBasic errors''' + {{Cl|CASE}} 34, 42, 47, 58, 60, 62, 92, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QB64 errors''' + {{Cl|CASE}} 46: dot% = dot% + 1: {{Cl|IF...THEN|IF}} dot% > 1 {{Cl|THEN}} E% = E% + 1: {{Cl|COLOR}} 12 + {{Cl|END SELECT}} + {{Cl|PRINT}} {{Cl|CHR$}}(code%); 'use {{Cl|LOCATE}} before {{Cl|FUNCTION}} call to place print + {{Cl|NEXT}} + CheckName% = E% +{{Cl|END FUNCTION}} '' '' {{CodeEnd}} -: ''Explanation:'' The [[_FILEEXISTS]] function is used before {{InlineCode}}OPEN datafile$ FOR INPUT AS #D%{{InlineCodeEnd}}, which would generate an error in case the file didn't exist. +''Note: The QBasic character error list is commented out and the function will return invalid filenames under QB64. + +{{OutputStart}} + {{text|Hello|#54FC54}}{{text|,|red}}{{text|~1.mp3|#54FC54}} {{text|Total Errors|yellow}}<nowiki> = </nowiki>{{text|1|yellow}} +{{OutputEnd}} +:''Note:'' The screen output displays filename characters in green except for red comma QBasic error. -{{PageSeeAlso}} -* [[INPUT (file statement)|INPUT #]], [[LINE INPUT (file statement)|LINE INPUT #]], [[INPUT$]] {{text|(file input)}} -* [[INPUT]], [[LINE INPUT]], [[INPUT$]] {{text|(keyboard input)}} -* [[APPEND]], [[RANDOM]], [[OUTPUT]], [[BINARY]] -* [[READ]], [[DATA]] +''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: +{{CodeStart}} '' '' +f% = {{Cl|FREEFILE}} 'should always be 1 at program start +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +g% = {{Cl|FREEFILE}} 'should always be 2 after 1 +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% + +{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 + {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" +NEXT '' '' +{{CodeEnd}}{{small|code by Steve McNeill}} +: ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. + + +''Example 3:'' Showcasing different file modes. +{{CodeStart}} +{{Cl|CLS}} + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst didn't exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "A new file was created named test.tst and then deleted." +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst did exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "It was overwritten with this and deleted." +{{Cl|CLOSE}} #1 + +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 +{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1) +{{Cl|INPUT (file statement)|INPUT}} #1, a$ +{{Cl|PRINT}} a$ +{{Cl|LOOP}} +{{Cl|CLOSE}} #1 + +{{Cl|KILL}} "test.tst" + +{{Cl|END}} + +{{CodeEnd}} + +{{OutputStart}} +If test.tst didn't exist: +A new file was created named test.tst and then deleted. +If test.tst did exist: +It was overwritten with this and deleted. +{{OutputEnd}} +:'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. + + +{{PageSeeAlso}} +* [[PRINT (file statement)]], [[INPUT (file statement)]] +* [[GET]], [[PUT]], [[WRITE (file statement)]] +* [[INPUT$]], [[LINE INPUT (file statement)]] +* [[CLOSE]], [[LOF]], [[EOF]], [[LOC]] +* [[SEEK (statement)]], [[SEEK]] +* [[OPEN COM]], [[LEN]], [[RESET]] +* [[FIELD]], [[TYPE]] * [[_FILEEXISTS]], [[_DIREXISTS]] +* [[_OPENCLIENT]], [[_OPENHOST]], [[_OPENCONNECTION]] {{text|(TCP/IP)}} +* [[_SNDOPEN]], [[_LOADIMAGE]] {{PageNavigation}} +< diff --git a/internal/help/INPUT_(file_statement).txt b/internal/help/INPUT_(file_statement).txt index ef98203e1..6a489bb00 100644 --- a/internal/help/INPUT_(file_statement).txt +++ b/internal/help/INPUT_(file_statement).txt @@ -5,15 +5,15 @@ The [[INPUT #]] file or port statement reads sequential data using one variable : [[INPUT #]]{{Parameter|fileNumber&}}, {{Parameter|variable1}}[, {{Parameter|variable2}}, ..., {{Parameter|variableN}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|fileNumber&}} is a positive [[LONG]] integer value used to [[OPEN]] the file FOR [[INPUT (file mode)|INPUT]] mode. -* The [[Variable Types|type]] of the ''variable'' used defines the value or list of values to be returned from the file. Numeric types must match the values returned. +* The [[type]] of the ''variable'' used defines the value or list of values to be returned from the file. Numeric types must match the values returned. * As reflected in the syntax you can list a number of variables with different types seperated by a comma and they will hold the values in the file (keep in mind that the information in the file should match the variable types used). {{PageDescription}} * The file number can be determined by the programmer or be an unused number returned by the [[FREEFILE]] function. -* Variable types must match the numerical [[Variable Types|type]]s being read. [[STRING]] variables can return unquoted numeric values. +* Variable types must match the numerical [[type]]s being read. [[STRING]] variables can return unquoted numeric values. * Leading or trailing spaces of [[STRING]] values must be inside of quotes. [[WRITE (file statement)|WRITE #]] writes strings inside of quotes automatically. [[PRINT (file statement)|PRINT #]] removes quotes. * [[INPUT #]] will read each value until it encounters a comma for the next value in a list. * Use the [[EOF]] function to avoid reading past the end of a file. @@ -84,3 +84,4 @@ y$ = "I'm fine." {{PageNavigation}} +< diff --git a/internal/help/INSTR.txt b/internal/help/INSTR.txt index 16ca10d21..dbcc502af 100644 --- a/internal/help/INSTR.txt +++ b/internal/help/INSTR.txt @@ -5,7 +5,7 @@ The [[INSTR]] function searches for the first occurence of a search [[STRING]] w : {{Parameter|position%}} = [[INSTR]]([{{Parameter|start%}},] {{Parameter|baseString$}}, {{Parameter|searchString$}}) -{{PageParameters}} +{{Parameters}} * The optional literal or variable [[INTEGER]] {{Parameter|start%}} indicates where in the {{Parameter|baseString$}} the search must start. * The {{Parameter|baseString$}} is a literal or variable [[STRING]] value to be searched for an exact match including [[UCASE$|letter cases]]. * The {{Parameter|searchString$}} is a literal or variable [[STRING]] value being searched. @@ -19,10 +19,9 @@ The [[INSTR]] function searches for the first occurence of a search [[STRING]] w * The {{Parameter|searchString$}} should be smaller or equal in [[LEN|length]] to the {{Parameter|baseString$}}, or 0 is returned. * Non-zero {{Parameter|position%}} return values can be used as a new start position by adding 1 to re-search the base string. See the example below. * In a loop, INSTR can search an entire file for occurences of certain words. See the [[MID$ (statement)|MID$]] statement example. -* To search right to left, use [[_INSTRREV]] -{{PageQBasic}} +==QBasic/QuickBASIC== * The {{Parameter|start%}} position had to be at least 1 or greater when used or there will be an [[ERROR Codes|Illegal function call]] error. In '''QB64''', a {{Parameter|start%}} value of 0 or negative is interpreted as 1 and doesn't generate an error. @@ -50,7 +49,7 @@ There is 'cats' in the string at position: 62 * [[LEFT$]], [[RIGHT$]] * [[LCASE$]], [[UCASE$]] * [[STRING]], [[INTEGER]] -* [[_INSTRREV]] {{PageNavigation}} +< diff --git a/internal/help/INT.txt b/internal/help/INT.txt index 98c9802c0..c15a055b7 100644 --- a/internal/help/INT.txt +++ b/internal/help/INT.txt @@ -5,7 +5,7 @@ The [[INT]] function rounds a numeric value down to the next whole number. : {{Parameter|result}} = [[INT]]({{Parameter|expression}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|expression}} is any [[Data types|type]] of literal or variable numerical value or mathematical calculation. @@ -34,3 +34,4 @@ PRINT INT(-2.5) {{PageNavigation}} +< diff --git a/internal/help/INTEGER.txt b/internal/help/INTEGER.txt index 35df7035c..ae1dd3e9e 100644 --- a/internal/help/INTEGER.txt +++ b/internal/help/INTEGER.txt @@ -59,3 +59,4 @@ i~% = 70000 {{PageNavigation}} +< diff --git a/internal/help/INTERRUPT.txt b/internal/help/INTERRUPT.txt index 2cc7097a8..8a446a484 100644 --- a/internal/help/INTERRUPT.txt +++ b/internal/help/INTERRUPT.txt @@ -1,7 +1,7 @@ The [[INTERRUPT]] statement is an assembly routine for accessing computer information registers. -{{PageLegacySupport}} +==Legacy support== * Registers are emulated in '''QB64''' to allow older programs to be compiled. To enable mouse input in your programs, the recommended practice is to use [[_MOUSEINPUT]] and related functions. @@ -9,12 +9,12 @@ The [[INTERRUPT]] statement is an assembly routine for accessing computer inform : [[CALL]] [[INTERRUPT]]({{Parameter|intNum}}, {{Parameter|inRegs}}, {{Parameter|outRegs}}) -{{PageParameters}} +{{Parameters}} * Registers are emulated in QB64 and there is no support for {{Parameter|intNum}} 33h mouse functions above 3 or {{Parameter|intNum}} requests other than 33. * {{Parameter|inRegs}} are the values placed into the call and {{Parameter|outRegs}} are the register return values. -{{PageQBasic}} +==QBasic/QuickBASIC== * Available in QuickBASIC versions 4 and up and required an external library to be loaded. <!-- Command line: QB.EXE /L in QB4.5 --> '''QB64''' emulates the statement without an external library. * {{Parameter|intNum}} is the interrupt reference vector table address. For historic reference, see: [http://www.ctyme.com/intr/cat.htm Ralf Brown's Interrupt List] * The [[TYPE]] definition below will work for both [[INTERRUPT]] and INTERRUPTX statement calls @@ -47,3 +47,4 @@ The [[INTERRUPT]] statement is an assembly routine for accessing computer inform {{PageNavigation}} +< diff --git a/internal/help/INTERRUPTX.txt b/internal/help/INTERRUPTX.txt index 5f9142387..4682c39e6 100644 --- a/internal/help/INTERRUPTX.txt +++ b/internal/help/INTERRUPTX.txt @@ -1,7 +1,7 @@ The [[INTERRUPTX]] statement is an assembly routine for accessing computer information registers. -{{PageLegacySupport}} +==Legacy support== * Registers are emulated in '''QB64''' to allow older programs to be compiled. To enable mouse input in your programs, the recommended practice is to use [[_MOUSEINPUT]] and related functions. @@ -9,12 +9,12 @@ The [[INTERRUPTX]] statement is an assembly routine for accessing computer infor : [[CALL]] [[INTERRUPTX]]({{Parameter|intNum}}, {{Parameter|inRegs}}, {{Parameter|outRegs}}) -{{PageParameters}} +{{Parameters}} * Registers are emulated in QB64 and there is no support for {{Parameter|intNum}} 33h mouse functions above 3 or {{Parameter|intNum}} requests other than 33. * {{Parameter|inRegs}} are the values placed into the call and {{Parameter|outRegs}} are the register return values. -{{PageQBasic}} +==QBasic/QuickBASIC== * Available in QuickBASIC versions 4 and up and required an external library to be loaded. <!-- Command line: QB.EXE /L in QB4.5 --> '''QB64''' emulates the statement without an external library. * {{Parameter|intNum}} is the interrupt reference vector table address. For historic reference, see: [http://www.ctyme.com/intr/cat.htm Ralf Brown's Interrupt List] * The [[TYPE]] definition below will work for both [[INTERRUPT]] and INTERRUPTX statement calls @@ -47,3 +47,4 @@ The [[INTERRUPTX]] statement is an assembly routine for accessing computer infor {{PageNavigation}} +< diff --git a/internal/help/IOCTL$.txt b/internal/help/IOCTL$.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/IOCTL$.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/IOCTL.txt b/internal/help/IOCTL.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/IOCTL.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/KEY(n).txt b/internal/help/KEY(n).txt index d555fa248..f9c908ae6 100644 --- a/internal/help/KEY(n).txt +++ b/internal/help/KEY(n).txt @@ -67,3 +67,4 @@ SLEEP '' '' {{PageNavigation}} +< diff --git a/internal/help/KEY_LIST.txt b/internal/help/KEY_LIST.txt index 8b42fc449..3cff545ab 100644 --- a/internal/help/KEY_LIST.txt +++ b/internal/help/KEY_LIST.txt @@ -1,81 +1,214 @@ -#REDIRECT [[KEY n#Function_Soft_Key_Strings_.281_to_10.2C_30_.26_31.29]] +The [[KEY n]] statement is used to assign a "soft key" string or a flag and scan code to a function key or display function soft key assignments. -The [[KEY LIST]] statement lists the soft key strings assigned to each of the function keys down the left side of the screen. +{{PageSyntax}} + +: '''KEY ''n%'', ''textString$''''' + +: '''KEY ''n%'', CHR$(''keyFlag%'') + CHR$(''scanCode'')''' -{{PageSyntax}} -: [[KEY LIST]] +==Function Soft Key Strings (1 to 10, 30 & 31)== + +<center>'''Assigning "Softkey" [[STRING]] values to function key press events'''</center> + +* n% is the number 1 to 10 (F1 to F10), 30 or 31 (F11 or F12) of the function key to assign the soft key string. +* Instead of using an [[ON KEY(n)]] [[GOSUB]] statement, Function keys F1 to F12 can be assigned a "soft key" string value to return. +* {{InlineCode}}KEY n, text${{InlineCodeEnd}} defines a literal or variable [[STRING]] "soft key" function key return value. + +{{WhiteStart}} '''KEY 1, "Help"''' 'returns the string "Help" to [[INPUT]] variable when F1 is pressed{{WhiteEnd}} + +* [[KEY LIST]] displays each of the 12 softkey '''function key''' (F1 to F12) string values going down left side of screen. +* [[KEY LIST|KEY {ON|OFF}]] displays or hides the softkey values of function keys F1 to F10 at the bottom of the screen. -{{PageDescription}} -* [[KEY LIST]] displays each of the 12 softkey '''function key''' (F1 to F12) string values going down the screen. +==Number Pad Arrow Keys (11 to 14)== + +* Arrow keys on the Number Pad are predefined KEY numbers 11 to 14 and only work with Number Lock off. +* Soft Key [[STRING]]s cannot be assigned to these key numbers! +* To use the extended arrow keys on a keyboard use the Extended Key Flag 128 with corresponding Scan code as User Defined Keys. -{{PageExamples}} -''Example 1:'' Displaying the current '''KEY LIST''' string assignments to the Function keys. +==User Defined Keys (15 to 29)== + +<center>'''Assigning user defined keys or combinations with: KEY n, CHR$(keyflag) + CHR$(scancode)'''</center> +{{WhiteStart}} '''Function Key Flag Combination Values''' + + '''0''' = no function key combination flag(single key) + '''1''' = Left Shift key flag + '''2''' = Right Shift key flag + '''4''' = Ctrl flag + '''8''' = Alt flag + '''32''' = Number Lock flag + '''64''' = Caps Lock flag + '''128''' = Extended keys (see trapping extended keys below) + + Flag values can be added to monitor multiple function key combinations. +{{WhiteEnd}} +* After the keyflag code character the [[Scancodes|scancode]] character is added using one of the two '''trapping methods''' that follow: +{{WhiteStart}}' '''Soft Key Scan Code Values''' +' +' {{text|1 2 3 4 5 6 7 8 9 10 30 31 Predefined Keys|red}} +'''' Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 SysReq ScrL Pause''' +' 1 59 60 61 62 63 64 65 66 67 68 87 88 -- 70 29 +' '''`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSpc Insert Home PgUp NumL / * -''' +' 41 2 3 4 5 6 7 8 9 10 11 12 13 14 {{text|82 71 73|blue}} {{text|32|purple}}/69 {{text|53|blue}} 55 74 +' '''Tab Q W E R T Y U I O P [{ ]} \| Delete End PgDn 7/Home 8/▲ 9/PU + ''' +' 15 16 17 18 19 20 21 22 23 24 25 26 27 43 {{text|83 79 81|blue}} 71 {{text|11|red}}/72 73 78 +' '''CapL A S D F G H J K L ;: '" Enter 4/◄- 5 6/-► E''' +' {{text|64|purple}}/58 30 31 32 33 34 35 36 37 38 39 40 28 {{text|12|red}}/75 76 {{text|13|red}}/77 '''n''' +' '''Shift Z X C V B N M ,< .> /? Shift ▲ 1/End 2/▼ 3/PD t''' +' {{text|1|purple}}/42 44 45 46 47 48 49 50 51 52 53 {{text|2|purple}}/54 {{text|72|blue}} 79 {{text|14|red}}/80 81 '''e''' +' '''Ctrl Win Alt Spacebar Alt Win Menu Ctrl ◄- ▼ -► 0/Insert ./Del r''' +' {{text|4|purple}}/29 {{text|91|orange}} {{text|8|purple}}/56 57 {{text|56|blue}} {{text|92 93|orange}} {{text|29 75 80 77|blue}} 82 83 {{text|28|blue}} +' +' '''Keyflag:''' {{text|Function(0, 1, 2, 4, 8, 32, 64)|purple}}, {{text|Extended(128)|blue}} '''Scan Code: '''1-88, {{text|QB64 only(91-93)|orange}} +' +' Reserved and function key combinations can be made using the scan code instead. +' Add function flag values to 128 for Extended key combinations. +{{WhiteEnd}}{{small|NOTE: The above commented table can be copied and pasted directly into the QB64 IDE}} + + +<center>'''Trapping Ctrl, Alt and Shift key combinations'''</center> +:Keyboard Flag values can be added to monitor more than one control key. For example, flag combination 12 would flag both the Ctrl and Alt key presses. Since the flag already determines the function key to monitor, you don't necessarily have to use it's scancode. You can look for a key combination such as Ctrl + by using the plus key's scancode which is 13 as shown below: + +{{WhiteStart}} '''KEY 15, CHR$(4) + CHR$(13)''' 'enabled event when Ctrl and + key are pressed{{WhiteEnd}} + + +<center>'''Trapping Extended keys (Insert, Home, Page Up, Right Ctrl, R.Alt, and cursor arrow pad)'''</center> +* On a 101-key keyboard, you can trap any of the keys on the dedicated cursorpad by assigning the string to any of the keynumber values from 15 to 25 using the 128 keyboard flag. The cursor arrows are not the same as the pre-assigned number pad arrows: +{{WhiteStart}} '''KEY n, [[CHR$]](128) + [[CHR$]](scancode) ' where n = 15 to 29. See: [[Scancodes]]''' + + KEY 15, CHR$(128) + CHR$(75) 'left arrow cursor pad  + + KEY 16, CHR$(128) + CHR$(72) 'up arrow cursor pad   + + KEY 17, CHR$(128) + CHR$(77) 'right arrow cursor pad + + KEY 18, CHR$(128) + CHR$(80) 'down arrow cursor pad +{{WhiteEnd}} +<center>Use CHR$(0) for the first byte flag for non-function keys. You can substitute a literal [[STRING]] value to trap as shown in Example 2.</center> + + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> + + +==Examples== + + +''Example 1:'' Shows a list of all the string assignments to the function keys F1-F12 (Prints help every time F1 is pressed in the input) {{CodeStart}} '' '' {{Cl|KEY n|KEY}} 1, "Help" -{{Cl|KEY n|KEY}} 5, "Compile" -{{Cl|KEY n|KEY}} 10, "Quit" -{{Cl|PRINT}} "Press any key!" -K$ = {{Cl|INPUT$}}(1) {{Cl|KEY LIST}} -{{Cl|END}} '' '' +INPUT "Press F1 or to quit press ENTER: ", a$ + {{CodeEnd}} -{{OutputStart}}Press any key! -F1 Help +{{OutputStart}} +F1 Help F2 F3 F4 -F5 Compile +F5 F6 F7 F8 F9 -F10 Quit +F10 F11 F12 +Press F1 or to quit press ENTER: HelpHelpHelpHelp {{OutputEnd}} -''Example 2:'' Displaying the function key assignments for F1 to F10 at the bottom of the screen with '''KEY ON''' and '''KEY OFF'''. -{{CodeStart}} '' '' -{{Cl|KEY n|KEY}} 1, "Help" + {{Cl|CHR$}}(13) 'add Return character to complete the input -{{Cl|KEY n|KEY}} 5, "Compile" + {{Cl|CHR$}}(13) -{{Cl|KEY n|KEY}} 10, "Quit" + {{Cl|CHR$}}(13) -'''KEY ON''' -DO -{{Cl|INPUT}} "Press F10 to turn display off! ", M$ -LOOP UNTIL M$ = "Quit" -'''KEY OFF''' -K$ = {{Cl|INPUT$}}(1) -{{Cl|KEY LIST}} -{{Cl|END}} '' '' +''Example 2:'' Trapping the Control + key combination. Use the Control Keyboard flag 4 and + key scancode 13. +{{CodeStart}} +{{Cl|CLS}} '' '' +{{Cl|KEY n|KEY}} 15, {{Cl|CHR$}}(4) + {{Cl|CHR$}}(13) 'scancode for "=" or "+" key is 13 +{{Cl|ON KEY (n)|ON KEY}}(15) {{Cl|GOSUB}} control 'action of user defined key press +{{Cl|KEY(n)|KEY}}(15) ON 'turn ON event trapping for key combination +{{Cl|PRINT}} "Press Ctrl and plus key combination, escape quits!" +{{Cl|DO}}: {{Cl|SLEEP}} +count = count + 1 +{{Cl|PRINT}} count; +{{Cl|IF}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) {{Cl|THEN}} {{Cl|END}} 'escape key exit +{{Cl|LOOP}} + +control: 'NUMBER LOCK MUST BE OFF! +{{Cl|PRINT}} "Control and + keys pressed!"; +{{Cl|RETURN}} '' '' {{CodeEnd}} -{{OutputStart}}Press F10 to turn display off! Help -Press F10 to turn display off! Compile +{{small|Code by Ted Weissgerber}} +''Example 3:'' Differentiating the extended cursor keypad arrows from the predefined Number Pad arrow keys. +{{CodeStart}} '' '' +'predefined keys 11 to 14 for number pad arrows only +{{Cl|ON KEY(n)|ON KEY}}(11) {{Cl|GOSUB}} UpNum: {{Cl|KEY(n)|KEY}}(11) ON 'up +{{Cl|ON KEY(n)|ON KEY}}(12) {{Cl|GOSUB}} LNum: {{Cl|KEY(n)|KEY}}(12) ON 'left +{{Cl|ON KEY(n)|ON KEY}}(13) {{Cl|GOSUB}} RNum: {{Cl|KEY(n)|KEY}}(13) ON 'right +{{Cl|ON KEY(n)|ON KEY}}(14) {{Cl|GOSUB}} DnNum: {{Cl|KEY(n)|KEY}}(14) ON 'down +'user defined keys use extended key flag 128 + scan code +{{Cl|ON KEY(n)|ON KEY}}(15) {{Cl|GOSUB}} UpPad +{{Cl|KEY n|KEY}} 15, {{Cl|CHR$}}(128) + {{Cl|CHR$}}(72): {{Cl|KEY(n)|KEY}}(15) ON 'cursor up +{{Cl|ON KEY(n)|ON KEY}}(16) {{Cl|GOSUB}} LPad +{{Cl|KEY n|KEY}} 16, {{Cl|CHR$}}(128) + {{Cl|CHR$}}(75): {{Cl|KEY(n)|KEY}}(16) ON 'cursor left +{{Cl|ON KEY(n)|ON KEY}}(17) {{Cl|GOSUB}} RPad +{{Cl|KEY n|KEY}} 17, {{Cl|CHR$}}(128) + {{Cl|CHR$}}(77): {{Cl|KEY(n)|KEY}}(17) ON 'cursor right +{{Cl|ON KEY(n)|ON KEY}}(18) {{Cl|GOSUB}} DnPad +{{Cl|KEY n|KEY}} 18, {{Cl|CHR$}}(128) + {{Cl|CHR$}}(80): {{Cl|KEY(n)|KEY}}(18) ON 'cursor down + +{{Cl|DEF SEG}} = 0 +DO + numL = {{Cl|PEEK}}(1047) {{Cl|AND (boolean)|AND}} 32 '32 if on + capL = {{Cl|PEEK}}(1047) {{Cl|AND (boolean)|AND}} 64 '64 on + {{Cl|IF...THEN|IF}} numL {{Cl|OR (boolean)|OR}} capL {{Cl|THEN}} + {{Cl|COLOR}} 12: {{Cl|LOCATE}} 13, 50: {{Cl|PRINT}} "Turn Num or Cap Lock OFF!" + {{Cl|ELSE}} : {{Cl|COLOR}} 10: {{Cl|LOCATE}} 13, 50: {{Cl|PRINT}} "Number and Cap Lock OK! " + {{Cl|SLEEP}} ' {{Cl|KEY n|KEY}} or {{Cl|TIMER}} event breaks a sleep + {{Cl|END IF}} +{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) +{{Cl|DEF SEG}} + +{{Cl|KEY(n)|KEY}}(15) OFF: {{Cl|KEY(n)|KEY}}(16) OFF: {{Cl|KEY(n)|KEY}}(17) OFF: {{Cl|KEY(n)|KEY}}(18) OFF +{{Cl|KEY(n)|KEY}}(11) OFF: {{Cl|KEY(n)|KEY}}(12) OFF: {{Cl|KEY(n)|KEY}}(13) OFF: {{Cl|KEY(n)|KEY}}(14) OFF +{{Cl|END}} + +UpPad: +COLOR 14: LOCATE 11, 26: PRINT " Up cursor pad " +{{Cl|RETURN}} +LPad: +COLOR 14: LOCATE 11, 26: PRINT "Left cursor pad " +{{Cl|RETURN}} +RPad: +COLOR 14: LOCATE 11, 26: PRINT "Right cursor pad" +{{Cl|RETURN}} +DnPad: +COLOR 14: LOCATE 11, 26: PRINT "Down cursor pad " +{{Cl|RETURN}} +UpNum: +COLOR 11: LOCATE 11, 26: PRINT " Up number pad " +{{Cl|RETURN}} +LNum: +COLOR 11: LOCATE 11, 26: PRINT "Left number pad " +{{Cl|RETURN}} +RNum: +COLOR 11: LOCATE 11, 26: PRINT "Right number pad" +{{Cl|RETURN}} +DnNum: +COLOR 11: LOCATE 11, 26: PRINT "Down number pad " +{{Cl|RETURN}} '' '' +{{CodeEnd}} +: ''Explanation:'' The Number Lock or Caps Lock keys ON may hinder extended key reads in Qbasic but not QB64! +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> - - - - - - - -1 {{WBG|Help←}} 2 3 4 5 {{WBG|Compil}} 6 7 8 9 10 {{WBG|Quit←}} -{{OutputEnd}} -:''Explanation:'' The [[INPUT]] variable will hold the string value as if it was typed in and entered. "Quit" will KEY OFF bottom display. - - -{{PageSeeAlso}} -* [[KEY n]], [[KEY(n)]], -* [[ON KEY(n)]] +{{PageSeeAlso}} +* [[KEY LIST]], [[ON KEY(n)]] +* [[KEY(n)]], [[INKEY$]] * [[_KEYHIT]], [[_KEYDOWN]] +* [[Keyboard scancodes]] {{PageNavigation}} +< diff --git a/internal/help/KEY_n.txt b/internal/help/KEY_n.txt index ef8322e67..3cff545ab 100644 --- a/internal/help/KEY_n.txt +++ b/internal/help/KEY_n.txt @@ -197,7 +197,7 @@ DnNum: COLOR 11: LOCATE 11, 26: PRINT "Down number pad " {{Cl|RETURN}} '' '' {{CodeEnd}} -: ''Explanation:'' The Number Lock or Caps Lock keys ON may hinder extended key reads in QBasic but not QB64! +: ''Explanation:'' The Number Lock or Caps Lock keys ON may hinder extended key reads in Qbasic but not QB64! <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> @@ -211,3 +211,4 @@ COLOR 11: LOCATE 11, 26: PRINT "Down number pad " {{PageNavigation}} +< diff --git a/internal/help/KILL.txt b/internal/help/KILL.txt index 9fc797e3e..f5fd0ed6c 100644 --- a/internal/help/KILL.txt +++ b/internal/help/KILL.txt @@ -20,7 +20,7 @@ The [[KILL]] statement deletes a file designated by a [[STRING]] value or variab {{PageExamples}} {{CodeStart}} -KILL "C:\QBasic\data\2000data.dat" +KILL "C:\Qbasic\data\2000data.dat" {{CodeEnd}} @@ -31,3 +31,4 @@ KILL "C:\QBasic\data\2000data.dat" {{PageNavigation}} +< diff --git a/internal/help/Keyword_Reference_-_Alphabetical.txt b/internal/help/Keyword_Reference_-_Alphabetical.txt index 251229d6f..c6dfb0b08 100644 --- a/internal/help/Keyword_Reference_-_Alphabetical.txt +++ b/internal/help/Keyword_Reference_-_Alphabetical.txt @@ -1,21 +1,21 @@ __NOTOC__ -<div id="toc"><p style="text-align: center"><br> '''Alphabetical QB64 Keyword Listings''' <br><br>     '''QB64:'''  [[#uA|_A]] [[#uB|_B]] [[#uC|_C]] [[#uD|_D]] [[#uE|_E]] [[#uF|_F]] [[#uG|_G]] [[#uH|_H]] [[#uI|_I]] [[#uK|_K]] [[#uL|_L]] [[#uM|_M]] [[#uN|_N]] [[#uO|_O]] [[#uP|_P]] [[#uR|_R]] [[#uS|_S]] [[#uT|_T]] [[#uU|_U]] [[#uV|_V]] [[#uW|_W]]                <br><br>'''QBasic:'''  [[#A|A]]   [[#B|B]]   [[#C|C]]   [[#D|D]]   [[#E|E]]    [[#F|F]]   [[#G|G]]   [[#H|H]]    [[#I| I]]    [[#K|K]]   [[#L|L]]   [[#M|M]]   [[#N|N]]    [[#O|O]]   [[#P|P]]    [[#R|R]]   [[#S|S]]    [[#T|T]]   [[#U|U]]   [[#V|V]]   [[#W|W]]   [[#X|X]]   <br><br> [[#symbols|Symbols]] '''   -   ''' [[#references|References]]<br><br>{{small|Menu Created by Cyperium}}</p></div> +<div id="toc"><p style="text-align: center"><br> '''Alphabetical QB64 Keyword Listings''' <br><br>     '''QB 64:'''  [[#uA|_A]] [[#uB|_B]] [[#uC|_C]] [[#uD|_D]] [[#uE|_E]] [[#uF|_F]] [[#uG|_G]] [[#uH|_H]] [[#uI|_I]] [[#uK|_K]] [[#uL|_L]] [[#uM|_M]] [[#uN|_N]] [[#uO|_O]] [[#uP|_P]] [[#uR|_R]] [[#uS|_S]] [[#uT|_T]] [[#uU|_U]] [[#uV|_V]] [[#uW|_W]]                <br><br>'''QBasic:'''  [[#A|A]]   [[#B|B]]   [[#C|C]]   [[#D|D]]   [[#E|E]]    [[#F|F]]   [[#G|G]]   [[#H|H]]    [[#I| I]]    [[#K|K]]   [[#L|L]]   [[#M|M]]   [[#N|N]]    [[#O|O]]   [[#P|P]]    [[#R|R]]   [[#S|S]]    [[#T|T]]   [[#U|U]]   [[#V|V]]   [[#W|W]]   [[#X|X]]   <br><br>'''OpenGL:'''   [[#glA|A]]    [[#glB|B]]    [[#glC|C]]    [[#glD|D]]    [[#glE|E]]     [[#glF|F]]    [[#glG|G]]    [[#glH|H]]    [[#glI| I  ]]   [[#glL|L]]    [[#glM|M]]    [[#glN|N]]     [[#glO|O]]    [[#glP|P]]     [[#glR|R]]    [[#glS|S]]     [[#glT|T]]    [[#glV|V]]       <br><br> [[#symbols|Symbols]] '''   -   ''' [[#references|References]]<br><br>{{small|Menu Created by Cyperium}}</p></div> -<center>[[QB64 FAQ|Frequently Asked Questions about QB64]]</center> +<center>[[QB64 FAQ|Go to Frequently Asked Questions about QB64]]</center> -<p style="text-align: center">[[Keyword Reference - By usage|Keywords by usage]]</p> +<p style="text-align: center">[[Keyword Reference - By usage|Go to keywords by Usage]]</p> <p style="text-align: center">Keywords beginning with _underscores are QB64 specific. '''To use them without the prefix, use [[$NOPREFIX]].'''</p> <p style="text-align: center">[[Keywords currently not supported by QB64]]</p> -<p style="text-align: center">[[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords not supported in Linux or MAC versions]]</p> +<p style="text-align: center">[[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords Not Supported in Linux or MAC versions]]</p> <p style="text-align: center">Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.</p> -<p style="text-align: center">For comments or suggestions about this WIKI goto the [http://www.qb64.org/forum/index.php QB64 Forum].</p> +<p style="text-align: center">For comments or suggestions about this WIKI goto the [http://qb64phoenix.com/forum/index.php QB64 Forum].</p> <center> '''If code examples only display partial code, use the browser Refresh button'''</center> @@ -30,19 +30,19 @@ __NOTOC__ <div id = "uA">_A</div> * [[_ACCEPTFILEDROP]] (statement) {{text|turns a program window into a valid drop destination for dragging files from Windows Explorer.}} * [[_ACOS]] (function) {{text|arccosine function returns the angle in radians based on an input [[COS]]ine value range from -1 to 1.}} -* [[_ACOSH]] (function) {{text|returns the nonnegative arc hyperbolic cosine of x, expressed in radians.}} +* [[_ACOSH]] (function) {{text|Returns the nonnegative arc hyperbolic cosine of x, expressed in radians.}} * [[_ALLOWFULLSCREEN]] (statement) {{text|allows setting the behavior of the ALT+ENTER combo.}} * [[_ALPHA]] (function) {{text|returns the alpha channel transparency level of a color value used on a screen page or image.}} * [[_ALPHA32]] (function) {{text|returns the alpha channel transparency level of a color value used on a 32 bit screen page or image.}} * [[Mathematical_Operations|_ARCCOT]] (function) {{text|is the inverse function of the cotangent. . http://mathworld.wolfram.com/InverseCosecant.html}} * [[Mathematical_Operations|_ARCCSC]] (function) {{text|is the inverse function of the cosecant. http://mathworld.wolfram.com/InverseCosecant.html}} * [[Mathematical_Operations|_ARCSEC]] (function) {{text|is the inverse function of the secant. http://mathworld.wolfram.com/InverseSecant.html}} -* [[_ASIN]] (function) {{text|returns the principal value of the arc sine of x, expressed in radians.}} -* [[_ASINH]] (function) {{text|returns the arc hyperbolic sine of x, expressed in radians.}} -* [[_ASSERT]] (statement) {{text|performs debug tests.}} -* [[$ASSERTS]] ([[metacommand]]) {{text|enables the [[_ASSERT]] macro}} -* [[_ATAN2]] (function) {{text|returns the principal value of the [[ATN|arc tangent]] of y/x, expressed in radians.}} -* [[_ATANH]] (function) {{text|returns the arc hyperbolic tangent of x, expressed in radians.}} +* [[_ASIN]] (function) {{text|Returns the principal value of the arc sine of x, expressed in radians.}} +* [[_ASINH]] (function) {{text|Returns the arc hyperbolic sine of x, expressed in radians.}} +* [[_ASSERT]] (statement) {{text|Performs debug tests.}} +* [[$ASSERTS]] (metacommand) {{text|Enables the [[_ASSERT]] macro}} +* [[_ATAN2]] (function) {{text|Returns the principal value of the [[ATN|arc tangent]] of y/x, expressed in radians.}} +* [[_ATANH]] (function) {{text|Returns the arc hyperbolic tangent of x, expressed in radians.}} * [[_AUTODISPLAY]] (statement) {{text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}} * [[_AUTODISPLAY (function)]] {{text|returns the current display mode as true (-1) if automatic or false (0) if per request using [[_DISPLAY]].}} * [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distance from the device axis center, 0.}} @@ -71,9 +71,9 @@ __NOTOC__ <div id = "uC">_C</div> * [[_CAPSLOCK (function)]] {{text|returns -1 when Caps Lock is on}} * [[_CAPSLOCK]] (statement) {{text|sets Caps Lock key state}} -* [[$CHECKING]] ([[metacommand]]) {{text|turns event error checking OFF or ON.}} -* [[_CEIL]] (function) {{text|rounds x upward, returning the smallest integral value that is not less than x.}} -* [[_CINP]] (function) {{text|returns a key code from $CONSOLE input}} +* [[$CHECKING]] (QB64 C++ [[Metacommand]]) {{text|turns event error checking OFF or ON.}} +* [[_CEIL]] (function) {{text|Rounds x upward, returning the smallest integral value that is not less than x.}} +* [[_CINP]] (function) {{text|Returns a key code from $CONSOLE input}} * [[_CLEARCOLOR (function)]] {{text|returns the current transparent color of an image.}} * [[_CLEARCOLOR]] (statement) {{text|sets a specific color index of an image to be transparent}} * [[_CLIP]] ([[PUT (graphics statement)|PUT]] graphics option) {{text|allows placement of an image partially off of the screen.}} @@ -81,11 +81,11 @@ __NOTOC__ * [[_CLIPBOARD$ (statement)]] {{text|sets and overwrites the [[STRING]] value in the operating system's clipboard.}} * [[_CLIPBOARDIMAGE (function)]] {{text|pastes an image from the clipboard into a new QB64 image in memory.}} * [[_CLIPBOARDIMAGE]] {{text|(statement) copies a valid QB64 image to the clipboard.}} -* [[$COLOR]] ([[metacommand]]) {{text|includes named color constants in a program}} +* [[$COLOR]] (metacommand) {{text|includes named color constants in a program}} * [[_COMMANDCOUNT]] (function) {{text|returns the number of arguments passed to the compiled program from the command line.}} * [[_CONNECTED]] (function) {{text|returns the status of a TCP/IP connection handle.}} * [[_CONNECTIONADDRESS$]] (TCP/IP function) {{text|returns a connected user's STRING IP address value using the handle.}} -* [[$CONSOLE]] ([[metacommand]]) {{text|creates a console window that can be used throughout a program.}} +* [[$CONSOLE]] (QB64 [[Metacommand]]) {{text|creates a console window that can be used throughout a program.}} * [[_CONSOLE]] (statement) {{text|used to turn a console window OFF or ON or to designate [[_DEST]] _CONSOLE for output.}} * [[_CONSOLEINPUT]] (function) {{text|fetches input data from a [[$CONSOLE]] window to be read later (both mouse and keyboard)}} * [[_CONSOLETITLE]] (statement) {{text|creates the title of the console window using a literal or variable [[STRING|string]].}} @@ -95,10 +95,10 @@ __NOTOC__ * [[_COPYIMAGE]] (function) {{text|copies an image handle value to a new designated handle.}} * [[_COPYPALETTE]] (statement) {{text|copies the color palette intensities from one 4 or 8 BPP image to another image.}} * [[Mathematical_Operations|_COT]] (function) {{text| the mathematical function cotangent defined by 1/TAN. http://mathworld.wolfram.com/Cotangent.html}} -* [[Mathematical_Operations|_COTH]] (function) {{text|returns the hyperbolic cotangent. http://mathworld.wolfram.com/HyperbolicCotangent.html}} -* [[Mathematical_Operations|_COSH]] (function) {{text|returns the hyperbolic cosine of x radians. http://mathworld.wolfram.com/HyperbolicCosine.html}} +* [[Mathematical_Operations|_COTH]] (function) {{text|Returns the hyperbolic cotangent. http://mathworld.wolfram.com/HyperbolicCotangent.html}} +* [[Mathematical_Operations|_COSH]] (function) {{text|Returns the hyperbolic cosine of x radians. http://mathworld.wolfram.com/HyperbolicCosine.html}} * [[Mathematical_Operations|_CSC]] (function) {{text| the mathematical function cosecant defined by 1/SIN. http://mathworld.wolfram.com/Cosecant.html}} -* [[Mathematical_Operations|_CSCH]] (function) {{text|returns the hyperbolic cosecant. http://mathworld.wolfram.com/HyperbolicCosecant.html}} +* [[Mathematical_Operations|_CSCH]] (function) {{text|Returns the hyperbolic cosecant. http://mathworld.wolfram.com/HyperbolicCosecant.html}} * [[_CV]] (function) {{text|converts any [[_MK$]] [[STRING]] value to the designated numerical type value.}} * [[_CWD$]] (function) {{text|returns the current working directory as a [[STRING]] value.}} @@ -112,7 +112,6 @@ __NOTOC__ * [[_D2R]] (function) {{text|converts degrees to radian angle values.}} * [[DECLARE LIBRARY|DECLARE LIBRARY (QB64 statement block)]] {{text|declares a C++, SDL or Operating System [[SUB]] or [[FUNCTION]] to be used.}} * [[DECLARE DYNAMIC LIBRARY|DECLARE DYNAMIC LIBRARY (QB64 statement)]] {{text|declares DYNAMIC, CUSTOMTYPE or STATIC library (DLL) [[SUB]] or [[FUNCTION]].}} -* [[$DEBUG]] (precompiler [[metacommand]]) {{text|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.}} * [[_DEFAULTCOLOR]] (function) {{text|returns the current default text color for an image handle or page.}} * [[_DEFINE]] (statement) {{text|defines a range of variable names according to their first character as a data type.}} * [[_DEFLATE$]] (function) {{text|compresses a string}} @@ -140,14 +139,11 @@ __NOTOC__ <div id = "uE">_E</div> * [[_ECHO]] (statement) {{text|used in conjunction with $IF for the precompiler.}} -* [[$ELSE]] (precompiler [[metacommand]]) {{text|used in conjunction with $IF for the precompiler.}} -* [[$ELSEIF]] (precompiler [[metacommand]]) {{text|used in conjunction with $IF for the precompiler.}} -* [[$END IF]] (precompiler [[metacommand]]) {{text|used in conjunction with $IF for the precompiler.}} -* [[_ENVIRONCOUNT]] (function) {{text|returns the number of key/value pairs currently exist in the environment table.}} -* [[$ERROR]] (precompiler [[metacommand]]) {{text|used to trigger compiler errors.}} +* [[$ELSE]] (Pre-Compiler [[Metacommand]]) {{text|used in conjunction with $IF for the precompiler.}} +* [[$ELSEIF]] (Pre-Compiler [[Metacommand]]) {{text|used in conjunction with $IF for the precompiler.}} +* [[$END IF]] (Pre-Compiler [[Metacommand]]) {{text|used in conjunction with $IF for the precompiler.}} * [[_ERRORLINE]] (function) {{text|returns the source code line number that caused the most recent runtime error.}} -* [[_ERRORMESSAGE$]] (function) {{text|returns a human-readable message describing the most recent runtime error.}} -* [[$EXEICON]] (precompiler [[metacommand]]) {{text|used with a .ICO icon file name to embed the image into the QB64 executable.}} +* [[$EXEICON]] (Pre-Compiler [[Metacommand]]) {{text|used with a .ICO icon file name to embed the image into the QB64 executable.}} * [[_EXIT (function)]] {{text|prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}} <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> @@ -186,16 +182,16 @@ __NOTOC__ <div id = "uH">_H</div> * [[_HEIGHT]] (function) {{text|returns the height of a designated image handle.}} * [[_HIDE]] ([[SHELL]] action) {{text| hides the command line display during a shell.}} -* [[_HYPOT]] (function) {{text|returns the hypotenuse of a right-angled triangle whose legs are x and y.}} +* [[_HYPOT]] (function) {{text|Returns the hypotenuse of a right-angled triangle whose legs are x and y.}} ---- <div id = "uI">_I</div> -* [[$IF]] (precompiler [[metacommand]]) {{text|used to set an IF condition for the precompiler.}} +* [[$IF]] (Pre-Compiler [[Metacommand]]) {{text|used to set an IF condition for the precompiler.}} * [[_ICON]] (statement) {{text|designates a [[_LOADIMAGE]] image file handle to be used as the program's icon or loads the embedded icon (see [[$EXEICON]]).}} -* [[_INCLERRORFILE$]] (function) {{text|returns the name of the original source code $INCLUDE module that caused the most recent error.}} +* [[_INCLERRORFILE$]] {function) {{text|returns the name of the original source code $INCLUDE module that caused the most recent error.}} * [[_INCLERRORLINE]] (function) {{text|returns the line number in an included file that caused the most recent error.}} * [[_INFLATE$]] (function) {{text|decompresses a string}} * [[_INSTRREV]] (function) {{text|allows searching for a substring inside another string, but unlike [[INSTR]] it returns the last occurrence instead of the first one.}} @@ -209,15 +205,15 @@ __NOTOC__ <div id = "uK">_K</div> *[[_KEYCLEAR]] (statement) {{text|clears the keyboard buffers for INKEY$, _KEYHIT, and INP.}} +*[[_KEYHIT]] (function) {{text|returns [[ASCII]] one and two byte, SDL Virtual Key and [[Unicode]] keyboard key press codes.}} *[[_KEYDOWN]] (function) {{text|returns whether CTRL, ALT, SHIFT, combinations and other keys are pressed.}} -*[[_KEYHIT]] (function) {{text|returns [[ASCII]] one and two byte, Virtual Key and [[Unicode]] keyboard key press codes.}} ---- <div id = "uL">_L</div> -* [[$LET]] (precompiler [[metacommand]]) {{text|used to set a flag variable for the precompiler.}} +* [[$LET]] (Pre-Compiler [[Metacommand]]) {{text|used to set a flag variable for the precompiler.}} * [[_LASTAXIS]] (function) {{text|returns the number of axis available on a specified number device listed by [[_DEVICE$]].}} * [[_LASTBUTTON]] (function) {{text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}} * [[_LASTWHEEL]] (function) {{text|returns the number of scroll wheels available on a specified number device listed by [[_DEVICE$]].}} @@ -246,7 +242,6 @@ __NOTOC__ * [[_MEMIMAGE]] (function) {{text|returns a [[_MEM]] block referring to a designated image handle's memory}} * [[_MEMNEW]] (function) {{text|allocates new memory with a designated SIZE and returns a [[_MEM]] block referring to it.}} * [[_MEMPUT]] (statement) {{text|places a designated value into a designated memory block OFFSET}} -* [[_MEMSOUND]] (function) {{text|returns a [[_MEM]] block referring to a designated sound handle's memory}} * [[_SCREENMOVE|_MIDDLE]] (_SCREENMOVE parameter) {{text|centers the program window on the desktop in any screen resolution.}} * [[_MK$]] (function) {{text|converts a numerical value to a designated [[ASCII]] [[STRING]] value.}} * [[_MOUSEBUTTON]] (function) {{text|returns the status of a designated mouse button.}} @@ -255,6 +250,7 @@ __NOTOC__ * [[_MOUSEMOVE]] (statement) {{text|moves the mouse pointer to a designated position on the program [[SCREEN]].}} * [[_MOUSEMOVEMENTX]] (function) {{text|returns the relative horizontal position of the mouse cursor compared to the previous position.}} * [[_MOUSEMOVEMENTY]] (function) {{text|returns the relative vertical position of the mouse cursor compared to the previous position.}} +* [[_MOUSEPIPEOPEN]] (function) {{text|creates a pipe handle value for a mouse when using a virtual keyboard.}} * [[_MOUSESHOW]] (statement) {{text|displays the mouse cursor after it has been hidden or can change the cursor shape.}} * [[_MOUSEWHEEL]] (function) {{text|returns the number of mouse scroll wheel "clicks" since last read.}} * [[_MOUSEX]] (function) {{text|returns the current horizontal position of the mouse cursor.}} @@ -266,7 +262,7 @@ __NOTOC__ <div id = "uN">_N</div> * [[_NEWIMAGE]] (function) {{text|creates a designated size program [[SCREEN]] or page image and returns a handle value.}} -* [[$NOPREFIX]] ([[metacommand]]) {{text|allows QB64-specific keywords to be used without the underscore prefix.}} +* [[$NOPREFIX]] (metacommand) {{text|allows QB64-specific keywords to be used without the underscore prefix.}} * [[_NUMLOCK (function)]] {{text|returns -1 when Num Lock is on}} * [[_NUMLOCK]] (statement) {{text|sets Num Lock key state}} @@ -281,8 +277,8 @@ __NOTOC__ * [[_OPENCLIENT]] (TCP/IP function) {{text|connects to a Host on the Internet as a Client and returns the Client status handle.}} * [[_OPENCONNECTION]] (TCP/IP function) {{text|open's a connection from a client that the host has detected and returns a status handle.}} * [[_OPENHOST]] (TCP/IP function) {{text|opens a Host and returns a Host status handle.}} -* [[OPTION _EXPLICIT]] (precompiler statement) {{text|instructs the compiler to require variable declaration with [[DIM]] or an equivalent statement.}} -* [[OPTION _EXPLICITARRAY]] (precompiler statement) {{text|instructs the compiler to require array declaration with [[DIM]] or an equivalent statement.}} +* [[OPTION _EXPLICIT]] (Pre-compiler directive) {{text|instructs the compiler to require variable declaration with [[DIM]] or an equivalent statement.}} +* [[OPTION _EXPLICITARRAY]] (Pre-compiler directive) {{text|instructs the compiler to require array declaration with [[DIM]] or an equivalent statement.}} * [[_OS$]] (function) {{text|returns the QB64 compiler version in which the program was compiled as [WINDOWS], [LINUX] or [MACOSX] and [32BIT] or [64BIT].}} @@ -314,7 +310,7 @@ __NOTOC__ * [[_RED32]] (function) {{text|returns the red component intensity of a 32-bit color value.}} * [[_READBIT]] (function) {{text|returns the state of the specified bit of an integer variable.}} * [[_RESETBIT]] (function) {{text|is used to set the specified bit of an integer variable to 0.}} -* [[$RESIZE]] ([[metacommand]]) {{text|used with ON allows a user to resize the program window where OFF does not.}} +* [[$RESIZE]] ([[Metacommand]]) {{text|used with ON allows a user to resize the program window where OFF does not.}} * [[_RESIZE]] (statement) {{text|sets resizing of the window ON or OFF and sets the method as _STRETCH or _SMOOTH.}} * [[_RESIZE (function)]] {{text|returns -1 when a program user wants to resize the program screen.}} * [[_RESIZEHEIGHT]] (function) {{text|returns the requested new user screen height when [[$RESIZE]]:ON allows it.}} @@ -332,17 +328,17 @@ __NOTOC__ <div id = "uS">_S</div> * [[Mathematical_Operations#Derived_Mathematical_Functions|_SEC]] (function) {{text| the mathematical function secant defined by 1/COS. http://mathworld.wolfram.com/Secant.html}} -* [[Mathematical_Operations#Derived_Mathematical_Functions|_SECH]] (function) {{text|returns the hyperbolic secant. http://mathworld.wolfram.com/HyperbolicSecant.html}} +* [[Mathematical_Operations#Derived_Mathematical_Functions|_SECH]] (function) {{text|Returns the hyperbolic secant. http://mathworld.wolfram.com/HyperbolicSecant.html}} * [[_SCREENCLICK]] (statement) {{text|simulates clicking on a point on the desktop screen with the left mouse button.}} * [[_SCREENEXISTS]] (function) {{text|returns a -1 value once a screen has been created.}} -* [[$SCREENHIDE]] ([[metacommand]]) {{text|hides the program window from view.}} +* [[$SCREENHIDE]] ([QB64 [Metacommand]]) {{text|hides the program window from view.}} * [[_SCREENHIDE]] (statement) {{text|hides the program window from view.}} * [[_SCREENICON (function)]] {{text|returns -1 or 0 to indicate if the window has been minimized to an icon on the taskbar.}} * [[_SCREENICON]] (statement) {{text|minimizes the program window to an icon on the taskbar.}} * [[_SCREENIMAGE]] (function) {{text|creates an image of the current desktop and returns an image handle.}} * [[_SCREENMOVE]] (statement) {{text|positions program window on the desktop using designated coordinates or the _MIDDLE option.}} * [[_SCREENPRINT]] (statement) {{text|simulates typing text into a Windows program using the keyboard.}} -* [[$SCREENSHOW]] ([[metacommand]]) {{text|displays that program window after it was hidden by [[$SCREENHIDE]].}} +* [[$SCREENSHOW]] (QB64 [[Metacommand]]) {{text|displays that program window after it was hidden by [[$SCREENHIDE]].}} * [[_SCREENSHOW]] (statement) {{text|displays the program window after it has been hidden by [[_SCREENHIDE]].}} * [[_SCREENX]] (function) {{text|returns the program window's upper left corner horizontal position on the desktop.}} * [[_SCREENY]] (function) {{text|returns the program window's upper left corner vertical position on the desktop.}} @@ -354,7 +350,7 @@ __NOTOC__ * [[_SHELLHIDE]] (function) {{text|returns the code sent by a program exit using [[END]] or [[SYSTEM]] followed by an [[INTEGER]] value.}} * [[_SHL]] (function) {{text|used to shift the bits of a numerical value to the left}} * [[_SHR]] (function) {{text|used to shift the bits of a numerical value to the right.}} -* [[Mathematical_Operations|_SINH]] (function) {{text|returns the hyperbolic sine of x radians.}} +* [[Mathematical_Operations|_SINH]] (function) {{text|Returns the hyperbolic sine of x radians.}} * [[_SNDBAL]] (statement) {{text|attempts to set the balance or 3D position of a sound file.}} * [[_SNDCLOSE]] (statement) {{text|frees and unloads an open sound using the sound handle created by [[_SNDOPEN]].}} * [[_SNDCOPY]] (function) {{text|copies a sound handle value to a new designated handle.}} @@ -390,7 +386,7 @@ __NOTOC__ <div id = "uT">_T</div> -* [[Mathematical_Operations|_TANH]] (function) {{text|returns the hyperbolic tangent of x radians.}} +* [[Mathematical_Operations|_TANH]] (function) {{text|Returns the hyperbolic tangent of x radians.}} * [[_TITLE]] (statement) {{text|sets the program title [[STRING|string]] value.}} * [[_TITLE$]] (function) {{text|gets the program title [[STRING|string]] value.}} * [[_TOGGLEBIT]] (function) {{text|is used to toggle the specified bit of an integer variable from 1 to 0 or 0 to 1.}} @@ -411,8 +407,8 @@ __NOTOC__ <div id = "uV">_V</div> -* [[$VERSIONINFO]] ([[metacommand]]) {{text|adds metadata to Windows only binaries for identification purposes across the OS.}} -* [[$VIRTUALKEYBOARD]] ([[metacommand]] - Deprecated) {{text|turns the virtual keyboard ON or OFF for use in touch-enabled devices}} +* [[$VERSIONINFO]] ([[Metacommand]]) {{text|adds metadata to Windows only binaries for identification purposes across the OS.}} +* [[$VIRTUALKEYBOARD]] ([[Metacommand]] - Deprecated) {{text|turns the virtual keyboard ON or OFF for use in touch-enabled devices}} ---- @@ -428,7 +424,7 @@ __NOTOC__ <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> -<center>([[Keyword Reference - Alphabetical#QB64 specific keywords:|Top of QB64 specific keywords]])</center> +<center>([[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to Top of QB64 specific keywords]])</center> ==Original QBasic keywords:== '''<p style="text-align: center">These QBasic keywords (with a few noted exceptions) will work in all versions of QB64.</p>''' @@ -465,9 +461,12 @@ __NOTOC__ <div id = "C">C</div> * [[CALL]] (statement) {{text|optional statement that sends the program to a [[SUB]] procedure. Requires parameters be enclosed in brackets(parenthesis).}} * [[CALL ABSOLUTE]] (statement) {{text|is used to access computer interrupt registers.}} +* [[CALLS]] (non-BASIC call statement) * [[CASE]] ([[SELECT CASE]] condition) {{text|designates specific conditions in a [[SELECT CASE]] statement block.}} * [[CASE ELSE]] ([[SELECT CASE]] condition) {{text|designates an alternative condition to be evaluated in a [[SELECT CASE]] statement block.}} * [[CASE IS]] ([[SELECT CASE]] condition) {{text|designates specific conditions in a [[SELECT CASE]] statement block.}} +* [[CDBL]] (function) {{text|returns the closest [[DOUBLE]] value of a number.}} +* [[CDECL]] ([[DECLARE (non-BASIC statement)]]) * [[CHAIN]] (statement) {{text|sends a program to another specified program module or compiled program.}} * [[CHDIR]] (statement) {{text|changes the current program path for file access.}} * [[CHR$]] (function) {{text|returns a text [[STRING|string]] character by the specified [[ASCII]] code number.}} @@ -499,6 +498,9 @@ __NOTOC__ <div id = "D">D</div> * [[DATA]] (statement) {{text|creates a line of fixed program information separated by commas.}} * [[DATE$]] (function) {{text|returns the present Operating System date [[STRING|string]] formatted as mm-dd-yyyy.}} +* [[DATE$ (statement)]] {{text|sets the date of the Operating System using a mm-dd-yyyy [[STRING|string]] format.}} +* DECLARE (BASIC statement) {{text|declares a [[SUB]] or [[FUNCTION]] procedure at the start of a program. Not required in QB64.}} +* [[DECLARE (non-BASIC statement)]] {{text|declares non-basic [[SUB]] or [[FUNCTION]] procedures. Not implemented in QB64.}} * [[DECLARE LIBRARY|DECLARE LIBRARY (QB64 statement block)]] {{text|declares a C++, SDL or Operating System [[SUB]] or [[FUNCTION]] to be used.}} * [[DECLARE DYNAMIC LIBRARY|DECLARE DYNAMIC LIBRARY (QB64 statement)]] {{text|declares DYNAMIC, CUSTOMTYPE or STATIC library(DLL) [[SUB]] or [[FUNCTION]].}} * [[DEF SEG]] (statement) {{text|defines a segment in memory to be accessed by a memory procedure.}} @@ -511,7 +513,7 @@ __NOTOC__ * [[DO...LOOP]] (statement) {{text|sets a recursive procedure loop that can be ignored or exited using conditional arguments.}} * [[DOUBLE]] (numerical type #) {{text|8 byte value limited to values up to 15 decimal places.}} * [[DRAW]] (statement) {{text|uses a special [[STRING|string]] format that draws graphical lines in specific directions.}} -* [[$DYNAMIC]] ([[metacommand]]) {{text|used at the start of a program to set all program arrays as changeable in size using [[REDIM]].}} +* [[$DYNAMIC]] ([[Metacommand]]) {{text|used at the start of a program to set all program arrays as changeable in size using [[REDIM]].}} <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> @@ -523,11 +525,13 @@ __NOTOC__ * [[ELSEIF]] ([[IF...THEN]] statement) {{text|is used with [[THEN]] to set alternate conditional evaluations.}} * [[END]] (statement) {{text|sets the end of a program, sub-procedure, statement block, [[DECLARE LIBRARY]] or [[TYPE]] definition.}} * [[IF...THEN|END IF]] (statement) {{text|[[END]]s an IF...THEN conditional block statement using more than one line of code.}} -* [[ENVIRON]] (statement) {{text|temporarily sets an environmental key/value pair.}} +* [[ENVIRON]] (statement) {{text|temporarily sets an environmental key/pair value.}} * [[ENVIRON$]] (function) {{text|returns a specified string setting or numerical position as an environmental [[STRING]] value.}} * [[EOF]] (file function) {{text|returns -1 when a file [[INPUT (file statement)|INPUT]] or [[GET]] has reached the end of a file.}} * [[EQV]] (logic operator) {{text|is used to compare two numerical values bitwise.}} * [[ERASE]] (statement) {{text|clears the values from [[$STATIC]] arrays and completely removes [[$DYNAMIC]] arrays.}} +* [[ERDEV]] (function) {{text|returns an error code from the last device to create an error.}} +* [[ERDEV$]] (function) {{text|returns the 8 character name of the last device to declare an error as a [[STRING|string]].}} * [[ERL]] (error function) {{text|returns the closest line number before an error occurred if line numbers are used.}} * [[ERR]] (function) {{text|returns the [[ERROR Codes|ERROR code]] when a program error occurs.}} * [[ERROR]] (statement) {{text|sets a specific [[ERROR Codes|ERROR code]] to be simulated.}} @@ -541,10 +545,12 @@ __NOTOC__ <div id = "F">F</div> * [[FIELD]] (statement) {{text|defines the variable sizes to be written or read from a file.}} +* [[FILEATTR]] (function) {{text|returns the current file access mode.}} * [[FILES]] (statement) {{text|returns a list of files in the current directory path to the [[SCREEN]].}} * [[FIX]] (function) {{text|returns the rounded [[INTEGER]] value of a numerical value.}} * [[FOR...NEXT]] (statement) {{text|creates a recursive loop procedure that loop a specified number of times.}} * [[FOR (file statement)]] {{text|used in an [[OPEN]] file or device statement to indicate the access mode.}} +* [[FRE]] (function) {{text|returns the number of bytes of Memory available to running programs.}} * [[TIMER (statement)|FREE (QB64 TIMER statement)]] {{text|frees a numbered TIMER event in QB64.}} * [[FREEFILE]] (file function) {{text|returns a file number that is currently not in use by the Operating System.}} * [[FUNCTION]] (procedure block) {{text|sub-procedure that can calculate and return one value to a program in its name.}} @@ -575,7 +581,7 @@ __NOTOC__ <div id = "I">I</div> * [[IF...THEN]] (statement) {{text|a conditional block statement used control program flow.}} * [[IMP]] (logic operator) {{text|is used to compare two numerical values bitwise.}} -* [[$INCLUDE]] ([[metacommand]]) {{text|designates a text code library file to include with the program.}} +* [[$INCLUDE]] ([[Metacommand]]) {{text|designates a text code library file to include with the program.}} * [[INKEY$]] (function) [[ASCII]] {{text|returns a [[STRING|string]] value entry from the keyboard.}} * [[INP]] (function) {{text|returns a numerical value from a specified port register address. See [[Keyboard scancodes]]}} * [[INPUT]] (statement) {{text|a user input that returns a value to one or more specified variable(s).}} @@ -587,6 +593,8 @@ __NOTOC__ * [[INTEGER]] (% numerical type) {{text|2 byte whole values from -32768 to 32767.}} * [[INTERRUPT]] (statement) {{text|is used to access computer interrupt registers.}} * [[INTERRUPTX]] (statement) {{text|is used to access computer interrupt registers.}} +* [[IOCTL]] (statement) +* [[IOCTL$]] (function) <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> @@ -662,15 +670,19 @@ __NOTOC__ <div id = "O">O</div> * [[OCT$]] (function) {{text|returns the octal (base 8) [[STRING]] representation of a decimal [[INTEGER]] value.}} * [[OFF]] (event statement) {{text|turns off all [[ON]] event checking.}} +* [[ON COM(n)]] (statement) {{text|sets up a COM port event procedure call.}} * [[ON ERROR]] (statement) {{text|sets up and activates an error event checking procedure call. Use to avoid program errors.}} * [[ON KEY(n)]] (statement) {{text|sets up a keyboard key entry event procedure.}} +* [[ON PEN]] (statement) {{text|sets up a pen event procedure call.}} +* [[ON PLAY(n)]] (statement) {{text|sets up a [[PLAY]] event procedure call.}} * [[ON STRIG(n)]] (statement) {{text|sets up a joystick button event procedure call.}} * [[ON TIMER(n)]] (statement) {{text|sets up a timed event procedure call.}} +* [[ON UEVENT]] (statement) '''{{text|Not implemented in QB64.}}''' * [[ON...GOSUB]] (statement) {{text|sets up a numerical event procedure call.}} * [[ON...GOTO]] (statement) {{text|sets up a numerical event procedure call.}} * [[OPEN]] (file statement) {{text|opens a file name for an access mode with a specific file number.}} * [[OPEN COM]] (statement) {{text|opens a serial communication port for access at a certain speed and mode.}} -* [[OPTION BASE]] (precompiler statement) {{text|can set the lower boundary of all arrays to 1.}} +* [[OPTION BASE]] (statement) {{text|can set the lower boundary of all arrays to 1.}} * [[OR]] (logic operator) {{text|is used to compare two numerical values bitwise.}} * [[OR (boolean)]] {{text| conditonal operator is used to include an alternative evaluation in an [[IF...THEN]] or [[Boolean]] statement.}} * [[OUT]] (statement) {{text|writes numerical data to a specified register port.}} @@ -687,6 +699,9 @@ __NOTOC__ * [[PALETTE USING]] (statement) {{text|sets the color intensity settings using a designated [[arrays|array]].}} * [[PCOPY]] (statement) {{text|swaps two designated memory page images when page swapping is enabled in the [[SCREEN]] statement.}} * [[PEEK]] (function) {{text|returns a numerical value from a specified segment address in memory.}} +* [[PEN]] (function) {{text|returns requested information about the lightpen device used.}} +* [[PEN (statement)]] {{text|enables/disables or suspends event trapping of a lightpen device.}} +* [[PLAY(n)]] (function) {{text|returns the number of notes currently in the background music queue.}} * [[PLAY]] (statement) {{text|uses a special [[STRING|string]] format that can produce musical tones and effects.}} * [[PMAP]] (function) {{text|returns the physical or WINDOW view graphic coordinates.}} * [[POINT]] (function) {{text|returns the color attribute number or 32 bit [[_RGB32]] value.}} @@ -737,10 +752,12 @@ __NOTOC__ * [[SEEK]] (function) {{text|returns the present byte position in an [[OPEN|opened]] file.}} * [[SEEK (statement)]] {{text|moves to a specified position in an [[OPEN|opened]] file.}} * [[SELECT CASE]] (statement) {{text|a program flow block that can handle numerous conditional evaluations.}} +* [[SETMEM]] (function) {{text|sets the memory to use.}} * [[SGN]] (function) {{text|returns -1 for negative, 0 for zero, and 1 for positive numerical values.}} * [[SHARED]] (statement) {{text|designates that a variable can be used by other procedures or the main procedure when in a sub-procedure.}} * [[SHELL]] (statement) {{text|sends [[STRING]] commands to the command line. SHELL calls will not affect the current path.}} * [[SHELL (function)|SHELL (QB64 function)]] {{text|executes an external command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}} +* [[SIGNAL]] (OS 2 event) * [[SIN]] (function) {{text|returns the sine of a radian angle.}} * [[SINGLE]] (! numerical type) {{text|4 byte floating decimal point values up to 7 decimal places.}} * [[SLEEP]] (statement) {{text|pauses the program for a designated number of seconds or until a key is pressed.}} @@ -749,7 +766,7 @@ __NOTOC__ * [[SPC]] (function) {{text|moves the text cursor a number of spaces on the [[SCREEN]].}} * [[SQR]] (function) {{text|returns the square root of a non-negative number.}} * [[STATIC]] (statement) {{text|creates a [[SUB]] or [[FUNCTION]] variable that retains its value.}} -* [[$STATIC]] ([[metacommand]]) {{text|used at the start of a program to set all program arrays as unchangeable in size using [[DIM]].}} +* [[$STATIC]] ([[Metacommand]]) {{text|used at the start of a program to set all program arrays as unchangeable in size using [[DIM]].}} * [[STEP]] (keyword) {{text|move relatively from one graphic position or change the counting increment in a [[FOR...NEXT]] loop.}} * [[STICK]] (function) {{text|returns the present joystick position.}} * [[STOP]] (statement) {{text|stops a program when troubleshooting or stops an [[ON]] event.}} @@ -784,6 +801,7 @@ __NOTOC__ <div id = "U">U</div> * [[UBOUND]] (function) {{text|returns the upper-most index number of a designated [[arrays|array]].}} * [[UCASE$]] (function) {{text|returns an uppercase representation of a specified [[STRING]].}} +* [[UEVENT]] (statement) '''{{text|Not implemented in QB64.}}''' * [[UNLOCK]] (statement) {{text|unlocks a designated file or portions of it.}} * [[UNTIL]] (condition) {{text|evaluates a [[DO...LOOP]] condition until it is True.}} @@ -826,11 +844,434 @@ __NOTOC__ <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> -<center>([[Keyword Reference - Alphabetical#Original QBasic keywords:|Top of Original QB keywords]])</center> +<center>([[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]])</center> <!-- (referenced by QB64 IDE HELP) --> +<div id = "glA">_glA</div> +==OpenGL specific keywords:== +<center>'''All QB64 OpenGL keywords must use the underscore _gl prefix with the alphabetically listed function names.'''</center> +<center>Use [[$NOPREFIX]] to enable these to be used without the leading underscore.</center> + +* Important: See [[SUB _GL]] + + +---- + +* [[_glAccum]] (statement) {{text|OpenGL command}} +* [[_glAlphaFunc]] (statement) {{text|OpenGL command}} +* [[_glAreTexturesResident]] (statement) {{text|OpenGL command}} +* [[_glArrayElement]] (statement) {{text|OpenGL command}} + + +---- +<div id = "glB">_glB</div> +* [[_glBegin]] (statement) {{text|OpenGL command}} +* [[_glBindTexture]] (statement) {{text|OpenGL command binds a named texture to a texturing target}} +* [[_glBitmap]] (statement) {{text|OpenGL command}} +* [[_glBlendFunc]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glC">_glC</div> +* [[_glCallList]] (statement) {{text|OpenGL command}} +* [[_glCallLists]] (statement) {{text|OpenGL command}} +* [[_glClear]] (statement) {{text|OpenGL command clears buffers to preset values}} +* [[_glClearAccum]] (statement) {{text|OpenGL command}} +* [[_glClearColor]] (statement) {{text|OpenGL command specifies clear values for the color buffers}} +* [[_glClearDepth]] (statement) {{text|OpenGL command specifies the depth value used when the depth buffer is cleared. Initial value is 1.}} +* [[_glClearIndex]] (statement) {{text|OpenGL command}} +* [[_glClearStencil]] (statement) {{text|OpenGL command specifies the index used when the stencil buffer is cleared. Initial value is 0.}} +* [[_glClipPlane]] (statement) {{text|OpenGL command}} +* [[_glColor3b]] (statement) {{text|OpenGL command}} +* [[_glColor3bv]] (statement) {{text|OpenGL command}} +* [[_glColor3d]] (statement) {{text|OpenGL command}} +* [[_glColor3dv]] (statement) {{text|OpenGL command}} +* [[_glColor3f]] (statement) {{text|OpenGL command}} +* [[_glColor3fv]] (statement) {{text|OpenGL command}} +* [[_glColor3i]] (statement) {{text|OpenGL command}} +* [[_glColor3iv]] (statement) {{text|OpenGL command}} +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +* [[_glColor3s]] (statement) {{text|OpenGL command}} +* [[_glColor3sv]] (statement) {{text|OpenGL command}} +* [[_glColor3ub]] (statement) {{text|OpenGL command}} +* [[_glColor3ubv]] (statement) {{text|OpenGL command}} +* [[_glColor3ui]] (statement) {{text|OpenGL command}} +* [[_glColor3uiv]] (statement) {{text|OpenGL command}} +* [[_glColor3us]] (statement) {{text|OpenGL command}} +* [[_glColor3usv]] (statement) {{text|OpenGL command}} +* [[_glColor4b]] (statement) {{text|OpenGL command}} +* [[_glColor4bv]] (statement) {{text|OpenGL command}} +* [[_glColor4d]] (statement) {{text|OpenGL command}} +* [[_glColor4dv]] (statement) {{text|OpenGL command}} +* [[_glColor4f]] (statement) {{text|OpenGL command}} +* [[_glColor4fv]] (statement) {{text|OpenGL command}} +* [[_glColor4i]] (statement) {{text|OpenGL command}} +* [[_glColor4iv]] (statement) {{text|OpenGL command}} +* [[_glColor4s]] (statement) {{text|OpenGL command}} +* [[_glColor4sv]] (statement) {{text|OpenGL command}} +* [[_glColor4ub]] (statement) {{text|OpenGL command}} +* [[_glColor4ubv]] (statement) {{text|OpenGL command}} +* [[_glColor4ui]] (statement) {{text|OpenGL command}} +* [[_glColor4uiv]] (statement) {{text|OpenGL command}} +* [[_glColor4us]] (statement) {{text|OpenGL command}} +* [[_glColor4usv]] (statement) {{text|OpenGL command}} +* [[_glColorMask]] (statement) {{text|OpenGL command enables and disables writing of frame buffer color components}} +* [[_glColorMaterial]] (statement) {{text|OpenGL command}} +* [[_glColorPointer]] (statement) {{text|OpenGL command}} +* [[_glCopyPixels]] (statement) {{text|OpenGL command}} +* [[_glCopyTexImage1D]] (statement) {{text|OpenGL command copies pixels into a 1D texture image}} +* [[_glCopyTexImage2D]] (statement) {{text|OpenGL command copies pixels into a 2D texture image}} +* [[_glCopyTexSubImage1D]] (statement) {{text|OpenGL command copies a one-dimensional texture subimage}} +* [[_glCopyTexSubImage2D]] (statement) {{text|OpenGL command copiess a two-dimensional texture subimage}} +* [[_glCullFace]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glD">_glD</div> +* [[_glDeleteLists]] (statement) {{text|OpenGL command}} +* [[_glDeleteTextures]] (statement) {{text|OpenGL command deletes named textures}} +* [[_glDepthFunc]] (statement) {{text|OpenGL command specifies the value used for depth buffer comparisons}} +* [[_glDepthMask]] (statement) {{text|OpenGL command enables or disables writing into the depth buffer}} +* [[_glDepthRange]] (statement) {{text|OpenGL command specifies mapping of near clipping plane to window coordinates. Initial value 0.}} +* [[_glDisable]] (statement) {{text|OpenGL command}} +* [[_glDisableClientState]] (statement) {{text|OpenGL command}} +* [[_glDrawArrays]] (statement) {{text|OpenGL command}} +* [[_glDrawBuffer]] (statement) {{text|OpenGL command}} +* [[_glDrawElements]] (statement) {{text|OpenGL command}} +* [[_glDrawPixels]] (statement) {{text|OpenGL command}} + + +---- +<div id = "glE">_glE</div> +* [[_glEdgeFlag]] (statement) {{text|OpenGL command}} +* [[_glEdgeFlagPointer]] (statement) {{text|OpenGL command}} +* [[_glEdgeFlagv]] (statement) {{text|OpenGL command}} +* [[_glEnable]] (statement) {{text|OpenGL command}} +* [[_glEnableClientState]] (statement) {{text|OpenGL command}} +* [[_glEnd]] (statement) {{text|OpenGL command}} +* [[_glEndList]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord1d]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord1dv]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord1f]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord1fv]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord2d]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord2dv]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord2f]] (statement) {{text|OpenGL command}} +* [[_glEvalCoord2fv]] (statement) {{text|OpenGL command}} +* [[_glEvalMesh1]] (statement) {{text|OpenGL command}} +* [[_glEvalMesh2]] (statement) {{text|OpenGL command}} +* [[_glEvalPoint1]] (statement) {{text|OpenGL command}} +* [[_glEvalPoint2]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glF">_glF</div> +* [[_glFeedbackBuffer]] (statement) {{text|OpenGL command}} +* [[_glFinish]] (statement) {{text|OpenGL command}} +* [[_glFlush]] (statement) {{text|OpenGL command}} +* [[_glFogf]] (statement) {{text|OpenGL command}} +* [[_glFogfv]] (statement) {{text|OpenGL command}} +* [[_glFogi]] (statement) {{text|OpenGL command}} +* [[_glFogiv]] (statement) {{text|OpenGL command}} +* [[_glFrontFace]] (statement) {{text|OpenGL command}} +* [[_glFrustum]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glG">_glG</div> +* [[_glGenLists]] (statement) {{text|OpenGL command}} +* [[_glGenTextures]] (statement) {{text|OpenGL command}} +* [[_glGetBooleanv]] (statement) {{text|OpenGL command}} +* [[_glGetClipPlane]] (statement) {{text|OpenGL command}} +* [[_glGetDoublev]] (statement) {{text|OpenGL command}} +* [[_glGetError]] (statement) {{text|OpenGL command}} +* [[_glGetFloatv]] (statement) {{text|OpenGL command}} +* [[_glGetIntegerv]] (statement) {{text|OpenGL command}} +* [[_glGetLightfv]] (statement) {{text|OpenGL command}} +* [[_glGetLightiv]] (statement) {{text|OpenGL command}} +* [[_glGetMapdv]] (statement) {{text|OpenGL command}} +* [[_glGetMapfv]] (statement) {{text|OpenGL command}} +* [[_glGetMapiv]] (statement) {{text|OpenGL command}} +* [[_glGetMaterialfv]] (statement) {{text|OpenGL command}} +* [[_glGetMaterialiv]] (statement) {{text|OpenGL command}} +* [[_glGetPixelMapfv]] (statement) {{text|OpenGL command}} +* [[_glGetPixelMapuiv]] (statement) {{text|OpenGL command}} +* [[_glGetPixelMapusv]] (statement) {{text|OpenGL command}} +* [[_glGetPointerv]] (statement) {{text|OpenGL command}} +* [[_glGetPolygonStipple]] (statement) {{text|OpenGL command}} +* [[_glGetString]] (statement) {{text|OpenGL command}} +* [[_glGetTexEnvfv]] (statement) {{text|OpenGL command}} +* [[_glGetTexEnviv]] (statement) {{text|OpenGL command}} +* [[_glGetTexGendv]] (statement) {{text|OpenGL command}} +* [[_glGetTexGenfv]] (statement) {{text|OpenGL command}} +* [[_glGetTexGeniv]] (statement) {{text|OpenGL command}} +* [[_glGetTexImage]] (statement) {{text|OpenGL command}} +* [[_glGetTexLevelParameterfv]] (statement) {{text|OpenGL command}} +* [[_glGetTexLevelParameteriv]] (statement) {{text|OpenGL command}} +* [[_glGetTexParameterfv]] (statement) {{text|OpenGL command}} +* [[_glGetTexParameteriv]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glH">_glH</div> +* [[_glHint]] (statement) {{text|OpenGL command}} + + +---- +<div id = "glI">_glI</div> +* [[_glIndexMask]] (statement) {{text|OpenGL command}} +* [[_glIndexPointer]] (statement) {{text|OpenGL command}} +* [[_glIndexd]] (statement) {{text|OpenGL command}} +* [[_glIndexdv]] (statement) {{text|OpenGL command}} +* [[_glIndexf]] (statement) {{text|OpenGL command}} +* [[_glIndexfv]] (statement) {{text|OpenGL command}} +* [[_glIndexi]] (statement) {{text|OpenGL command}} +* [[_glIndexiv]] (statement) {{text|OpenGL command}} +* [[_glIndexs]] (statement) {{text|OpenGL command}} +* [[_glIndexsv]] (statement) {{text|OpenGL command}} +* [[_glIndexub]] (statement) {{text|OpenGL command}} +* [[_glIndexubv]] (statement) {{text|OpenGL command}} +* [[_glInitNames]] (statement) {{text|OpenGL command}} +* [[_glInterleavedArrays]] (statement) {{text|OpenGL command}} +* [[_glIsEnabled]] (statement) {{text|OpenGL command}} +* [[_glIsList]] (statement) {{text|OpenGL command}} +* [[_glIsTexture]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glL">_glL</div> +* [[_glLightModelf]] (statement) {{text|OpenGL command}} +* [[_glLightModelfv]] (statement) {{text|OpenGL command}} +* [[_glLightModeli]] (statement) {{text|OpenGL command}} +* [[_glLightModeliv]] (statement) {{text|OpenGL command}} +* [[_glLightf]] (statement) {{text|OpenGL command}} +* [[_glLightfv]] (statement) {{text|OpenGL command}} +* [[_glLighti]] (statement) {{text|OpenGL command}} +* [[_glLightiv]] (statement) {{text|OpenGL command}} +* [[_glLineStipple]] (statement) {{text|OpenGL command}} +* [[_glLineWidth]] (statement) {{text|OpenGL command}} +* [[_glListBase]] (statement) {{text|OpenGL command}} +* [[_glLoadIdentity]] (statement) {{text|OpenGL command}} +* [[_glLoadMatrixd]] (statement) {{text|OpenGL command}} +* [[_glLoadMatrixf]] (statement) {{text|OpenGL command}} +* [[_glLoadName]] (statement) {{text|OpenGL command}} +* [[_glLogicOp]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glM">_glM</div> +* [[_glMap1d]] (statement) {{text|OpenGL command}} +* [[_glMap1f]] (statement) {{text|OpenGL command}} +* [[_glMap2d]] (statement) {{text|OpenGL command}} +* [[_glMap2f]] (statement) {{text|OpenGL command}} +* [[_glMapGrid1d]] (statement) {{text|OpenGL command}} +* [[_glMapGrid1f]] (statement) {{text|OpenGL command}} +* [[_glMapGrid2d]] (statement) {{text|OpenGL command}} +* [[_glMapGrid2f]] (statement) {{text|OpenGL command}} +* [[_glMaterialf]] (statement) {{text|OpenGL command}} +* [[_glMaterialfv]] (statement) {{text|OpenGL command}} +* [[_glMateriali]] (statement) {{text|OpenGL command}} +* [[_glMaterialiv]] (statement) {{text|OpenGL command}} +* [[_glMatrixMode]] (statement) {{text|OpenGL command}} +* [[_glMultMatrixd]] (statement) {{text|OpenGL command}} +* [[_glMultMatrixf]] (statement) {{text|OpenGL command}} + + +---- +<div id = "glN">_glN</div> +* [[_glNewList]] (statement) {{text|OpenGL command}} +* [[_glNormal3b]] (statement) {{text|OpenGL command}} +* [[_glNormal3bv]] (statement) {{text|OpenGL command}} +* [[_glNormal3d]] (statement) {{text|OpenGL command}} +* [[_glNormal3dv]] (statement) {{text|OpenGL command}} +* [[_glNormal3f]] (statement) {{text|OpenGL command}} +* [[_glNormal3fv]] (statement) {{text|OpenGL command}} +* [[_glNormal3i]] (statement) {{text|OpenGL command}} +* [[_glNormal3iv]] (statement) {{text|OpenGL command}} +* [[_glNormal3s]] (statement) {{text|OpenGL command}} +* [[_glNormal3sv]] (statement) {{text|OpenGL command}} +* [[_glNormalPointer]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glO">_glO</div> +* [[_glOrtho]] (statement) {{text|OpenGL command}} + + +---- +<div id = "glP">_glP</div> +* [[_glPassThrough]] (statement) {{text|OpenGL command}} +* [[_glPixelMapfv]] (statement) {{text|OpenGL command}} +* [[_glPixelMapuiv]] (statement) {{text|OpenGL command}} +* [[_glPixelMapusv]] (statement) {{text|OpenGL command}} +* [[_glPixelStoref]] (statement) {{text|OpenGL command}} +* [[_glPixelStorei]] (statement) {{text|OpenGL command}} +* [[_glPixelTransferf]] (statement) {{text|OpenGL command}} +* [[_glPixelTransferi]] (statement) {{text|OpenGL command}} +* [[_glPixelZoom]] (statement) {{text|OpenGL command}} +* [[_glPointSize]] (statement) {{text|OpenGL command}} +* [[_glPolygonMode]] (statement) {{text|OpenGL command}} +* [[_glPolygonOffset]] (statement) {{text|OpenGL command}} +* [[_glPolygonStipple]] (statement) {{text|OpenGL command}} +* [[_glPopAttrib]] (statement) {{text|OpenGL command}} +* [[_glPopClientAttrib]] (statement) {{text|OpenGL command}} +* [[_glPopMatrix]] (statement) {{text|OpenGL command}} +* [[_glPopName]] (statement) {{text|OpenGL command}} +* [[_glPrioritizeTextures]] (statement) {{text|OpenGL command}} +* [[_glPushAttrib]] (statement) {{text|OpenGL command}} +* [[_glPushClientAttrib]] (statement) {{text|OpenGL command}} +* [[_glPushMatrix]] (statement) {{text|OpenGL command}} +* [[_glPushName]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glR">_glR</div> +* [[_glRasterPos2d]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2dv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2f]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2fv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2i]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2iv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2s]] (statement) {{text|OpenGL command}} +* [[_glRasterPos2sv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3d]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3dv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3f]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3fv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3i]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3iv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3s]] (statement) {{text|OpenGL command}} +* [[_glRasterPos3sv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4d]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4dv]] (statement) {{text|OpenGL command}} +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +* [[_glRasterPos4f]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4fv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4i]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4iv]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4s]] (statement) {{text|OpenGL command}} +* [[_glRasterPos4sv]] (statement) {{text|OpenGL command}} +* [[_glReadBuffer]] (statement) {{text|OpenGL command}} +* [[_glReadPixels]] (statement) {{text|OpenGL command}} +* [[_glRectd]] (statement) {{text|OpenGL command}} +* [[_glRectdv]] (statement) {{text|OpenGL command}} +* [[_glRectf]] (statement) {{text|OpenGL command}} +* [[_glRectfv]] (statement) {{text|OpenGL command}} +* [[_glRecti]] (statement) {{text|OpenGL command}} +* [[_glRectiv]] (statement) {{text|OpenGL command}} +* [[_glRects]] (statement) {{text|OpenGL command}} +* [[_glRectsv]] (statement) {{text|OpenGL command}} +* [[_GLRENDER]] (statement) {{text|sets whether context is displayed, on top of or behind the software rendering.}} +* [[_glRenderMode]] (statement) {{text|OpenGL command}} +* [[_glRotated]] (statement) {{text|OpenGL command}} +* [[_glRotatef]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glS">_glS</div> +* [[_glScaled]] (statement) {{text|OpenGL command}} +* [[_glScalef]] (statement) {{text|OpenGL command}} +* [[_glScissor]] (statement) {{text|OpenGL command}} +* [[_glSelectBuffer]] (statement) {{text|OpenGL command}} +* [[_glShadeModel]] (statement) {{text|OpenGL command}} +* [[_glStencilFunc]] (statement) {{text|OpenGL command}} +* [[_glStencilMask]] (statement) {{text|OpenGL command}} +* [[_glStencilOp]] (statement) {{text|OpenGL command}} + + +---- +<div id = "glT">_glT</div> +* [[_glTexCoord1d]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1dv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1f]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1fv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1i]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1iv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1s]] (statement) {{text|OpenGL command}} +* [[_glTexCoord1sv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2d]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2dv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2f]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2fv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2i]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2iv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2s]] (statement) {{text|OpenGL command}} +* [[_glTexCoord2sv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3d]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3dv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3f]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3fv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3i]] (statement) {{text|OpenGL command}} +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +* [[_glTexCoord3iv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3s]] (statement) {{text|OpenGL command}} +* [[_glTexCoord3sv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4d]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4dv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4f]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4fv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4i]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4iv]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4s]] (statement) {{text|OpenGL command}} +* [[_glTexCoord4sv]] (statement) {{text|OpenGL command}} +* [[_glTexCoordPointer]] (statement) {{text|OpenGL command}} +* [[_glTexEnvf]] (statement) {{text|OpenGL command}} +* [[_glTexEnvfv]] (statement) {{text|OpenGL command}} +* [[_glTexEnvi]] (statement) {{text|OpenGL command}} +* [[_glTexEnviv]] (statement) {{text|OpenGL command}} +* [[_glTexGend]] (statement) {{text|OpenGL command}} +* [[_glTexGendv]] (statement) {{text|OpenGL command}} +* [[_glTexGenf]] (statement) {{text|OpenGL command}} +* [[_glTexGenfv]] (statement) {{text|OpenGL command}} +* [[_glTexGeni]] (statement) {{text|OpenGL command}} +* [[_glTexGeniv]] (statement) {{text|OpenGL command}} +* [[_glTexImage1D]] (statement) {{text|OpenGL command}} +* [[_glTexImage2D]] (statement) {{text|OpenGL command}} +* [[_glTexParameterf]] (statement) {{text|OpenGL command}} +* [[_glTexParameterfv]] (statement) {{text|OpenGL command}} +* [[_glTexParameteri]] (statement) {{text|OpenGL command}} +* [[_glTexParameteriv]] (statement) {{text|OpenGL command}} +* [[_glTexSubImage1D]] (statement) {{text|OpenGL command}} +* [[_glTexSubImage2D]] (statement) {{text|OpenGL command}} +* [[_glTranslated]] (statement) {{text|OpenGL command}} +* [[_glTranslatef]] (statement) {{text|OpenGL command}} + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +---- +<div id = "glV">_glV</div> +* [[_glVertex2d]] (statement) {{text|OpenGL command}} +* [[_glVertex2dv]] (statement) {{text|OpenGL command}} +* [[_glVertex2f]] (statement) {{text|OpenGL command}} +* [[_glVertex2fv]] (statement) {{text|OpenGL command}} +* [[_glVertex2i]] (statement) {{text|OpenGL command}} +* [[_glVertex2iv]] (statement) {{text|OpenGL command}} +* [[_glVertex2s]] (statement) {{text|OpenGL command}} +* [[_glVertex2sv]] (statement) {{text|OpenGL command}} +* [[_glVertex3d]] (statement) {{text|OpenGL command}} +* [[_glVertex3dv]] (statement) {{text|OpenGL command}} +* [[_glVertex3f]] (statement) {{text|OpenGL command}} +* [[_glVertex3fv]] (statement) {{text|OpenGL command}} +* [[_glVertex3i]] (statement) {{text|OpenGL command}} +* [[_glVertex3iv]] (statement) {{text|OpenGL command}} +* [[_glVertex3s]] (statement) {{text|OpenGL command}} +* [[_glVertex3sv]] (statement) {{text|OpenGL command}} +* [[_glVertex4d]] (statement) {{text|OpenGL command}} +* [[_glVertex4dv]] (statement) {{text|OpenGL command}} +* [[_glVertex4f]] (statement) {{text|OpenGL command}} +* [[_glVertex4fv]] (statement) {{text|OpenGL command}} +* [[_glVertex4i]] (statement) {{text|OpenGL command}} +* [[_glVertex4iv]] (statement) {{text|OpenGL command}} +* [[_glVertex4s]] (statement) {{text|OpenGL command}} +* [[_glVertex4sv]] (statement) {{text|OpenGL command}} +* [[_glVertexPointer]] (statement) {{text|OpenGL command}} +* [[_glViewport]] (statement) {{text|OpenGL command}} + + + +<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> + <div id = "symbols"></div> @@ -848,10 +1289,10 @@ __NOTOC__ :'''Program Code Markers''' -* [[Apostrophe|' Apostrophe]] ignores a line of code or program comment and MUST be used before a [[metacommand]]. Same as using [[REM]]. +* [[Apostrophe|' Apostrophe]] ignores a line of code or program comment and MUST be used before a [[Metacommand]]. Same as using [[REM]]. * [[Comma|, Comma]] is used to separate [[DATA]], [[SUB]] or [[FUNCTION]] parameter variables. * [[Colon|: Colon]]s can be used to separate two procedure statements on one code line. -* [[Dollar_Sign|$ Dollar sign]] prefix denotes a QBasic [[metacommand]]. +* [[Dollar_Sign|$ Dollar sign]] prefix denotes a QBasic [[Metacommand]]. * [[Parenthesis|( ) Parenthesis]] enclose a math or conditional procedure order, [[SUB]] or [[FUNCTION]] parameters or to pass by value. * [[+|+ Plus]] [[concatenation]] operator MUST be used to combine literal string values in a variable definition. * [[Quotation mark|" Quotation mark]] designates the ends of a literal [[STRING]] value. Use [[CHR$]](34) to insert quotes in a text [[STRING]]. @@ -904,11 +1345,11 @@ __NOTOC__ <center>'''WIKI Pages''' -[[Keyword Reference - Alphabetical#QB64 specific keywords:|QB64 specific keywords]] +[[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to QB64 specific keywords]] -[[Keyword Reference - Alphabetical#Original QBasic keywords:|Original QBasic keywords]] +[[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]] -[[Keyword Reference - By usage|Keywords by Usage]] +[[Keyword Reference - By usage|Go to keywords by Usage]] [[Main_Page#Appendix:|Main Page with Appendix and Tutorials]] @@ -917,11 +1358,21 @@ __NOTOC__ [[QB64 FAQ|Visit the QB64 FAQ]] -[https://www.qb64.org Visit the QB64 Main Site] +[http://qb64phoenix.com Visit the QB64 Main Site] -[https://www.qb64.org/forum/ Visit QB64 Community Forum] +[http://qb64phoenix.com/forum/index.php Visit QB64 Community Forum] -[http://discord.qb64.org Join our Discord server] + +'''Links to other QBasic Sites:''' + +[http://qbasicstation.com/index.php?c=p_member Member programs at QBasic Station] + +[http://www.network54.com/Index/10167 QBasic Forum at Network 54] + +[http://www.petesqbsite.com/forum/ Pete's QBasic Forum] + +[http://www.petesqbsite.com/downloads/downloads.shtml Pete's QBasic Downloads]</center> <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +< diff --git a/internal/help/Keyword_Reference_-_By_usage.txt b/internal/help/Keyword_Reference_-_By_usage.txt index 5b1b6ceae..52f3c073f 100644 --- a/internal/help/Keyword_Reference_-_By_usage.txt +++ b/internal/help/Keyword_Reference_-_By_usage.txt @@ -4,9 +4,9 @@ -[[QB64 FAQ|Frequently Asked Questions about QB64]] +[[QB64 FAQ|Go to Frequently Asked Questions about QB64]] -[[Keyword Reference - Alphabetical|Alphabetical keywords]] +[[Keyword Reference - Alphabetical|Go to Alphabetical keywords]] [[Keywords currently not supported by QB64]] @@ -23,9 +23,7 @@ * [[$DYNAMIC]] (metacommand) {{text|defines that all arrays are dynamic or changeable in size.}} * [[ERASE]] (array statement) {{text|clears a [[STATIC|static]] array of all values and totally removes a [[$DYNAMIC|dynamic]] array.}} * [[LBOUND]] (array function) {{text|returns the lowest valid index (lower boundary) of an [[arrays|array]].}} -* [[OPTION BASE]] (precompiler statement) {{text|sets the default starting index of an array to 0 or 1.}} -* [[OPTION _EXPLICIT]] (precompiler directive) {{text|instructs the compiler to require variable declaration with [[DIM]] or an equivalent statement.}} -* [[OPTION _EXPLICITARRAY]] (precompiler directive) {{text|instructs the compiler to require array declaration with [[DIM]] or an equivalent statement.}} +* [[OPTION BASE]] (statement) {{text|sets the default starting index of an array to 0 or 1.}} * [[REDIM]] (statement) {{text|re-dimensions the number of elements in a [[$DYNAMIC|dynamic]](resizeable) [[arrays|array]] and defines the type.}} * [[SHARED]] (statement) {{text|designates variable values that can be shared with sub-procedures without using parameters.}} * [[STATIC]] (statement) {{text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}} @@ -46,9 +44,6 @@ == [[COLOR|Colors]] and Transparency == -* [[$COLOR]] (Metacommand) {{text|adds named color constants in a program.}} - - * [[_ALPHA]] (function) {{text|returns the alpha channel transparency level of a color value used on a screen page or image.}} * [[_ALPHA32]] (function) {{text|function returns the alpha channel level of a 32 bit color value only.}} * [[_BACKGROUNDCOLOR]] (function) {{text|returns the current background color.}} @@ -144,9 +139,7 @@ * [[DOUBLE]] {# numerical [[TYPE|type]]) {{text|an 8 byte floating decimal variable type with numerical values up to 15 decimal places.}} * [[INTEGER]] {% numerical [[TYPE|type]]) {{text|a two byte variable type with values from -32768 to 32767. [[_UNSIGNED|Unsigned]] to 65535.}} * [[LONG]] {& numerical [[TYPE|type]]) {{text|Integer values can be from -2147483648 to 2147483647. [[_UNSIGNED]] values to 4294967295.}} -* [[OPTION BASE]] (precompiler statement) {{text|sets the default starting index of an [[arrays|array]] to 0 or 1.}} -* [[OPTION _EXPLICIT]] (precompiler directive) {{text|instructs the compiler to require variable declaration with [[DIM]] or an equivalent statement.}} -* [[OPTION _EXPLICITARRAY]] (precompiler directive) {{text|instructs the compiler to require array declaration with [[DIM]] or an equivalent statement.}} +* [[OPTION BASE]] (statement) {{text|sets the default starting index of an [[arrays|array]] to 0 or 1.}} * [[REDIM]] {{text|defines and sizes a [[$DYNAMIC|dynamic]](changeable) array and can define the type of value returned.}} * [[SHARED]] (statement) {{text|designates variable values that can be shared with sub-procedures without using [[SUB]] parameters.}} * [[SINGLE]] (! numerical [[TYPE|type]]) {{text|a 4 byte floating decimal variable type with numerical values up to 7 decimal places.}} @@ -186,9 +179,8 @@ * [[CHDIR]] (statement) {{text|changes the program path to a new path.}} * [[COMMAND$]] (function) {{text|returns command line parameters sent when a program is started.}} -* [[ENVIRON]] (statement) {{text|temporarily sets an environmental key/value pairs.}} +* [[ENVIRON]] (statement) {{text|temporarily sets an environmental key/pair value.}} * [[ENVIRON$]] (function) {{text|returns the environmental settings of the computer.}} -* [[_ENVIRONCOUNT]] (function) {{text|returns the number of key/value pairs currently exist in the environment table.}} * [[FILES]] (statement) {{text|displays a specified list of files.}} * [[MKDIR]] (statement) {{text|creates a new directory folder in the designated path.}} * [[NAME]] (statement) {{text|renames a file.}} @@ -261,7 +253,7 @@ The following table describes the error codes that are reported by the '''QB64'' |- | 33 || Duplicate label || Line numbers or labels cannot be used twice in a procedure. || none |- -| 35 || Subprogram not defined. || Often occurs when the QuickBASIC Library is not used with [[CALL ABSOLUTE]] or [[INTERRUPT]] or a [[SUB]] or [[FUNCTION]] procedure has not been created for a [[CALL]]. || none +| 35 || Subprogram not defined. || Often occurs when the Quickbasic Library is not used with [[CALL ABSOLUTE]] or [[INTERRUPT]] or a [[SUB]] or [[FUNCTION]] procedure has not been created for a [[CALL]]. || none |- | 37 || Argument-count mismatch || The number of sub-procedure [[parameters]] do not match the call. || none |- @@ -297,7 +289,7 @@ The following table describes the error codes that are reported by the '''QB64'' |- | 64 || Bad file name || File name contains illegal characters or exceeds 12 characters. || none |- -| 67 || Too many files || Over 15 files are open in QBasic. || none +| 67 || Too many files || Over 15 files are open in Qbasic. || none |- | 68 || Device unavailable. || Device does not exist, busy or not connected. || none |- @@ -334,17 +326,12 @@ The following table describes the error codes that are reported by the '''QB64'' <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> -== Error Trapping/Debugging == +== Error Trapping == -* [[_ASSERT]] (statement) {{text|performs debug tests.}} -* [[$ASSERTS]] ([[Metacommand]]) {{text|enables the [[_ASSERT]] macro.}} -* [[$CHECKING]] ([[Metacommand]]) {{text|turns off or on error event checking and strips error code from compiled programs.}} -* [[$DEBUG]] (precompiler [[metacommand]]) {{text|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.}} +* [[_ASSERT]] (statement) {{text|Performs debug tests.}} +* [[$ASSERTS]] (metacommand) {{text|Enables the [[_ASSERT]] macro}}* [[$CHECKING]] ([[Metacommand]]) {{text|turns off or on error event checking and strips error code from compiled programs.}} * [[_ERRORLINE]] (function) {{text|returns the actual text code line where a program error occurred.}} -* [[_INCLERRORFILE$]] (function) {{text|returns the name of the original source code $INCLUDE module that caused the most recent error.}} -* [[_INCLERRORLINE]] (function) {{text|returns the line number in an included file that caused the most recent error.}} -* [[_ERRORMESSAGE$]] (function) {{text|returns a human-readable message describing the most recent runtime error.}} * [[ERR]] (function) {{text|returns the error code number of the last error to occur.}} * [[ERROR]] (statement) {{text|simulates a program error based on the error code number used.}} * [[ERL]] (function) {{text|returns the closest line number before an error occurred if the program uses them.}} @@ -395,6 +382,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[CLOSE]] (statement) {{text|closes a specified file or all open files.}} * [[EOF]] (file function) {{text|returns -1 when the end of a file has been read.}} * [[FIELD]] (statement) {{text|creates a [[STRING]] type definition for a random-access file buffer.}} +* [[FILEATTR]] (function) {{text|can return a file's current file mode or DOS handle number.}} * [[FILES]] (statement) {{text|displays a specified list of files.}} * [[FREEFILE]] (file function) {{text|returns a file access number that is currently not in use.}} * [[GET]] (file I/O statement) {{text|reads file data by byte or record positions.}} @@ -536,7 +524,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_CONTROLCHR (function)]] {{text| returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.}} * [[_EXIT (function)]] {{text|prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}} * [[_KEYDOWN]] (function) {{text|returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.}} -* [[_KEYHIT]] (function) {{text|returns ASCII one and two byte, Virtual Key and Unicode keyboard key press codes.}} +* [[_KEYHIT]] (function) {{text|returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.}} * [[_SCREENPRINT]] (statement) {{text|simulates typing text into another OS program using the keyboard.}} @@ -565,7 +553,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[ALIAS]] (statement) {{text|tells the program that you will use a different name than the name used in the Library file.}} * [[BYVAL]] (statement) {{text|used to pass a parameter's value with sub-procedures from a Library.}} -* [[DECLARE LIBRARY]] {{text|allows the use of OS specific or C++ external library [[SUB]] and [[FUNCTION]] procedures}} +* [[DECLARE LIBRARY]] {{text|allows the use of OS specific, SDL or C++ external library [[SUB]] and [[FUNCTION]] procedures}} * [[DECLARE DYNAMIC LIBRARY]] {{text|declares DYNAMIC, CUSTOMTYPE or STATIC library(DLL) [[SUB]]s or [[FUNCTION]]s.}} * [[DECLARE LIBRARY| END DECLARE]] {{text|required at the END of the block of Library declarations in QB64.}} @@ -643,7 +631,6 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_MEMIMAGE]] (function) {{text|returns a [[_MEM]] block referring to a designated image handle's memory}} * [[_MEMNEW]] (function) {{text|allocates new memory with a designated SIZE and returns a [[_MEM]] block referring to it.}} * [[_MEMPUT]] (statement) {{text|places a designated value into a designated memory [[_OFFSET]]}} -* [[_MEMSOUND]] (function) {{text|returns a [[_MEM]] block referring to a designated sound handle's memory}} * [[_OFFSET (function)]] {{text|returns the memory offset of a variable when used with [[DECLARE LIBRARY]] or [[_MEM]] only.}} * [[_OFFSET]](%& numerical type) {{text|can be used store the value of an offset in memory when using [[DECLARE LIBRARY]] or [[_MEM]] only.}} @@ -663,28 +650,17 @@ The following table describes the error codes that are reported by the '''QB64'' == Metacommands == :Metacommands are commands that affect a program globally after they are in used. Error checking can be turned [[OFF]] or [[ON]]. -<center>'''QB64 [[Metacommand]]s DO NOT allow commenting or [[REM]]!'''</center> +<center>'''QB64 [[Metacommand]]s do NOT allow commenting or [[REM]]!'''</center> - -* [[$ASSERTS]] {{text|enables the [[_ASSERT]] macro.}} -* [[$CHECKING]] {{text|turns event and error checking ON and OFF. ON (default) can only be used after it is OFF.}} -* [[$COLOR]] {{text|includes named color constants in a program.}} +* [[$CHECKING]]:OFF/ON {{text|(QB64 only) turns event and error checking ON and OFF. ON (default) can only be used after it is OFF.}} * [[$CONSOLE]] {{text|creates a console window throughout the program.}} -* [[$ERROR]] {{text|used to trigger compiler errors.}} -* [[$EXEICON]] {{text|embeds a designated icon file into the compiled EXE file. (Windows ONLY)}} -* [[$IF]]...[[$ELSEIF]]...[[$ELSE]]...[[$END IF]] {{text|used to set an IF condition for the precompiler.}} -* [[$LET]] {{text|used to set a flag variable for the precompiler.}} -* [[$NOPREFIX]] {{text|allows all QB64 functions and statements to be used without the leading underscore (_).}} -* [[$RESIZE]] {{text|determines if a program window can be resized by the user.}} -* [[$SCREENHIDE]] {{text|hides the main program window throughout the program until [[$SCREENSHOW]] is used.}} +* [[$SCREENHIDE]] {{text|hides the program window throughout the program until [[$SCREENSHOW]] is used.}} * [[$SCREENSHOW]] {{text|displays the main program window throughout the program only after [[$SCREENHIDE]] or [[_SCREENHIDE]] has been used.}} -* [[$VERSIONINFO]] {{text|adds metadata to Windows only binaries for identification purposes across the OS.}} -* [[$VIRTUALKEYBOARD]] {{text|turns the virtual keyboard ON or OFF for use in touch-enabled devices. (DEPRECATED)}} -<center>'''QBasic [[Metacommand]]s DO require commenting or [[REM]] in QB64!'''</center> +<center>'''Qbasic [[Metacommand]]s do not require commenting or [[REM]] in QB64!'''</center> * '[[$DYNAMIC]] {{text|defines that all arrays are dynamic or changeable in size using [[DIM]] or [[REDIM]].}} -* '[[$INCLUDE]] {{text|includes a text library file with procedures to be used in a program. Comment both sides of file name also.}} +* '[[$INCLUDE]]: 'filename$' {{text|includes a text library file with procedures to be used in a program. Comment both sides of file name also.}} * '[[$STATIC]] {{text|defines that all arrays are static or unchangeable in size using [[DIM]].}} @@ -763,11 +739,14 @@ The following table describes the error codes that are reported by the '''QB64'' == Port Input and Output (COM and LPT) == +* [[COM(n)]] (statement) {{text|used in an OPEN COM statement to open "COM1" or "COM2".}} + * [[GET]] (file I/O statement) {{text|reads port data data by byte or record positions.}} * [[LOC]] (function) {{text|finds the current file location or size of a [[COM]] port receive buffer.}} +* [[ON COM(n)]] (event statement) {{text|branches to a line number or label when there is a value in the serial port specified.}} * [[OPEN COM]] (statement) {{text|opens a computer serial COMmunications port.}} * [[OUT]] (statement) {{text|sends values to register or port hardware addresses (emulated - limited access).}} @@ -923,7 +902,7 @@ The following table describes the error codes that are reported by the '''QB64'' == Sub procedures and Functions == -<center>'''QBasic and QB64'''</center> +<center>'''Qbasic and QB64'''</center> * [[CALL]] (statement) {{text|sends code execution to a [[SUB]] procedure in a program. Parameter brackets are required when used.}} * [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{text|used to access Interrupts on the computer or execute assembly type procedures.}} * [[CHAIN]] (statement) {{text|changes seamlessly from one program module to another.}} @@ -1013,7 +992,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_DISPLAY]] (statement) {{text|turns off automatic display while only displaying the screen changes when called.}} *[[_FREETIMER]] (function) {{text|returns a free TIMER number for multiple [[ON TIMER(n)]] events.}} * [[_KEYDOWN]] (function) {{text|returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.}} -* [[_KEYHIT]] (function) {{text|returns ASCII one and two byte, Virtual Key and Unicode keyboard key press codes.}} +* [[_KEYHIT]] (function) {{text|returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.}} * [[_LIMIT]] (statement) {{text|sets the loop repeat rate of a program to so many per second, relinquishing spare cpu cycles.}} @@ -1085,10 +1064,10 @@ The following table describes the error codes that are reported by the '''QB64'' :'''Program Code Markers''' -* [[Apostrophe|' Apostrophe]] denotes a program comment, to ignore a code line or a QBasic [[Metacommand]]. Same as using [[REM]]. +* [[Apostrophe|' Apostrophe]] denotes a program comment, to ignore a code line or a Qbasic [[Metacommand]]. Same as using [[REM]]. * [[Comma|, Comma]] is a statement variable or [[DATA]], [[SUB]] or [[FUNCTION]] parameter separator. * [[Colon|: Colon]]s can be used to separate two procedure statements on one code line. -* [[Dollar_Sign|$ Dollar sign]] prefix denotes a QBasic [[Metacommand]]. Only '''QB64''''s event [[$CHECKING]] should NOT be commented. +* [[Dollar_Sign|$ Dollar sign]] prefix denotes a Qbasic [[Metacommand]]. Only '''QB64''''s event [[$CHECKING]] should NOT be commented. * [[Parenthesis|( ) Parenthesis]] enclose a math or conditional procedure order, [[SUB]] or [[FUNCTION]] parameters or to pass by value. * [[+|+ Plus]] [[concatenation]] operator MUST be used to combine literal string values in a variable definition. * [[Quotation mark|" Quotation mark]] delimits the ends of a literal [[STRING]] value. Use [[CHR$]](34) to insert quotes in a text [[STRING]]. @@ -1141,11 +1120,11 @@ The following table describes the error codes that are reported by the '''QB64'' <center>'''WIKI Pages''' -[[Keyword Reference - Alphabetical#QB64 specific keywords:|QB64 specific keywords]] +[[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to QB64 specific keywords]] -[[Keyword Reference - Alphabetical#Original QBasic keywords:|Original QBasic keywords]] +[[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]] -[[Keyword Reference - Alphabetical|Alphabetical keywords]] +[[Keyword Reference - Alphabetical|Go to Alphabetical keywords]] [[Main_Page#Appendix:|Main Page with Appendix and Tutorials]] @@ -1154,9 +1133,10 @@ The following table describes the error codes that are reported by the '''QB64'' [[QB64 FAQ|Visit the QB64 FAQ]] -[http://www.qb64.org Visit the QB64 Main Site] +[http://qb64phoenix.com Visit the QB64 Main Site] -[http://www.qb64.org/forum Visit QB64 Community Forum] +[http://qb64phoenix.com/forum/index.php Visit QB64 Community Forum] <p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +< diff --git a/internal/help/LBOUND.txt b/internal/help/LBOUND.txt index 4a6a8e388..308208ecc 100644 --- a/internal/help/LBOUND.txt +++ b/internal/help/LBOUND.txt @@ -31,3 +31,4 @@ The [[LBOUND]] function returns the smallest valid index (lower bound) of an arr {{PageNavigation}} +< diff --git a/internal/help/LCASE$.txt b/internal/help/LCASE$.txt index 35a9416af..fa3ddbdae 100644 --- a/internal/help/LCASE$.txt +++ b/internal/help/LCASE$.txt @@ -1,4 +1,4 @@ -The [[LCASE$]] function returns an all-lowercase version of a [[STRING]]. +The [[LCASE$]] function outputs an all-lowercase version of a [[STRING]]. {{PageSyntax}} @@ -27,3 +27,4 @@ The [[LCASE$]] function returns an all-lowercase version of a [[STRING]]. {{PageNavigation}} +< diff --git a/internal/help/LEFT$.txt b/internal/help/LEFT$.txt index 5e1996508..c139ceea1 100644 --- a/internal/help/LEFT$.txt +++ b/internal/help/LEFT$.txt @@ -5,7 +5,7 @@ The [[LEFT$]] string function returns a number of characters from the left of a : [[LEFT$]]({{Parameter|stringValue$}}, {{Parameter|numberOfCharacters%}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|stringValue$}} can be any [[STRING]] literal or variable. * {{Parameter|numberOfCharacters%}} [[INTEGER]] determines the number of characters to return from left of string. @@ -67,3 +67,4 @@ This is your sentence to change your words.{{OutputEnd}} {{PageNavigation}} +< diff --git a/internal/help/LEN.txt b/internal/help/LEN.txt index 19d38c021..98beb77be 100644 --- a/internal/help/LEN.txt +++ b/internal/help/LEN.txt @@ -118,3 +118,4 @@ PRINT NumRecords%; "records" {{PageNavigation}} +< diff --git a/internal/help/LET.txt b/internal/help/LET.txt index 88913e4ea..36a4455dc 100644 --- a/internal/help/LET.txt +++ b/internal/help/LET.txt @@ -2,12 +2,13 @@ The [[LET]] is a useless statement designed by [[cavemen]] when they started pro {{PageSyntax}} -: ['''LET'''] {{Parameter|variable}} = {{Parameter|expression}} +: '''[LET]''' {{Parameter|variable}} = {{Parameter|expression}} {{PageDescription}} * {{InlineCode}}LET a = 12{{InlineCodeEnd}} is the same as {{InlineCode}}a = 12{{InlineCodeEnd}}, but wastes 4 extra bytes of program space. -* [[LET]] is '''optional''', it's the only keyword where the '''entire keyword''' is optional :-) + +''Notes:'' LET is '''optional''', it's the only keyword where the '''entire keyword''' is optional :-) {{PageSeeAlso}} @@ -16,3 +17,4 @@ The [[LET]] is a useless statement designed by [[cavemen]] when they started pro {{PageNavigation}} +< diff --git a/internal/help/LINE.txt b/internal/help/LINE.txt index 845047b79..e41110531 100644 --- a/internal/help/LINE.txt +++ b/internal/help/LINE.txt @@ -5,7 +5,7 @@ The [[LINE]] statement is used in graphic [[SCREEN (statement)|SCREEN]] modes to : [[LINE]] [STEP] ['''('''''column1''''',''' ''row1''''')''']'''-'''[STEP] '''('''''column2'', ''row2'''''),''' ''color''[, [{B|BF}], {{Parameter|style%}}] -{{PageParameters}} +{{Parameters}} * The [[STEP]] keyword make ''column'' and ''row'' coordinates relative to the previously coordinates set by any graphic statement. * The optional parameters (''column1'', ''row1'') set the line's starting point. * The dash and second coordinate parameters (''column2'', ''row2'') must be designated to complete the line or box. @@ -86,3 +86,4 @@ The [[LINE]] statement is used in graphic [[SCREEN (statement)|SCREEN]] modes to {{PageNavigation}} +< diff --git a/internal/help/LINE_INPUT.txt b/internal/help/LINE_INPUT.txt index cf27ca588..4838ceea3 100644 --- a/internal/help/LINE_INPUT.txt +++ b/internal/help/LINE_INPUT.txt @@ -6,14 +6,14 @@ The [[LINE INPUT]] statement requests a [[STRING]] keyboard entry from a program : [[LINE INPUT]] ; {{Parameter|stringVariable$}} -{{PageParameters}} +{{Parameters}} * A [[semicolon]] immediately after LINE INPUT stops the cursor after the entry and prevents screen roll on the lowest two screen rows. * ''text prompt or question'' is optional, but quotes are necessary unless just a semicolon is used before the {{Parameter|stringVariable$}}. * Requires only one [[STRING|string]] variable to hold the entire text entry. {{PageDescription}} -* Cannot use numerical [[Variable Types|type]] variables or [[comma]] separated variable lists for multiple entries. +* Cannot use numerical [[type]] variables or [[comma]] separated variable lists for multiple entries. * Allows [[comma]]s and [[quotation mark]]s in the user input, unlike [[INPUT]] where commas denote extra input values and quotes delimit strings. * The statement halts the program until an entry is made. Pressing Enter ends the entry and code execution resumes. * LINE INPUT does not trim off leading or trailing spaces in the string entry like [[INPUT]] string returns. @@ -50,3 +50,4 @@ n$ = {{Cl|UCASE$}}(name$) ' convert search name to upper case {{PageNavigation}} +< diff --git a/internal/help/LINE_INPUT_(file_statement).txt b/internal/help/LINE_INPUT_(file_statement).txt index a62e9400f..f8cd2ef9b 100644 --- a/internal/help/LINE_INPUT_(file_statement).txt +++ b/internal/help/LINE_INPUT_(file_statement).txt @@ -5,7 +5,7 @@ The '''LINE INPUT #''' file statement reads an entire line from a text file into : '''LINE INPUT''' '''#'''{{Parameter|fileNumber&}}''',''' ''stringVariable$'' -{{PageParameters}} +{{Parameters}} * {{Parameter|fileNumber&}} is the [[INTEGER]] number of the file previously opened with the [[OPEN]] statement. * {{Parameter|stringVariable$}} holds the text line read from the file. @@ -52,3 +52,4 @@ The '''LINE INPUT #''' file statement reads an entire line from a text file into {{PageNavigation}} +< diff --git a/internal/help/LOC.txt b/internal/help/LOC.txt index 3c856dec2..9b4e962a8 100644 --- a/internal/help/LOC.txt +++ b/internal/help/LOC.txt @@ -32,3 +32,4 @@ The [[LOC]] function returns the status of a serial (COM) port received buffer o * [[SEEK]] {{PageNavigation}} +< diff --git a/internal/help/LOCATE.txt b/internal/help/LOCATE.txt index 49022c6ec..07462db06 100644 --- a/internal/help/LOCATE.txt +++ b/internal/help/LOCATE.txt @@ -5,7 +5,7 @@ The [[LOCATE]] statement locates the screen text row and column positions for a : [[LOCATE]] [{{Parameter|row%}}][, {{Parameter|column%}}] [, {{Parameter|cursor%}}][, {{Parameter|cursorStart%}}, {{Parameter|cursorStop%}}] -{{PageParameters}} +{{Parameters}} * optional text {{Parameter|row%}} [[INTEGER]] values are from 1 to 25, 43 or 50 in [[SCREEN]] 0 and 25 in most other legacy graphic screen modes, except screens 11 and 12 which can have 30 or 60 rows. * optional {{Parameter|column%}} [[INTEGER]] values are from 1 to 40 or 80 in [[SCREEN]] 0 and 80 in all other legacy screen modes. * optional {{Parameter|cursor%}} value can be 0 to turn displaying the cursor off or 1 to turn it on. @@ -21,7 +21,6 @@ The [[LOCATE]] statement locates the screen text row and column positions for a * When [[PRINT]]ing on the bottom 2 ''rows'', use a [[semicolon]] after the PRINT expression to avoid a screen roll. * If the {{Parameter|cursorStart%}} line is given, the {{Parameter|cursorStop%}} line must also be given. A wider range between them produces a taller cursor. * If you use LOCATE beyond the current number of rows in text mode, QB64 will try to adapt the screen instead of tossing an error. -* When writing to the console, only the ''row'' and ''column'' arguments are used, all others are ignored. Furthermore, on non-Windows systems LOCATE statements that do not give both a ''row'' and ''column'' will be ignored entirely. {{PageExamples}} @@ -54,3 +53,4 @@ LOOP '' '' {{PageNavigation}} +< diff --git a/internal/help/LOCK.txt b/internal/help/LOCK.txt index d2b112c1b..0c0a494b7 100644 --- a/internal/help/LOCK.txt +++ b/internal/help/LOCK.txt @@ -18,7 +18,7 @@ The [[LOCK]] statement restricts access to parts of a file by other programs or * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword not supported in Linux or macOS versions]] -{{PageQBasic}} +==QBasic/QuickBasic== * Required DOS '''SHARED.EXE''' to be run for QBasic to use networking access modes. No longer required. @@ -29,3 +29,4 @@ The [[LOCK]] statement restricts access to parts of a file by other programs or {{PageNavigation}} +< diff --git a/internal/help/LOF.txt b/internal/help/LOF.txt index dbf0831e3..b7d36f87d 100644 --- a/internal/help/LOF.txt +++ b/internal/help/LOF.txt @@ -28,3 +28,4 @@ The [[LOF]] function is used to find the length of an [[OPEN]] file in bytes. {{PageNavigation}} +< diff --git a/internal/help/LOG.txt b/internal/help/LOG.txt index 45a2609d8..4a33f6ed6 100644 --- a/internal/help/LOG.txt +++ b/internal/help/LOG.txt @@ -15,9 +15,9 @@ The [[LOG]] math function returns the natural logarithm of a specified numerical {{PageExamples}} ''Example 1:'' [[FUNCTION]] to find the base ten logarithm of a numerical value. {{CodeStart}} -{{Cl|FUNCTION}} Log10#(value {{Cl|AS}} {{Cl|DOUBLE}}) {{Cl|STATIC}} - Log10# = {{Cl|LOG}}(value) / LOG(10.#) -{{Cl|END FUNCTION}} '' '' + FUNCTION Log10#(value AS DOUBLE) {{Cl|STATIC}} + Log10# = LOG(value) / LOG(10.#) + END FUNCTION '' '' {{CodeEnd}} :''Explanation:'' The natural logarithm of the value is divided by the base 10 logarithm. The LOG of ten is designated as a DOUBLE precision return by using # after the Log10 value. The return tells you the number of times 10 goes into a value. @@ -25,13 +25,13 @@ The [[LOG]] math function returns the natural logarithm of a specified numerical ''Example 2:'' A binary FUNCTION to convert [[INTEGER]] values using LOG to find the number of digits the return will be. {{CodeStart}} '' '' -{{Cl|FUNCTION}} BIN$ (n&) - {{Cl|IF}} n& < 0 {{Cl|THEN}} {{Cl|EXIT FUNCTION}} 'positive numbers only! negative error! - {{Cl|FOR}} p% = 0 {{Cl|TO}} {{Cl|INT}}({{Cl|LOG}}(n& + .1) / {{Cl|LOG}}(2)) 'added +.1 to get 0 to work - {{Cl|IF}} n& {{Cl|AND}} 2 ^ p% {{Cl|THEN}} s$ = "1" + s$ {{Cl|ELSE}} s$ = "0" + s$ 'find bits on - {{Cl|NEXT}} p% - {{Cl|IF}} s$ = "" {{Cl|THEN}} BIN$ = "&B0" {{Cl|ELSE}} BIN$ = "&B" + s$ 'check for zero return '' '' -{{Cl|END FUNCTION}} +FUNCTION BIN$ (n&) + IF n& < 0 THEN EXIT FUNCTION 'positive numbers only! negative error! + FOR p% = 0 TO INT({{Cl|LOG}}(n& + .1) / {{Cl|LOG}}(2)) ' added +.1 to get 0 to work + IF n& {{Cl|AND}} 2 ^ p% THEN s$ = "1" + s$ ELSE s$ = "0" + s$ 'find bits on + NEXT p% + IF s$ = "" THEN BIN$ = "&B0" ELSE BIN$ = "&B" + s$ 'check for zero return '' '' +END FUNCTION {{CodeEnd}} : ''Explanation:'' The LOG of a '''positive''' [[INTEGER]] value is divided by the LOG of 2 to determine the number of binary digits that will be returned. The FOR loop compares the value with the exponents of two and determines if a bit is ON or OFF as "1" or "0". @@ -39,6 +39,8 @@ The [[LOG]] math function returns the natural logarithm of a specified numerical {{PageSeeAlso}} *[[EXP]], [[&B]] (binary number) +*[[Mathematical Operations#Derived Mathematical Functions|Derived Trigonometric Functions]] {{PageNavigation}} +< diff --git a/internal/help/LONG.txt b/internal/help/LONG.txt index 9821d8d17..e3b4e9b50 100644 --- a/internal/help/LONG.txt +++ b/internal/help/LONG.txt @@ -27,3 +27,4 @@ {{PageNavigation}} +< diff --git a/internal/help/LPOS.txt b/internal/help/LPOS.txt index 9fffa9022..55cdf464c 100644 --- a/internal/help/LPOS.txt +++ b/internal/help/LPOS.txt @@ -44,3 +44,4 @@ The [[LPOS]] function returns the current LPT printer head position. {{PageNavigation}} +< diff --git a/internal/help/LPRINT.txt b/internal/help/LPRINT.txt index a19d70764..2358c5697 100644 --- a/internal/help/LPRINT.txt +++ b/internal/help/LPRINT.txt @@ -13,7 +13,6 @@ The [[LPRINT]] statement sends string text or numerical values to a parallel por * [[LPRINT USING]] can print formatted text data to a page identically to how [[PRINT USING]] formats a program screen. * [[COLOR]]ed text and images can be printed using [[_PRINTIMAGE]] which stretches them to fit the default printer's paper size. * LPRINT will only print to the default USB or LPT printer set up in Windows. '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]''' -** To print in Linux, see [[Connecting to printer via TCP/IP]]. * Note: Printer ''escape codes'' starting with [[CHR$]](27) will not work with LPRINT and may produce text printing errors. @@ -25,3 +24,4 @@ The [[LPRINT]] statement sends string text or numerical values to a parallel por {{PageNavigation}} +< diff --git a/internal/help/LPRINT_USING.txt b/internal/help/LPRINT_USING.txt index 421275f34..e1bedf160 100644 --- a/internal/help/LPRINT_USING.txt +++ b/internal/help/LPRINT_USING.txt @@ -5,10 +5,10 @@ The [[LPRINT USING]] statement sends formatted data to LPT1, the parallel port p : '''LPRINT''' [''text$''{;|,}] '''USING''' {{Parameter|template$}}; {{Parameter|variable}}[; ...][{;|,}] -{{PageParameters}} +{{Parameters}} * Literal or variable [[STRING]] ''text$'' can be placed between [[LPRINT]] and USING or it can be included in the {{Parameter|template$}}. * A [[semicolon]] or [[comma]] may follow the {{Parameter|text$}} to stop or tab the print cursor before the {{Parameter|template$}} [[LPRINT]]. -* The literal or variable [[STRING]] {{Parameter|template$}} should use the template symbols to display each variable [[Variable Types|type]] in the list following it. +* The literal or variable [[STRING]] {{Parameter|template$}} should use the template symbols to display each variable [[type]] in the list following it. * The list of data ''variables'' used in the {{Parameter|template$}} are '''separated by semicolons''' after the template string value. * A [[semicolon]] or [[comma]] may follow the variable list to stop or tab the print cursor for pending prints. @@ -31,3 +31,4 @@ The [[LPRINT USING]] statement sends formatted data to LPT1, the parallel port p {{PageNavigation}} +< diff --git a/internal/help/LSET.txt b/internal/help/LSET.txt index 2cc4f1e1e..67decfe6b 100644 --- a/internal/help/LSET.txt +++ b/internal/help/LSET.txt @@ -60,3 +60,4 @@ you.head: ACHES {{PageNavigation}} +< diff --git a/internal/help/LTRIM$.txt b/internal/help/LTRIM$.txt index d22833b4b..acb61da9b 100644 --- a/internal/help/LTRIM$.txt +++ b/internal/help/LTRIM$.txt @@ -54,3 +54,4 @@ TRIM$ = {{Cl|LTRIM$}}({{Cl|RTRIM$}}(text$)) {{PageNavigation}} +< diff --git a/internal/help/Less_Than.txt b/internal/help/Less_Than.txt index 2cfb3b63a..bea93c27e 100644 --- a/internal/help/Less_Than.txt +++ b/internal/help/Less_Than.txt @@ -17,3 +17,4 @@ The '''<''' condition symbol denotes that a value must be less than another v {{PageNavigation}} +< diff --git a/internal/help/Less_Than_Or_Equal.txt b/internal/help/Less_Than_Or_Equal.txt index a18edec24..2a16da0bf 100644 --- a/internal/help/Less_Than_Or_Equal.txt +++ b/internal/help/Less_Than_Or_Equal.txt @@ -13,3 +13,4 @@ The '''<=''' condition symbol denotes that a value must be less than or equal {{PageNavigation}} +< diff --git a/internal/help/MID$.txt b/internal/help/MID$.txt index 017e5b1a7..2e09008fb 100644 --- a/internal/help/MID$.txt +++ b/internal/help/MID$.txt @@ -5,7 +5,7 @@ The [[MID$]] function returns a portion of a [[STRING|string]]. : {{Parameter|portion$}} = [[MID$]]({{Parameter|stringValue$}}, {{Parameter|startPosition%}}[, {{Parameter|bytes%}}]) -{{PageParameters}} +{{Parameters}} * {{Parameter|stringValue$}} can be any literal or variable non-empty [[STRING]] value. Use [[LEN]] to check the length of a string. * {{Parameter|startPosition%}} designates the non-zero position of the first character to be returned by the function. * {{Parameter|bytes%}} (optional) tells the function how many characters to return including the first character at {{Parameter|startPosition%}}. @@ -18,7 +18,7 @@ The [[MID$]] function returns a portion of a [[STRING|string]]. * In '''QB64''', [[ASC]] string byte position reads are about '''5 times faster''' than MID$ when parsing strings. See ''Example 2'' below. -{{PageQBasic}} +==QBasic/QuickBASIC== * In QBasic the {{Parameter|startPosition%}} could not be zero (0) or an [[ERROR Codes|Illegal function call error]] would occur. @@ -107,3 +107,4 @@ t5# = {{Cl|TIMER}} {{PageNavigation}} +< diff --git a/internal/help/MID$_(statement).txt b/internal/help/MID$_(statement).txt index 06641c0c4..616ba2fe2 100644 --- a/internal/help/MID$_(statement).txt +++ b/internal/help/MID$_(statement).txt @@ -18,17 +18,17 @@ The [[MID$]] statement substitutes one or more new characters for existing chara ''Example:'' Using [[INSTR]] to locate the string positions and a [[MID$ (statement)|MID$]] statement to change the words. {{CodeStart}} -text$ = "The cats and dogs were playing, even though dogs don't like cats." -{{Cl|PRINT}} text$ -start% = 1 ' start cannot be 0 when used in the INSTR function! -{{Cl|DO...LOOP|DO}} - position% = {{Cl|INSTR}}(start%, text$, "dog") - {{Cl|IF}} position% {{Cl|THEN}} ' when position is a value greater than 0 - {{Cl|MID$}}(text$, position%, 3) = "rat" ' change "dog" to "rat" when found - start% = position% + 1 ' advance one position to search rest of string - {{Cl|END IF}} -{{Cl|LOOP}} {{Cl|UNTIL}} position% = 0 ' no other matches found -{{Cl|PRINT}} text$ '' '' + text$ = "The cats and dogs were playing, even though dogs don't like cats." + PRINT text$ + start% = 1 ' start cannot be 0 when used in the INSTR function! + {{Cl|DO...LOOP|DO}} + position% = {{Cl|INSTR}}(start%, text$, "dog") + IF position% THEN ' when position is a value greater than 0 + {{Cl|MID$}}(text$, position%, 3) = "rat" ' changes "dog" to "rat" when found + start% = position% + 1 ' advance one position to search rest of string + END IF + LOOP UNTIL position% = 0 ' no other matches found + PRINT text$ '' '' {{CodeEnd}} {{OutputStart}} The cats and dogs were playing, even though dogs don't like cats. @@ -44,3 +44,4 @@ The cats and rats were playing, even though rats don't like cats. {{PageNavigation}} +< diff --git a/internal/help/MKD$.txt b/internal/help/MKD$.txt index c4429ec82..38de7f457 100644 --- a/internal/help/MKD$.txt +++ b/internal/help/MKD$.txt @@ -18,3 +18,4 @@ The [[MKD$]] function encodes a [[DOUBLE]] numerical value into an 8-byte [[ASCI * [[_MK$]], [[_CV]] {{PageNavigation}} +< diff --git a/internal/help/MKDIR.txt b/internal/help/MKDIR.txt index cfdb2745a..6c76897e9 100644 --- a/internal/help/MKDIR.txt +++ b/internal/help/MKDIR.txt @@ -22,3 +22,4 @@ The [[MKDIR]] statement creates a new folder ('''dir'''ectory) at a specified pa {{PageNavigation}} +< diff --git a/internal/help/MKDMBF$.txt b/internal/help/MKDMBF$.txt index e3ba0023c..79b7a0497 100644 --- a/internal/help/MKDMBF$.txt +++ b/internal/help/MKDMBF$.txt @@ -16,3 +16,4 @@ The [[MKDMBF$]] function encodes a double-precision IEEE number to a string valu {{PageNavigation}} +< diff --git a/internal/help/MKI$.txt b/internal/help/MKI$.txt index 5a0faed42..d5372b975 100644 --- a/internal/help/MKI$.txt +++ b/internal/help/MKI$.txt @@ -44,3 +44,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/MKL$.txt b/internal/help/MKL$.txt index 1b41aa9f5..dbf1dbf69 100644 --- a/internal/help/MKL$.txt +++ b/internal/help/MKL$.txt @@ -27,3 +27,4 @@ See examples in: {{PageNavigation}} +< diff --git a/internal/help/MKS$.txt b/internal/help/MKS$.txt index f365e91d4..78af02e0d 100644 --- a/internal/help/MKS$.txt +++ b/internal/help/MKS$.txt @@ -19,3 +19,4 @@ The [[MKS$]] function encodes a [[SINGLE]] numerical value into a 4-byte [[ASCII {{PageNavigation}} +< diff --git a/internal/help/MKSMBF$.txt b/internal/help/MKSMBF$.txt index 755cdadad..9647f342e 100644 --- a/internal/help/MKSMBF$.txt +++ b/internal/help/MKSMBF$.txt @@ -16,3 +16,4 @@ The [[MKSMBF$]] function encodes a single-precision IEEE number to a string valu {{PageNavigation}} +< diff --git a/internal/help/MOD.txt b/internal/help/MOD.txt index fda1996e2..d9b29118d 100644 --- a/internal/help/MOD.txt +++ b/internal/help/MOD.txt @@ -2,10 +2,10 @@ The [[MOD]] operator gives the remainder after division of one number by another {{PageSyntax}} -:{{Parameter|remainder}} = {{Parameter|numerator}} [[MOD]] {{Parameter|divisor}} +: {{Parameter|remainder}} = {{Parameter|numerator}} [[MOD]] {{Parameter|divisor}} -{{PageParameters}} +{{Parameters}} * Returns the integer division remainder as a whole [[INTEGER]], [[LONG]] or [[_INTEGER64]] value. * {{Parameter|numerator}} is the [[INTEGER]] value to divide. * {{Parameter|divisor}} is the [[INTEGER]] value to divide by. @@ -24,7 +24,7 @@ The [[MOD]] operator gives the remainder after division of one number by another {{CodeStart}} I% = 100 {{Cl|\}} 9 R% = 100 {{Cl|MOD}} 9 - {{Cl|PRINT}} "Integer division ="; I%, "Remainder ="; R% + PRINT "Integer division ="; I%, "Remainder ="; R% {{CodeEnd}} {{OutputStart}} Integer division = 11 Remainder = 1 '' '' @@ -38,27 +38,27 @@ The [[MOD]] operator gives the remainder after division of one number by another tmp1$ = " Normal: ####.# / #### = ##.### " tmp2$ = " Integer: ####.# \ #### = ### " tmp3$ = " Remainder: ####.# MOD #### = #### " -{{Cl|FOR}} i = 1 {{Cl|TO}} 6 - {{Cl|SELECT CASE}} i - {{Cl|CASE}} 1: numerator = 1: divisor = 5 - {{Cl|CASE}} 2: numerator = 13: divisor = 10 - {{Cl|CASE}} 3: numerator = 990: divisor = 100 - {{Cl|CASE}} 4: numerator = 1100: divisor = 100 - {{Cl|CASE}} 5: numerator = 4501: divisor = 1000 - {{Cl|CASE}} 6: numerator = 50.6: divisor = 10 - {{Cl|END SELECT}} -{{Cl|LOCATE}} 5, 20: {{Cl|PRINT USING}} tmp1$; numerator; divisor; numerator / divisor -{{Cl|LOCATE}} 7, 20: {{Cl|PRINT USING}} tmp2$; numerator; divisor; numerator \ divisor -{{Cl|LOCATE}} 9, 20: {{Cl|PRINT USING}} tmp3$; numerator; divisor; numerator {{Cl|MOD}} divisor -{{Cl|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" -{{Cl|NEXT}} '' '' +FOR i = 1 TO 6 + SELECT CASE i + CASE 1: numerator = 1: divisor = 5 + CASE 2: numerator = 13: divisor = 10 + CASE 3: numerator = 990: divisor = 100 + CASE 4: numerator = 1100: divisor = 100 + CASE 5: numerator = 4501: divisor = 1000 + CASE 6: numerator = 50.6: divisor = 10 + END SELECT +LOCATE 5, 20: PRINT USING tmp1$; numerator; divisor; numerator / divisor +LOCATE 7, 20: PRINT USING tmp2$; numerator; divisor; numerator \ divisor +LOCATE 9, 20: PRINT USING tmp3$; numerator; divisor; numerator MOD divisor +DO: SLEEP: LOOP UNTIL INKEY$ <> "" +NEXT '' '' {{CodeEnd}} ''Example 3:'' Integer division and MOD can be used to convert values to different base numbering systems from base 2 to 36 as [[STRING|strings]]: {{CodeStart}} '' '' {{Cl|CLS}} -{{Cl|DO}} +DO {{Cl|INPUT}} "Enter a base number system 2 to 36: ", b% {{Cl|IF...THEN|IF}} b% < 2 {{Cl|OR (boolean)|OR}} b% > 36 {{Cl|THEN}} {{Cl|EXIT DO}} {{Cl|PRINT}} "Enter a positive value to convert: "; @@ -78,7 +78,7 @@ tmp3$ = " Remainder: ####.# MOD #### = #### " {{Cl|FUNCTION}} BASEN$ (number&, basenum%) {{Cl|IF...THEN|IF}} basenum% < 2 {{Cl|OR (boolean)|OR}} basenum% > 36 {{Cl|OR (boolean)|OR}} number& = 0 {{Cl|THEN}} {{Cl|EXIT FUNCTION}} num& = number& 'protect value of number! -{{Cl|DO}} +DO remain% = {{Cl|ABS}}(num&) {{Cl|MOD}} basenum% ' remainder is used to create actual digit 0 to Z num& = num& \ basenum% ' move up one exponent of base% with integer division {{Cl|IF...THEN|IF}} remain% > 9 {{Cl|THEN}} @@ -101,3 +101,4 @@ BASEN$ = BN$ {{PageNavigation}} +< diff --git a/internal/help/Mathematical_Operations.txt b/internal/help/Mathematical_Operations.txt index b8911bc8d..14cfeaf77 100644 --- a/internal/help/Mathematical_Operations.txt +++ b/internal/help/Mathematical_Operations.txt @@ -3,7 +3,7 @@ |} ==Basic and QB64 Numerical Types== -<center>'''QBasic Number Types'''</center> +<center>'''Qbasic Number Types'''</center> * [[INTEGER]] ['''%''']: 2 Byte signed whole number values from -32768 to 32767. 0 to 65535 unsigned. (not checked in QB64) * [[LONG]] ['''&''']: 4 byte signed whole number values from -2147483648 to 2147483647. 0 to 4294967295 unsigned. @@ -18,7 +18,7 @@ * [[_BYTE]] ['''%%''']: 1 byte signed whole number values from -128 to 127. Unsigned values from 0 to 255. * [[_INTEGER64]] ['''&&''']: 8 byte signed whole number values from -9223372036854775808 to 9223372036854775807 * [[_FLOAT]] [##]: currently set as 10 byte signed floating decimal point values up to 1.1897E+4932. '''Cannot be unsigned.''' -* [[_OFFSET]] [%&]: undefined flexible length integer offset values used in [[DECLARE DYNAMIC LIBRARY]] declarations. +* [[_OFFSET]] [%&]: undefined flexable length integer offset values used in [[DECLARE DYNAMIC LIBRARY]] declarations. <center>'''Signed and Unsigned Integer Values'''</center> @@ -36,32 +36,38 @@ Negative (signed) numerical values can affect calculations when using any of the <center>[[#toc|Return to Top]]</center> ==Mathematical Operation Symbols== -Most of the BASIC math operators are ones that require no introduction. The addition, subtraction, multiplication and division operators are ones commonly used as shown below: +Most of the BASIC math operators are ones that require no introduction. The addition, subtraction, multplication and division operators are ones commonly used as shown below: -{| class="wikitable" -! Symbol !! Procedure Type !! Example Usage !! Operation Order +{| align="center" border=1 +! Symbol +! Procedure Type +! Example Usage +! Operation Order |- -| [[+]] || Addition || c = a + b || Last +| align="center" |[[+]] || Addition || align="center" | c = a + b || align="center" | Last |- -| [[-]] || Subtraction || c = a - b || Last +| align="center" |[[-]] || Subtraction || align="center" | c = a - b || align="center" | Last |- -| [[-]] || Negation || c = -a || Last +| align="center" |[[-]] || Negation || align="center" | c = - a || align="center" | Last |- -| [[*]] || Multiplication || c = a * b || Second +| align="center" |[[*]] || Multiplication || align="center" | c = a * b || align="center" | Second |- -| [[/]] || Division || c = a / b || Second +| align="center" |[[/]] || Division || align="center" | c = a / b || align="center" | Second |} BASIC can also use two other operators for '''[[INTEGER]] division'''. Integer division returns only whole number values. [[MOD]] '''remainder division''' returns a value only if an integer division cannot divide a number exactly. Returns 0 if a value is exactly divisible. -{| class="wikitable" -! Symbol !!Procedure Type !!Example Usage !!Operation Order +{| align="center" border=1 +!Symbol +!Procedure Type +!Example Usage +!Operation Order |- -| [[\]] || Integer division || c = a \ b || Second +| align="center" |[[\]] || Integer division || align="center" | c = a \ b || align="center" | Second |- -| [[MOD]] || Remainder division || c = a MOD b || Second +| align="center" |[[MOD]] || Remainder division || align="center" | c = a MOD b || align="center" | Second |} @@ -71,12 +77,15 @@ BASIC can also use two other operators for '''[[INTEGER]] division'''. Integer d There is also an operator for '''exponential''' calculations. The exponential operator is used to raise a number's value to a designated exponent of itself. In QB the exponential return values are [[DOUBLE]] values. The [[SQR]] function can return a number's Square Root. For other '''exponential roots''' the operator can be used with fractions such as (1 / 3) designating the cube root of a number. -{| class="wikitable" -! Symbol !!Procedure !!Example Usage !!Operation Order +{| align="center" border=1 +!Symbol +!Procedure +!Example Usage +!Operation Order |- -| [[^]] || Exponent || c = a ^ (1 / 2) || First +| align="center" |[[^]] || Exponent || align="center" | c = a [[^]] (1 / 2) || align="center" | First |- -| [[SQR]] || Square Root || c = SQR(a ^ 2 + b ^ 2) || First +| align="center" | [[SQR]] || Square Root || align="center" | c = [[SQR]](a [[^]] 2 + b [[^]] 2) || align="center" | First |} @@ -104,52 +113,50 @@ Sometimes a calculation may need BASIC to do them in another order or the calcul ==Basic's Mathematical Functions== -{| class="wikitable" -! Function !! Description -|- -| [[ABS]](n) || returns the absolute (positive) value of n: ABS(-5) = 5 -|- -| [[ATN]](angle*) || returns the arctangent of an angle in radians: pi = 4 * ATN(1) -|- -| [[COS]](angle*) || returns the cosine of an angle in radians. (horizontal component) -|- -| [[EXP]](n) || returns e ^ x, (n <= 88.02969): e = EXP(1) ' (e = 2.718281828459045) -|- -| [[LOG]](n) || returns the base e natural logarithm of n. (n > 0) -|- -| [[SGN]](n) || returns -1 if n < 0, 0 if n = 0, 1 if n > 0: SGN(-5) = -1 -|- -| [[SIN]](angle*) || returns the sine of an angle in radians. (vertical component) -|- -| [[SQR]](n) || returns the square root of a number. (n >= 0) -|- -| [[TAN]](angle*) || returns the tangent of an angle in radians -|} +{| align=center border=1 + ! Function + ! Description + |- + | [[ABS]](n) || returns the absolute (positive) value of n: ABS(-5) = 5 + |- + | [[ATN]](angle*) || returns the arctangent of an angle in radians: π = 4 * ATN(1) + |- + | [[COS]](angle*) || returns the cosine of an angle in radians. (horizontal component) + |- + | [[EXP]](n) || returns e<sup>x</sup>, '''(n <= 88.02969)''': e = EXP(1) ' (e = 2.718281828459045) + |- + | [[LOG]](n) || returns the base e natural logarithm of n. '''(n > 0)''' + |- + | [[SGN]](n) || returns -1 if n < 0, 0 if n = 0, 1 if n > 0: SGN(-5) = -1 + |- + | [[SIN]](angle*) || returns the sine of an angle in radians. (vertical component) + |- + | [[SQR]](n) || returns the square root of a number. '''(n >= 0)''' + |- + | [[TAN]](angle*) || returns the tangent of an angle in radians + |} <center> '''* angles measured in radians'''</center> -''Example:'' Degree to Radian Conversion. -{{CodeStart}} '' '' -{{Cl|FUNCTION}} Radian (degrees) - Radian = degrees * (4 * {{Cl|ATN}}(1)) / 180 -{{Cl|END FUNCTION}} '' '' +{{TextStart}} '''Degree to Radian Conversion:''' +FUNCTION Radian (degrees) +Radian = degrees * (4 * {{Cb|ATN}}(1)) / 180 +END FUNCTION '' '' -{{Cl|FUNCTION}} Degree (radians) - Degree = radians * 180 / (4 * {{Cl|ATN}}(1)) -{{Cl|END FUNCTION}} '' '' -{{CodeEnd}} +FUNCTION Degree (radians) +Degree = radians * 180 / (4 * {{Cb|ATN}}(1)) +END FUNCTION -''Example:'' Logarithm to base n. -{{CodeStart}} '' '' -{{Cl|FUNCTION}} LOGN (X, n) - {{Cl|IF}} n > 0 {{Cl|AND}} n <> 1 {{Cl|AND}} X > 0 {{Cl|THEN}} LOGN = {{Cl|LOG}}(X) / {{Cl|LOG}}(n) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' + '''Logarithm to base n''' +FUNCTION LOGN (X, n) +IF n > 0 AND n <> 1 AND X > 0 THEN LOGN = {{Cb|LOG}}(X) / {{Cb|LOG}}(n) ELSE BEEP +END FUNCTION '' '' -{{Cl|FUNCTION}} LOG10 (X) 'base 10 logarithm - {{Cl|IF}} X > 0 {{Cl|THEN}} LOG10 = {{Cl|LOG}}(X) / {{Cl|LOG}}(10) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' -{{CodeEnd}} +FUNCTION LOG10 (X) 'base 10 logarithm +IF X > 0 THEN LOG10 = {{Cb|LOG}}(X) / {{Cb|LOG}}(10) ELSE BEEP +END FUNCTION '' '' +{{TextEnd}} <center>'''The numerical value of n in the [[LOG]](n) evaluation must be a positive value.'''</center> @@ -167,107 +174,102 @@ Sometimes a calculation may need BASIC to do them in another order or the calcul The following Trigonometric functions can be derived from the '''BASIC Mathematical Functions''' listed above. Each function checks that certain values can be used without error or a [[BEEP]] will notify the user that a value could not be returned. An error handling routine can be substituted if desired. '''Note:''' Functions requiring '''π''' use 4 * [[ATN]](1) for [[SINGLE]] accuracy. Use [[ATN]](1.#) for [[DOUBLE]] accuracy. -{{CodeStart}}'' '' -{{Cl|FUNCTION}} SEC (x) 'Secant - {{Cl|IF}} COS(x) <> 0 {{Cl|THEN}} SEC = 1 / {{Cl|COS}}(x) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +{{TextStart}}'' '' +FUNCTION SEC (x) 'Secant +IF COS(x) <> 0 THEN SEC = 1 / {{Cb|COS}}(x) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} CSC (x) 'CoSecant - {{Cl|IF}} SIN(x) <> 0 {{Cl|THEN}} CSC = 1 / {{Cl|SIN}}(x) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION CSC (x) 'CoSecant +IF SIN(x) <> 0 THEN CSC = 1 / {{Cb|SIN}}(x) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} COT (x) 'CoTangent - {{Cl|IF}} TAN(x) <> 0 {{Cl|THEN}} COT = 1 / {{Cl|TAN}}(x) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION COT (x) 'CoTangent +IF TAN(x) <> 0 THEN COT = 1 / {{Cb|TAN}}(x) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} ARCSIN (x) 'Inverse Sine - {{Cl|IF}} x < 1 {{Cl|THEN}} ARCSIN = {{Cl|ATN}}(x / {{Cl|SQR}}(1 - (x * x))) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION ARCSIN (x) 'Inverse Sine +IF x < 1 THEN ARCSIN = {{Cb|ATN}}(x / {{Cb|SQR}}(1 - (x * x))) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} ARCCOS (x) ' Inverse Cosine - {{Cl|IF}} x < 1 {{Cl|THEN}} ARCCOS = (2 * {{Cl|ATN}}(1)) - {{Cl|ATN}}(x / {{Cl|SQR}}(1 - x * x)) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION ARCCOS (x) ' Inverse Cosine +IF x < 1 THEN ARCCOS = (2 * ATN(1)) - {{Cb|ATN}}(x / {{Cb|SQR}}(1 - x * x)) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} ARCSEC (x) ' Inverse Secant - {{Cl|IF}} x < 1 {{Cl|THEN}} ARCSEC = {{Cl|ATN}}(x / {{Cl|SQR}}(1 - x * x)) + ({{Cl|SGN}}(x) - 1) * (2 * ATN(1)) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION ARCSEC (x) ' Inverse Secant +IF x < 1 THEN ARCSEC = {{Cb|ATN}}(x / {{Cb|SQR}}(1 - x * x)) + ({{Cb|SGN}}(x) - 1) * (2 * ATN(1)) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} ARCCSC (x) ' Inverse CoSecant - {{Cl|IF}} x < 1 {{Cl|THEN}} ARCCSC = {{Cl|ATN}}(1 / {{Cl|SQR}}(1 - x * x)) + ({{Cl|SGN}}(x)-1) * (2 * {{Cl|ATN}}(1)) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION ARCCSC (x) ' Inverse CoSecant +IF x < 1 THEN ARCCSC = ATN(1 / SQR(1 - x * x)) + (SGN(x)-1) * (2 * ATN(1)) ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} ARCCOT (x) ' Inverse CoTangent - ARCCOT = (2 * {{Cl|ATN}}(1)) - {{Cl|ATN}}(x) -{{Cl|END FUNCTION}} '' '' +FUNCTION ARCCOT (x) ' Inverse CoTangent +ARCCOT = (2 * {{Cb|ATN}}(1)) - {{Cb|ATN}}(x) +END FUNCTION '' '' -{{Cl|FUNCTION}} SINH (x) ' Hyperbolic Sine - {{Cl|IF}} x <= 88.02969 {{Cl|THEN}} SINH = ({{Cl|EXP}}(x) - {{Cl|EXP}}(-x)) / 2 {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' +FUNCTION SINH (x) ' Hyperbolic Sine +IF x <= 88.02969 THEN SINH = ({{Cb|EXP}}(x) - {{Cb|EXP}}(-x)) / 2 ELSE BEEP +END FUNCTION '' '' -{{Cl|FUNCTION}} COSH (x) ' Hyperbolic CoSine - {{Cl|IF}} x <= 88.02969 {{Cl|THEN}} COSH = ({{Cl|EXP}}(x) + {{Cl|EXP}}(-x)) / 2 {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' +FUNCTION COSH (x) ' Hyperbolic CoSine +IF x <= 88.02969 THEN COSH = (EXP(x) + EXP(-x)) / 2 ELSE BEEP +END FUNCTION '' '' -{{Cl|FUNCTION}} TANH (x) ' Hyperbolic Tangent or SINH(x) / COSH(x) - {{Cl|IF}} 2 * x <= 88.02969 {{Cl|AND}} {{Cl|EXP}}(2 * x) + 1 <> 0 {{Cl|THEN}} - TANH = ({{Cl|EXP}}(2 * x) - 1) / ({{Cl|EXP}}(2 * x) + 1) - {{Cl|ELSE}} - {{Cl|BEEP}} - {{Cl|END IF}} -{{Cl|END FUNCTION}} '' '' +FUNCTION TANH (x) ' Hyperbolic Tangent or SINH(x) / COSH(x) +IF 2 * x <= 88.02969 AND EXP(2 * x) + 1 <> 0 THEN + TANH = ({{Cb|EXP}}(2 * x) - 1) / ({{Cb|EXP}}(2 * x) + 1) +ELSE BEEP +END IF +END FUNCTION '' '' -{{Cl|FUNCTION}} SECH (x) ' Hyperbolic Secant or (COSH(x)) ^ -1 - {{Cl|IF}} x <= 88.02969 {{Cl|AND}} ({{Cl|EXP}}(x) + {{Cl|EXP}}(-x)) <> 0 {{Cl|THEN}} SECH = 2 / ({{Cl|EXP}}(x) + {{Cl|EXP}}(-x)) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' +FUNCTION SECH (x) ' Hyperbolic Secant or (COSH(x)) ^ -1 +IF x <= 88.02969 AND (EXP(x) + EXP(-x)) <> 0 THEN SECH = 2 / ({{Cb|EXP}}(x) + {{Cb|EXP}}(-x)) ELSE BEEP +END FUNCTION '' '' -{{Cl|FUNCTION}} CSCH (x) ' Hyperbolic CoSecant or (SINH(x)) ^ -1 - {{Cl|IF}} x <= 88.02969 {{Cl|AND}} ({{Cl|EXP}}(x) - {{Cl|EXP}}(-x)) <> 0 {{Cl|THEN}} CSCH = 2 / ({{Cl|EXP}}(x) - {{Cl|EXP}}(-x)) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' +FUNCTION CSCH (x) ' Hyperbolic CoSecant or (SINH(x)) ^ -1 +IF x <= 88.02969 AND (EXP(x) - EXP(-x)) <> 0 THEN CSCH = 2 / ({{Cb|EXP}}(x) - {{Cb|EXP}}(-x)) ELSE BEEP +END FUNCTION '' '' -{{Cl|FUNCTION}} COTH (x) ' Hyperbolic CoTangent or COSH(x) / SINH(x) - {{Cl|IF}} 2 * x <= 88.02969 {{Cl|AND}} {{Cl|EXP}}(2 * x) - 1 <> 0 {{Cl|THEN}} - COTH = ({{Cl|EXP}}(2 * x) + 1) / ({{Cl|EXP}}(2 * x) - 1) - {{Cl|ELSE}} - {{Cl|BEEP}} - {{Cl|END IF}} -{{Cl|END FUNCTION}} '' '' +FUNCTION COTH (x) ' Hyperbolic CoTangent or COSH(x) / SINH(x) +IF 2 * x <= 88.02969 AND EXP(2 * x) - 1 <> 0 THEN + COTH = ({{Cb|EXP}}(2 * x) + 1) / ({{Cb|EXP}}(2 * x) - 1) +ELSE BEEP +END IF +END FUNCTION '' '' -{{Cl|FUNCTION}} ARCSINH (x) ' Inverse Hyperbolic Sine - {{Cl|IF}} (x * x) + 1 >= 0 {{Cl|AND}} x + {{Cl|SQR}}((x * x) + 1) > 0 {{Cl|THEN}} - ARCSINH = {{Cl|LOG}}(x + {{Cl|SQR}}(x * x + 1)) - {{Cl|ELSE}} - {{Cl|BEEP}} - {{Cl|END IF}} -{{Cl|END FUNCTION}} '' '' +FUNCTION ARCSINH (x) ' Inverse Hyperbolic Sine +IF (x * x) + 1 >= 0 AND x + SQR((x * x) + 1) > 0 THEN +ARCSINH = {{Cb|LOG}}(x + {{Cb|SQR}}(x * x + 1)) +ELSE BEEP +END IF +END FUNCTION '' '' -{{Cl|FUNCTION}} ARCCOSH (x) ' Inverse Hyperbolic CoSine - {{Cl|IF}} x >= 1 {{Cl|AND}} x * x - 1 >= 0 {{Cl|AND}} x + {{Cl|SQR}}(x * x - 1) > 0 {{Cl|THEN}} - ARCCOSH = {{Cl|LOG}}(x + {{Cl|SQR}}(x * x - 1)) - {{Cl|ELSE}} - {{Cl|BEEP}} - {{Cl|END IF}} -{{Cl|END FUNCTION}} '' '' +FUNCTION ARCCOSH (x) ' Inverse Hyperbolic CoSine +IF x >= 1 AND x * x - 1 >= 0 AND x + SQR(x * x - 1) > 0 THEN +ARCCOSH = {{Cb|LOG}}(x + {{Cb|SQR}}(x * x - 1)) +ELSE BEEP +END IF +END FUNCTION '' '' -{{Cl|FUNCTION}} ARCTANH (x) ' Inverse Hyperbolic Tangent - {{Cl|IF}} x < 1 {{Cl|THEN}} ARCTANH = {{Cl|LOG}}((1 + x) / (1 - x)) / 2 {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} +FUNCTION ARCTANH (x) ' Inverse Hyperbolic Tangent +IF x < 1 THEN ARCTANH = {{Cb|LOG}}((1 + x) / (1 - x)) / 2 ELSE BEEP +END FUNCTION -{{Cl|FUNCTION}} ARCSECH (x) ' Inverse Hyperbolic Secant - {{Cl|IF}} x > 0 {{Cl|AND}} x <= 1 {{Cl|THEN}} ARCSECH = {{Cl|LOG}}(({{Cl|SGN}}(x) * {{Cl|SQR}}(1 - x * x) + 1) / x) {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' +FUNCTION ARCSECH (x) ' Inverse Hyperbolic Secant +IF x > 0 AND x <= 1 THEN ARCSECH = {{Cb|LOG}}(({{Cb|SGN}}(x) * {{Cb|SQR}}(1 - x * x) + 1) / x) ELSE BEEP +END FUNCTION '' '' -{{Cl|FUNCTION}} ARCCSCH (x) ' Inverse Hyperbolic CoSecant - {{Cl|IF}} x <> 0 {{Cl|AND}} x * x + 1 >= 0 {{Cl|AND}} ({{Cl|SGN}}(x) * {{Cl|SQR}}(x * x + 1) + 1) / x > 0 {{Cl|THEN}} - ARCCSCH = {{Cl|LOG}}(({{Cl|SGN}}(x) * {{Cl|SQR}}(x * x + 1) + 1) / x) - {{Cl|ELSE}} - {{Cl|BEEP}} - {{Cl|END IF}} -{{Cl|END FUNCTION}} '' '' +FUNCTION ARCCSCH (x) ' Inverse Hyperbolic CoSecant +IF x <> 0 AND x * x + 1 >= 0 AND (SGN(x) * SQR(x * x + 1) + 1) / x > 0 THEN + ARCCSCH = {{Cb|LOG}}(({{Cb|SGN}}(x) * {{Cb|SQR}}(x * x + 1) + 1) / x) +ELSE BEEP +END IF +END FUNCTION '' '' -{{Cl|FUNCTION}} ARCCOTH (x) ' Inverse Hyperbolic CoTangent - {{Cl|IF}} x > 1 {{Cl|THEN}} ARCCOTH = {{Cl|LOG}}((x + 1) / (x - 1)) / 2 {{Cl|ELSE}} {{Cl|BEEP}} -{{Cl|END FUNCTION}} '' '' -{{CodeEnd}} +FUNCTION ARCCOTH (x) ' Inverse Hyperbolic CoTangent +IF x > 1 THEN ARCCOTH = {{Cb|LOG}}((x + 1) / (x - 1)) / 2 ELSE BEEP +END FUNCTION '' '' +{{TextEnd}} {{WhiteStart}} '''Hyperbolic Function Relationships:''' @@ -291,7 +293,7 @@ The following Trigonometric functions can be derived from the '''BASIC Mathemati {{WhiteEnd}} -<center>[https://web.archive.org/web/20140417011701/http://support.microsoft.com/kb/28249 Microsoft's Derived BASIC Functions (KB 28249)]</center> +<center>[http://support.microsoft.com/kb/28249 Microsoft's Derived BASIC Functions (KB 28249)]</center> <center>[[#toc|Return to Top]]</center> @@ -324,22 +326,24 @@ Relational Operations are used to compare values in a Conditional [[IF...THEN]], : Rounding is used when the program needs a certain number value or type. There are 4 [[INTEGER]] or [[LONG]] Integer functions and one function each for closest [[SINGLE]] and closest [[DOUBLE]] numerical types. Closest functions use "bankers" rounding which rounds up if the decimal point value is over one half. Variable types should match the return value. -{| class="wikitable" -! Name !! Description +{| align=center border=1 +! Name +! Description |- + |[[INT]](n) || rounds down to lower Integer value whether positive or negative |- |[[FIX]](n) || rounds positive values lower and negative to a less negative Integer value |- |[[CINT]](n) ||rounds to closest Integer. Rounds up for decimal point values over one half. |- -|[[CLNG]](n) || rounds Integer or Long values to closest value like CINT.(values over 32767) +| [[CLNG]](n) || rounds Integer or Long values to closest value like CINT.(values over 32767) |- -|[[CSNG]](n) || rounds Single values to closest last decimal point value. +| [[CSNG]](n) || rounds Single values to closest last decimal point value. |- -|[[CDBL]](n) || rounds Double values to closest last decimal point value. +| [[CDBL]](n) || rounds Double values to closest last decimal point value. |- -|[[_ROUND]](n) || rounds to closest numerical integer value. +| [[_ROUND]] || rounds to closest numerical integer value in '''QB64''' only. |} ===Note=== @@ -508,3 +512,4 @@ Relational Operations are used to compare values in a Conditional [[IF...THEN]], * [[TYPE]] {{PageNavigation}} +< diff --git a/internal/help/NAME.txt b/internal/help/NAME.txt index f4ebd02bd..09fd12b25 100644 --- a/internal/help/NAME.txt +++ b/internal/help/NAME.txt @@ -28,3 +28,4 @@ The [[NAME]] statement changes the name of a file or directory to a new name. {{PageNavigation}} +< diff --git a/internal/help/NEXT.txt b/internal/help/NEXT.txt index 95afdf2ed..e8a8bbf99 100644 --- a/internal/help/NEXT.txt +++ b/internal/help/NEXT.txt @@ -39,3 +39,4 @@ PRINT "AFTER the LOOP, NEXT makes the value of i ="; i '' '' {{PageNavigation}} +< diff --git a/internal/help/NOT.txt b/internal/help/NOT.txt index d5e8a27f4..68d076776 100644 --- a/internal/help/NOT.txt +++ b/internal/help/NOT.txt @@ -80,3 +80,4 @@ b%% = {{Cl|&B}}11111010 {{PageNavigation}} +< diff --git a/internal/help/Not_Equal.txt b/internal/help/Not_Equal.txt index 5c1b9ec0c..42dcb6e7b 100644 --- a/internal/help/Not_Equal.txt +++ b/internal/help/Not_Equal.txt @@ -17,3 +17,4 @@ The '''<>''' condition symbol denotes that a value must not equal another val {{PageNavigation}} +< diff --git a/internal/help/OCT$.txt b/internal/help/OCT$.txt index 4cd5d1d09..4fb798c76 100644 --- a/internal/help/OCT$.txt +++ b/internal/help/OCT$.txt @@ -55,3 +55,4 @@ NEXT n% {{PageNavigation}} +< diff --git a/internal/help/OFF.txt b/internal/help/OFF.txt index 97747d644..2f01a116e 100644 --- a/internal/help/OFF.txt +++ b/internal/help/OFF.txt @@ -1,9 +1,9 @@ -[[OFF]] is a flag that disables event-trappping for [[KEY(n)]], [[STRIG(n)]], [[TIMER]]. +[[OFF]] is a flag that disables event-trappping for [[KEY(n)]], [[ON COM (n)|COM(n)]], [[PEN]], [[PLAY]], [[STRIG(n)]], [[TIMER]], [[UEVENT]]. {{PageDescription}} * [[OFF]] can be used to turn off the display of soft-key assignments at the bottom of the screen using [[KEY]]. -* [[OFF]] can also be used to disable an event-trapping in the following statements: [[KEY(n)]], [[STRIG(n)]], [[TIMER]]. The trap can be turned back [[ON]], but all events triggered since [[OFF]] was used are lost. +* [[OFF]] can also be used to disable an event-trapping in the following statements: [[KEY(n)]], [[ON COM (n)|COM(n)]], [[PEN]], [[PLAY]], [[STRIG(n)]], [[TIMER]], [[UEVENT]]. The trap can be turned back [[ON]], but all events triggered since [[OFF]] was used are lost. * [[$CHECKING]]:'''OFF''' is used to disable C++ error trapping (used for verified sections of code that require speed). @@ -12,3 +12,4 @@ {{PageNavigation}} +< diff --git a/internal/help/ON...GOSUB.txt b/internal/help/ON...GOSUB.txt index 435a87eb6..d75c1aebb 100644 --- a/internal/help/ON...GOSUB.txt +++ b/internal/help/ON...GOSUB.txt @@ -12,7 +12,7 @@ * '''Note:''' [[SELECT CASE]] provides a much more convenient way of doing this task. -{{PageQBasic}} +==QBasic/QuickBASIC== * In QuickBASIC 4.5 the list could contain a maximum of 60 line numbers or labels, while '''QB64''' has no limit. @@ -52,3 +52,4 @@ Also notice the RETURN statement that can be used with GOSUB! {{PageNavigation}} +< diff --git a/internal/help/ON...GOTO.txt b/internal/help/ON...GOTO.txt index 3bc2476a0..e4750e8c5 100644 --- a/internal/help/ON...GOTO.txt +++ b/internal/help/ON...GOTO.txt @@ -11,7 +11,7 @@ * '''Note:''' [[SELECT CASE]] provides a much more convenient way of doing this task. -{{PageQBasic}} +==QBasic/QuickBASIC== * In QuickBASIC 4.5 the list could contain a maximum of 60 line numbers or labels, while '''QB64''' has no limit. @@ -47,3 +47,4 @@ And here we are... {{PageNavigation}} +< diff --git a/internal/help/ON_COM(n).txt b/internal/help/ON_COM(n).txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/ON_COM(n).txt @@ -0,0 +1 @@ +< diff --git a/internal/help/ON_ERROR.txt b/internal/help/ON_ERROR.txt index aac767601..1d39c8f44 100644 --- a/internal/help/ON_ERROR.txt +++ b/internal/help/ON_ERROR.txt @@ -62,9 +62,10 @@ hand: {{PageSeeAlso}} * [[ERR]], [[ERL]], [[RESUME]] * [[ON...GOTO]] -* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]] +* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]] * [[ERROR]] {{text|(simulates an error)}} * [[ERROR Codes]] {{PageNavigation}} +< diff --git a/internal/help/ON_KEY(n).txt b/internal/help/ON_KEY(n).txt index fe98dab5b..c054606a3 100644 --- a/internal/help/ON_KEY(n).txt +++ b/internal/help/ON_KEY(n).txt @@ -60,3 +60,4 @@ trap: {{PageNavigation}} +< diff --git a/internal/help/ON_PEN.txt b/internal/help/ON_PEN.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/ON_PEN.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/ON_PLAY(n).txt b/internal/help/ON_PLAY(n).txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/ON_PLAY(n).txt @@ -0,0 +1 @@ +< diff --git a/internal/help/ON_STRIG(n).txt b/internal/help/ON_STRIG(n).txt index 710e41b6d..ea356bcf1 100644 --- a/internal/help/ON_STRIG(n).txt +++ b/internal/help/ON_STRIG(n).txt @@ -12,7 +12,7 @@ The [[ON STRIG(n)]] statement is an event procedure that directs program flow up * The statement sends the procedure to a line number, line label or [[SUB]] procedure when a button event occurs. -{{PageQBasic}} +==QBasic/QuickBASIC== * In QBasic, value of ''n'' could only be a number from 0 to 3 only as it could only monitor 2 joystick buttons and 2 joysticks. @@ -71,3 +71,4 @@ a$ = "[STRIG 0 EVENT]" {{PageNavigation}} +< diff --git a/internal/help/ON_TIMER(n).txt b/internal/help/ON_TIMER(n).txt index b50094f25..aca20a51b 100644 --- a/internal/help/ON_TIMER(n).txt +++ b/internal/help/ON_TIMER(n).txt @@ -77,3 +77,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/ON_UEVENT.txt b/internal/help/ON_UEVENT.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/ON_UEVENT.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/OPEN.txt b/internal/help/OPEN.txt index a8175711e..c364960e2 100644 --- a/internal/help/OPEN.txt +++ b/internal/help/OPEN.txt @@ -9,7 +9,7 @@ The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communi : [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] -{{PageParameters}} +{{Parameters}} * The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. * FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). * GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. @@ -22,11 +22,11 @@ The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communi * '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' * {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) * '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' -* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in QBasic. +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. * {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. * Once a file or port is opened, it can be used in any program procedure using the assigned file number. * The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). -* '''Devices such as "KYBD:", "CONS:", and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. : '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. * [[OPEN COM]] can also be used for serial port access in '''QB64'''. @@ -47,7 +47,7 @@ The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communi ===File Access Modes=== * FOR mode can be: -** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as COM ports. +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. ** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' ** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' ** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. @@ -68,11 +68,11 @@ The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communi ''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. {{CodeStart}} -file$ = "Hello,~1.mp3" 'example call below -{{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% {{Cl|FUNCTION}} CheckName% (Filename$) - 'NOTE: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} @@ -101,13 +101,13 @@ file$ = "Hello,~1.mp3" 'example call below ''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: {{CodeStart}} '' '' f% = {{Cl|FREEFILE}} 'should always be 1 at program start -{{Cl|OPEN}} "SCRN:" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% g% = {{Cl|FREEFILE}} 'should always be 2 after 1 -{{Cl|OPEN}} "temp.txt" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% {{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" -{{Cl|NEXT}} '' '' +NEXT '' '' {{CodeEnd}}{{small|code by Steve McNeill}} : ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. @@ -159,3 +159,4 @@ It was overwritten with this and deleted. {{PageNavigation}} +< diff --git a/internal/help/OPEN_COM.txt b/internal/help/OPEN_COM.txt index 35436b576..4817e4527 100644 --- a/internal/help/OPEN_COM.txt +++ b/internal/help/OPEN_COM.txt @@ -5,7 +5,7 @@ The [[OPEN COM]] statement is used to access a computer's serial port COM. : '''OPEN''' "COMn: ''Speed'', ''Parity'', ''Bits'', ''Stopbit'', [''Options'']" [FOR {[[RANDOM]]|[[BINARY]]|[[OUTPUT]]|[[INPUT (file mode)|INPUT]]}] AS #''P'' [LEN = {{Parameter|byteSize}}] -{{PageParameters}} +{{Parameters}} * ''Speed'' (baud rate): 50, 150, 300, 600, 1200, 1800, 2400, '''9600''' (QBasic's maximum), 19200 or '''115200''' ('''QB64''''s maximum). * ''Parity'': '''N''' (none), E (even), O (odd), S (space) or M (mark). Note: If 8 bits, use parity N for numerical data. * ''Bits'' = number of bits/byte: Valid numbers: 5, 6, 7 or '''8''' @@ -127,3 +127,4 @@ Start# = {{Cl|TIMER}} {{PageNavigation}} +< diff --git a/internal/help/OPTION_BASE.txt b/internal/help/OPTION_BASE.txt index dedd692a2..2f10b3f29 100644 --- a/internal/help/OPTION_BASE.txt +++ b/internal/help/OPTION_BASE.txt @@ -48,3 +48,4 @@ The [[OPTION BASE]] statement is used to set the default lower bound of arrays. {{PageNavigation}} +< diff --git a/internal/help/OPTION__EXPLICIT.txt b/internal/help/OPTION__EXPLICIT.txt index 5ea4ce421..1c62693aa 100644 --- a/internal/help/OPTION__EXPLICIT.txt +++ b/internal/help/OPTION__EXPLICIT.txt @@ -12,7 +12,8 @@ {{PageErrors}} -* It's not advisable to use [[OPTION _EXPLICIT]] in [[$INCLUDE]]d modules. +* If used, [[OPTION _EXPLICIT]] must be the very first statement in your program. No other statements can precede it (except for [[$NOPREFIX]] or comment lines started with an [[Apostrophe|apostrophe]] or [[REM]]). +* Do not use [[OPTION _EXPLICIT]] in [[$INCLUDE]]d modules. {{PageExamples}} @@ -38,3 +39,4 @@ myVariable = 5 {{PageNavigation}} +< diff --git a/internal/help/OPTION__EXPLICITARRAY.txt b/internal/help/OPTION__EXPLICITARRAY.txt index 82003d9b8..969a39f4d 100644 --- a/internal/help/OPTION__EXPLICITARRAY.txt +++ b/internal/help/OPTION__EXPLICITARRAY.txt @@ -10,7 +10,8 @@ * Unlike [[OPTION _EXPLICIT]], simple variables can still be used without a declaration. Example: {{InlineCode}}i = 1{{InlineCodeEnd}} {{PageErrors}} -* It's not advisable to use [[OPTION _EXPLICITARRAY]] in [[$INCLUDE]]d modules. +* If used, [[OPTION _EXPLICITARRAY]] must be the very first statement in your program. No other statements can precede it (except for [[$NOPREFIX]] or comment lines started with an [[Apostrophe|apostrophe]] or [[REM]]). +* Do not use [[OPTION _EXPLICITARRAY]] in [[$INCLUDE]]d modules. {{PageExamples}} @@ -36,3 +37,4 @@ y(2) = 3 'This now generates an error {{PageNavigation}} +< diff --git a/internal/help/OR.txt b/internal/help/OR.txt index 9f37d2f1d..39b6e6476 100644 --- a/internal/help/OR.txt +++ b/internal/help/OR.txt @@ -45,3 +45,4 @@ The [[OR]] numerical operator returns a comparative bit value of 1 if either val {{PageNavigation}} +< diff --git a/internal/help/OR_(boolean).txt b/internal/help/OR_(boolean).txt index 269c11f1a..2835ccd24 100644 --- a/internal/help/OR_(boolean).txt +++ b/internal/help/OR_(boolean).txt @@ -35,3 +35,4 @@ True {{PageNavigation}} +< diff --git a/internal/help/OUT.txt b/internal/help/OUT.txt index b34e7ec70..13bb404b0 100644 --- a/internal/help/OUT.txt +++ b/internal/help/OUT.txt @@ -5,7 +5,7 @@ : [[OUT]] {{Parameter|registerAddress%}}, {{Parameter|value%}} -{{PageParameters}} +{{Parameters}} * {{Parameter|registerAddress%}} is a value expressed as a decimal [[INTEGER]] or [[&H|hexadecimal]]. * The [[INTEGER]] {{Parameter|value%}} sent is normally only 0 to 255 per byte register (8 bit) address. @@ -34,7 +34,7 @@ ::::* Some [[DAC]] color attribute intensities cannot be changed using OUT. -{{PageQBasic}} +==QBasic/QuickBASIC== * In DOS, OUT accesses memory and hardware directly, unlike [[POKE]], and could cause PC damage. @@ -99,3 +99,4 @@ PRINT red%, green%, blue% '' '' {{PageNavigation}} +< diff --git a/internal/help/OUTPUT.txt b/internal/help/OUTPUT.txt index e5294f413..c364960e2 100644 --- a/internal/help/OUTPUT.txt +++ b/internal/help/OUTPUT.txt @@ -1,50 +1,162 @@ -#REDIRECT [[OPEN#File_Access_Modes]] - -The [[OUTPUT]] file mode is used in an [[OPEN]] statement to send new data to files or ports. +The [[OPEN]] statement is used to open a file or [[OPEN_COM|COM]] serial communications port for program input or output. {{PageSyntax}} -: [[OPEN]] {{Parameter|fileName$}} '''FOR''' [[OUTPUT]] '''AS''' #1 +: [[OPEN]] {{Parameter|fileName$}} ['''FOR''' {{Parameter|mode}}] [{{{KW|ACCESS}}|{{{KW|LOCK}}|SHARED}} [{READ|WRITE}] [[AS]] [#]{{Parameter|fileNumber&}} [LEN = {{Parameter|recordLength}}] + + +===Legacy ''GW-BASIC'' syntax=== +: [[OPEN]] {{Parameter|modeLetter$}}, [#]{{Parameter|fileNumber&}}, {{Parameter|fileName$}}[, {{Parameter|recordLength}}] + + +{{Parameters}} +* The {{Parameter|fileName$}} is a [[STRING]] variable or literal file name (path optional) in quotes. +* FOR mode can be: [[APPEND]] (write to end), [[BINARY]] (read/write), [[INPUT (file mode)|INPUT]] (read), [[OUTPUT]] (write new) or [[RANDOM]] (read/write). +* GW-BASIC's {{Parameter|modeLetter$}} is a [[STRING]] variable or the letter "A", "B", "I", "O" or "R" designating the OPEN modes above. +* {{Parameter|fileNumber&}} can be any '''positive''' [[INTEGER]] or [[LONG]] whole number value or an unused value determined by the [[FREEFILE]] function. +* [[LEN]] = or {{Parameter|recordLength}} is optional to denote the RANDOM file record byte length (default = 128) or sequential (default = 512) load buffer. {{PageDescription}} -* OUTPUT mode erases all previous data in an existing file or clears a port receive buffer. -* Creates an empty file if the filename does not exist. Use [[APPEND]] if previous file data is to be preserved. -* Mode can use [[PRINT (file statement)|PRINT]], [[WRITE (file statement)|WRITE]] or [[PRINT USING (file statement)|PRINT USING]] to output file data. +* '''QB64''' can open as many files as your computer memory can handle. QBasic could only open about 15 at a time. +* '''QB64 will allocate 4 bytes of memory for every possible file number up to the highest number used in a program.''' +* {{Parameter|mode}} defaults to RANDOM if the {{Parameter|mode}} or FOR access statement is omitted. (see open modes described below) +* '''Only the {{Parameter|fileName$}}, {{Parameter|fileNumber&}} and LEN = {{Parameter|recordLength}} values can use variable values in the QBasic syntax.''' +* If [[LEN]] = is ommitted, sequential file record sizes default to 512 and [[RANDOM]] to 128 bytes in Qbasic. +* {{Parameter|fileName$}} can be up to 255 characters with no limit on file name extension length in '''QB64'''. +* Once a file or port is opened, it can be used in any program procedure using the assigned file number. +* The '''"SCRN:"''' device is supported in '''version 1.000 and up''' (see Example 3). +* '''Devices such as "KYBD:", "CONS:", "COMn" and "LPTn:" are [[Keywords currently not supported by QB64|not supported in QB64.]]'''. +: '''Note:''' OPEN "LPTn" is not supported by QB64, but may be supported directly by your operating system. +* [[OPEN COM]] can also be used for serial port access in '''QB64'''. + + +{{PageErrors}} +* Illegal '''QB64''' Windows filename characters are ''' " * / \ | ? : < > '''. Multiple dots (periods) are allowed. +* Possible OPEN [[ERROR Codes|errors]] include "Bad file name or number", "Bad File Mode", "File Not Found" or "Path Not Found". +** An OPEN file not found error may occur if [[CHR$]](0) to (31) are used in a Windows file name. +* '''QB64''' does not have DOS file name limitations. + + +==Details== +===File ACCESS and LOCK Permissions=== +* [[ACCESS]] clause limits file access to READ, WRITE or READ WRITE on a network. +* [[LOCK (access)|LOCK]] clause can specify SHARED or a LOCK READ or LOCK WRITE file lock in an OPEN statement working on a network. +* A separate [[LOCK]] statement can lock or [[UNLOCK]] file access on a network using a format that can lock specific records. +* If another process already has access to a specified file, program access is denied for that file OPEN access. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error. + +===File Access Modes=== +* FOR mode can be: +** '''OUTPUT''': Sequential mode creates a new file or erases an existing file for new program output. Use [[WRITE (file statement)|WRITE #]] to write numerical or text data or [[PRINT (file statement)|PRINT #]] for text. '''OUTPUT clears files of all data''' and clears the receive buffer on other devices such as [[ON COM(n)|COM]]. +** '''APPEND''': Sequential mode creates a new file if it doesn't exist or appends program output to the end of an existing file. Use [[WRITE (file statement)|WRITE #]] for numerical or text data or [[PRINT (file statement)|PRINT #]] for text as in the OUTPUT mode. '''APPEND does not remove previous data.''' +** '''INPUT''' : Sequential mode '''only reads input''' from an existing file. '''[[ERROR Codes|File error]] if file does not exist.''' Use [[INPUT (file statement)|INPUT #]] for comma separated numerical or text data and [[LINE INPUT (file statement)|LINE INPUT #]] or [[INPUT$]] to only read text data. '''Use [[_FILEEXISTS]] or [[_DIREXISTS]] to avoid errors.''' +** '''BINARY''': Creates a new file when it doesn't exist or reads and writes to an existing binary file. Use [[GET|GET #]] to read or [[PUT|PUT #]] to write byte positions simultaneously. [[LEN]] = statements are ignored in this mode. +** '''RANDOM''': Creates a new file when it doesn't exist or reads or writes to an existing random file record. Use [[GET|GET #]] or [[PUT|PUT #]] to read or write to file records. A [[LEN]] = statement can define the byte size of a record (no LEN statement defaults to 128 bytes) +** Modes '''INPUT''', '''BINARY''' and '''RANDOM''' allow a file to be concurrently opened in a different mode and number. + + +====GW-BASIC modes==== +* ''Mode letter'' is a variable or literal [[STRING]] letter value as one of the following: +** "A" = '''APPEND'''. +** "B" = '''BINARY'''. +** "I" = '''INPUT'''. +** "O" = '''OUTPUT'''. +** "R" = '''RANDOM'''. {{PageExamples}} -''Example:'' Writes new data to a text file sequentially and reads it back to the program screen. +''Example 1:'' Function that displays errors and the number of errors in QBasic filenames. Returns 0 when filename is OK. + +{{CodeStart}} + file$ = "Hello,~1.mp3" 'example call below + {{Cl|LOCATE}} 20, 30: errors% = CheckName%(file$): {{Cl|COLOR}} 14: {{Cl|PRINT}} " Total Errors ="; errors% + +{{Cl|FUNCTION}} CheckName% (Filename$) + '{{Cl|NOT}}E: Function also displays filename errors so {{Cl|LOCATE}} on screen before call! + {{Cl|DIM}} L {{Cl|AS}} {{Cl|INTEGER}}, DP {{Cl|AS}} {{Cl|INTEGER}}, XL {{Cl|AS}} {{Cl|INTEGER}} + L = {{Cl|LEN}}(Filename$): DP = {{Cl|INSTR}}(Filename$, "."): {{Cl|IF...THEN|IF}} DP {{Cl|THEN}} XL = L - DP 'extension + {{Cl|IF...THEN|IF}} L = 0 {{Cl|OR (boolean)|OR}} L > 12 {{Cl|OR (boolean)|OR}} DP > 9 {{Cl|OR (boolean)|OR}} XL > 3 {{Cl|THEN}} + CheckName% = -1: {{Cl|COLOR}} 12: {{Cl|PRINT}} "Illegal format!"; : {{Cl|EXIT FUNCTION}} + {{Cl|END IF}} + {{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} L 'check each filename character" + code% = {{Cl|ASC}}({{Cl|MID$}}(Filename$, i%, 1)): {{Cl|COLOR}} 10 ' see ASCII codes + {{Cl|SELECT CASE}} code% 'check for errors and highlight in red + '{{Cl|CASE}} 34, 42 {{Cl|TO}} 44, 47, 58 {{Cl|TO}} 63, 91 {{Cl|TO}} 93, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QBasic errors''' + {{Cl|CASE}} 34, 42, 47, 58, 60, 62, 92, 124: E% = E% + 1: {{Cl|COLOR}} 12 ' '''QB64 errors''' + {{Cl|CASE}} 46: dot% = dot% + 1: {{Cl|IF...THEN|IF}} dot% > 1 {{Cl|THEN}} E% = E% + 1: {{Cl|COLOR}} 12 + {{Cl|END SELECT}} + {{Cl|PRINT}} {{Cl|CHR$}}(code%); 'use {{Cl|LOCATE}} before {{Cl|FUNCTION}} call to place print + {{Cl|NEXT}} + CheckName% = E% +{{Cl|END FUNCTION}} '' '' +{{CodeEnd}} +''Note: The QBasic character error list is commented out and the function will return invalid filenames under QB64. + +{{OutputStart}} + {{text|Hello|#54FC54}}{{text|,|red}}{{text|~1.mp3|#54FC54}} {{text|Total Errors|yellow}}<nowiki> = </nowiki>{{text|1|yellow}} +{{OutputEnd}} +:''Note:'' The screen output displays filename characters in green except for red comma QBasic error. + + +''Example 2:'' When '''OPEN "SCRN:" FOR OUTPUT AS #f''' is used, '''PRINT #f''' will print the text to the screen instead of to a file: {{CodeStart}} '' '' -filename$ = "testfile.dat" -x = 1: y = 2: z$ = "Three" +f% = {{Cl|FREEFILE}} 'should always be 1 at program start +{{Cl|OPEN}} "SCRN:" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #f% +g% = {{Cl|FREEFILE}} 'should always be 2 after 1 +{{Cl|OPEN}} "temp.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #g% -{{Cl|OPEN}} filename$ {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 'opens and clears an existing file or creates new empty file +{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2 + {{Cl|PRINT (file statement)|PRINT}} #i, "Hello World, Screen and File version" +NEXT '' '' +{{CodeEnd}}{{small|code by Steve McNeill}} +: ''Note:'' Linux or Mac file names can use a path destination such as ".\SCRN:" to use SCRN: as an actual file name. -{{Cl|WRITE (file statement)|WRITE}} #1, x, y, z$ -{{Cl|CLOSE}} #1 +''Example 3:'' Showcasing different file modes. +{{CodeStart}} +{{Cl|CLS}} -{{Cl|PRINT}} "File created with data. Press a key!" +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst didn't exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "A new file was created named test.tst and then deleted." +{{Cl|PRINT (file statement)|PRINT}} #1, "If test.tst did exist:" +{{Cl|PRINT (file statement)|PRINT}} #1, "It was overwritten with this and deleted." +{{Cl|CLOSE}} #1 -K$ = {{Cl|INPUT$}}(1) 'press a key +{{Cl|OPEN}} "test.tst" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 +{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1) +{{Cl|INPUT (file statement)|INPUT}} #1, a$ +{{Cl|PRINT}} a$ +{{Cl|LOOP}} +{{Cl|CLOSE}} #1 -{{Cl|OPEN}} filename$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #2 'opens a file to read it +{{Cl|KILL}} "test.tst" -{{Cl|INPUT (file statement)|INPUT}} #2, a, b, c$ +{{Cl|END}} -{{Cl|CLOSE}} #2 - -{{Cl|PRINT}} a, b, c$ - -{{Cl|END}} '' '' {{CodeEnd}} +{{OutputStart}} +If test.tst didn't exist: +A new file was created named test.tst and then deleted. +If test.tst did exist: +It was overwritten with this and deleted. +{{OutputEnd}} +:'''Warning:''' Make sure you don't have a file named test.tst before you run this or it will be overwritten. -{{PageSeeAlso}} -* [[APPEND]], [[RANDOM]] -* [[INPUT (file mode)]], [[BINARY]] -* [[WRITE]], [[INPUT (file statement)]] + +{{PageSeeAlso}} +* [[PRINT (file statement)]], [[INPUT (file statement)]] +* [[GET]], [[PUT]], [[WRITE (file statement)]] +* [[INPUT$]], [[LINE INPUT (file statement)]] +* [[CLOSE]], [[LOF]], [[EOF]], [[LOC]] +* [[SEEK (statement)]], [[SEEK]] +* [[OPEN COM]], [[LEN]], [[RESET]] +* [[FIELD]], [[TYPE]] +* [[_FILEEXISTS]], [[_DIREXISTS]] +* [[_OPENCLIENT]], [[_OPENHOST]], [[_OPENCONNECTION]] {{text|(TCP/IP)}} +* [[_SNDOPEN]], [[_LOADIMAGE]] {{PageNavigation}} +< diff --git a/internal/help/PAINT.txt b/internal/help/PAINT.txt index 54ffe58c0..d0cea7053 100644 --- a/internal/help/PAINT.txt +++ b/internal/help/PAINT.txt @@ -5,7 +5,7 @@ The [[PAINT]] statement is used to fill a delimited area in a graphic screen mod : [[PAINT]] ['''STEP'''] ({{Parameter|column%}}, {{Parameter|row%}}), {{Parameter|fillColor}}[, {{Parameter|borderColor%}}] -{{PageParameters}} +{{Parameters}} * Can use the [[STEP]] keyword for relative coordinate placements. See example 1 below. * {{Parameter|fillColor}} is an [[INTEGER]] or [[LONG]] 32-bit value to paint the inside of an object. Colors are limited to the [[SCREEN]] mode used. * Optional [[INTEGER]] or [[LONG]] 32-bit {{Parameter|borderColor%}} is the color of the border of the shape to be filled when this is different from the fill color. @@ -144,3 +144,4 @@ ptndata: {{PageNavigation}} +< diff --git a/internal/help/PALETTE.txt b/internal/help/PALETTE.txt index a71842fef..df5d0ab71 100644 --- a/internal/help/PALETTE.txt +++ b/internal/help/PALETTE.txt @@ -16,7 +16,7 @@ The [[PALETTE]] statement can swap color settings, set colors to default or set * QB64 implements the [[_PALETTECOLOR]] statement to provide extended palette functionality. -{{PageQBasic}} +==QBasic/QuickBASIC== * Screens 0, 7 and 9 ([[DAC]]) colors could not be changed using the first syntax, but the program could use [[OUT]] to change intensity settings of attributes 1 thru 5. @@ -43,3 +43,4 @@ The [[PALETTE]] statement can swap color settings, set colors to default or set {{PageNavigation}} +< diff --git a/internal/help/PALETTE_USING.txt b/internal/help/PALETTE_USING.txt index 7bbf0ce50..b6b8e7019 100644 --- a/internal/help/PALETTE_USING.txt +++ b/internal/help/PALETTE_USING.txt @@ -32,3 +32,4 @@ The [[PALETTE USING]] statement sets all RGB screen color intensities using valu {{PageNavigation}} +< diff --git a/internal/help/PCOPY.txt b/internal/help/PCOPY.txt index 3d2c977ba..6c6cade30 100644 --- a/internal/help/PCOPY.txt +++ b/internal/help/PCOPY.txt @@ -14,7 +14,7 @@ The [[PCOPY]] statement copies one source screen page to a destination page in m * The '''QB64''' [[_DISPLAY]] statement can also be used to stop screen flicker without page flipping or [[CLS]] and '''is the recommended practice'''. -{{PageQBasic}} +==QBasic/QuickBASIC== * {{Parameter|sourcePage%}} and {{Parameter|destinationPage%}} numbers are limited by the SCREEN mode used. In '''QB64''', the same limits don't apply. @@ -80,3 +80,4 @@ SetupCursor {{PageNavigation}} +< diff --git a/internal/help/PEEK.txt b/internal/help/PEEK.txt index 5753477d9..2b4fc9119 100644 --- a/internal/help/PEEK.txt +++ b/internal/help/PEEK.txt @@ -64,3 +64,4 @@ The '''PEEK''' function returns the value that is contained at a certain memory {{PageNavigation}} +< diff --git a/internal/help/PEN.txt b/internal/help/PEN.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/PEN.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/PEN_(statement).txt b/internal/help/PEN_(statement).txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/PEN_(statement).txt @@ -0,0 +1 @@ +< diff --git a/internal/help/PLAY(n).txt b/internal/help/PLAY(n).txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/PLAY(n).txt @@ -0,0 +1 @@ +< diff --git a/internal/help/PLAY.txt b/internal/help/PLAY.txt index d4e957ba7..6c165fd05 100644 --- a/internal/help/PLAY.txt +++ b/internal/help/PLAY.txt @@ -5,7 +5,7 @@ ::: '''PLAY ''commandstring$''''' -{{PageParameters}} +{{Parameters}} * The ''commandstring'' can be any literal or variable [[STRING]] consisting of the following uppercase or lowercase commands: :*'''O'''n - Sets the current octave (from 0 to 6). Example: '''{{text|PLAY "O3"|green}}''' :*'''<''' - Down one octave (cannot be below zero). Example: '''{{text|PLAY "<<"|green}}''' 'goes down two octaves. @@ -20,9 +20,9 @@ ::*'''ML''' - Each note plays full length set by L (legato) ::*'''P'''n - Pause in the duration of n quarternotes (n can be 1 to 64) corresponding to L, Example: '''{{text|PLAY "P32"|green}}''' ::*'''T'''n - Tempo sets number of L4 quarter notes per minute (n can be 32 to 255 where 120 is the default). Example: '''{{text|PLAY "T180"|green}}''' -:::*''' .  '''  - period after a note plays 1½ times the note length determined by L * T. -:::*'''.. '''  - two periods plays 1-3/4 times the note length determined by L * T. -:*''',  '''  - '''commas in QB64''' stop play advancement to allow more than one note to be played simultaneously. Example: '''{{text|PLAY "C,E,G,"|green}}''' +:::*''' . ''' - period after a note plays 1½ times the note length determined by L * T. +:::*'''.. ''' - two periods plays 1-3/4 times the note length determined by L * T. +:*''', ''' - '''commas in QB64''' stop play advancement to allow more than one note to be played simultaneously. Example: '''{{text|PLAY "C,E,G,"|green}}''' :*'''V'''n - Volume in '''QB64 only''' can be any volume from 0(none) to 100(full). The default level is 50 when '''n''' is not specified. :*'''MF''' - Play music in the foreground (each note must be completed before another can start). :*'''MB''' - Play music in the background while program code execution continues (QB64 has no note buffer limits). @@ -332,3 +332,4 @@ x$ = x$ + " f1 ,mn>f.d8dc l1 ml f, c, <a ,f"</n {{PageNavigation}} +< diff --git a/internal/help/PMAP.txt b/internal/help/PMAP.txt index 3402e02d2..e2157db24 100644 --- a/internal/help/PMAP.txt +++ b/internal/help/PMAP.txt @@ -61,3 +61,4 @@ Y = {{Cl|PMAP}}(479, 3) ' Y = 200 {{PageNavigation}} +< diff --git a/internal/help/POINT.txt b/internal/help/POINT.txt index 85870814c..b58e73c39 100644 --- a/internal/help/POINT.txt +++ b/internal/help/POINT.txt @@ -1,15 +1,15 @@ The '''POINT''' function returns the pixel [[COLOR]] attribute at a specified graphics coordinate or the current graphic cursor position. -== ''Color'' Syntax == +''Color'' {{PageSyntax}} ::::color_attribute% = '''POINT ('''''column%, row%''''')''' -== ''Graphic cursor position'' Syntax == +''Graphic cursor position'' {{PageSyntax}} ::::pointer_coordinate% = '''POINT('''{0|1|2|3}''')''' -{{PageParameters}} +{{Parameters}} Graphic Color syntax: * The [[INTEGER]] ''column'' and ''row'' coordinates designate the pixel position color on the screen to read. @@ -35,11 +35,11 @@ Graphic cursor position syntax: * '''POINT cannot be used in SCREEN 0!''' Use the [[SCREEN (function)|SCREEN]] function to point text character codes and colors in SCREEN 0. -<center>'''POINT in QBasic Legacy Graphic SCREEN Modes:'''</center> +<center>'''POINT in Qbasic Legacy Graphic SCREEN Modes:'''</center> * The [[INTEGER]] color attributes returned are limited by the number of colors in the legacy SCREEN mode used. * ''Column'' and ''row'' [[INTEGER]] parameters denote the graphic pixel coordinate to read. * In '''QB64''' the offscreen or off image value returned is -1. Use IF POINT(x, y) <> -1 THEN... -* In QBasic the coordinates MUST be on the screen or an [[ERROR Codes|Illegal Function Call error]] will occur. +* In Qbasic the coordinates MUST be on the screen or an [[ERROR Codes|Illegal Function Call error]] will occur. <center>'''POINT in QB64 32 Bit Graphic [[_NEWIMAGE]] or [[_LOADIMAGE]] Modes:'''</center> @@ -63,7 +63,7 @@ clr = {{Cl|POINT}}(100, 100) {{Cl|IF...THEN|IF}} {{Cl|POINT}}(100, 100) = {{Cl|_RGB}}(255, 255, 255) {{Cl|THEN}} {{Cl|PRINT}} "_RGB OK" {{Cl|IF...THEN|IF}} {{Cl|POINT}}(100, 100) = clr {{Cl|THEN}} {{Cl|PRINT}} "Type OK" 'will not print with a LONG variable type'' '' {{CodeEnd}} -:'''Note:''' Change the DIM ''clr'' variable type to [[LONG]] to see how the last IF statement doesn't PRINT as shown in the output below: +:'''Note:''' Change the [[DIM]] ''clr'' variable type to [[LONG]] to see how the last [[IF]] statement doesn't [[PRINT]] as shown in the output below: {{OutputStart}}POINT(100, 100) = 4294967295 Variable clr = -1 Long OK @@ -72,14 +72,14 @@ _RGB OK -''Example 2:'' Using a POINT mouse routine to get the 32 bit color values of an image. +''Example 2:'' Using a [[POINT]] mouse routine to get the 32 bit color values of the image. {{CodeStart}} '' '' {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) {{Cl|_TITLE}} "Mouse {{Cl|POINT}}er 32" '{{Cl|LINE INPUT}} "Enter an image file: ", image$ 'use quotes around file names with spaces -image$ = "QB64bee.png" 'up to 320 X 240 with current {{Cl|_PUTIMAGE}} settings +image$ = "QB64bee.png" 'any 24/32 bit image up to 320 X 240 with current {{Cl|_PUTIMAGE}} settings i& = {{Cl|_LOADIMAGE}}(image$, 32) {{Cl|IF...THEN|IF}} i& >= -1 {{Cl|THEN}} {{Cl|BEEP}}: {{Cl|PRINT}} "Could {{Cl|NOT}} load image!": {{Cl|END}} w& = {{Cl|_WIDTH (function)|_WIDTH}}(i&): h& = {{Cl|_HEIGHT}}(i&) @@ -151,3 +151,4 @@ BG$ = {{Cl|UCASE$}}({{Cl|INPUT$}}(1)) {{PageNavigation}} +< diff --git a/internal/help/POKE.txt b/internal/help/POKE.txt index 519708a83..4a688132a 100644 --- a/internal/help/POKE.txt +++ b/internal/help/POKE.txt @@ -103,3 +103,4 @@ addr& = (x1 - 1 + (y - 1) * {{Cl|_WIDTH (function)|_WIDTH}}) * 2 + 1 {{PageNavigation}} +< diff --git a/internal/help/POS.txt b/internal/help/POS.txt index 63a11ded6..8ac5c8125 100644 --- a/internal/help/POS.txt +++ b/internal/help/POS.txt @@ -33,3 +33,4 @@ The '''POS''' function returns the current print cursor text column position. {{PageNavigation}} +< diff --git a/internal/help/PRESET.txt b/internal/help/PRESET.txt index da685bdef..b40d15cd5 100644 --- a/internal/help/PRESET.txt +++ b/internal/help/PRESET.txt @@ -140,3 +140,4 @@ c% = 1 {{PageNavigation}} +< diff --git a/internal/help/PRINT.txt b/internal/help/PRINT.txt index f613cc0a1..7ea5328c3 100644 --- a/internal/help/PRINT.txt +++ b/internal/help/PRINT.txt @@ -5,7 +5,7 @@ The {{KW|PRINT}} statement prints numeric or string expressions to the program s ::: '''PRINT''' [{{Parameter|expression}}] [{;|,] [''expression''...] -{{PageParameters}} +{{Parameters}} * {{Parameter|expression}} is a numeric or string expression or list of expressions to be written to the screen. End quotes will not be displayed in strings. * The print statement can be followed by a [[semicolon]] to stop the print cursor or a [[comma]] to tab space the next print. @@ -85,3 +85,4 @@ Hello city! {{PageNavigation}} +< diff --git a/internal/help/PRINT_(file_statement).txt b/internal/help/PRINT_(file_statement).txt index 04cd16fbd..bc147ce2f 100644 --- a/internal/help/PRINT_(file_statement).txt +++ b/internal/help/PRINT_(file_statement).txt @@ -5,7 +5,7 @@ The [[PRINT (file statement)|PRINT #]] statement prints numeric or string expres ::: '''PRINT #''fileNumber&''''', [ [{{Parameter|expression}}] [{;|,] ... ] -{{PageParameters}} +{{Parameters}} * {{Parameter|fileNumber&}} is the file number of a file or device opened for writing. See {{KW|OPEN}}. * {{Parameter|expression}} is a numeric or string expression to be written to the file. Quotes will be removed from strings. * The print statement can be followed by a [[semicolon]] to stop the print cursor or a [[comma]] to tab the next print. @@ -74,3 +74,4 @@ K$ = {{Cl|INPUT$}}(1) 'press a key {{PageNavigation}} +< diff --git a/internal/help/PRINT_USING.txt b/internal/help/PRINT_USING.txt index a21fd2900..14ba2553f 100644 --- a/internal/help/PRINT_USING.txt +++ b/internal/help/PRINT_USING.txt @@ -1,34 +1,30 @@ -The [[PRINT USING]] statement is used to [[PRINT]] formatted data to the Screen or a file using a [[STRING]] template. +The '''PRINT USING''' statement is used to [[PRINT]] formatted data to the Screen or a file using a [[STRING]] template. {{PageSyntax}} :: '''PRINT''' [''text$''{;|,}] '''USING''' ''template$''; ''variable''[; ...][{;|,}] -{{PageParameters}} +{{Parameters}} * Literal or variable [[STRING]] ''text$'' can be placed between PRINT and USING or it can be included in the ''template''. * A [[semicolon]] or [[comma]] may follow the ''text'' to stop or tab the print cursor before the ''template'' [[PRINT]]. -* The literal or variable [[STRING]] ''template'' should use the template symbols to display each variable [[Variable Types|type]] in the list following it. -* The list of data ''variables'' used in the ''template'' are separated by semicolons after the template string value. -* In QB64 one [[semicolon]] or [[comma]] may follow the variable list to stop the print cursor for pending prints. QB only allowed a semicolon. +* The literal or variable [[STRING]] ''template'' should use the template symbols to display each variable [[type]] in the list following it. +* The list of data ''variables'' used in the ''template'' are '''separated by semicolons''' after the template string value. +* In '''QB64''' ONE [[semicolon]] or [[comma]] may follow the variable list to stop the print cursor for pending prints. QB only allowed a semicolon. -{{PageDescription}} +''Usage:'' * The ''variables'' should be listed in the order that they are used in the template from left to right. -* If the ''template'' string is omitted or symbols don't match the ''variable(s)'' an "Illegal Function Call" [[ERROR Codes|ERROR]] will occur. +* '''If the ''template'' string is omitted or symbols don't match the ''variable(s)'' an "Illegal Function Call" [[ERROR Codes|ERROR]] will occur!''' +* No more than 25 # digit places are allowed in a template number or an [[ERROR Codes|error]] will occur. * Can convert numerical exponential or [[scientific notation]] values to normal decimal point values using less digits. -* NOTE: If the numerical value exceeds the template's digit range a % symbol will appear in the leftmost digit area. -* WARNING: The numbers displayed are rounded so the actual values are never changed and are actually more accurate. +* '''NOTE:''' If the numerical value exceeds the template's digit range a % symbol will appear in the leftmost digit area. +* '''WARNING: The numbers displayed are rounded so the actual values are never changed and are actually more accurate.''' {{PrintUsing}} -{{PageQBasic}} -* QBasic limited the number of specified digit positions to 24; QB64 has no such restriction. - - -{{PageExamples}} ''Example 1:'' Printing formatted data using a predefined [[STRING|string]] template variable. {{CodeStart}} '' '' first$ = "Bobby": last$ = "Smith" @@ -43,14 +39,15 @@ tmp$ = "Salesperson: & & #####,. $$#####,.##" ''Example 2:'' How to display formatting symbols as normal text using underscores in a PRINT USING template. -{{CodeStart}} +{{CodeStart}} '' '' errcode = 35 -{{Cl|PRINT USING}} "Error ## occurred!"; errcode -'the ! is now displayed at the end of the printed string -{{Cl|PRINT USING}} "Error ## occurred_!"; errcode +{{Cl|PRINT USING}} "Error ## occurred!!"; errcode +'now there are the !! at the end of the printed string +{{Cl|PRINT USING}} "Error ## occurred_!_!"; errcode +{{Cl|END}} '' {{CodeEnd}} {{OutputStart}}Error 35 occurred -Error 35 occurred! +Error 35 occurred!! {{OutputEnd}} : ''Explanation:'' The first template will not print the exclamation points or error when the requested text parameters are omitted. @@ -77,15 +74,13 @@ tmp$ = "$$#######,.##" {{Cl|PRINT}} "I have this much money!"; {{Cl|PRINT USING|USING}} tmp$; money '' '' {{CodeEnd}} -{{OutputStart}} -I have this much money! $12,345.45 -{{OutputEnd}} : ''Note:'' This can also be used to print the USING formatting characters outside of the template. -{{PageSeeAlso}} +''See also:'' * [[PRINT]], [[PRINT USING (file statement)|PRINT #, USING]] * [[LPRINT]], [[LPRINT USING]] {{PageNavigation}} +< diff --git a/internal/help/PRINT_USING_(file_statement).txt b/internal/help/PRINT_USING_(file_statement).txt index 7db512a27..5ad3906c9 100644 --- a/internal/help/PRINT_USING_(file_statement).txt +++ b/internal/help/PRINT_USING_(file_statement).txt @@ -6,11 +6,11 @@ The '''PRINT #, USING''' statement is used to [[PRINT]] formatted text data to a :: '''PRINT ''filenumber%,''''' [''text$''{;|,}] '''USING ''template$''; ''variable'''''[; ...][{;|,}] -{{PageParameters}} +{{Parameters}} * [[INTEGER]] ''filenumber'' refers to the file number [[OPEN]]ed previously followed by a [[comma]]. * Literal or variable [[STRING]] ''text$'' can be placed between PRINT and USING or it can be included in the ''template''. * A [[semicolon]] or [[comma]] may follow the ''text'' to stop or tab the print cursor before the ''template'' [[PRINT]]. -* The literal or variable [[STRING]] ''template'' should use the template symbols to display each variable [[Variable Types|type]] in the list following it. +* The literal or variable [[STRING]] ''template'' should use the template symbols to display each variable [[type]] in the list following it. * The list of data ''variables'' used in the ''template'' are '''separated by semicolons''' after the template string value. * In '''QB64''' ONE [[semicolon]] or [[comma]] may follow the variable list to stop the print cursor for pending prints. QB only allowed a semicolon. @@ -33,3 +33,4 @@ The '''PRINT #, USING''' statement is used to [[PRINT]] formatted text data to a {{PageNavigation}} +< diff --git a/internal/help/PSET.txt b/internal/help/PSET.txt index 27680e492..95c2ffda5 100644 --- a/internal/help/PSET.txt +++ b/internal/help/PSET.txt @@ -1,4 +1,4 @@ -The '''PSET''' graphics [[SCREEN (statement)|SCREEN]] statement sets a pixel to a coordinate with a default or designated color attribute. +The '''PSET''' grahics [[SCREEN (statement)|SCREEN]] statement sets a pixel to a coordinate with a default or designated color attribute. {{PageSyntax}} @@ -157,3 +157,4 @@ y={{Cl|_MOUSEY}} {{PageNavigation}} +< diff --git a/internal/help/PUT.txt b/internal/help/PUT.txt index ef33f9ab4..7881db08b 100644 --- a/internal/help/PUT.txt +++ b/internal/help/PUT.txt @@ -89,3 +89,4 @@ showme 'display array after transfer from file {{PageNavigation}} +< diff --git a/internal/help/PUT_(TCP%2FIP_statement).txt b/internal/help/PUT_(TCP%2FIP_statement).txt index 93367ada5..77ef1ccbd 100644 --- a/internal/help/PUT_(TCP%2FIP_statement).txt +++ b/internal/help/PUT_(TCP%2FIP_statement).txt @@ -5,7 +5,7 @@ The '''PUT #''' TCP/IP statement sends unformatted(raw) data to an open connect :: '''PUT ''#handle'', , ''data'' ''' -{{PageParameters}} +{{Parameters}} * The ''handle'' value is returned by the [[_OPENCLIENT]], [[_OPENHOST]] or [[_OPENCONNECTION]] '''QB64''' functions. * The ''data'' can be any variable type value. Literal values are not allowed. @@ -36,3 +36,4 @@ The '''PUT #''' TCP/IP statement sends unformatted(raw) data to an open connect {{PageNavigation}} +< diff --git a/internal/help/PUT_(graphics_statement).txt b/internal/help/PUT_(graphics_statement).txt index b6e8c851e..4124abc67 100644 --- a/internal/help/PUT_(graphics_statement).txt +++ b/internal/help/PUT_(graphics_statement).txt @@ -43,7 +43,7 @@ The '''PUT''' graphics statement is used to place [[GET (graphics statement)|GET {{CodeStart}} '' '' {{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 256) {{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}} -image& = {{Cl|_LOADIMAGE}}("QB64.png") 'replace with your own image +image& = {{Cl|_LOADIMAGE}}("QB64.png") wide& = {{Cl|_WIDTH (function)|_WIDTH}}(image&): deep& = {{Cl|_HEIGHT}}(image&) {{Cl|DIM}} Array(wide& * deep&) {{Cl|AS}} {{Cl|INTEGER}} @@ -88,3 +88,4 @@ K$ = {{Cl|INPUT$}}(1) {{PageNavigation}} +< diff --git a/internal/help/Parenthesis.txt b/internal/help/Parenthesis.txt index 8a1a3d247..ff4bcba1a 100644 --- a/internal/help/Parenthesis.txt +++ b/internal/help/Parenthesis.txt @@ -32,3 +32,4 @@ nmb$ = {{Cl|LTRIM$}}((({{Cl|RTRIM$}}(nmb$)))) 'extra bracket pairs do not affec {{PageNavigation}} +< diff --git a/internal/help/QB64_FAQ.txt b/internal/help/QB64_FAQ.txt index 2fa1bff76..da2c17506 100644 --- a/internal/help/QB64_FAQ.txt +++ b/internal/help/QB64_FAQ.txt @@ -11,7 +11,7 @@ As with everything else, this list will be updated to correspond to new progress ==Q: What is QB64?== -A: '''QB64''' is a BASIC compatible Editor and C++ emitter that creates working Executable files from QBasic BAS files that can be run on 32 or 64 bit PC's using '''Windows''' (XP to 10), '''Linux''' or '''macOS'''. The goal is to be 100% compatible with QuickBASIC 4.5 plus add hundreds of new abilities such as program icons and custom sized windows and a great retro Editor with builtin help. +A: '''QB64''' is a BASIC compatible Editor and C++ emitter that creates working Executable files from Qbasic BAS files that can be run on 32 or 64 bit PC's using '''Windows''' (XP to 10), '''Linux''' or '''macOS'''. The goal is to be 100% compatible with QuickBasic 4.5 plus add hundreds of new abilities such as program icons and custom sized windows and a great retro Editor with builtin help. The '''new keywords''' add some '''new features''' such as playing '''music or sound''' files and instant access to '''32 bit graphics''' file images. Also '''TCP/IP''' internet communication is available to '''download''' files, '''email''' messages over the web or play '''internet games'''. '''DLL Libraries''' can add more programming options and QB64 can access all of the new USB gaming '''controllers''' and '''printers'''. @@ -64,7 +64,7 @@ A: QB64 supports the following Operating Systems: <center>'''Windows NT (XP), Windows Vista, Windows 7, 8 or 10:'''</center> -:'''1)''' Download the appropriate package according to your system from [http://www.qb64.org QB64.org] +:'''1)''' Download the appropriate package according to your system from [http://github.com/QB64Team/qb64/releases GitHub] :'''2)''' Unpack the contents to any location on your computer. Avoid unpacking to Program Files or other system folders that may require administrative privileges. QB64 needs to have full write permissions to its own folder. :*Executable programs are portable between like systems by copying the stand-alone executable file. @@ -73,7 +73,7 @@ A: QB64 supports the following Operating Systems: ---- <center>'''Most distributions of Linux, both 32 and 64 bit'''</center> -:'''1)''' Download the appropriate package according to your system from [http://www.qb64.org QB64.org] +:'''1)''' Download the appropriate package according to your system from [http://github.com/QB64Team/qb64/releases GitHub] :'''2)''' After extracting the downloaded package, run the installation batch/script called ''./setup_lnx.sh'' in the main ''qb64'' folder to setup QB64. :'''3)''' Most dependencies should be automatically downloaded by the setup script, but these are the ones you should look for if compilation fails: OpenGL developement libraries, ALSA development libraries, GNU C++ Compiler (g++) @@ -89,7 +89,7 @@ A: QB64 supports the following Operating Systems: :'''1)''' You must install Apple's '''Xcode command line tools''' for C++ compilation from their website. The simplest way to do so is opening a terminal window and typing the following command: '''xcode-select --install''' (more info here: [http://developer.apple.com/technologies/tools/xcode.html Xcode download]) :    (you won't be using the Xcode interface, QB64 just needs to have access to the C++ compiler and libraries it installs) -:'''3)''' Download the appropriate package according to your system from [http://www.qb64.org QB64.org] +:'''3)''' Download the appropriate package according to your system from [http://github.com/QB64Team/qb64/releases GitHub] :    Extract the downloaded package and run ''./setup_osx.command'', found within the QB64 folder to install the QB64 compiler. <center>'''After installation you should run '''./qb64''' or '''./qb64_start_osx.command''' to run qb64.'''</center> @@ -99,7 +99,7 @@ A: QB64 supports the following Operating Systems: <center>'''Note: Some QB64 keywords and procedures are not available for macOS.'''</center> -<center>[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_macOS_versions|Keywords Not Supported in Linux or macOS versions]]</center> +<center>[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords Not Supported in Linux or MAC OSX versions]]</center> ---- @@ -266,13 +266,16 @@ A: Not directly, but [[_FLOAT]] currency values up to 4 decimal places can be mu ==Q: Do you provide changelogs?== -A: We do. For all recent changelogs, check [http://www.qb64.org QB64.org] +We do. + +*For all recent changelogs, check at [http://github.com/QB64Team/qb64/blob/development/CHANGELOG.md GitHub] <p style="text-align: center">([[#toc|Return to FAQ topics]])</p> ==Q: Where I can view the C++ code before it gets compiled?== -A: Look in the QB64 '''internal\temp''' folder for '''main.txt''' to get the C code used to compile the latest program. +Look in the QB64 '''internal\temp''' folder for '''main.txt''' to get the C code used to compile the latest program. {{PageNavigation}} +< diff --git a/internal/help/QB64_Help_Menu.txt b/internal/help/QB64_Help_Menu.txt index aba142c10..931841834 100644 --- a/internal/help/QB64_Help_Menu.txt +++ b/internal/help/QB64_Help_Menu.txt @@ -1,7 +1 @@ -<center>[[Keyword Reference - Alphabetical|Alphabetical Keyword Index]] - -[[Keyword Reference - By usage|Keyword Index by Usage]] - -[[QB64 FAQ|Frequently Asked Questions About QB64]] - -</center> +< diff --git a/internal/help/Question_mark.txt b/internal/help/Question_mark.txt index 3c35b2ec3..b75576cba 100644 --- a/internal/help/Question_mark.txt +++ b/internal/help/Question_mark.txt @@ -20,3 +20,4 @@ A '''question mark''' can be used as a substitute shortcut to typing PRINT when {{PageNavigation}} +< diff --git a/internal/help/Quotation_mark.txt b/internal/help/Quotation_mark.txt index 5922f1c68..b1fd5573b 100644 --- a/internal/help/Quotation_mark.txt +++ b/internal/help/Quotation_mark.txt @@ -22,3 +22,4 @@ A '''quotation mark''' delimits the start and end of a literal [[STRING]] value. {{PageNavigation}} +< diff --git a/internal/help/RANDOM.txt b/internal/help/RANDOM.txt index 484e9d7e6..0eccedb41 100644 --- a/internal/help/RANDOM.txt +++ b/internal/help/RANDOM.txt @@ -103,3 +103,4 @@ ABCDEFGHI 9 {{PageNavigation}} +< diff --git a/internal/help/RANDOMIZE.txt b/internal/help/RANDOMIZE.txt index 8ee16fa3a..6632f91ea 100644 --- a/internal/help/RANDOMIZE.txt +++ b/internal/help/RANDOMIZE.txt @@ -102,3 +102,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/READ.txt b/internal/help/READ.txt index 734deb8ea..b1998411d 100644 --- a/internal/help/READ.txt +++ b/internal/help/READ.txt @@ -17,7 +17,7 @@ The '''READ''' statement reads values from a [[DATA]] field and assigns them to * Use the [[RESTORE]] statement to reread DATA statements from the start, with or without a line label as required. * [[ACCESS]] READ can be used in an [[OPEN]] statement to limit file access to read only, preserving file data. * '''WARNING! Do not place DATA fields after [[SUB]] or [[FUNCTION]] procedures! QB64 will FAIL to compile properly!''' -: QBasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures. +: Qbasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures. ''Example 1:'' Placing data into an array. @@ -50,11 +50,11 @@ The '''READ''' statement reads values from a [[DATA]] field and assigns them to {{Cl|DATA}} "DENVER,", COLORADO, 80211 '' '' {{CodeEnd}} {{OutputStart}} - CITY      STATE     ZIP + CITY STATE ZIP ------------------------------ - DENVER,  COLORADO    80211 + DENVER, COLORADO 80211 {{OutputEnd}} -:''Note:'' String DATA values do not require quotes unless they contain commas, end spaces or QBasic keywords. +:''Note:'' String DATA values do not require quotes unless they contain commas, end spaces or Qbasic keywords. @@ -65,3 +65,4 @@ The '''READ''' statement reads values from a [[DATA]] field and assigns them to {{PageNavigation}} +< diff --git a/internal/help/REDIM.txt b/internal/help/REDIM.txt index 33f2b127a..6cccbbdd6 100644 --- a/internal/help/REDIM.txt +++ b/internal/help/REDIM.txt @@ -3,28 +3,26 @@ A {{KW|REDIM}} statement can re-dimension one [[$DYNAMIC|dynamic]](flexible) [[A {{PageSyntax}} :[[REDIM]] [{{KW|_PRESERVE}}] [{{KW|SHARED}}] ArrayName[''typesuffix''] ({''max_element''|low_element[{{KW|TO}} ''upper_element'', ...]}) [{{KW|AS}} {{KW|TYPE|Type}}] -:[[REDIM]] [{{KW|_PRESERVE}}] [{{KW|SHARED}}] [{{KW|AS}} {{KW|TYPE|Type}}] ArrayName({''max_element''|low_element[{{KW|TO}} ''upper_element'', ...]}) {{PageDescription}} * Can change the number of elements in an array (the present array data is lost unless [[_PRESERVE]] is used). * Dynamic array elements can also be sized or resized by a program user's entry. -* The [[_PRESERVE]] option also allows the ''element'' range values to be moved upward or downward. +* The [[_PRESERVE]] option also allows the ''element'' range values to be moved upward or downward in '''QB64 only!''' * {{Parameter|Array}} is the name of the array to be dimensioned or re-dimensioned. * {{Parameter|elements}} is the number of elements the array should hold. Use the optional [[TO]] {{Parameter|elements2}} to set a range. * '''Always use the same array [[TYPE]] suffix ([[AS]] type) or a new array type with the same name may be created.''' -* REDIM cannot change [[$STATIC]] arrays created with a [[DIM]] statement unless the [[$DYNAMIC]] [[metacommand]] is used. +* REDIM cannot change [[$STATIC]] arrays created with a [[DIM]] statement unless the [[$DYNAMIC]] [[Metacommand]] is used! * To create a dynamic array use the [[$DYNAMIC]] metacommand or use [[REDIM]] rather than [[DIM]] when first creating the array. * Use REDIM [[_PRESERVE]] to change the range or number of array elements without losing the remaining elements. Data may move up or down to accommodate those boundary changes. -* '''REDIM [[_PRESERVE]] cannot change the number of array dimensions or type.''' +* '''REDIM [[_PRESERVE]] cannot change the number of array dimensions or type!''' * [[$DYNAMIC|Dynamic]] arrays MUST be [[REDIM]]ensioned if [[ERASE]] or [[CLEAR]] are used to clear the arrays as they no longer exist. * When [[AS]] is used to declare the type, use [[AS]] to retain that type or it will change to [[SINGLE]]! -* '''Warning! Do not use negative array upper bound index values as OS access or "Out of Memory" [[ERROR Codes|errors]] will occur.''' -* When using the '''AS type variable-list''' syntax, type symbols cannot be used. +* '''NOTE: Many Qbasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!''' +* '''Warning! Do not use negative array upper bound index values as OS access or "Out of Memory" [[ERROR Codes|errors]] will occur!''' -{{PageExamples}} -''Example 1:'' The [[$DYNAMIC]] metacommand allows an array to be re-sized using [[DIM]] and REDIM. +''Example 1:'' The [[$DYNAMIC]] Metacommand allows an array to be re-sized using [[DIM]] and REDIM. {{CodeStart}} '' '' '{{Cl|$DYNAMIC}} @@ -66,3 +64,4 @@ array(10) = 24 {{PageNavigation}} +< diff --git a/internal/help/REM.txt b/internal/help/REM.txt index 6e3376abe..c0afd2dca 100644 --- a/internal/help/REM.txt +++ b/internal/help/REM.txt @@ -1,33 +1,31 @@ -[[REM]] allows explanatory comments, or remarks, to be inserted in a program. [[REM]] statements extend to the end of the line and the text is ignored when the program is run. +'''REM''' or an apostrophe is used for programmer remarks, comments or to stop the execution of program code. {{PageSyntax}} -:: [[REM]] this is a comment -:: [[apostrophe|']] this is also a comment +:: REM program comment or ignore code {{PageDescription}} -* [[REM]] may only be used where statements are allowed unlike [[apostrophe]] comments which may be included anywhere. -* [[REM]] must appear as the last, or only, statement on a line. Any following statements are included in the comment text and ignored. -* QBasic [[metacommand]]s like [[$INCLUDE]] must be included in a comment using either [[REM]] or [[apostrophe|']]. -* [[Apostrophe]] comments, unavailable in earlier dialects of the BASIC language, are now generally favored over [[REM]] statements for their greater flexibility. -* Comments are also useful for disabling code for program testing and debugging purposes. +* Comments cannot be read by Qbasic correctly and may cause syntax and other errors without REM! +* Instead of REM you can use the {{KW|REM|'}} symbol which can be put anywhere. +* Code can also be commented out for program testing purposes. +* Qbasic Metacommands such as {{KW|$DYNAMIC}} and {{KW|$INCLUDE}} require the use of REM or the apostrophe. -{{PageExamples}} -''Example:'' Avoiding an [[END IF]] error. +''Example:'' Avoiding an END IF error. {{CodeStart}} '' '' {{Cl|REM}} This is a remark... ' This is also a remark... -{{Cl|IF...THEN|IF}} a = 0 {{Cl|THEN}} {{Cl|REM}} this statement is executed so this is a single-line IF statement -{{Cl|IF...THEN|IF}} a = 0 {{Cl|THEN}} ' this comment is not executed so this is a multi-line IF statement and END IF is required +{{Cl|IF...THEN|IF}} a = 0 {{Cl|THEN}} {{Cl|REM}} (REM follows syntax rules) +{{Cl|IF...THEN|IF}} a = 0 {{Cl|THEN}} '(apostrophe doesn't follow syntax rules, so use END IF after this) {{Cl|END IF}} '' '' {{CodeEnd}} {{PageSeeAlso}} * [[Apostrophe]] -* [[$DYNAMIC]], [[$STATIC]], [[$INCLUDE]] +* {{KW|$DYNAMIC}}, {{KW|$STATIC}}, {{KW|$INCLUDE|$INCLUDE:}} {{PageNavigation}} +< diff --git a/internal/help/RESET.txt b/internal/help/RESET.txt index f0b8ad825..fe3f02589 100644 --- a/internal/help/RESET.txt +++ b/internal/help/RESET.txt @@ -15,3 +15,4 @@ The '''RESET''' statement closes all files and writes the directory information {{PageNavigation}} +< diff --git a/internal/help/RESTORE.txt b/internal/help/RESTORE.txt index 5399a49a2..71df480e4 100644 --- a/internal/help/RESTORE.txt +++ b/internal/help/RESTORE.txt @@ -1,51 +1,49 @@ -The [[RESTORE]] statement is used to reset the DATA pointer to the beginning of the data. +The '''RESTORE''' statement is used to reset the DATA pointer to the beginning of the data. {{PageSyntax}} -:: [[RESTORE]] [lineNumber|lineLabel] +:: RESTORE [datafield] -{{PageDescription}} -* The line label or number enables a labeled data field to be [[READ]] more than once as required. +* The datafield line label or number enables a labeled data field to be [[READ]] more than once as required. * Datafield label names are not required when working with ONE or a progression of data fields in the main body of code. * Label multiple data fields to restore them to use them again when necessary. * If RESTORE is used with unlabeled data fields or no datafield is designated then the first data field is read. * Use RESTORE to avoid an [[ERROR Codes|"Out of Data" error]] when reading a data field! * See the [[DATA]] statement for [[STRING]] data value specifications. * '''Do not place [[DATA]] fields after [[SUB]] or [[FUNCTION]] procedures! QB64 will FAIL to [[RESTORE]] properly!''' -: QBasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures. +: Qbasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures. -{{PageExamples}} -''Example 1:'' Restoring a labeled DATA field to avoid going past the end of DATA. +''Example:'' Restoring a labeled DATA field to avoid going past the end of DATA. {{CodeStart}} -{{Cl|DO}} - {{Cl|INPUT}} "Enter a month number(1 to 12): ", monthnum% +DO + {{Cl|INPUT}} "Enter a month number(1 to 12): ", monthnum% - {{Cl|RESTORE}} Months - {{Cl|FOR}} i = 1 {{Cl|TO}} monthnum% - {{Cl|READ}} month$, days% 'variables must match data field types - {{Cl|NEXT}} - {{Cl|PRINT}} "The month "; month$; " has"; days%; "days." -{{Cl|LOOP}} {{Cl|UNTIL}} monthnum% < 1 OR monthnum% > 12 + {{Cl|RESTORE}} Months + FOR i = 1 TO monthnum% + {{Cl|READ}} month$, days% 'variables must match data field types + NEXT + {{Cl|PRINT}} "The month "; month$; " has"; days%; "days." +LOOP UNTIL monthnum% < 1 OR monthnum% > 12 -Months: -{{Cl|DATA}} January, 31, February, 28, March, 31, April, 30, May, 31, June, 30 -{{Cl|DATA}} July, 31, August, 31, September, 30, October, 31, November, 30, December, 31 + Months: + {{Cl|DATA}} January, 31, February, 28, March, 31, April, 30, May, 31, June, 30 + {{Cl|DATA}} July, 31, August, 31, September, 30, October, 31, November, 30, December, 31 {{CodeEnd}} {{OutputStart}} Enter a month number(1 to 12): 6 The month June has 30 days. {{OutputEnd}} -:''Note:'' String DATA values do not require quotes unless they have commas, end spaces or QBasic keywords in them. +:''Note:'' String DATA values do not require quotes unless they have commas, end spaces or Qbasic keywords in them. -''Example 2:'' Using RESTORE to know the number of elements in the DATA in order to dimension and store the items in a array. +''Example:'' Using RESTORE to know the number of elements in the DATA in order to dimension and store the items in a array. {{CodeStart}} {{Cl|DO}} - {{Cl|READ}} dummy$ 'we won't actually use this string for anything else than to know when there is no more DATA. - count = count + 1 +{{Cl|READ}} dummy$ 'we won't actually use this string for anything else than to know when there is no more DATA. +count = count + 1 {{Cl|LOOP}} {{Cl|UNTIL}} dummy$ = "stop" 'when dummy$ = "stop" then we know that it is the last entry so it only does the above loop until then. count = count - 1 'since the last string is "stop" and we don't want to store it in the array. @@ -58,13 +56,13 @@ count = count - 1 'since the last string is "stop" and we don't want to store it {{Cl|FOR}} c = 1 {{Cl|TO}} count - {{Cl|READ}} entry$(c) 'read the DATA and store it into the array. +{{Cl|READ}} entry$(c) 'read the DATA and store it into the array. {{Cl|NEXT}} 'we can now print the contents of the array: {{Cl|FOR}} c = 1 {{Cl|TO}} count - {{Cl|PRINT}} entry$(c) +{{Cl|PRINT}} entry$(c) {{Cl|NEXT}} {{Cl|END}} @@ -82,9 +80,11 @@ entry3 ''Note:'' Now we can add any number of entries without further compensation to the code. -{{PageSeeAlso}} + +''See also'' * [[DATA]], [[READ]] * [[line numbers]] / line labels {{PageNavigation}} +< diff --git a/internal/help/RESUME.txt b/internal/help/RESUME.txt index dd575c8be..a5bdecd26 100644 --- a/internal/help/RESUME.txt +++ b/internal/help/RESUME.txt @@ -19,3 +19,4 @@ The '''RESUME''' statement is used with '''NEXT''' or a line number or label in {{PageNavigation}} +< diff --git a/internal/help/RETURN.txt b/internal/help/RETURN.txt index 78b4fb172..89ae6df10 100644 --- a/internal/help/RETURN.txt +++ b/internal/help/RETURN.txt @@ -5,7 +5,7 @@ :: '''RETURN''' [{''linelabel''|''linenumber''}] -{{PageParameters}} +{{Parameters}} * RETURN without parameters returns to the code immediately following the original [[GOSUB]] call. * ''line number'' or ''linelabel'' after the RETURN statement returns code execution to that label. @@ -71,3 +71,4 @@ it went here. {{PageNavigation}} +< diff --git a/internal/help/RIGHT$.txt b/internal/help/RIGHT$.txt index 80deab5ff..b9dc91610 100644 --- a/internal/help/RIGHT$.txt +++ b/internal/help/RIGHT$.txt @@ -6,7 +6,7 @@ The '''RIGHT$''' function returns a set number of characters in a [[STRING]] var :: '''RIGHT$('''''stringvalue$, numberofcharacters%''''')''' -{{PageParameters}} +{{Parameters}} * The ''stringvalue$'' can be any string of [[ASCII]] characters as a [[STRING]] variable. * The ''numberofcharacters'' [[INTEGER]] value determines the number of characters to return from the right end of the string. @@ -57,3 +57,4 @@ hexadecimal$ = "{{Cl|&H}}FF" + {{Cl|RIGHT$}}("0" + {{Cl|HEX$}}(R), 2) + {{Cl {{PageNavigation}} +< diff --git a/internal/help/RMDIR.txt b/internal/help/RMDIR.txt index db16ed89c..a06b0ce2b 100644 --- a/internal/help/RMDIR.txt +++ b/internal/help/RMDIR.txt @@ -61,3 +61,4 @@ C:\temp is not empty! {{PageNavigation}} +< diff --git a/internal/help/RND.txt b/internal/help/RND.txt index e3ac4d6e9..a2d446b67 100644 --- a/internal/help/RND.txt +++ b/internal/help/RND.txt @@ -5,7 +5,7 @@ The '''RND''' function returns a random number with a value between 0 (inclusive :: result! = [[RND]] [(''n'')] -{{PageParameters}} +{{Parameters}} * ''n'' is a [[SINGLE]] numeric value that defines the behavior of the RND function but is '''NOT normally required''': ::n parameter omitted: Returns next random number in the sequence. ::n = 0: Return the last value returned. @@ -106,3 +106,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/RSET.txt b/internal/help/RSET.txt index 8777a7378..36d847e72 100644 --- a/internal/help/RSET.txt +++ b/internal/help/RSET.txt @@ -41,3 +41,4 @@ Over ten c {{PageNavigation}} +< diff --git a/internal/help/RTRIM$.txt b/internal/help/RTRIM$.txt index 215d14c53..dbf255fc7 100644 --- a/internal/help/RTRIM$.txt +++ b/internal/help/RTRIM$.txt @@ -36,3 +36,4 @@ Tommy {{PageNavigation}} +< diff --git a/internal/help/RUN.txt b/internal/help/RUN.txt index ac6f57435..b1bd5bb20 100644 --- a/internal/help/RUN.txt +++ b/internal/help/RUN.txt @@ -8,10 +8,10 @@ The multi-modular technique goes back to when QBasic and QuickBASIC had module s :: '''RUN''' [{''line_number'' | ''filespec$''}] [''command_parameter(s)''] -{{PageParameters}} +{{Parameters}} * ''line number'' specifies a line number in the main module code. * An optional ''filespec'' specifies a program to load into memory and run. -: * BAS or EXE extensions are assumed to be the same as the calling module's extension, EXE or BAS (QBasic only). +: * BAS or EXE extensions are assumed to be the same as the calling module's extension, EXE or BAS (Qbasic only). : * ''file names specs'' with other extensions must use the full filename. No extension requires a dot. * In '''QB64''' ''command line parameters'' can follow the program file name and be read using the [[COMMAND$]] function later. @@ -60,3 +60,4 @@ Do you want to quit?(Y/N)_ {{PageNavigation}} +< diff --git a/internal/help/SADD.txt b/internal/help/SADD.txt index dd86e07ef..5a8cca2a8 100644 --- a/internal/help/SADD.txt +++ b/internal/help/SADD.txt @@ -15,3 +15,4 @@ The '''SADD''' function returns the address of a [[STRING]] variable as an offse {{PageNavigation}} +< diff --git a/internal/help/SCREEN.txt b/internal/help/SCREEN.txt index 91538a8de..ddf7aa73d 100644 --- a/internal/help/SCREEN.txt +++ b/internal/help/SCREEN.txt @@ -9,7 +9,7 @@ The [[SCREEN]] statement sets the video display mode and size of the program win ::: '''SCREEN''' {''mode%''|''imagehandle&''} [, , active_page, visual_page] -{{PageParameters}} +{{Parameters}} * The SCREEN ''mode'' [[INTEGER]] values available today are 0 to 2 and 7 to 13 listed below. * '''QB64''' can use a [[LONG]] [[_NEWIMAGE]] page or [[_LOADIMAGE]] file ''image handle'' value instead. * The empty comma disables color when any value is used. '''DO NOT USE!''' Include the comma ONLY when using page flipping. @@ -63,11 +63,11 @@ The [[SCREEN]] statement sets the video display mode and size of the program win ==Legacy Screen Modes== -* '''[[SCREEN]] 0''' (default mode) is a '''text only''' screen mode. 64 (VGA) colors with hi-intensity(blinking) colors 16 to 31. ([[DAC]] attrib 6, 8 to 15). 8 Background colors intensities only(0 - 7). No graphics are possible! Normally runs in a window. ALT-Enter switches from a window to fullscreen. To automatically run in '''QBasic''' fullscreen, use another Screen mode before using {{KW|SCREEN (statement)|SCREEN}} 0. Can use {{KW|PCOPY}} with video pages 0 to 7. Text is 25, 43 or 50 rows by 40 or 80 columns. Default is 25 by 80. See {{KW|WIDTH}}. +* '''[[SCREEN]] 0''' (default mode) is a '''text only''' screen mode. 64 (VGA) colors with hi-intensity(blinking) colors 16 to 31. ([[DAC]] attrib 6, 8 to 15). 8 Background colors intensities only(0 - 7). No graphics are possible! Normally runs in a window. ALT-Enter switches from a window to fullscreen. To automatically run in '''Qbasic''' fullscreen, use another Screen mode before using {{KW|SCREEN (statement)|SCREEN}} 0. Can use {{KW|PCOPY}} with video pages 0 to 7. Text is 25, 43 or 50 rows by 40 or 80 columns. Default is 25 by 80. See {{KW|WIDTH}}. : '''Note:''' Use [[OUT]] or [[_PALETTECOLOR]] to create higher intensity color backgrounds than [[COLOR]] , 7. -:::'''All other available [[SCREEN]] modes can use text and graphics and are fullscreen in QBasic ONLY.''' +:::'''All other available [[SCREEN]] modes can use text and graphics and are fullscreen in Qbasic ONLY.''' * '''[[SCREEN]] 1''' has 4 background color attributes. 0 = black, 1 = blue, 2 = green, 3 = grey. White foreground only. Text is 25 by 40. White graphics is 320 by 200. @@ -114,7 +114,7 @@ The [[SCREEN]] statement sets the video display mode and size of the program win * The minimum on screen graphics pixel coordinates are 0 for columns and rows in the top left corner. * Maximum pixel coordinates are one less than the maximum dimensions above because the pixel count starts at 0. * Graphic objects such as [[PSET]], [[PRESET]], [[LINE]], [[CIRCLE]] and [[DRAW]] can be placed partially off of the screen. -* [[GET (graphics statement)|GET]] and [[PUT (graphics statement)|PUT]] screen image operations MUST be located completely on the screen in QBasic! +* [[GET (graphics statement)|GET]] and [[PUT (graphics statement)|PUT]] screen image operations MUST be located completely on the screen in Qbasic! * [[VIEW]] can be used to designate a graphic view port area of the screen. * [[WINDOW]] can be used to set the graphics SCREEN coordinates to almost any size needed. Use the SCREEN option for normal row coordinate values. Row coordinates are Cartesian(decrease in value going down the screen) otherwise. * In '''QB64''' the [[_WIDTH (function)|_WIDTH]] and [[_HEIGHT]] functions will return the graphic pixel dimensions in SCREENs other than 0. @@ -134,7 +134,7 @@ The [[SCREEN]] statement sets the video display mode and size of the program win ==Examples== -:''Example 1:'' Shows an example of each legacy screen mode available to QBasic and QB64. +:''Example 1:'' Shows an example of each legacy screen mode available to Qbasic and QB64. {{CodeStart}} '' '' {{Cl|SCREEN}} 0 {{Cl|PRINT}} "This is {{Cl|SCREEN}} 0 - only text is allowed!" @@ -191,3 +191,4 @@ This is SCREEN 0 - only text is allowed! {{PageNavigation}} +< diff --git a/internal/help/SCREEN_(function).txt b/internal/help/SCREEN_(function).txt index 7ee8728c8..06ddd62c5 100644 --- a/internal/help/SCREEN_(function).txt +++ b/internal/help/SCREEN_(function).txt @@ -5,7 +5,7 @@ The '''SCREEN''' function returns the [[ASCII]] code of a text character or the :: codeorcolor% = '''SCREEN (''row%'', ''column%''''' [, colorflag%]''')''' -{{PageParameters}} +{{Parameters}} * ''row'' and ''column'' are the [[INTEGER]] text coordinates of the [[SCREEN]] mode used. * Optional ''colorflag'' [[INTEGER]] value can be omitted or 0 for [[ASCII]] code values or 1 for color attributes. @@ -17,7 +17,7 @@ The '''SCREEN''' function returns the [[ASCII]] code of a text character or the * When the ''flag'' value is greater than 0 in '''SCREEN 0''', the function returns the foreground and background color attribute of text position. :: * The foreground color(0 to 15) is the returned SCREEN color value AND 15: '''{{text|FG <nowiki>=</nowiki> SCREEN(1, 1, 1) AND 15|green}}''' :: * The background color(0 to 7) is the returned SCREEN color value \ 16: '''{{text|BG <nowiki>=</nowiki> SCREEN(1, 1, 1) \ 16|green}}''' -* '''QB64''' can return color values in screen modes other than [[SCREEN]] 0. QBasic returned the wrong color values in graphic screen modes! +* '''QB64''' can return color values in screen modes other than [[SCREEN]] 0. Qbasic returned the wrong color values in graphic screen modes! ''Example 1:'' Finding the text foreground and background colors in SCREEN 0 only: @@ -37,7 +37,7 @@ The '''SCREEN''' function returns the [[ASCII]] code of a text character or the : ''Note:'' How the SCREEN 0 background color can only be changed to colors 0 through 7! 7 * 16 = 112. -''Example 2:'' Reading the [[ASCII]] code and color of a text character using the SCREEN function. Graphic colors were not reliable in QBasic! +''Example 2:'' Reading the [[ASCII]] code and color of a text character using the SCREEN function. Graphic colors were not reliable in Qbasic! {{CodeStart}} '' '' {{Cl|SCREEN (statement)|SCREEN}} 12 row = 10: column = 10 @@ -89,3 +89,4 @@ a$ = {{Cl|RTRIM$}}(a$) {{PageNavigation}} +< diff --git a/internal/help/SEEK.txt b/internal/help/SEEK.txt index dfd1fdf23..817d7df4f 100644 --- a/internal/help/SEEK.txt +++ b/internal/help/SEEK.txt @@ -19,3 +19,4 @@ The '''SEEK''' function returns the current byte or record position in a file. {{PageNavigation}} +< diff --git a/internal/help/SEEK_(statement).txt b/internal/help/SEEK_(statement).txt index 134649d40..e252a1e38 100644 --- a/internal/help/SEEK_(statement).txt +++ b/internal/help/SEEK_(statement).txt @@ -29,3 +29,4 @@ The '''SEEK''' statement sets the next byte or record position of a file for a r {{PageNavigation}} +< diff --git a/internal/help/SELECT_CASE.txt b/internal/help/SELECT_CASE.txt index 1d48f12d0..7d4b87d0d 100644 --- a/internal/help/SELECT_CASE.txt +++ b/internal/help/SELECT_CASE.txt @@ -12,7 +12,7 @@ :'''END SELECT''' -{{PageDescription}} + * '''SELECT CASE''' evaluates {{Parameter|testExpression}} and executes the first matching [[CASE]] or [[CASE ELSE]] block and exits. * '''SELECT EVERYCASE''' allows the execution of all matching [[CASE]] blocks from top to bottom or the [[CASE ELSE]] block. * The literal, variable or expression {{Parameter|testExpression}} comparison can result in any string or numerical type. @@ -167,3 +167,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/SETMEM.txt b/internal/help/SETMEM.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/SETMEM.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/SGN.txt b/internal/help/SGN.txt index e6aa68534..0509dc292 100644 --- a/internal/help/SGN.txt +++ b/internal/help/SGN.txt @@ -30,3 +30,4 @@ PRINT n '' '' {{PageNavigation}} +< diff --git a/internal/help/SHARED.txt b/internal/help/SHARED.txt index 20d0d1047..135f9513f 100644 --- a/internal/help/SHARED.txt +++ b/internal/help/SHARED.txt @@ -4,14 +4,12 @@ The '''SHARED''' statement allows variables to be passed automatically to any [[ {{PageSyntax}} :: DIM SHARED Qt AS STRING * 1 -:: DIM SHARED AS STRING * 1 Qt * [[DIM]]ensioned variables are shared with all procedures in the program module. * When used with [[DIM]] in the main module, it eliminates the need to pass a parameter variable to a [[SUB]] or [[FUNCTION]]. * Use [[COMMON SHARED]] to share a list of variable values with sub-procedures or other modules. See also: [[COMMON]] * SHARED ('''without [[DIM]]''') can share a list of variables inside of [[SUB]] or [[FUNCTION]] procedures with the main module only. -* When using the '''AS type variable-list''' syntax, type symbols cannot be used. :'''Note: SHARED variables in sub-procedures will not be passed to other sub-procedures, only the main module.''' @@ -70,3 +68,4 @@ DIR$ = DirList$(Index%) {{PageNavigation}} +< diff --git a/internal/help/SHELL.txt b/internal/help/SHELL.txt index 096bee847..aab2e8419 100644 --- a/internal/help/SHELL.txt +++ b/internal/help/SHELL.txt @@ -22,7 +22,7 @@ The [[SHELL]] statement allows a program to run external programs or command lin *'''NOTE: Use [[CHDIR]] instead of CD as SHELL commands cannot affect the current program path.''' -{{PageQBasic}} +==QBasic/QuickBASIC== * '''QBasic BAS files could be run like compiled programs without returning to the IDE when [[SYSTEM]] was used to [[END|end]] them.''' * A user would invoke it with {{InlineCode}}SHELL "QB.EXE /L /RUN program.BAS"{{InlineCodeEnd}} @@ -33,10 +33,9 @@ The [[SHELL]] statement allows a program to run external programs or command lin {{Cl|SHELL}} {{Cl|_HIDE}} "dir " + {{Cl|CHR$}}(34) + "free cell.ico" + {{Cl|CHR$}}(34) + " /b > temp.dir" '' '' {{Cl|SHELL}} "start Notepad temp.dir" ' display temp file contents in Notepad window '' '' {{CodeEnd}} -:Contents of ''temp.dir'' text file: -{{OutputStart}} -Free Cell.ico -{{OutputEnd}} +:{{small|Contents of ''temp.dir'' text file:}} +{{TextStart}}Free Cell.ico +{{TextEnd}} ''Example 2:'' Opening a Windows program (Notepad) to read or print a Basic created text file. @@ -58,20 +57,20 @@ Free Cell.ico ''Example 3:'' Function that returns the program's current working path. {{CodeStart}} currentpath$ = Path$ ' function call saves a path for later program use - {{Cl|PRINT}} currentpath$ + PRINT currentpath$ {{Cl|FUNCTION}} Path$ - {{Cl|SHELL}} {{Cl|_HIDE}} "CD > D0S-DATA.INF" 'code to hide window in '''QB64''' - {{Cl|OPEN}} "D0S-DATA.INF" {{Cl|FOR (file statement)|FOR}} {{Cl|APPEND}} {{Cl|AS}} #1 'this may create the file + {{Cl|SHELL}} {{Cl|_HIDE}} "CD > D0S-DATA.INF" 'code to hide window in '''QB64''' + {{Cl|OPEN}} "D0S-DATA.INF" FOR {{Cl|APPEND}} AS #1 'this may create the file L% = {{Cl|LOF}}(1) 'verify that file and data exist {{Cl|CLOSE}} #1 {{Cl|IF}} L% {{Cl|THEN}} 'read file if it has data - {{Cl|OPEN}} "DOS-DATA.INF" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 + {{Cl|OPEN}} "D0S-DATA.INF" FOR {{Cl|INPUT (file mode)|INPUT}} AS #1 {{Cl|LINE INPUT (file statement)|LINE INPUT}} #1, line$ 'read only line in file Path$ = line$ + "\" 'add slash to path so only a filename needs added later {{Cl|CLOSE}} #1 {{Cl|ELSE}} : Path = "" 'returns zero length string if path not found - {{Cl|END IF}} + END IF {{Cl|KILL}} "D0S-DATA.INF" 'deleting the file is optional {{Cl|END FUNCTION}} '' '' {{CodeEnd}} @@ -83,7 +82,7 @@ Free Cell.ico ''Example 4:'' Determining if a drive or path exists. Cannot use with a file name specification. {{CodeStart}} '' '' {{Cl|LINE INPUT}} "Enter a drive or path (no file name): ", DirPath$ -{{Cl|IF}} PathExist%(DirPath$) {{Cl|THEN}} {{Cl|PRINT}} "Drive Path exists!" {{Cl|ELSE}} PRINT "Drive Path does not exist!" +{{Cl|IF}} PathExist%(DirPath$) {{Cl|THEN}} PRINT "Drive Path exists!" {{Cl|ELSE}} PRINT "Drive Path does not exist!" {{Cl|END}} {{Cl|FUNCTION}} PathExist% (Path$) @@ -92,41 +91,39 @@ PathExist% = 0 {{Cl|IF}} {{Cl|LEN}}({{Cl|ENVIRON$}}("OS")) {{Cl|THEN}} CMD$ = "CMD /C " {{Cl|ELSE}} CMD$ = "COMMAND /C " {{Cl|SHELL}} {{Cl|_HIDE}} CMD$ + "If Exist " + Path$ + "\nul echo yes > D0S-DATA.INF" {{Cl|OPEN}} "D0S-DATA.INF" {{Cl|FOR (file statement)|FOR}} {{Cl|APPEND}} {{Cl|AS}} #1 -{{Cl|IF}} {{Cl|LOF}}(1) {{Cl|THEN}} PathExist% = -1 'yes will be in file if path exists +{{Cl|IF}} {{Cl|LOF}}(1) {{Cl|THEN}} PathExist% = -1 'yes will be in file if path exists {{Cl|CLOSE}} #1 -{{Cl|KILL}} "D0S-DATA.INF" 'delete data file optional +{{Cl|KILL}} "D0S-DATA.INF" 'delete data file optional {{Cl|END FUNCTION}} '' '' {{CodeEnd}} {{small|Code by Ted Weissgerber}} -:''Explanation: IF Exist'' checks for the drive path. ''\Nul'' allows an empty folder at end of path. ''Echo'' prints '''yes''' in the file if it exists. +:''Explanation: IF Exist'' checks for the drive path. ''\Nul'' allows an emply folder at end of path. ''Echo'' prints '''yes''' in the file if it exists. : In '''QB64''' you can simply use the [[_FILEEXISTS]] statement for the same purpose of the example above. ''Snippet 1:'' When looking for '''printers''' this command gives you a file list with the default printer marked as '''TRUE''': -{{CodeStart}} -{{Cl|SHELL}} {{Cl|_HIDE}} "CMD /C" + "wmic printer get name,default > default.txt" -{{CodeEnd}} -: Created file's text: -{{OutputStart}}Default Name +{{TextStart}}{{Cb|SHELL}} {{Cb|_HIDE}} "CMD /C" + "wmic printer get name,default > default.txt" +{{TextEnd}} +'''Created file's text:''' +{{TextStart}}Default Name FALSE Microsoft XPS Document Writer TRUE HP Photosmart C7200 series FALSE HP Officejet Pro 8600 FALSE Fax -{{OutputEnd}} +{{TextEnd}} : ''Explanation:'' [[LINE INPUT]] could be used to find the printer names as [[STRING]] variables. ''Snippet 2:'' Here is the code to set the default printer to the "HP Officejet Pro 8600": -{{CodeStart}} -{{Cl|SHELL}} {{Cl|_HIDE}} "CMD /C" + "wmic printer where name='HP Officejet Pro 8600' call setdefaultprinter" -{{CodeEnd}} -: After executing this program, and then running the first snippet again, we see the following contents of the text file: -{{OutputStart}}Default Name +{{TextStart}}SHELL _HIDE "CMD /C" + "wmic printer where name='HP Officejet Pro 8600' call setdefaultprinter" +{{TextEnd}} +: After executing this program, and then running the first snippet again, we see the following '''contents of the text file:''' +{{TextStart}}Default Name FALSE Microsoft XPS Document Writer FALSE HP Photosmart C7200 series TRUE HP Officejet Pro 8600 FALSE Fax -{{OutputEnd}} +{{TextEnd}} ===More examples=== @@ -155,3 +152,4 @@ PathExist% = 0 {{PageNavigation}} +< diff --git a/internal/help/SHELL_(function).txt b/internal/help/SHELL_(function).txt index 159ee0dd7..303afc7be 100644 --- a/internal/help/SHELL_(function).txt +++ b/internal/help/SHELL_(function).txt @@ -5,7 +5,7 @@ The '''SHELL''' function displays the console and returns the [[INTEGER]] code v ::: return_code = '''SHELL(''DOScommand$'')''' -{{PageParameters}} +{{Parameters}} * The literal or variable [[STRING]] ''command'' parameter can be any valid external command or call to another program. @@ -58,3 +58,4 @@ returncode% = {{Cl|SHELL (function)|SHELL}}("DesktopSize") 'replace call with na {{PageNavigation}} +< diff --git a/internal/help/SIGNAL.txt b/internal/help/SIGNAL.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/SIGNAL.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/SIN.txt b/internal/help/SIN.txt index a75fbb583..2048038d9 100644 --- a/internal/help/SIN.txt +++ b/internal/help/SIN.txt @@ -5,7 +5,7 @@ The {{KW|SIN}} function returns the vertical component or sine of an angle measu ::: value! = '''SIN('''''radian_angle!''''')''' -{{PageParameters}} +{{Parameters}} * The ''radian_angle'' must be measured in radians from 0 to 2 * Pi. @@ -15,7 +15,7 @@ The {{KW|SIN}} function returns the vertical component or sine of an angle measu * Accuracy can be determined as [[SINGLE]] by default or [[DOUBLE]] by following the parameter value with a # suffix. -''Example 1:'' Converting degree angles to radians for QBasic's trig functions and drawing the line at the angle. +''Example 1:'' Converting degree angles to radians for Qbasic's trig functions and drawing the line at the angle. {{CodeStart}} '' '' {{Cl|SCREEN}} 12 PI = 4 * {{Cl|ATN}}(1) @@ -117,3 +117,4 @@ The value of 2 &pi; is used to determine the sec! multiplier that determines {{PageNavigation}} +< diff --git a/internal/help/SINGLE.txt b/internal/help/SINGLE.txt index 6219267c5..c9d8845a5 100644 --- a/internal/help/SINGLE.txt +++ b/internal/help/SINGLE.txt @@ -12,7 +12,7 @@ * Values returned may be expressed using exponential or [[scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision. * Floating decimal point numerical values cannot be [[_UNSIGNED]]! * Values can be converted to 4 byte [[ASCII]] string values using [[_MKS$]] and back with [[_CVS]]. -* '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix!''' +* '''Warning: Qbasic keyword names cannot be used as numerical variable names with or without the type suffix!''' {{PageSeeAlso}} @@ -24,3 +24,4 @@ {{PageNavigation}} +< diff --git a/internal/help/SLEEP.txt b/internal/help/SLEEP.txt index 533b1ae27..58c6cef83 100644 --- a/internal/help/SLEEP.txt +++ b/internal/help/SLEEP.txt @@ -37,3 +37,4 @@ You've waited for 2 seconds. {{PageNavigation}} +< diff --git a/internal/help/SOUND.txt b/internal/help/SOUND.txt index 90dd6ea38..3bc1def60 100644 --- a/internal/help/SOUND.txt +++ b/internal/help/SOUND.txt @@ -14,7 +14,7 @@ {{PageErrors}} * Low ''frequency'' values between 0 and 37 will create an [[ERROR Codes|Illegal Function call error]]. * '''Warning:''' SOUND may not work when the program is not in focus. Use SOUND 0, 0 at sound procedure start to set focus. -* '''Note:''' SOUND 0, 0 will not stop previous '''QB64''' sounds like it did in QBasic! +* '''Note:''' SOUND 0, 0 will not stop previous '''QB64''' sounds like it did in Qbasic! * SOUND may have clicks or pauses between the sounds generated. [[PLAY]] can be used for musical sounds. {{WhiteStart}} ''' The Seven Music Octaves ''' @@ -84,7 +84,7 @@ notes$ = "C C#D D#E F F#G G#A A#B " Octaves: {{Cl|DATA}} 32.7,34.65,36.71,38.9,41.2,43.65,46.25,49,51.91,55,58.27,61.74 '' '' {{CodeEnd}} -{{small|Code adapted by Ted Weissgerber from code in [http://www.amazon.com/Running-MS-DOS-QBASIC-Michael-Halvorson/dp/1556153406 "Running MS-DOS QBasic"] by Microsoft Press}} +{{small|Code adapted by Ted Weissgerber from code in [http://www.amazon.com/Running-MS-DOS-QBASIC-Michael-Halvorson/dp/1556153406 "Running MS-DOS Qbasic"] by Microsoft Press}} ''Example 2:'' Playing a song called "Bonnie" with [[SOUND]] frequencies. @@ -125,7 +125,7 @@ Octaves: {{Cl|DATA}} 523,8," lies ",587,8,"O-",523,8,"ver ",440,8,"the ",392,8,"O-",330,32,"cean ",392,8,"Oh " {{Cl|DATA}} 440,8,"bring ",587,8,"back ",523,8,"my ",494,8,"Bon-",440,8,"nie ",494,8,"to ",523,32,"me..!" '' '' {{CodeEnd}} -{{small|Code adapted by Ted Weissgerber from code [http://www.amazon.com/Running-MS-DOS-QBASIC-Michael-Halvorson/dp/1556153406 "Running MS-DOS QBasic"] by Microsoft Press}} +{{small|Code adapted by Ted Weissgerber from code [http://www.amazon.com/Running-MS-DOS-QBASIC-Michael-Halvorson/dp/1556153406 "Running MS-DOS Qbasic"] by Microsoft Press}} ''See also:'' @@ -135,3 +135,4 @@ Octaves: {{PageNavigation}} +< diff --git a/internal/help/SPACE$.txt b/internal/help/SPACE$.txt index d12a39feb..1ded0c944 100644 --- a/internal/help/SPACE$.txt +++ b/internal/help/SPACE$.txt @@ -5,7 +5,7 @@ The {{KW|SPACE$}} function returns a {{KW|STRING}} consisting of a number of spa :''result$'' = '''SPACE$({{Parameter|count&}})''' -{{PageParameters}} +{{Parameters}} * {{Parameter|count&}} is the number of space characters to repeat. Cannot use negative values! @@ -101,3 +101,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/SPC.txt b/internal/help/SPC.txt index c1fc21fa5..2cf8787f0 100644 --- a/internal/help/SPC.txt +++ b/internal/help/SPC.txt @@ -5,7 +5,7 @@ The {{KW|SPC}} function is used in [[PRINT]] and [[LPRINT]] statements to print ::: '''SPC({{Parameter|count%}})''' -{{PageParameters}} +{{Parameters}} * ''count'' designates the number of column spaces to move the cursor in a [[PRINT]] statement. @@ -33,3 +33,4 @@ abc 123 {{PageNavigation}} +< diff --git a/internal/help/SQR.txt b/internal/help/SQR.txt index 1038e4793..e12da9563 100644 --- a/internal/help/SQR.txt +++ b/internal/help/SQR.txt @@ -1,21 +1,19 @@ -The [[SQR]] function returns the square root of a numerical value. +The '''SQR''' function returns the square root of a numerical value. {{PageSyntax}} -:square_root = [[SQR]](value) +:: square_root = '''SQR('''value''')''' -{{PageDescription}} * The ''square root'' returned is normally a [[SINGLE]] or [[DOUBLE]] numerical value. * The ''value'' parameter can be any '''positive''' numerical type. '''Negative parameter values will not work!''' * Other exponential root functions can use fractional exponents([[^]]) enclosed in '''parenthesis only'''. EX: {{text|root <nowiki> = </nowiki> c ^ (a / b)|green}} -{{PageExamples}} ''Example 1:'' Finding the hypotenuse of a right triangle: {{CodeStart}} '' '' A% = 3: B% = 4 - {{Cl|PRINT}} "hypotenuse! ="; {{Cl|SQR}}((A% ^ 2) + (B% ^ 2)) '' '' + PRINT "hypotenuse! ="; SQR((A% ^ 2) + (B% ^ 2)) '' '' {{CodeEnd}} {{OutputStart}} hypotenuse = 5 @@ -26,7 +24,7 @@ The [[SQR]] function returns the square root of a numerical value. {{CodeStart}} '' '' number = 8 cuberoot = number {{Cl|^}} (1/3) - {{Cl|PRINT}} cuberoot '' '' + PRINT cuberoot '' '' {{CodeEnd}} {{OutputStart}} 2 @@ -37,7 +35,7 @@ The [[SQR]] function returns the square root of a numerical value. {{CodeStart}} '' '' number = 8 negroot = number {{Cl|^}} -2 - {{Cl|PRINT}} negroot '' '' + PRINT negroot '' '' {{CodeEnd}} {{OutputStart}} .015625 @@ -47,21 +45,21 @@ The [[SQR]] function returns the square root of a numerical value. ''Example 4:'' Fast Prime number checker limits the numbers checked to the square root (half way). {{CodeStart}} -{{Cl|DEFLNG}} P -{{Cl|DO}} +DEFLNG P +DO PRIME = -1 'set PRIME as True -{{Cl|INPUT}} "Enter any number to check up to 2 million (Enter quits): ", guess$ +INPUT "Enter any number to check up to 2 million (Enter quits): ", guess$ PR = {{Cl|VAL}}(guess$) -{{Cl|IF}} PR {{Cl|MOD}} 2 {{Cl|THEN}} 'check for even number - {{Cl|FOR}} P = 3 {{Cl|TO}} {{Cl|SQR}}(PR) {{Cl|STEP}} 2 'largest number that could be a multiple is the SQR - {{Cl|IF}} PR {{Cl|MOD}} P = 0 {{Cl|THEN}} PRIME = 0: {{Cl|EXIT FOR}} 'MOD = 0 when evenly divisible by another - {{Cl|NEXT}} -{{Cl|ELSE}} : PRIME = 0 'number to be checked is even so it cannot be a prime -{{Cl|END IF}} -{{Cl|IF}} PR = 2 {{Cl|THEN}} PRIME = -1 '2 is the ONLY even prime -{{Cl|IF}} PR = 1 {{Cl|THEN}} PRIME = 0 'MOD returns true but 1 is not a prime by definition -{{Cl|IF}} PRIME {{Cl|THEN}} {{Cl|PRINT}} "PRIME! How'd you find me? " {{Cl|ELSE}} {{Cl|PRINT}} "Not a prime, you lose!" -{{Cl|LOOP}} {{Cl|UNTIL}} PR = 0 '' '' +IF PR {{Cl|MOD}} 2 THEN 'check for even number + FOR P = 3 TO {{Cl|SQR}}(PR) STEP 2 'largest number that could be a multiple is the SQR + IF PR {{Cl|MOD}} P = 0 THEN PRIME = 0: EXIT FOR 'MOD = 0 when evenly divisible by another + NEXT +ELSE : PRIME = 0 'number to be checked is even so it cannot be a prime +END IF +IF PR = 2 THEN PRIME = -1 '2 is the ONLY even prime +IF PR = 1 THEN PRIME = 0 'MOD returns true but 1 is not a prime by definition +IF PRIME THEN PRINT "PRIME! How'd you find me? " ELSE PRINT "Not a prime, you lose!" +LOOP UNTIL PR = 0 '' '' {{CodeEnd}} {{OutputStart}} Enter any number to check up to 2 million (Enter quits): 12379 @@ -70,7 +68,7 @@ PRIME! How'd you find me? <center>''Note:'' Prime numbers cannot be evenly divided by any other number except one.</center> -{{PageSeeAlso}} +''See also:'' *[[MOD]] {{text|(integer remainder division)}} *[[^]] {{text|(exponential operator)}} *[[Mathematical Operations]] @@ -78,3 +76,4 @@ PRIME! How'd you find me? {{PageNavigation}} +< diff --git a/internal/help/STATIC.txt b/internal/help/STATIC.txt index 656c69806..d2dcf3ca5 100644 --- a/internal/help/STATIC.txt +++ b/internal/help/STATIC.txt @@ -3,7 +3,6 @@ The {{KW|STATIC}} keyword is used in declaration statements to control where var {{PageSyntax}} :{{KW|STATIC}} {{Parameter|variableName}}[()] [{{KW|AS}} {{Parameter|dataType}}][, ...] -:{{KW|STATIC}} [{{KW|AS}} {{Parameter|dataType}}] {{Parameter|variableName}}[()][, ...] {{PageSyntax}} :{[[SUB]]|[[FUNCTION]]} {{Parameter|procedureName}} [({{Parameter|parameterList}})] STATIC @@ -15,7 +14,7 @@ The {{KW|STATIC}} keyword is used in declaration statements to control where var :* {{Parameter|variableName}} may include a type suffix or use [[AS]] to specify a type other than the default [[SINGLE]] type. :* Arrays with static storage are declared by specifying empty parenthesis following the array name. See [[Arrays]] * STATIC can be used after the name of a [[SUB]] or [[FUNCTION]] in the procedure to force all variables to retain their values. -* '''Recursive procedures may be required to be STATIC to avoid a Stack Overflow error. QB64 programs may just close.''' +* '''Recursive procedures may be required to be STATIC to avoid a Stack Overflow! QB64 programs may just close!''' * [[$STATIC]] defined program [[arrays]] cannot be [[REDIM|re-sized]] or use [[_PRESERVE]]. @@ -41,7 +40,7 @@ The {{KW|STATIC}} keyword is used in declaration statements to control where var {{Cl|IF...THEN|IF}} s$ = "" {{Cl|THEN}} Bin$ = "0" {{Cl|ELSE}} Bin$ = s$ {{Cl|END FUNCTION}} '' '' {{CodeEnd}} -: ''Explanation:'' The [[FUNCTION]] above returns a [[STRING]] value representing the bits ON in an [[INTEGER]] value. The string can be printed to the screen to see what is happening in a port register. '''STATIC''' keeps the function from overloading the memory "Stack" and is normally REQUIRED when recursive calls are used in QBasic! '''QB64 procedures will close without warning or error!''' +: ''Explanation:'' The [[FUNCTION]] above returns a [[STRING]] value representing the bits ON in an [[INTEGER]] value. The string can be printed to the screen to see what is happening in a port register. '''STATIC''' keeps the function from overloading the memory "Stack" and is normally REQUIRED when recursive calls are used in Qbasic! '''QB64 procedures will close without warning or error!''' ''Example 2:'' Using a static array to cache factorials, speeding up repeated calculations: @@ -49,7 +48,7 @@ The {{KW|STATIC}} keyword is used in declaration statements to control where var {{Cl|PRINT}} Factorial(0) {{Cl|PRINT}} Factorial(5) -{{Cl|PRINT}} Factorial(50) +{{Cl|PRINT}} Factorial(50 {{Cl|FUNCTION}} Factorial# ( n {{Cl|AS}} {{Cl|DOUBLE}} ) {{Cl|CONST}} maxNToCache = 50 @@ -97,3 +96,4 @@ The {{KW|STATIC}} keyword is used in declaration statements to control where var {{PageNavigation}} +< diff --git a/internal/help/STEP.txt b/internal/help/STEP.txt index af91715d6..b654651ff 100644 --- a/internal/help/STEP.txt +++ b/internal/help/STEP.txt @@ -54,3 +54,4 @@ The '''STEP''' keyword is used in [[FOR...NEXT]] loops to skip through the count {{PageNavigation}} +< diff --git a/internal/help/STICK.txt b/internal/help/STICK.txt index f0d9b0070..1710cc8ff 100644 --- a/internal/help/STICK.txt +++ b/internal/help/STICK.txt @@ -5,7 +5,7 @@ The '''STICK''' function returns the directional axis coordinate move of game po :: coordinate_move% = STICK(direction%) -== QB64 Syntax == +QB64 {{PageSyntax}} :: coordinate_move% = STICK(''direction%''[, ''axis_number%'']) @@ -14,12 +14,12 @@ The '''STICK''' function returns the directional axis coordinate move of game po * ''axis_number'' can be used as the next axis parameter for controllers with multiple axis using the SAME ''directional'' parameters. * The ''axis_number'' 1 can be omitted for the main stick column and row parameter reads. * Point of view "hats" also have 2 axis. Slide, turn or twist controls have one. The device determines the order of the axis. -* Returns coordinate values from 1 to 254. QBasic only returned values from 1 to 200. +* Returns coordinate values from 1 to 254. Qbasic only returned values from 1 to 200. * STICK(0) is required to get values from the other STICK functions. Always read it first! {{WhiteStart}}'''STICK(0) returns the column coordinate of device 1. Enables reads of the other STICK values.''' '''STICK(1) returns row coordinate of device 1.''' STICK(2) returns column coordinate of device 2. (second joystick if used) -STICK(3) returns row coordinate of device 2 if used. (QBasic maximum was 2 controllers) +STICK(3) returns row coordinate of device 2 if used. (Qbasic maximum was 2 controllers) '''STICK(4) returns column coordinate of device 3. (other joysticks if used in QB64 only!)''' '''STICK(5) returns row coordinate of device 3 if used.''' {{WhiteEnd}} @@ -85,7 +85,8 @@ Buttons: 9 Buttons -0 -1 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ {{OutputEnd}} -: ''Note:'' A Sidewinder Precision Pro requires that pins 2 and 7 (blue and purple) be connected together for digital USB recognition. +: ''Note:'' A Sidewinder Precision Pro requires that pins 2 and 7(blue and purple) be connected together for digital USB recognition. +<center> [http://www.amazon.com/Belkin-F3U200-08INCH-Joystick-Adapter-SideWinder/dp/B000067RIV Sidewinder Precision Pro game port to USB adapter]</center> ''See also:'' @@ -96,3 +97,4 @@ Buttons: 9 {{PageNavigation}} +< diff --git a/internal/help/STOP.txt b/internal/help/STOP.txt index 91f9e4ea9..48a624a25 100644 --- a/internal/help/STOP.txt +++ b/internal/help/STOP.txt @@ -1,12 +1,27 @@ -The '''STOP''' statement is used to stop program execution. +The '''STOP''' statement is used to stop program execution when troubleshooting a program or to suspend event trapping. {{PageSyntax}} :: STOP -* STOP ends the program. -* Since QB64 programs are compiled and not interpreted, use [[END]] or [[SYSTEM]] instead. +* STOP used in the Qbasic IDE does not close any files or go to the operating system. It returns to the IDE. +* In the QB64 compiler, STOP closes the program window and returns to the IDE when the code is compiled from there. +* STOP is ONLY used for debugging purposes and should not be used to exit programs! +* STOP can also be used to suspend an event trap in the following statements: [[KEY(n)]], [[ON COM (n)|COM(n)]], [[PEN]], [[PLAY]], [[STRIG(n)]], [[TIMER]], [[UEVENT]]. The trap can be turned back on with [[ON]] and returns any trap events since '''STOP''' was used. + + +''Example:'' When run in the Qbasic IDE, the program will return to the IDE at STOP. Press F5 to finish the program. +{{CodeStart}} +{{Cl|PRINT}} "start" + +{{Cl|SLEEP}} 3 + +{{Cl|STOP}} + +{{Cl|PRINT}} "resumed" +{{CodeEnd}} +: ''Explanation:'' QB64 will STOP the program and close the window as it does not have an interpreter to run the rest of the code. ''See also:'' @@ -15,3 +30,4 @@ The '''STOP''' statement is used to stop program execution. {{PageNavigation}} +< diff --git a/internal/help/STR$.txt b/internal/help/STR$.txt index a7105a78c..3e0fd1eab 100644 --- a/internal/help/STR$.txt +++ b/internal/help/STR$.txt @@ -5,7 +5,7 @@ The '''STR$''' function returns the [[STRING]] representation of a numerical val :: result$ = '''STR$('''{{Parameter|number}}''')''' -{{PageParameters}} +{{Parameters}} * {{Parameter|number}} is any numerical type value to convert. @@ -44,3 +44,4 @@ a = 33 {{PageNavigation}} +< diff --git a/internal/help/STRIG(n).txt b/internal/help/STRIG(n).txt index 44c7c6a23..f5ff56dfe 100644 --- a/internal/help/STRIG(n).txt +++ b/internal/help/STRIG(n).txt @@ -46,3 +46,4 @@ a$ = "[STRIG 0 EVENT]" {{PageNavigation}} +< diff --git a/internal/help/STRIG.txt b/internal/help/STRIG.txt index 6bfdd2247..2ce9f681d 100644 --- a/internal/help/STRIG.txt +++ b/internal/help/STRIG.txt @@ -22,7 +22,7 @@ QB64 {{PageSyntax}} '''STRIG(4) = -1 'upper button 2 on device 1 pressed since last STRIG(4) read''' '''STRIG(5) = -1 'upper button 2 on device 1 currently pressed''' STRIG(6) = -1 'upper button 2 on device 2 pressed since last STRIG(6) read - STRIG(7) = -1 'upper button 2 on device 2 currently pressed (maximum in QBasic) + STRIG(7) = -1 'upper button 2 on device 2 currently pressed (maximum in Qbasic) '''STRIG(8) = -1 'button 3 on device 1 pressed since last STRIG(8) read''' 'QB64 only '''STRIG(9) = -1 'button 3 on device 1 currently pressed''' STRIG(10) = -1 'button 3 on device 2 pressed since last STRIG(10) read 'QB64 only @@ -64,3 +64,4 @@ STRIG(2, 4): STRIG(3, 4): STRIG(6, 4): STRIG(7, 4): STRIG(10, 4): STRIG(11, 4) ' {{PageNavigation}} +< diff --git a/internal/help/STRING$.txt b/internal/help/STRING$.txt index 5f093a46a..1443ffa25 100644 --- a/internal/help/STRING$.txt +++ b/internal/help/STRING$.txt @@ -48,3 +48,4 @@ The {{KW|STRING$}} function returns a {{KW|STRING}} consisting of a single chara {{PageNavigation}} +< diff --git a/internal/help/STRING.txt b/internal/help/STRING.txt index d5ba30053..0bbc42a07 100644 --- a/internal/help/STRING.txt +++ b/internal/help/STRING.txt @@ -13,16 +13,16 @@ * Literal string ends are designated by quotation marks such as: "text". Use [[CHR$]](34) to add quotes to string values. * Variable suffix type definition is $ such as: text$. * STRING values are compared according to the [[ASCII]] code values from left to right until one string code value exceeds the other. +* '''NOTE: Many Qbasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!''' -:::::'''Creating a fixed length STRING variable''' +:::::'''Creating a fixed length STRING variable in Qbasic:''' :* Variable$ = " " ' 1 space creates a one [[_BYTE|byte]] string length in a procedure(not fixed) :* Variable$ = SPACE$(n%) ' defined as a n% length string in a procedure(not fixed) :* [[DIM]] variable AS STRING * n% ' fixed string length cannot be changed later :* Variable AS STRING * n% ' fixed string length in a [[SUB]] parameter or [[TYPE]] definition. :* [[CONST]] variables can also be used after the constant value is defined. -:* Fixed length strings may not be initialized with spaces and may contain only a series of CHR$(0) at program start. :::::'''QB64 fixed length string type suffixes''' @@ -108,3 +108,4 @@ value3$ = "z" {{PageNavigation}} +< diff --git a/internal/help/SUB.txt b/internal/help/SUB.txt index a8f203a9d..38ece70bd 100644 --- a/internal/help/SUB.txt +++ b/internal/help/SUB.txt @@ -9,7 +9,7 @@ A '''SUB''' procedure is a procedure within a program that can calculate and ret :: '''END SUB''' -{{PageParameters}} +{{Parameters}} * Parameters passed after the procedure call must match the variable types in the SUB parameters in order. * If there are no ''parameter''s passed or they are [[SHARED]] the parameters and parenthesis are not required in the procedure. * Parameter [[Variable]] names in the procedure do not have to match the names used in the [[CALL]], just the value types. @@ -24,9 +24,8 @@ A '''SUB''' procedure is a procedure within a program that can calculate and ret * SUB procedures can save program memory as all memory used in a SUB is released on procedure exit except for [[STATIC]] values. * [[_DEFINE]] can be used to define all new or old QB64 variable [[TYPE]] definitions instead of DEF***. * [[$INCLUDE]] text library files with needed SUB and [[FUNCTION]] procedures can be included in programs after all sub-procedures. -* '''QB64 ignores all procedural DECLARE statements.''' Define all ''parameter'' [[TYPE]]s in the SUB procedure. +* '''QB64 ignores all procedural DECLARE statements!''' Define all ''parameter'' [[TYPE]]s in the SUB procedure. * '''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].''' -* In order to use OpenGL commands you need a [[SUB]] [[_GL]] in your program. ''Example 1:'' Text [[PRINT]] screen centering using [[PEEK]] to find the SCREEN mode width. Call and SUB procedure code: @@ -76,9 +75,9 @@ exit 1 ''See also:'' * [[FUNCTION]], [[CALL]] -* '''SUB''' [[_GL]] * [[BYVAL]], [[SCREEN (statement)]] * [[EXIT]], [[END]] {{PageNavigation}} +< diff --git a/internal/help/SWAP.txt b/internal/help/SWAP.txt index a037ec515..033893bf4 100644 --- a/internal/help/SWAP.txt +++ b/internal/help/SWAP.txt @@ -125,3 +125,4 @@ Middle = array((Lo + Hi) / 2) 'find middle of array {{PageNavigation}} +< diff --git a/internal/help/SYSTEM.txt b/internal/help/SYSTEM.txt index 00eda754e..def1e5ef3 100644 --- a/internal/help/SYSTEM.txt +++ b/internal/help/SYSTEM.txt @@ -1,25 +1,25 @@ -The [[SYSTEM]] statement immediately closes a program and returns control to the operating system. +The {{KW|SYSTEM}} statement immediately closes a program and returns control to the operating system. {{PageSyntax}} :'''SYSTEM''' [return_code%] -{{PageParameters}} +{{Parameters}} * QB64 allows a ''code'' number to be used after SYSTEM to be read in another program module by the [[SHELL]] or [[_SHELLHIDE]] functions. -{{PageDescription}} +''Usage:'' * This command should be used to close a program quickly instead of pausing with [[END]] or nothing at all. * A code can be added after the statement to send a value to the [[SHELL (function)]] or [[_SHELLHIDE]] function in another module. * SYSTEM ends the program and closes the window immediately. The last screen image may not be displayed. -{{PageQBasic}} -* '''QBasic BAS files can be run like compiled programs without returning to the IDE when [[SYSTEM]] is used to [[END|end]] them!''' +''Qbasic or QuickBasic:'' +* '''Qbasic BAS files can be run like compiled programs without returning to the IDE when [[SYSTEM]] is used to [[END|end]] them!''' * If a program BAS module is run from the IDE, stopped by Ctrl-Break or an error occurs the QB program will exit to the IDE. -* To run a QuickBASIC program without the IDE use the following DOS command line: {{text|QB.EXE /L /RUN filename.BAS|green}} +* To run a QuickBasic program without the IDE use the following DOS command line: {{text|QB.EXE /L /RUN filename.BAS|green}} {{PageSeeAlso}} @@ -29,3 +29,4 @@ The [[SYSTEM]] statement immediately closes a program and returns control to the {{PageNavigation}} +< diff --git a/internal/help/Semicolon.txt b/internal/help/Semicolon.txt index 30ffc7fe3..7cdfefc2e 100644 --- a/internal/help/Semicolon.txt +++ b/internal/help/Semicolon.txt @@ -28,3 +28,4 @@ The '''semicolon''' is used in a [[PRINT]] statement to stop the screen print cu {{PageNavigation}} +< diff --git a/internal/help/TAB.txt b/internal/help/TAB.txt index b9588f17f..1ce5bc5ed 100644 --- a/internal/help/TAB.txt +++ b/internal/help/TAB.txt @@ -11,7 +11,7 @@ The {{KW|TAB}} function is used in [[PRINT]] and [[LPRINT]] statements to move t * [[ASCII]] [[CHR$]](9) can be substituted for sequencial 9 space column moves. * [[Comma]] PRINT spacing is up to 15 column places (IE: TAB(15)) to a maximum column of 57. * When printing to a file, a carriage return([[CHR$]](13)) and linefeed([[CHR$]](10)) character are output when it moves to the next row. -* '''Note:''' QBasic did not allow a TAB to be [[concatenation|added]] to a string value. In [[PRINT]] statements the [[+|plus]] would be changed to a [[semicolon]]. +* '''Note:''' Qbasic did not allow a TAB to be [[concatenation|added]] to a string value. In [[PRINT]] statements the [[+|plus]] would be changed to a [[semicolon]]. : In QB64, TAB [[concatenation]] is allowed instead of [[semicolon]]s. Example: {{text|PRINT "text" + TAB(9) + "here"|green}} @@ -43,3 +43,4 @@ The {{KW|TAB}} function is used in [[PRINT]] and [[LPRINT]] statements to move t {{PageNavigation}} +< diff --git a/internal/help/TAN.txt b/internal/help/TAN.txt index 19cd0f9fa..a3e244514 100644 --- a/internal/help/TAN.txt +++ b/internal/help/TAN.txt @@ -5,7 +5,7 @@ The [[TAN]] function returns the ratio of [[SIN]]e to [[COS]]ine or tangent valu ::: tangent! = '''TAN('''''radian_angle!''''')''' -{{PageParameters}} +{{Parameters}} * The ''radian_angle'' must be measured in radians. @@ -88,3 +88,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/THEN.txt b/internal/help/THEN.txt index 2bdc3a889..2e900403f 100644 --- a/internal/help/THEN.txt +++ b/internal/help/THEN.txt @@ -17,3 +17,4 @@ {{PageNavigation}} +< diff --git a/internal/help/TIME$.txt b/internal/help/TIME$.txt index fad07e88f..eaf4715d7 100644 --- a/internal/help/TIME$.txt +++ b/internal/help/TIME$.txt @@ -56,11 +56,12 @@ END FUNCTION '' '' ''See also:'' -* [[TIMER]] -* [[DATE$]] +* [[TIME$ (statement)]], [[TIMER]] +* [[DATE$]], [[DATE$ (statement)]] * [[VAL]], [[STR$]], [[HEX$]] * [[LTRIM$]], [[MID$]], [[LEFT$]] * [[IF...THEN]] {{PageNavigation}} +< diff --git a/internal/help/TIMER.txt b/internal/help/TIMER.txt index 989442036..47dbb167c 100644 --- a/internal/help/TIMER.txt +++ b/internal/help/TIMER.txt @@ -10,10 +10,10 @@ The '''TIMER''' function returns the number of seconds past the previous midnite * TIMER return values range from 0 at midnight to 86399! A comparison value must stay within that range! * [[INTEGER]] or [[LONG]] second values range from 0 at midnight to 86399 seconds each day. -* QBasic can return [[SINGLE]] values down to about .04 or 1/18th (one tick) of a second accurately. +* Qbasic can return [[SINGLE]] values down to about .04 or 1/18th (one tick) of a second accurately. * '''QB64''' can read [[DOUBLE]] ''accuracy'' down to 1 millisecond. Example: {{text|start# <nowiki>=</nowiki> TIMER(.001)|green}} * Use [[DOUBLE]] variables for millisecond accuracy as [[SINGLE]] values are only accurate to 100ths of a second later in the day! -* TIMER loops should use a midnight adjustment to avoid non-ending loops in QBasic. +* TIMER loops should use a midnight adjustment to avoid non-ending loops in Qbasic. * TIMER can also be used for timing program Events. See [[ON TIMER(n)]] or the [[TIMER (statement)]] * '''QB64''' can use a [[_DELAY]] down to .001(one millisecond) or [[_LIMIT]] loops per second. Both help limit program CPU usage. @@ -22,7 +22,7 @@ The '''TIMER''' function returns the number of seconds past the previous midnite {{CodeStart}} '' '' {{Cl|DO...LOOP|DO}} {{Cl|PRINT}} "Hello"; - Delay .5 'accuracy down to .05 seconds or 1/18th of a second in QBasic + Delay .5 'accuracy down to .05 seconds or 1/18th of a second in Qbasic {{Cl|PRINT}} "World!"; {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit @@ -84,3 +84,4 @@ start! = {{Cl|TIMER}} {{PageNavigation}} +< diff --git a/internal/help/TIMER_(statement).txt b/internal/help/TIMER_(statement).txt index ecee908c8..a67ea77d8 100644 --- a/internal/help/TIMER_(statement).txt +++ b/internal/help/TIMER_(statement).txt @@ -1,27 +1,26 @@ -A [[TIMER]] statement enables, turns off or stops timer event trapping. QBasic only uses the base timer, but '''QB64''' can run many. +A '''TIMER''' statement enables, turns off or stops timer event trapping. Qbasic only uses the base timer, but '''QB64''' can run many. -{{PageSyntax}} -QB +QB {{PageSyntax}} + :::TIMER {ON|STOP|OFF} -QB64 +QB64 {{PageSyntax}} + :::TIMER(''number%'') {ON|STOP|OFF|FREE} -{{PageParameters}} +{{Parameters}} * ''number'' denotes a specific numbered timer event in '''QB64 only'''. QB64 can run many timer events at once including the base timer. * TIMER ON enables event trapping of an [[ON TIMER (n)]] statement. While enabled, a check is made after every code statement to see if the specified time has elapsed and the ON TIMER [[GOSUB]] (or [[SUB]] in QB64) procedure is executed. * TIMER STOP disables timer event trapping. When an event occurs while stopped, it is remembered. If timer events are turned back on later, any remembered events are immediately executed. * TIMER OFF turns timer event trapping completely off and no subsequent events are remembered. -* TIMER(n) '''FREE''' clears a specific timer event when it is no longer needed. '''The base TIMER or TIMER(0) cannot be freed!''' - -{{PageDescription}} <center>'''QB64 only'''</center> * Get a TIMER number from [[_FREETIMER]] ONLY except when the base timer(no number or 0) is used. Use specific variables or an array to hold each event number value for later reference. * If the TIMER number is omitted or 0, the TIMER used is the base timer. * Specific TIMER events can be enabled, suspended, turned off or freed using [[TIMER (statement)|TIMER(n)]] ON, STOP, OFF or FREE. +* TIMER(n) '''FREE''' clears a specific timer event when it is no longer needed. '''The base TIMER or TIMER(0) cannot be freed!''' <center>'''QB64 Timing Alternatives'''</center> @@ -30,29 +29,32 @@ QB64 * [[_LIMIT]] can slow down loops to a specified number of frames per second. This can also alleviate a program's CPU usage. -{{PageExamples}} ''Example:'' How to update the time while [[PRINT|printing]] at the same time in a program. {{CodeStart}} '' '' -{{Cl|TIMER}} ON ' enable timer event trapping -{{Cl|LOCATE}} 4, 2 ' set the starting PRINT position -{{Cl|ON TIMER(n)|ON TIMER}}(10) {{Cl|GOSUB}} Clock ' set procedure execution repeat time -{{Cl|DO}} {{Cl|WHILE}} {{Cl|INKEY$}} = "": {{Cl|PRINT}} "A"; : {{Cl|SLEEP}} 6: {{Cl|LOOP}} -{{Cl|TIMER}} OFF -{{Cl|SYSTEM}} + TIMER ON ' enable timer event trapping + LOCATE 4, 2 ' set the starting PRINT position + {{Cl|ON TIMER(n)|ON TIMER}}(10) GOSUB Clock ' set procedure execution repeat time + DO WHILE INKEY$ = "": PRINT "A"; : SLEEP 6: LOOP + TIMER OFF + {{Cl|SYSTEM}} -Clock: - row = {{Cl|CSRLIN}} ' Save current print cursor row. - col = {{Cl|POS|POS(0)}} ' Save current print cursor column. - {{Cl|LOCATE}} 2, 37: {{Cl|PRINT}} {{Cl|TIME$}}; ' print current time at top of screen. - {{Cl|LOCATE}} row, col ' return to last print cursor position -{{Cl|RETURN}} '' '' + Clock: + row = {{Cl|CSRLIN}} ' Save current print cursor row. + col = {{Cl|POS|POS(0)}} ' Save current print cursor column. + LOCATE 2, 37: PRINT {{Cl|TIME$}}; ' print current time at top of screen. + LOCATE row, col ' return to last print cursor position + {{Cl|RETURN}} '' '' {{CodeEnd}} -: NOTE: SLEEP will be interrupted in QBasic. +: NOTE: SLEEP will be interrupted in Qbasic. -{{PageSeeAlso}} +''See also:'' + * [[ON TIMER(n)]], [[TIMER]](function) + * [[_DELAY]], [[_LIMIT]] + {{PageNavigation}} +< diff --git a/internal/help/TO.txt b/internal/help/TO.txt index f57bdf85f..c86fea9a8 100644 --- a/internal/help/TO.txt +++ b/internal/help/TO.txt @@ -25,3 +25,4 @@ {{PageNavigation}} +< diff --git a/internal/help/TYPE.txt b/internal/help/TYPE.txt index d19fac361..338e39942 100644 --- a/internal/help/TYPE.txt +++ b/internal/help/TYPE.txt @@ -1,63 +1,52 @@ -'''TYPE''' definitions are used to create variables that can hold more than one element. +'''TYPE''' definitions are used to create variables that can hold more than one variable type of a fixed byte length. {{PageSyntax}} ::'''TYPE''' typename -::: element-name1 AS type -::: element-name2 AS type -::: . -::: . -::: . -::: element-nameN AS type + +::. + +::. variable(s) AS type + +::. + ::'''END TYPE''' -::'''TYPE''' typename -::: AS type element-list1 -::: AS type element-list2 -::: . -::: . -::: . -::: AS type element-listN -::'''END TYPE''' - - -{{PageDescription}} * Typename is an undefined type name holder as it can hold any variable types. -* TYPE definitions are usually placed in the main module before the start of the program code execution. -* TYPE definitions cam also be placed in [[SUB]] or [[FUNCTION]] procedures. -* TYPE definitions cannot contain Array variables. Arrays can be [[DIM]]ensioned as a TYPE definition. -* TYPE definitions cannot be inside of another TYPE definition, but variables can be defined AS another type.(See Example 4) +* TYPE definitions should be placed in the main module before the start of the program code execution. +* TYPE definitions CAN be placed in [[SUB]] or [[FUNCTION]] procedures using QB64 only! +* TYPE definitions cannot contain Array variables! Arrays can be [[DIM]]ensioned as a TYPE definition. +* TYPE definitions cannot be inside of another TYPE definition, but variables can be defined AS another type.(See Example 3) * TYPE definitions must be ended with [[END TYPE]]. -* A TYPE variable must be assigned to the type after it is defined. Array variables are allowed. +* A TYPE variable MUST be assigned to the type after it is defined. Array variables are allowed. * Type variables must be defined in every SUB or FUNCTION unless the type variable is [[DIM]]ensioned as [[SHARED]]. * Type variables use DOT variable names to read or write specific values. They do not use type suffixes as they can hold ANY variable type values! The name before the dot is the one you defined after the type definition and the name after is the variable name used inside of the TYPE. The name of the dimensioned type variable alone can be used to [[PUT]] # or [[GET]] # all of the data at once! * Once the TYPE variable is created you can find the record or byte size by using [[LEN]](typevariable). * TYPE definitions can also be placed in [[$INCLUDE]] .BI text files such as [[QB.BI]] is used by [[INTERRUPT]] and [[INTERRUPTX]]. -* You can mix the '''element-name AS type''' syntax with the '''AS type element-list''' syntax in the same TYPE block. -* '''[[_BIT]] is not supported in User Defined [[TYPE]]s'''. +* '''[[_BIT]] is not currently supported in User Defined [[TYPE]]s'''. +* '''NOTE: Many Qbasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!''' {{DataTypeTable}} -{{PageExamples}} ''Example 1:'' Creating a mouse [[INTERRUPT]] TYPE definition. Each [[INTEGER]] value is 2 bytes. {{CodeStart}} - TYPE RegType - AX AS INTEGER ' mouse function to use - BX AS INTEGER ' mouse button - CX AS INTEGER ' mouse graphic column position - DX AS INTEGER ' mouse graphic row position - BP AS INTEGER ' not used by mouse, but required * - SI AS INTEGER ' not used by mouse, but required * - DI AS INTEGER ' not used by mouse, but required * - Flags AS INTEGER ' not used by mouse but required * - DS AS INTEGER ' used by {{Cl|INTERRUPTX}} only - ES AS INTEGER ' used by {{Cl|INTERRUPTX}} only - END TYPE + {{Cl|TYPE}} RegType + AX {{Cl|AS}} {{Cl|INTEGER}} ' mouse function to use + BX {{Cl|AS}} {{Cl|INTEGER}} ' mouse button + CX {{Cl|AS}} {{Cl|INTEGER}} ' mouse graphic column position + DX {{Cl|AS}} {{Cl|INTEGER}} ' mouse graphic row position + BP {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse, but required * + SI {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse, but required * + DI {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse, but required * + Flags {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse but required * + DS {{Cl|AS}} {{Cl|INTEGER}} ' used by {{Cl|INTERRUPTX}} only + ES {{Cl|AS}} {{Cl|INTEGER}} ' used by {{Cl|INTERRUPTX}} only + {{Cl|TYPE|END TYPE}} - {{Cl|DIM}} {{Cl|SHARED}} InRegs AS RegType, OutRegs AS RegType ' create dot variables + {{Cl|DIM}} {{Cl|SHARED}} InRegs {{Cl|AS}} RegType, OutRegs {{Cl|AS}} RegType ' create dot variables InRegs.AX = 3 ' sets the mouse function to read the mouse buttons and position. @@ -69,20 +58,11 @@ ::::Each TYPE variable is designated as the DOT variable's suffix. -'''* Note: Omitting variables in the RegType definition can change other program variable values.''' - - -''Example 2:'' Simplifying the TYPE from Example 1 using the alternative TYPE syntax. -{{CodeStart}} - TYPE RegType - AS INTEGER AX, BX, CX, DX, BP, SI, DI, Flags, FS, ES - END TYPE -{{CodeEnd}} -:''Explanation:'' By using '''AS type element-list''' you reduce typing in your TYPE definition, while achieving the same results. +'''* Note: Omitting variables in the RegType definition can change other program variable values!''' -''Example 4:'' Creating an addressbook database for a [[RANDOM]] file. +''Example 2:'' Creating an addressbook database for a [[RANDOM]] file. {{CodeStart}} TYPE ContactInfo First AS STRING * 10 @@ -105,10 +85,10 @@ {{CodeEnd}} :''Explanation:'' Use the assigned type variable to find the RANDOM record length which is 118 bytes. +::::The DOT variable names consist of Contact as the prefix: - -''Example 4:'' Defining a TYPE variable as another variable type from a previous TYPE definition in QB64. +''Example 3:'' Defining a TYPE variable as another variable type from a previous TYPE definition in QB64. {{CodeStart}} {{Cl|TYPE}} bar b {{Cl|AS}} {{Cl|STRING}} * 10 @@ -128,7 +108,7 @@ PRINT foobar.a, foobar.c.b {{CodeEnd}} -''Example 5:'' A bitmap header information TYPE [[$INCLUDE]] File. +''Example 4:'' A bitmap header information TYPE [[$INCLUDE]] File. {{TextStart}} ' ******** 'Bitmap.BI can be included at start of program @@ -161,7 +141,7 @@ PRINT foobar.a, foobar.c.b {{CodeEnd}} :''Explanation:'' Use one [[GET]] to read all of the header information from the start of the bitmap file opened AS [[BINARY]]. It reads all 54 bytes as [[STRING]], [[INTEGER]] and [[LONG]] type DOT variable values. -:NOTE: BPP returns 4(16 colors), 8(256 colors) or 24(16 million colors) bits per pixel in QBasic. 24 bit can only be in greyscale. +:NOTE: BPP returns 4(16 colors), 8(256 colors) or 24(16 million colors) bits per pixel in Qbasic. 24 bit can only be in greyscale. :Then use the DOT variable name values like this [[GET (graphics statement)]] after you load the bitmap image to the screen: @@ -172,8 +152,7 @@ PRINT foobar.a, foobar.c.b :The bitmap image is now stored in an {{KW|Arrays|array}} to {{KW|BSAVE}} to a file. The RGB color information follows the file header as [[ASCII]] character values read using {{KW|ASC}}. The color values could be indexed at the start of the Array with the image being offset to: index = NumberOfColors * 3. As determined by the {{KW|SCREEN (statement)|SCREEN}} mode used. In SCREEN 13(256 colors) the index would be 768. -{{PageSeeAlso}} -* [[DIM]], [[REDIM]] +''See also:'' * [[INTEGER]], [[SINGLE]], [[DOUBLE]] * [[LONG]], [[_INTEGER64]], [[_FLOAT]] * [[STRING]], [[_BYTE]], [[_BIT]], [[_OFFSET]] @@ -184,3 +163,4 @@ PRINT foobar.a, foobar.c.b {{PageNavigation}} +< diff --git a/internal/help/UBOUND.txt b/internal/help/UBOUND.txt index 8ff1a9a51..bdf7f67c0 100644 --- a/internal/help/UBOUND.txt +++ b/internal/help/UBOUND.txt @@ -33,3 +33,4 @@ The {{KW|UBOUND}} function returns the largest valid index (upper bound) of an a {{PageNavigation}} +< diff --git a/internal/help/UCASE$.txt b/internal/help/UCASE$.txt index 20359032b..1025bdde6 100644 --- a/internal/help/UCASE$.txt +++ b/internal/help/UCASE$.txt @@ -1,4 +1,4 @@ -The [[UCASE$]] function returns an all-uppercase version of a [[STRING]]. +The [[UCASE$]] function outputs an all-uppercase version of a [[STRING]]. {{PageSyntax}} @@ -27,3 +27,4 @@ The [[UCASE$]] function returns an all-uppercase version of a [[STRING]]. {{PageNavigation}} +< diff --git a/internal/help/UEVENT.txt b/internal/help/UEVENT.txt new file mode 100644 index 000000000..a4ddeecac --- /dev/null +++ b/internal/help/UEVENT.txt @@ -0,0 +1,21 @@ +The '''UEVENT''' Statement uses ON, OFF or STOP to enable, turn off or suspend user event trapping. + + +{{PageSyntax}} +:::UEVENT {ON|STOP|OFF} + + +*'''[[Keywords currently not supported by QB64|Currently NOT supported in QB64!]]''' +* UEVENT ON enables user defined event-trapping as defined by the [[ON UEVENT]] statement. + +* UEVENT OFF disables the event-trapping routine. All events are ignored and are not remembered. + +* UEVENT STOP suspends the event-trapping routine. An event is remembered, and the event-trapping routine will be performed as soon as a UEVENT ON statement re-enables the trapping. + + +''See also:'' +* [[ON UEVENT]] + + +{{PageNavigation}} +< diff --git a/internal/help/UNLOCK.txt b/internal/help/UNLOCK.txt index 9f9bae5d9..8339a2c43 100644 --- a/internal/help/UNLOCK.txt +++ b/internal/help/UNLOCK.txt @@ -25,3 +25,4 @@ The {{KW|UNLOCK}} statement opens access to parts or all of a file to other prog {{PageNavigation}} +< diff --git a/internal/help/UNTIL.txt b/internal/help/UNTIL.txt index 3ef679023..245e7c22a 100644 --- a/internal/help/UNTIL.txt +++ b/internal/help/UNTIL.txt @@ -25,3 +25,4 @@ The '''UNTIL''' condition is used in [[DO...LOOP]] exit verifications. *[[WHILE...WEND]] {{PageNavigation}} +< diff --git a/internal/help/Underscore.txt b/internal/help/Underscore.txt index 0c9fb49db..45a42166a 100644 --- a/internal/help/Underscore.txt +++ b/internal/help/Underscore.txt @@ -1,28 +1,24 @@ An '''underscore''' can be used at the end of a line of code to continue a code line to the next line. -{{PageSyntax}} -::IF x + y > 500 AND x + y < 600 THEN_ +''Usage:'' IF x + y > 500 AND x + y < 600 THEN_ :::PRINT x + y -{{PageDescription}} - +* '''Only QB64 keywords can use a leading underscore! Leading underscores are reserved for QB64 procedure names only!''' * The underscore can be anywhere after the code on that line to continue the code to the next line in QB64. -* Multiple underscores can be used for the same line of code. -* Comments cannot follow an underscore and are not continued on the next line if they end in an underscore. -* Modern QB64 keywords are preceded by an underscore, unless [[$NOPREFIX]] is used. Variables and user procedures names cannot start with a single underscore. -** Variables and user procedures names can be preceded by double underscores if necessary. +* Multiple underscores can be used for the same line of code in QB64 only. * Underscores can be used in the middle of variable, sub procedure or [[CONST|constant]] names. -* In [[PRINT USING]] an underscore can precede a formatting character to display that character as literal text in a template [[STRING]]. +* '''The underscore is NOT compatible with Qbasic! The Qbasic IDE will remove or move code with leading underscores!''' +* In [[PRINT USING]] an underscore can precede a formatting character to display that character as text in a template [[STRING]]. -{{PageSeeAlso}} +''See also:'' * [[Colon]], [[Comma]], [[Semicolon]] * [[IF...THEN]] -* [[$NOPREFIX]] {{PageNavigation}} +< diff --git a/internal/help/VAL.txt b/internal/help/VAL.txt index a15b1e91b..156c27eb5 100644 --- a/internal/help/VAL.txt +++ b/internal/help/VAL.txt @@ -1,11 +1,10 @@ -The [[VAL]] Function returns the decimal numerical equivalent value of a [[STRING]] numerical value. +The '''VAL''' Function returns the decimal numerical equivalent value of a [[STRING]] numerical value. {{PageSyntax}} -:: value = [[VAL]](string_value$) +:: value = VAL(string_value$) -{{PageDescription}} * VAL converts string numbers to numerical values including decimal point values and prefixed "[[&H]]" hexadecimal, "[[&O]]" octal. * VAL conversion stops at non-numeric characters except for letter "D" or "E" exponential notation values. :String values with "D" and "E" letters between numbers may be converted also! EX: '''{{text|VAL("9D4") <nowiki>=</nowiki> 90000|green}}''' @@ -17,21 +16,20 @@ The [[VAL]] Function returns the decimal numerical equivalent value of a [[STRIN * In QB64 use an [[INTEGER]] return variable to hold integer values returned by VAL [[HEX$|Hex]] strings: '''{{text|value% <nowiki>= VAL("&HFFFF") =</nowiki> -1|green}}''' -{{PageExamples}} -''Example 1:'' Differences in values returned with QBasic and QB64: +''Example 1:'' Differences in values returned with Qbasic and QB64: {{CodeStart}} '' '' {{Cl|PRINT}} {{Cl|VAL}}("{{Cl|&H}}") '203 in QB, 0 in QB64 {{Cl|PRINT}} {{Cl|VAL}}("{{Cl|&H}}FFFF") ' -1 QB, 65535 in QB64 {{Cl|PRINT}} {{Cl|VAL}}("{{Cl|&H}}FFFF&") '65535 in both '' '' {{CodeEnd}} -:''Explanation:'' A quirk in QBasic returned VAL values of 203 for "&" and "&H" that was never fixed until PDS(7.1). +:''Explanation:'' A quirk in Qbasic returned VAL values of 203 for "&" and "&H" that was never fixed until PDS(7.1). ''Example 2:'' Converting a string with some number characters {{CodeStart}} '' '' text$ = "1.23Hello" - number! = {{Cl|VAL}}(text$) - {{Cl|PRINT}} number! '' '' + number! = VAL(text$) + PRINT number! '' '' {{CodeEnd}} {{OutputStart}} 1.23 @@ -41,7 +39,7 @@ The [[VAL]] Function returns the decimal numerical equivalent value of a [[STRIN ''Example 3:'' Converting literal and variable [[STRING|string]] values to numerical values. {{CodeStart}} '' '' a$ = "33" - {{Cl|PRINT}} {{Cl|VAL}}("10") + {{Cl|VAL}}(a$) + 1 '' '' + PRINT VAL("10") + VAL(a$) + 1 '' '' {{CodeEnd}} {{OutputStart}} 44 @@ -57,9 +55,9 @@ The [[VAL]] Function returns the decimal numerical equivalent value of a [[STRIN {{CodeStart}} decnumber% = 96 hexnumber$ = "&H" + {{Cl|HEX$}}(decnumber%) 'convert decimal value to hex and add hex prefix - {{Cl|PRINT}} hexnumber$ + PRINT hexnumber$ decimal% = {{Cl|VAL}}(hexnumber$) - {{Cl|PRINT}} decimal% '' '' + PRINT decimal% '' '' {{CodeEnd}} {{OutputStart}} &H60 @@ -68,9 +66,10 @@ The [[VAL]] Function returns the decimal numerical equivalent value of a [[STRIN : ''Explanation:'' [[HEX$]] converts a decimal number to hexadecimal, but [[VAL]] will only recognize it as a valid value with the "&H" prefix. Especially since hexadecimal numbers can use "A" through "F" in them. Create a converter function from this code! -{{PageSeeAlso}} +''See also:'' * [[STR$]], [[HEX$]] * [[OCT$]], [[ASC]] {{PageNavigation}} +< diff --git a/internal/help/VARPTR$.txt b/internal/help/VARPTR$.txt index eff6bfe37..15b03d23b 100644 --- a/internal/help/VARPTR$.txt +++ b/internal/help/VARPTR$.txt @@ -24,7 +24,7 @@ ROW$ = "x"+{{Cl|VARPTR$}}(WIND$)+"x"+{{Cl|VARPTR$}}(WIND$)+"x"+{{Cl|VARPTR$}}(WI {{Cl|DRAW}} "x" + {{Cl|VARPTR$}}(ROW$) {{Cl|NEXT}} '' '' {{CodeEnd}} -:''NOTE:'' '''GWBasic''' allows '''semicolons''' to be used in the ROW$ definition, but QBasic and '''QB64''' MUST use '''+''' concatenation. +:''NOTE:'' '''GWBasic''' allows '''semicolons''' to be used in the ROW$ definition, but Qbasic and '''QB64''' MUST use '''+''' concatenation. ''Example 2:'' Using the function to change a Turn Angle value using DRAW. @@ -76,3 +76,4 @@ C = 100: D = -100 {{PageNavigation}} +< diff --git a/internal/help/VARPTR.txt b/internal/help/VARPTR.txt index ba7fc0ef4..c01e67d66 100644 --- a/internal/help/VARPTR.txt +++ b/internal/help/VARPTR.txt @@ -8,7 +8,7 @@ The '''VARPTR''' function returns an [[INTEGER]] value that is the offset part o * If variablename is not defined before VARPTR or [[VARSEG]] is called, the variable is created and it's address is returned. * Reference index is used to set the offset address of an array index, not necessarily the lowest index. * When a string variable, VARPTR returns the offset address location of the first byte of the string. -* Because many QBasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used! +* Because many Qbasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used! * Integer array sizes are limited to 32767 elements when using [[VARPTR]] in QB and '''QB64'''!. Create a larger array using [[_BYTE]]. Example: [[DIM]] [[SHARED]] Memory (65535) AS [[_UNSIGNED]] [[_BYTE]] * '''Warning: DEF SEG, VARSEG , VARPTR, PEEK or POKE access QB64's emulated 16 bit conventional memory block!''' : '''It is highly recommended that QB64's [[_MEM]] memory system be used to avoid running out of memory.''' @@ -22,3 +22,4 @@ The '''VARPTR''' function returns an [[INTEGER]] value that is the offset part o {{PageNavigation}} +< diff --git a/internal/help/VARSEG.txt b/internal/help/VARSEG.txt index 5f345b2ef..226a6689c 100644 --- a/internal/help/VARSEG.txt +++ b/internal/help/VARSEG.txt @@ -9,7 +9,7 @@ The '''VARSEG''' function returns an [[INTEGER]] value that is the segment part * If variablename is not defined before [[VARPTR]] or VARSEG is called, the variable is created and its address is returned. * The start index is the lowest index of an array variable when used. * When a string variable, VARSEG returns the segment location address of the first byte of the string. -* Because many QBasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used! +* Because many Qbasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used! * Integer array sizes are limited to 32767 elements when using [[VARSEG]] in QB and '''QB64'''!. Create a larger array using [[_BYTE]]. Example: [[DIM]] [[SHARED]] Memory (65535) AS [[_UNSIGNED]] [[_BYTE]] * '''Warning: DEF SEG, VARSEG , VARPTR, PEEK or POKE access QB64's emulated 16 bit conventional memory block!''' : '''It is highly recommended that QB64's [[_MEM]] memory system be used to avoid running out of memory.''' @@ -23,3 +23,4 @@ The '''VARSEG''' function returns an [[INTEGER]] value that is the segment part {{PageNavigation}} +< diff --git a/internal/help/VIEW.txt b/internal/help/VIEW.txt index 79653c031..dabb19d4e 100644 --- a/internal/help/VIEW.txt +++ b/internal/help/VIEW.txt @@ -40,3 +40,4 @@ The '''VIEW''' statement creates a graphics view port area by defining the coord {{PageNavigation}} +< diff --git a/internal/help/VIEW_PRINT.txt b/internal/help/VIEW_PRINT.txt index 40cd5e86f..c69ee1948 100644 --- a/internal/help/VIEW_PRINT.txt +++ b/internal/help/VIEW_PRINT.txt @@ -5,7 +5,7 @@ The [[VIEW PRINT]] statement defines the boundaries of a text viewport {{KW|PRIN : '''VIEW PRINT''' [{{Parameter|topRow%}} '''TO''' {{Parameter|bottomRow%}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|topRow%}} and {{Parameter|bottomRow%}} specify the upper and lower rows of the text viewport. * If {{Parameter|topRow%}} and {{Parameter|bottomRow%}} are not specified when first used, the text viewport is defined to be the entire screen. @@ -58,3 +58,4 @@ The [[VIEW PRINT]] statement defines the boundaries of a text viewport {{KW|PRIN {{PageNavigation}} +< diff --git a/internal/help/WAIT.txt b/internal/help/WAIT.txt index d87a5a260..506ea42e4 100644 --- a/internal/help/WAIT.txt +++ b/internal/help/WAIT.txt @@ -29,3 +29,4 @@ WAIT &H3DA, 8, 8 ' finishes whenever the screen is being written to {{PageNavigation}} +< diff --git a/internal/help/WEND.txt b/internal/help/WEND.txt index c90fff2da..f8206b515 100644 --- a/internal/help/WEND.txt +++ b/internal/help/WEND.txt @@ -1 +1,2 @@ #REDIRECT [[WHILE...WEND]] +< diff --git a/internal/help/WHILE...WEND.txt b/internal/help/WHILE...WEND.txt index 7ac013b05..d96bd2e11 100644 --- a/internal/help/WHILE...WEND.txt +++ b/internal/help/WHILE...WEND.txt @@ -12,8 +12,7 @@ The {{KW|WHILE...WEND}} statement is used to repeat a block of statements while {{PageDescription}} * {{Parameter|condition}} is a numeric expression used to determine if the loop will execute. * {{Parameter|statements}} will execute repeatedly while {{Parameter|condition}} is a non-zero value. -* [[EXIT WHILE]] can be used for emergency exits from the loop. -* Use [[_CONTINUE]] to skip the remaining lines in the iteration without leaving the loop. +* [[EXIT]] WHILE can be used for emergency exits from the loop in QB64 only. * A [[DO...LOOP]] can use the same DO WHILE condition to get the same results. * WHILE loops only run if the WHILE condition is True. @@ -25,11 +24,11 @@ The {{KW|WHILE...WEND}} statement is used to repeat a block of statements while ''Example 1:'' Reading an entire file. Example assumes the program has a [[OPEN|file opened]] as #1 {{CodeStart}} '' '' -{{Cl|OPEN}} "Readme.txt" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT}} {{Cl|AS}} #1 +{{Cl|OPEN}} "Readme.txt" FOR {{Cl|INPUT (file mode)|INPUT}} AS #1 {{Cl|WHILE...WEND|WHILE}} {{Cl|NOT}} {{Cl|EOF}}(1) {{Cl|_LIMIT}} 1 'limit line prints to one per second {{Cl|LINE INPUT (file statement)|LINE INPUT #}}1, text$ - {{Cl|IF}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) {{Cl|THEN}} {{Cl|EXIT WHILE}} 'ESC key exits + IF {{Cl|INKEY$}} = {{Cl|CHR$}}(27) THEN {{Cl|EXIT}} {{Cl|WHILE}} 'ESC key exits {{Cl|PRINT}} text$ {{Cl|WEND}} '' '' {{CodeEnd}} @@ -48,3 +47,4 @@ The {{KW|WHILE...WEND}} statement is used to repeat a block of statements while {{PageNavigation}} +< diff --git a/internal/help/WHILE.txt b/internal/help/WHILE.txt index dd29fefd0..f8206b515 100644 --- a/internal/help/WHILE.txt +++ b/internal/help/WHILE.txt @@ -1,28 +1,2 @@ -The '''WHILE''' condition is used in [[WHILE...WEND]] or [[DO...LOOP]] loops to exit them. - - - -{{PageSyntax}} -:: DO [WHILE] evaluation -:: . -:: . -:: . -:: LOOP [WHILE] evaluation - - -* Only one conditional evaluation can be made at the start or the end of a [[DO...LOOP]]. -* DO WHILE evaluates a condition before and inside of the loop. The loop may not run at all. -* LOOP WHILE evaluates a condition inside of the loop. It has to loop once. -* Skips the loop or loops until an evaluation becomes False. - - -{{Template:RelationalTable}} - - -{{PageSeeAlso}} -*[[UNTIL]] -*[[DO...LOOP]] -*[[WHILE...WEND]] - - -{{PageNavigation}} +#REDIRECT [[WHILE...WEND]] +< diff --git a/internal/help/WIDTH.txt b/internal/help/WIDTH.txt index f078d91e8..93d8a25f2 100644 --- a/internal/help/WIDTH.txt +++ b/internal/help/WIDTH.txt @@ -8,13 +8,13 @@ The {{KW|WIDTH}} statement changes the text dimensions of certain {{KW|SCREEN (s ::: '''WIDTH''' {'''''file_number''''' | '''''device'''''}, '''''columnwidth%''''' -{{PageParameters}} +{{Parameters}} * When parameters are not specified, columns defaults to 80 with 25 (30 in [[SCREEN]] 11 or 12) rows. ''Usage:'' * WIDTH should be used AFTER a program SCREEN statement! It does not affect screen graphics or graphic coordinates. -* Affects SCREEN 0 Window size and alters the text block size of each screen mode listed in QBasic: +* Affects SCREEN 0 Window size and alters the text block size of each screen mode listed in Qbasic: :* SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is WIDTH 80, 25. :* SCREEN 9 can use 80 columns and 25 or 43(not supported on many monitors) rows. Default WIDTH 80, 25 fullscreen. :* SCREEN 10 can use 80 columns and 25 or 43 rows. Default is WIDTH 80, 25 fullscreen. @@ -33,3 +33,4 @@ The {{KW|WIDTH}} statement changes the text dimensions of certain {{KW|SCREEN (s {{PageNavigation}} +< diff --git a/internal/help/WINDOW.txt b/internal/help/WINDOW.txt index 6ac89a1ef..225c5ae5b 100644 --- a/internal/help/WINDOW.txt +++ b/internal/help/WINDOW.txt @@ -36,3 +36,6 @@ CIRCLE (5, 5), 1, _RGB32(0, 255, 0) 'Green circle at (5, 5) with radius 1 * [[PMAP]] * [[VIEW]] * [[VIEW PRINT]] + +{{PageNavigation}} +< diff --git a/internal/help/WRITE.txt b/internal/help/WRITE.txt index a17e34b32..aa91cd6ce 100644 --- a/internal/help/WRITE.txt +++ b/internal/help/WRITE.txt @@ -22,7 +22,7 @@ c! = 3.1415 {{Cl|WRITE}} a%, b$, c! 'displays commas between values, strings retain end quotes {{CodeEnd}} {{OutputStart}} -123        Hello      3.1415 +123 Hello 3.1415 123,"Hello",3.1415 '' '' {{OutputEnd}} @@ -35,3 +35,4 @@ c! = 3.1415 {{PageNavigation}} +< diff --git a/internal/help/WRITE_(file_statement).txt b/internal/help/WRITE_(file_statement).txt index 512ae62ee..f39190a7a 100644 --- a/internal/help/WRITE_(file_statement).txt +++ b/internal/help/WRITE_(file_statement).txt @@ -59,3 +59,4 @@ K$ = {{Cl|INPUT$}}(1) 'press a key {{PageNavigation}} +< diff --git a/internal/help/XOR.txt b/internal/help/XOR.txt index 563f59082..3b909a172 100644 --- a/internal/help/XOR.txt +++ b/internal/help/XOR.txt @@ -1 +1,103 @@ -#REDIRECT [[Bitwise Operators]] +Bitwise operators are much like the regular mathematics operators (+, * etc.) but are defined in terms of the individual bits of their operands. The full list of bitwise operators, with a brief summary of its operation: +* '''AND''': True if both inputs are true +* '''OR''': True if one or both inputs are true +* '''NOT''': Invert all bits +* '''XOR''': True if exactly one input is true +* '''IMP''': True if both inputs are the same +* '''EQV''': True unless first input is true and second is false + +== Syntax == +With the exception of NOT, all the bitwise operators take two operands: +::: ''result'' = ''value1'' '''AND''' ''value2'' +NOT goes before the value it operates on: +::: ''result'' = '''NOT''' ''value1'' +If ''value1'' or ''value2'' are non-integer numeric types, they are rounded to the nearest integer. + +== Details == +Bitwise operators work by comparing the corresponding bits in each of the input values to generate a single bit in the output value. The operators differ in how they do the comparison. The table below shows the output bit for each pair of input bits: +{| class="wikitable" +!colspan="2"|'''Operands''' +!colspan="6"|'''Operations''' +|- +!A !! B !! A AND B !! A OR B !! NOT A !! A XOR B !! A IMP B !! A EQV B +|- +|0 || 0 || 0 || 0 || 1 || 0 || 1 || 1 +|- +|0 || 1 || 0 || 1 || 1 || 1 || 1 || 0 +|- +|1 || 0 || 0 || 1 || 0 || 1 || 0 || 0 +|- +|1 || 1 || 1 || 1 || 0 || 0 || 1 || 1 +|} +Again, note that the NOT operator only has one operand. It is shown in the same table for convenience. + +If one input has more bits than the other (say, an INTEGER vs a LONG) the shorter will be considered to have 0's in the missing bit positions if it is positive, or 1's if it is negative. This scheme comes about because of the [[wikipedia:Two's_complement|Two's Complement]] system for representing negative numbers. As a general rule, there should not be any surprises. + +=== Use as logical operators === +QB64 does not have AND/OR/NOT operators dedicated to operating on the overall truth of values. A numeric value is defined to be ''false'' if it is equal to 0, and ''true'' for any other value, though -1 is the standard ''true'' value, returned by the <, <= etc. operators. One can use the bitwise operators mostly like regular logical operators, but with caution. For instance, 3 is a true value, so as a logical operator NOT 3 would be 0 (false). Because it is in fact a bitwise operator, it evaluates to -4. + +== Examples == +Use '''AND''' to mask certain bits in a value. In this example, the 1's in the mask (y&) specify which bits in (x&) we are interested in, forcing all others to 0. +<source lang="qbasic"> +x& = VAL("&B101010") 'Arbitrary collection of bits +y& = VAL("&B001100") 'A bit mask +PRINT "Input 1: "; BIN$(x&, 6) '6 indicates we want 6 bits of output +PRINT "Input 2: "; BIN$(y&, 6) +PRINT "Output: "; BIN$(x& AND y&, 6) + +'Converts the number n& to a string of binary digits, digits& long (padding or truncating as necessary). +FUNCTION BIN$ (n&, digits&) + FOR i& = digits& - 1 TO 0 STEP -1 + IF (n& AND 2 ^ i&) THEN B$ = B$ + "1" ELSE B$ = B$ + "0" + NEXT + BIN$ = B$ +END FUNCTION +</source> +Output: +<pre>Input 1: 101010 +Input 2: 001100 +Output: 001000</pre> + +Use '''OR''' to combine bit flags into a single value. The presence of a flag can then be tested by using the flag as a mask with '''AND''': +<source lang="qbasic"> +'The trick here is to give each flag a value corresponding to a different bit being 1 +FLAG_A& = VAL("&B0001") +FLAG_B& = VAL("&B0010") +FLAG_C& = VAL("&B0100") +FLAG_D& = VAL("&B1000") + +flags& = FLAG_A& OR FLAG_C& 'Set flags A, C + +'Use each flag as a bitmask to test for its presence: +IF flags& AND FLAG_A& THEN PRINT "Flag A is set" +IF flags& AND FLAG_B& THEN PRINT "Flag B is set" +IF flags& AND FLAG_C& THEN PRINT "Flag C is set" +IF flags& AND FLAG_D& THEN PRINT "Flag D is set" +</source> +Output: +<pre>Flag A is set +Flag C is set</pre> + +Use '''XOR''' to toggle a bit flag (that is, change its state to the opposite of what it was). This example is the same as the '''OR''' example above, but with one extra line added. This time we enable flags A & C, then toggle flags A & B. This will disable flag A and enable B. +<source lang="qbasic"> +'The trick here is to give each flag a value corresponding to a different bit being 1 +FLAG_A& = VAL("&B0001") +FLAG_B& = VAL("&B0010") +FLAG_C& = VAL("&B0100") +FLAG_D& = VAL("&B1000") + +flags& = FLAG_A& OR FLAG_C& 'Set flags A, C +flags& = flags& XOR FLAG_A& XOR FLAG_B& 'Toggle flags A, B + +'Use each flag as a bitmask to test for its presence: +IF flags& AND FLAG_A& THEN PRINT "Flag A is set" +IF flags& AND FLAG_B& THEN PRINT "Flag B is set" +IF flags& AND FLAG_C& THEN PRINT "Flag C is set" +IF flags& AND FLAG_D& THEN PRINT "Flag D is set" +</source> +Output: +<pre>Flag B is set +Flag C is set</pre> + +{{PageNavigation}} +< diff --git a/internal/help/^.txt b/internal/help/^.txt index c6694aff3..cb3fe01cd 100644 --- a/internal/help/^.txt +++ b/internal/help/^.txt @@ -1,16 +1,17 @@ -The [[^]] operation raises a numerical value to an exponential value expressing how many times the value is multiplied by itself. +The '''^''' operation raises a numerical value to an exponential value expressing how many times the value is multiplied by itself. {{PageSyntax}} -:return_value = number [[^]] {whole_exponent|(fractional_exponent)} +::'' return_value = number '''^''' {whole_exponent|(fractional_exponent)} {{PageDescription}} + * The number value can be any type literal or variable numerical value. * Exponents can be any positive or negative integer or fractional numerical value inside of parenthesis brackets. * If the exponent is zero, the value returned is 1. * Fractional(or decimal point) exponents MUST be enclosed in '''() brackets''' and will return the fractional exponential root of a value. -* Exponential operations are done first in the QBasic order of operations. +* Exponential operations are done first in the Qbasic order of operations. * The square root of a number can be returned by the [[SQR]] function or by using an exponent of (1 [[/]] 2). Brackets required. * Values returned may be expressed using exponential or [[Scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision. * WARNING: Exponential returns may exceed numerical type limitations and create an [[ERROR Codes|overflow error]]! @@ -37,8 +38,13 @@ Enter a number to calculate it's cube root: 144 {{OutputEnd}} -{{PageSeeAlso}} -* [[SQR]], [[Mathematical Operations]] + + +''See also:'' + +[[SQR]], [[Mathematical Operations]] + {{PageNavigation}} +< diff --git a/internal/help/_.txt b/internal/help/_.txt new file mode 100644 index 000000000..5aeee6f8c --- /dev/null +++ b/internal/help/_.txt @@ -0,0 +1,238 @@ + + + + +Editing * - QB64 Phoenix Edition Wiki + + + + + + + + + + + + + + +
+
+
+ +
+
+
+

Editing *

+
+ +
+
+ +
+ Jump to navigation + Jump to search +
+

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits. +

+
+
+
+

Please note that all contributions to QB64 Phoenix Edition Wiki may be edited, altered, or removed by other contributors. +If you do not want your writing to be edited mercilessly, then do not submit it here.
+You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see QB64 Phoenix Edition Wiki:Copyrights for details). +Do not submit copyrighted work without permission! +

+
+ + + + Cancel + Editing help (opens in new window) +
+
+ + +
+

Templates used on this page: +

+
+ +
+ +
+
+ +
+

Navigation menu

+
+ + +
+ + + + +
+
+ + + + + + +
+
+ + + +
+ + + + + \ No newline at end of file diff --git a/internal/help/_ACCEPTFILEDROP.txt b/internal/help/_ACCEPTFILEDROP.txt index c0d6805fd..6d287b80f 100644 --- a/internal/help/_ACCEPTFILEDROP.txt +++ b/internal/help/_ACCEPTFILEDROP.txt @@ -14,8 +14,8 @@ The [[_ACCEPTFILEDROP]] statement prepares a program window to receive files dro * '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -57,3 +57,4 @@ The [[_ACCEPTFILEDROP]] statement prepares a program window to receive files dro {{PageNavigation}} +< diff --git a/internal/help/_ACOS.txt b/internal/help/_ACOS.txt index 4b3268fe8..672f7bae9 100644 --- a/internal/help/_ACOS.txt +++ b/internal/help/_ACOS.txt @@ -1,3 +1,15 @@ + + + +View source for ACOS +← ACOS +Jump to navigationJump to search +You do not have permission to edit this page, for the following reason: + +The action you have requested is limited to users in the group: Users. + +You can view and copy the source of this page. + {{DISPLAYTITLE:_ACOS}} The [[_ACOS]] function returns the angle measured in radians based on an input [[COS]]ine value ranging from -1 to 1. @@ -11,8 +23,8 @@ The [[_ACOS]] function returns the angle measured in radians based on an input [ * Note: Due to rounding with floating point math, the _ACOS may not always give a perfect match for the COS angle which generated this. You can reduce the number of rounding errors by increasing the precision of your calculations by using [[DOUBLE]] or [[_FLOAT]] precision variables instead of [[SINGLE]]. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -52,3 +64,35 @@ Notice, A is the Angle in Radians. If we convert it to degrees, we discover the {{PageNavigation}} + +Templates used on this page: + +Template:Cl (view source) +Template:CodeEnd (view source) +Template:CodeStart (view source) +Template:OutputEnd (view source) +Template:OutputStart (view source) +Template:PageDescription (view source) +Template:PageExamples (view source) +Template:PageNavigation (view source) +Template:PageSeeAlso (view source) +Template:PageSyntax (view source) +Template:Parameter (view source) +Template:Small (view source) +Template:Text (view source) +Return to ACOS. + +Navigation menu +Log inPageDiscussionReadView sourceView historySearch +Search QB64 Wiki +Main page +Recent changes +Random page +Help about MediaWiki +Tools +What links here +Related changes +Special pages +Page information +Privacy policyAbout QB64 WikiDisclaimersPowered by MediaWiki +< diff --git a/internal/help/_ACOSH.txt b/internal/help/_ACOSH.txt index 94375bd41..26d6030cf 100644 --- a/internal/help/_ACOSH.txt +++ b/internal/help/_ACOSH.txt @@ -19,3 +19,4 @@ The [[_ACOSH]] returns the nonnegative arc hyperbolic cosine of {{Parameter|x!}} {{PageNavigation}} +< diff --git a/internal/help/_ALLOWFULLSCREEN.txt b/internal/help/_ALLOWFULLSCREEN.txt index 33c761975..d35a010a5 100644 --- a/internal/help/_ALLOWFULLSCREEN.txt +++ b/internal/help/_ALLOWFULLSCREEN.txt @@ -16,8 +16,8 @@ The [[_ALLOWFULLSCREEN]] statement allows setting the behavior of the ALT+ENTER * With [[_ALLOWFULLSCREEN]] _OFF you can trap Alt+Enter manually in your program and reassign it. See example 2 below. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -74,3 +74,4 @@ The [[_ALLOWFULLSCREEN]] statement allows setting the behavior of the ALT+ENTER {{PageNavigation}} +< diff --git a/internal/help/_ALPHA.txt b/internal/help/_ALPHA.txt index c77b086dc..717aa26ab 100644 --- a/internal/help/_ALPHA.txt +++ b/internal/help/_ALPHA.txt @@ -60,3 +60,4 @@ BG& = {{Cl|POINT}}(1, 1) {{PageNavigation}} +< diff --git a/internal/help/_ALPHA32.txt b/internal/help/_ALPHA32.txt index 6576cddef..7c72b2692 100644 --- a/internal/help/_ALPHA32.txt +++ b/internal/help/_ALPHA32.txt @@ -5,7 +5,7 @@ The [[_ALPHA32]] function returns the alpha transparency level of a 32 bit color {{PageSyntax}} :{{Parameter|alpha&}} = [[_ALPHA32]]({{Parameter|color32~&}})''' -{{PageParameters}} +{{Parameters}} * {{Parameter|color32&}} is the [[_UNSIGNED]] [[LONG]] 32 bit color value used to retrieve the alpha level. ** Color values that are set as a [[_CLEARCOLOR]] always have an alpha level of 0 (transparent). ** [[_SETALPHA]] can set any alpha level from 0 (or fully transparent) to 255 (or opaque). @@ -47,3 +47,4 @@ clr~& = {{Cl|_RGBA}}(255, 0, 255, 192) {{PageNavigation}} +< diff --git a/internal/help/_ASIN.txt b/internal/help/_ASIN.txt index df8657713..68989fcfa 100644 --- a/internal/help/_ASIN.txt +++ b/internal/help/_ASIN.txt @@ -12,8 +12,8 @@ The [[_ASIN]] function returns the angle measured in radians based on an input [ * Note: Due to rounding with floating point math, the [[_ASIN]] may not always give a perfect match for the [[SIN]] angle which generated this. You can reduce the number of rounding errors by increasing the precision of your calculations by using [[DOUBLE]] or [[_FLOAT]] precision variables instead of [[SINGLE]]. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up''' {{PageExamples}} @@ -53,3 +53,4 @@ Notice, A is the Angle in Radians. If we convert it to degrees, we discover the {{PageNavigation}} +< diff --git a/internal/help/_ASINH.txt b/internal/help/_ASINH.txt index abf3b6234..9bd7e51bb 100644 --- a/internal/help/_ASINH.txt +++ b/internal/help/_ASINH.txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:_ASINH}} -The [[_ASINH]] function returns the arc hyperbolic sine of x, expressed in radians. +The [[_ASINH]] returns the arc hyperbolic sine of x, expressed in radians. {{PageSyntax}} @@ -20,3 +20,4 @@ The [[_ASINH]] function returns the arc hyperbolic sine of x, expressed in radia {{PageNavigation}} +< diff --git a/internal/help/_ASSERT.txt b/internal/help/_ASSERT.txt index 43bb9e546..8efa19384 100644 --- a/internal/help/_ASSERT.txt +++ b/internal/help/_ASSERT.txt @@ -12,8 +12,8 @@ The [[_ASSERT]] statement can be used to perform tests in code that's in develop * If the condition is not met (that is, if it evaluates to 0), an error occurs ("_ASSERT failed on line #") and program execution stops. -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -45,3 +45,4 @@ The [[_ASSERT]] statement can be used to perform tests in code that's in develop {{PageNavigation}} +< diff --git a/internal/help/_ATAN2.txt b/internal/help/_ATAN2.txt index 49ebd0de5..8ead858c4 100644 --- a/internal/help/_ATAN2.txt +++ b/internal/help/_ATAN2.txt @@ -6,7 +6,7 @@ The [[_ATAN2]] function returns the radian angle between the positive x-axis of : {{Parameter|angle!}} = [[_ATAN2]]({{Parameter|y}}, {{Parameter|x}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|y}} is the vertical axis position (row) as a positive, zero or negative floating point value. * {{Parameter|x}} is the horizontal axis position (column) as a positive, zero or negative floating point value. @@ -36,3 +36,4 @@ The [[_ATAN2]] function returns the radian angle between the positive x-axis of {{PageNavigation}} +< diff --git a/internal/help/_ATANH.txt b/internal/help/_ATANH.txt index 3a43b6ea6..ce2e9daca 100644 --- a/internal/help/_ATANH.txt +++ b/internal/help/_ATANH.txt @@ -20,3 +20,4 @@ The [[_ATANH]] returns the arc hyperbolic tangent of {{Parameter|x!}}, expressed {{PageNavigation}} +< diff --git a/internal/help/_AUTODISPLAY.txt b/internal/help/_AUTODISPLAY.txt index 489f9531c..695d199c1 100644 --- a/internal/help/_AUTODISPLAY.txt +++ b/internal/help/_AUTODISPLAY.txt @@ -18,3 +18,4 @@ The [[_AUTODISPLAY]] statement enables the automatic display of the screen image {{PageNavigation}} +< diff --git a/internal/help/_AUTODISPLAY_(function).txt b/internal/help/_AUTODISPLAY_(function).txt index 917c37ad5..111997295 100644 --- a/internal/help/_AUTODISPLAY_(function).txt +++ b/internal/help/_AUTODISPLAY_(function).txt @@ -11,8 +11,8 @@ The [[_AUTODISPLAY (function)|_AUTODISPLAY]] function returns the current displa * If [[_DISPLAY]] is used, then [[_AUTODISPLAY (function)|_AUTODISPLAY]] returns 0, to indicate that screen changes (text or graphics) are only displayed per request, by calling [[_DISPLAY]] again to refresh the screen. -{{PageAvailability}} -* Build 20170924/69 and up. +==Availability== +* '''Build 20170924/69'''. {{PageSeeAlso}} @@ -21,3 +21,4 @@ The [[_AUTODISPLAY (function)|_AUTODISPLAY]] function returns the current displa {{PageNavigation}} +< diff --git a/internal/help/_AXIS.txt b/internal/help/_AXIS.txt index 0075a9a02..c6149bfc1 100644 --- a/internal/help/_AXIS.txt +++ b/internal/help/_AXIS.txt @@ -50,3 +50,4 @@ The [[_AXIS]] function returns the relative position of a specified axis number {{PageNavigation}} +< diff --git a/internal/help/_BACKGROUNDCOLOR.txt b/internal/help/_BACKGROUNDCOLOR.txt index 884657cd9..ee1117817 100644 --- a/internal/help/_BACKGROUNDCOLOR.txt +++ b/internal/help/_BACKGROUNDCOLOR.txt @@ -21,8 +21,8 @@ The [[_BACKGROUNDCOLOR]] function returns the current background color. BG% = {{Cl|_BACKGROUNDCOLOR}} {{Cl|PRINT}} BG% {{CodeEnd}} -{{BlueStart}}3 -{{BlueEnd}} +{{OutputStart}}3 +{{OutputEnd}} ''Example 2:'' Understanding the function output @@ -33,8 +33,8 @@ BG% = {{Cl|_BACKGROUNDCOLOR}} BG% = {{Cl|_BACKGROUNDCOLOR}} {{Cl|PRINT}} BG% 'prints the attribute as 3 instead of 11 {{CodeEnd}} -{{BlueStart}}3 -{{BlueEnd}} +{{OutputStart}}3 +{{OutputEnd}} :''Explanation: SCREEN 0 background colors over 7 will return the lower intensity color attribute values: EX: attribute - 8 @@ -46,3 +46,4 @@ BG% = {{Cl|_BACKGROUNDCOLOR}} {{PageNavigation}} +< diff --git a/internal/help/_BIT.txt b/internal/help/_BIT.txt index b0f10c89e..baaa04436 100644 --- a/internal/help/_BIT.txt +++ b/internal/help/_BIT.txt @@ -89,3 +89,4 @@ RShift = {{Cl|INT}}(n / (2 ^ RS)) {{PageNavigation}} +< diff --git a/internal/help/_BLEND.txt b/internal/help/_BLEND.txt index 6a4076c06..b36774dae 100644 --- a/internal/help/_BLEND.txt +++ b/internal/help/_BLEND.txt @@ -139,3 +139,4 @@ m& = {{Cl|POINT}}(303, 302) {{PageNavigation}} +< diff --git a/internal/help/_BLEND_(function).txt b/internal/help/_BLEND_(function).txt index e33db7e17..e9612d7dd 100644 --- a/internal/help/_BLEND_(function).txt +++ b/internal/help/_BLEND_(function).txt @@ -17,3 +17,4 @@ The [[_BLEND (function)|_BLEND]] function returns enabled or disabled for the cu {{PageNavigation}} +< diff --git a/internal/help/_BLINK.txt b/internal/help/_BLINK.txt index c9bbd3561..ab3017ccf 100644 --- a/internal/help/_BLINK.txt +++ b/internal/help/_BLINK.txt @@ -13,8 +13,8 @@ The [[_BLINK]] statement toggles blinking colors in text mode (SCREEN 0). Defaul * IF [[_DISPLAY]] is used, blinking is disabled, even if _BLINK is ON, but high intensity backgrounds aren't enabled in this case. -{{PageAvailability}} -* Build 20170816/61 and up). +==Availability:== +* Build 20170816/61 up (August 16, 2017). {{PageExamples}} @@ -33,3 +33,4 @@ The [[_BLINK]] statement toggles blinking colors in text mode (SCREEN 0). Defaul * [[_DISPLAY]] {{PageNavigation}} +< diff --git a/internal/help/_BLINK_(function).txt b/internal/help/_BLINK_(function).txt index 4dc8f69c0..7a588ccae 100644 --- a/internal/help/_BLINK_(function).txt +++ b/internal/help/_BLINK_(function).txt @@ -6,8 +6,8 @@ The [[_BLINK]] function returns the current blink setting for SCREEN 0 colors. I : {{Parameter|blinkState%%}} = [[_BLINK]] -{{PageAvailability}} -* Build 20170816/61 and up. +==Availability== +* Build 20170816/61 up (August 16, 2017). {{PageExamples}} @@ -29,3 +29,4 @@ The [[_BLINK]] function returns the current blink setting for SCREEN 0 colors. I * [[OUT]] {{PageNavigation}} +< diff --git a/internal/help/_BLUE.txt b/internal/help/_BLUE.txt index 08fa76706..8a2d5dab8 100644 --- a/internal/help/_BLUE.txt +++ b/internal/help/_BLUE.txt @@ -29,3 +29,4 @@ The [[_BLUE]] function returns the palette intensity or the blue component inten {{PageNavigation}} +< diff --git a/internal/help/_BLUE32.txt b/internal/help/_BLUE32.txt index f8aad0f11..e3b70e4c7 100644 --- a/internal/help/_BLUE32.txt +++ b/internal/help/_BLUE32.txt @@ -22,3 +22,4 @@ The [[_BLUE32]] function returns the blue component intensity of a 32-bit image {{PageNavigation}} +< diff --git a/internal/help/_BUTTON.txt b/internal/help/_BUTTON.txt index 2ada20121..25d784daa 100644 --- a/internal/help/_BUTTON.txt +++ b/internal/help/_BUTTON.txt @@ -7,7 +7,6 @@ The [[_BUTTON]] function returns -1 when specified button number on a controller {{PageDescription}} -* The '''[[_DEVICEINPUT]] function should be read first to specify which device [[_BUTTON]] is intended to check.''' * Values returned are -1 for a press and 0 when a button is released or not pressed. * The {{Parameter|button_number%}} must be a number which does not exceed the number of buttons found by the [[_LASTBUTTON]] function. * '''The number of [[_DEVICES]] must be read before using [[_DEVICE$]], [[_DEVICEINPUT]] or [[_LASTBUTTON]].''' @@ -52,3 +51,4 @@ The [[_BUTTON]] function returns -1 when specified button number on a controller {{PageNavigation}} +< diff --git a/internal/help/_BUTTONCHANGE.txt b/internal/help/_BUTTONCHANGE.txt index c85ed28ce..4c00995cb 100644 --- a/internal/help/_BUTTONCHANGE.txt +++ b/internal/help/_BUTTONCHANGE.txt @@ -7,7 +7,6 @@ The [[_BUTTONCHANGE]] function returns -1 or 1 when a specified button number on {{PageDescription}} -* The '''[[_DEVICEINPUT]] function should be read first to specify which device [[_BUTTONCHANGE]] is intended to check.''' * Values returned are -1 for a press and 1 when a button is released. No press or release event returns zero. * The {{Parameter|button_number%}} must be a number which does not exceed the number of buttons found by the [[_LASTBUTTON]] function. * '''The number of [[_DEVICES]] must be read before using [[_DEVICE$]], [[_DEVICEINPUT]] or [[_LASTBUTTON]].''' @@ -52,3 +51,4 @@ The [[_BUTTONCHANGE]] function returns -1 or 1 when a specified button number on {{PageNavigation}} +< diff --git a/internal/help/_BYTE.txt b/internal/help/_BYTE.txt index 7195bdd26..93dadd1fb 100644 --- a/internal/help/_BYTE.txt +++ b/internal/help/_BYTE.txt @@ -100,3 +100,4 @@ The most significant bit is furthest to the left. {{PageNavigation}} +< diff --git a/internal/help/_CAPSLOCK.txt b/internal/help/_CAPSLOCK.txt index 80b3613d7..23c4e0d03 100644 --- a/internal/help/_CAPSLOCK.txt +++ b/internal/help/_CAPSLOCK.txt @@ -6,7 +6,7 @@ The [[_CAPSLOCK]] statement sets the state of the Caps Lock key. : [[_CAPSLOCK]] {ON|OFF|_TOGGLE} -{{PageAvailability}} +==Availability== * Version 1.4 and up. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -17,3 +17,4 @@ The [[_CAPSLOCK]] statement sets the state of the Caps Lock key. {{PageNavigation}} +< diff --git a/internal/help/_CAPSLOCK_(function).txt b/internal/help/_CAPSLOCK_(function).txt index d0c860392..851129e47 100644 --- a/internal/help/_CAPSLOCK_(function).txt +++ b/internal/help/_CAPSLOCK_(function).txt @@ -6,7 +6,7 @@ The [[_CAPSLOCK (function)| _CAPSLOCK]] function returns the current state of th : {{Parameter|keyStatus%%}} = [[_CAPSLOCK (function)| _CAPSLOCK]] -{{PageAvailability}} +==Availability== * Version 1.4 and up. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -17,3 +17,4 @@ The [[_CAPSLOCK (function)| _CAPSLOCK]] function returns the current state of th {{PageNavigation}} +< diff --git a/internal/help/_CEIL.txt b/internal/help/_CEIL.txt index f4bbafe27..4ba4b5daa 100644 --- a/internal/help/_CEIL.txt +++ b/internal/help/_CEIL.txt @@ -10,8 +10,8 @@ The [[_CEIL]] function rounds a numeric value up to the next whole number or [[I * This means that [[_CEIL]] rounds up for both positive and negative numbers. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -33,3 +33,4 @@ PRINT INT(-2.5), CINT(-2.5), FIX(-2.5), _CEIL(-2.5) {{PageNavigation}} +< diff --git a/internal/help/_CINP.txt b/internal/help/_CINP.txt index 5423bf450..ee36051e2 100644 --- a/internal/help/_CINP.txt +++ b/internal/help/_CINP.txt @@ -57,3 +57,4 @@ The [[_CINP]] function returns keyboard key press codes from a [[$CONSOLE]] wind {{PageNavigation}} +< diff --git a/internal/help/_CLEARCOLOR.txt b/internal/help/_CLEARCOLOR.txt index 83e9470c4..92aa52c5d 100644 --- a/internal/help/_CLEARCOLOR.txt +++ b/internal/help/_CLEARCOLOR.txt @@ -5,7 +5,7 @@ The [[_CLEARCOLOR]] statement sets a specific color to be treated as transparent {{PageSyntax}} :[[_CLEARCOLOR]] {{{Parameter|color&}}|_NONE}[, {{Parameter|Dest_Handle&}}] -{{PageParameters}} +{{Parameters}} * In color modes using a palette, {{Parameter|color&}} is the palette index of the new transparent color value or _NONE designates no clear colors. * If {{Parameter|color&}} is not a valid palette index, an [[ERROR Codes|illegal function call]] error will occur. * In 32-bit color modes, {{Parameter|color&}} is the [[_LONG]] color value of the new transparent color. @@ -34,6 +34,7 @@ K$ = INPUT$(1) {{Cl|END}} '' '' {{CodeEnd}} + ''Example 2:'' Using a _CLEARCOLOR transparency with images created on a [[_NEWIMAGE]] page. Does not require an image file. {{CodeStart}}{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(512, 384, 32) ' screen uses handle value {{Cl|CIRCLE}}(50, 50), 50, {{Cl|_RGB}}(128, 0, 0) ' create a red ball image @@ -79,7 +80,7 @@ DO {{Cl|LOOP}} {{Cl|UNTIL}} a& = 0 {{Cl|END}} {{CodeEnd}} -:''Note:'' If the _CLEARCOLOR background was not put onto a separate page, [[_SETALPHA]] would display it also. +:''Note:'' If the _CLEARCOLOR image background was not put onto a separate page, [[_SETALPHA]] would display it also. @@ -91,3 +92,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_CLEARCOLOR_(function).txt b/internal/help/_CLEARCOLOR_(function).txt index 667d0f174..a63b644ed 100644 --- a/internal/help/_CLEARCOLOR_(function).txt +++ b/internal/help/_CLEARCOLOR_(function).txt @@ -23,3 +23,4 @@ The [[_CLEARCOLOR (function)|_CLEARCOLOR]] function returns the current transpar {{PageNavigation}} +< diff --git a/internal/help/_CLIP.txt b/internal/help/_CLIP.txt index f1a4c9f8f..09fb93598 100644 --- a/internal/help/_CLIP.txt +++ b/internal/help/_CLIP.txt @@ -47,3 +47,4 @@ The [[_CLIP]] option is used in a QB64 graphics [[PUT (graphics statement)|PUT]] {{PageNavigation}} +< diff --git a/internal/help/_CLIPBOARD$.txt b/internal/help/_CLIPBOARD$.txt index 6f486969e..054099732 100644 --- a/internal/help/_CLIPBOARD$.txt +++ b/internal/help/_CLIPBOARD$.txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:_CLIPBOARD$}} -The [[_CLIPBOARD$]] function returns the current operating system's clipboard contents as a [[STRING]]. +The [[_CLIPBOARD$]] function returns the current Operating System's clipboard contents as a [[STRING]]. {{PageSyntax}} @@ -19,7 +19,7 @@ The [[_CLIPBOARD$]] function returns the current operating system's clipboard co {{Cl|PRINT}} "Start Program2 to read your text entries! Empty entry quits!" {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "Entry program started!" 'set clipboard initially -{{Cl|DO}} +DO {{Cl|LINE INPUT}} "Enter some text to send to other program: ", text$ {{Cl|IF...THEN|IF}} text$ = "" {{Cl|THEN}} {{Cl|EXIT DO}} {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = text$ @@ -31,11 +31,11 @@ The [[_CLIPBOARD$]] function returns the current operating system's clipboard co {{CodeStart}} {{Cl|PRINT}} "Enter text in Program1 and this program will read it. Esc key quits!" -{{Cl|DO}}: {{Cl|_LIMIT}} 100 +DO: {{Cl|_LIMIT}} 100 text$ = {{Cl|_CLIPBOARD$}} 'function returns clipboard contents {{Cl|IF...THEN|IF}} {{Cl|LEN}}(text$) {{Cl|THEN}} - {{Cl|PRINT}} text$ - {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "" 'clear clipboard after a read + {{Cl|PRINT}} text$ + {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "" 'clear clipboard after a read {{Cl|END IF}} {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) @@ -141,3 +141,4 @@ K$ = {{Cl|UCASE$}}({{Cl|INPUT$}}(1)) {{PageNavigation}} +< diff --git a/internal/help/_CLIPBOARD$_(statement).txt b/internal/help/_CLIPBOARD$_(statement).txt index 0225659d9..40fb5b126 100644 --- a/internal/help/_CLIPBOARD$_(statement).txt +++ b/internal/help/_CLIPBOARD$_(statement).txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:_CLIPBOARD$ (statement)}} -The [[_CLIPBOARD$ (statement)|_CLIPBOARD$]] statement copies the specified [[STRING]] value into the operating system's clipboard. +The [[_CLIPBOARD$ (statement)|_CLIPBOARD$]] statement copies the [[STRING]] value into the system clipboard. {{PageSyntax}} @@ -41,3 +41,4 @@ This is line 2 {{PageNavigation}} +< diff --git a/internal/help/_CLIPBOARDIMAGE.txt b/internal/help/_CLIPBOARDIMAGE.txt index 907499a93..136a28fcb 100644 --- a/internal/help/_CLIPBOARDIMAGE.txt +++ b/internal/help/_CLIPBOARDIMAGE.txt @@ -13,8 +13,8 @@ The [[_CLIPBOARDIMAGE]] statement copies a valid QB64 image to the clipboard. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. -{{PageAvailability}} -* Build 20170906/64 and up. +==Availability== +* '''Build 20170906/64''' onward. {{PageExamples}} @@ -54,3 +54,4 @@ PRINT "Image copied to clipboard." {{PageNavigation}} +< diff --git a/internal/help/_CLIPBOARDIMAGE_(function).txt b/internal/help/_CLIPBOARDIMAGE_(function).txt index 076a9d375..79bdfa142 100644 --- a/internal/help/_CLIPBOARDIMAGE_(function).txt +++ b/internal/help/_CLIPBOARDIMAGE_(function).txt @@ -12,8 +12,8 @@ The [[_CLIPBOARDIMAGE (function)|_CLIPBOARDIMAGE]] function pastes an image from * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. -{{PageAvailability}} -* Build 20170906/64 and up. +==Availability== +* '''Build 20170906/64''' onward. {{PageExamples}} @@ -49,3 +49,4 @@ The [[_CLIPBOARDIMAGE (function)|_CLIPBOARDIMAGE]] function pastes an image from {{PageNavigation}} +< diff --git a/internal/help/_COMMANDCOUNT.txt b/internal/help/_COMMANDCOUNT.txt index 52724c44d..12e20c662 100644 --- a/internal/help/_COMMANDCOUNT.txt +++ b/internal/help/_COMMANDCOUNT.txt @@ -28,3 +28,4 @@ The [[_COMMANDCOUNT]] function returns the number or arguments passed from the c {{PageNavigation}} +< diff --git a/internal/help/_CONNECTED.txt b/internal/help/_CONNECTED.txt index 844c23ac5..2203e03a9 100644 --- a/internal/help/_CONNECTED.txt +++ b/internal/help/_CONNECTED.txt @@ -23,3 +23,4 @@ The [[_CONNECTED]] function returns the status of a TCP/IP connection handle. {{PageNavigation}} +< diff --git a/internal/help/_CONNECTIONADDRESS$.txt b/internal/help/_CONNECTIONADDRESS$.txt index b42dc7f5d..8af637cae 100644 --- a/internal/help/_CONNECTIONADDRESS$.txt +++ b/internal/help/_CONNECTIONADDRESS$.txt @@ -1 +1,47 @@ -#REDIRECT [[_CONNECTIONADDRESS]] +{{DISPLAYTITLE:_CONNECTIONADDRESS}} +The [[_CONNECTIONADDRESS]] function returns a connected user's [[STRING]] IP address value. + + +{{PageSyntax}} +:{{Parameter|result$}} = [[_CONNECTIONADDRESS|_CONNECTIONADDRESS[$]]]({{Parameter|connectionHandle&}}) + + +{{PageDescription}} +* The handle can come from the [[_OPENHOST]], [[OPENCLIENT]] or [[_OPENCONNECTION]] QB64 TCP/IP functions. +* For '''[[_OPENHOST|HOST]]s''': It may return "TCP/IP:8080:213.23.32.5" where 8080 is the port it is listening on and 213.23.32.5 is the global IP address which any computer connected to the internet could use to locate your computer. If a connection to the internet is unavailable or your firewall blocks it, it returns your 'local IP' address (127.0.0.1). You might like to store this address somewhere where other computers can find it and connect to your host. Dynamic IPs which can change will need to be updated. +* For '''[[_OPENCLIENT|CLIENT]]s''': It may return "TCP/IP:8080:213.23.32.5" where 8080 is the port it used to connect to the listening host and 213.23.32.5 is the IP address of the host name it resolved. +* For '''[[_OPENCONNECTION|CONNECTION]]s''' (from clients): It may return "TCP/IP:8080:34.232.321.25" where 8080 was the host listening port it connected to and 34.232.321.25 is the IP address of the client that connected. This is very useful because the host can log the IP address of clients for future reference (or banning, for example). +* The $ sygil is optional for compatibility with older versions. + + +{{PageExamples}} +''Example:'' A Host logging new chat clients in a Chat program. See the [[_OPENHOST]] example for the rest of the code used. +{{CodeStart}} '' '' +f = {{Cl|FREEFILE}} +{{Cl|OPEN}} "ChatLog.dat" {{Cl|FOR}} {{Cl|APPEND}} {{Cl|AS}} #f ' code at start of host section before DO loop. + + +newclient = {{Cl|_OPENCONNECTION}}(host) ' receive any new client connection handles +{{Cl|IF...THEN|IF}} newclient {{Cl|THEN}} + numclients = numclients + 1 ' increment index + Users(numclients) = newclient ' place handle into array + IP$ = {{Cl|_CONNECTIONADDRESS}}(newclient) + {{Cl|PRINT}} IP$ + " has joined." ' displayed to Host only + {{Cl|PRINT (file statement)|PRINT #f}}, IP$, numclients ' print info to a log file + {{Cl|PRINT (file statement)|PRINT #}}Users(numclients),"Welcome!" ' from Host to new clients only +{{Cl|END IF}} '' '' + +{{CodeEnd}} +: ''Explanation:'' The function returns the new client's IP address to the IP$ variable. Prints the IP and the original login position to a log file. The information can later be used by the host for referance if necessary. The host could set up a ban list too. + + +{{PageSeeAlso}} +* [[_OPENCONNECTION]] +* [[_OPENHOST]] +* [[_OPENCLIENT]] +* [[_CONNECTED]] +* [[WGET]] (HTTP and FTP file transfer) + + +{{PageNavigation}} +< diff --git a/internal/help/_CONSOLE.txt b/internal/help/_CONSOLE.txt index 000ac9b09..a3bf97c51 100644 --- a/internal/help/_CONSOLE.txt +++ b/internal/help/_CONSOLE.txt @@ -60,3 +60,4 @@ The [[_CONSOLE]] statement can be used to turn a console window ON/OFF. {{PageNavigation}} +< diff --git a/internal/help/_CONSOLEINPUT.txt b/internal/help/_CONSOLEINPUT.txt index c660d5a07..2afa3ef54 100644 --- a/internal/help/_CONSOLEINPUT.txt +++ b/internal/help/_CONSOLEINPUT.txt @@ -10,7 +10,6 @@ The [[_CONSOLEINPUT]] function is used to monitor any new mouse or keyboard inpu * Returns 1 if new keyboard information is available, 2 if mouse information is available, otherwise it returns 0. * Must be called before reading any of the other mouse functions and before reading [[_CINP]]. * To clear all previous input data, read [[_CONSOLEINPUT]] in a loop until it returns 0. -* To capture mouse input, turn off Quick Edit in the settings of command prompt and use [[_SOURCE]] [[_CONSOLE]]. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -42,3 +41,4 @@ The [[_CONSOLEINPUT]] function is used to monitor any new mouse or keyboard inpu {{PageNavigation}} +< diff --git a/internal/help/_CONSOLETITLE.txt b/internal/help/_CONSOLETITLE.txt index 81c15031c..75ec734b7 100644 --- a/internal/help/_CONSOLETITLE.txt +++ b/internal/help/_CONSOLETITLE.txt @@ -1,13 +1,13 @@ {{DISPLAYTITLE:_CONSOLETITLE}} -The [[_CONSOLETITLE]] statement sets the console window's title-bar text. +The [[_CONSOLETITLE]] statement creates the title of the console window using a literal or variable [[STRING|string]]. {{PageSyntax}} : [[_CONSOLETITLE]] {{Parameter|text$}} -{{Parameters}} -* ''text$'' can be any literal or variable [[STRING]] value. +{{PageDescription}} +* The ''text$'' used can be a literal or variable [[STRING]] value. {{PageExamples}} @@ -23,7 +23,7 @@ The [[_CONSOLETITLE]] statement sets the console window's title-bar text. {{Cl|END}} {{CodeEnd}} -:''Note:'' You can also use [[SHELL]] "title consoletitle" to set the title of the console window. However, the recommended practice is to use [[_CONSOLETITLE]]. +:''Note:'' You can also use [[SHELL]] "title consoletitle" to set the title of the console window. However, '''the recommended practice is to use [[_CONSOLETITLE]]'''. ''See also:'' @@ -33,3 +33,4 @@ The [[_CONSOLETITLE]] statement sets the console window's title-bar text. {{PageNavigation}} +< diff --git a/internal/help/_CONTINUE.txt b/internal/help/_CONTINUE.txt index 9b8ef832a..a78e5ecec 100644 --- a/internal/help/_CONTINUE.txt +++ b/internal/help/_CONTINUE.txt @@ -7,8 +7,8 @@ The [[_CONTINUE]] statement is used in a [[DO...LOOP]], [[WHILE...WEND]] or [[FO : [[_CONTINUE]] -{{PageAvailability}} -* Build 20170628/55 and up. +==Availability== +* Build 20170628/55 up. {{PageExamples}} @@ -31,3 +31,4 @@ The [[_CONTINUE]] statement is used in a [[DO...LOOP]], [[WHILE...WEND]] or [[FO * [[GOTO]] {{PageNavigation}} +< diff --git a/internal/help/_CONTROLCHR.txt b/internal/help/_CONTROLCHR.txt index 37a3fb303..a68d436c2 100644 --- a/internal/help/_CONTROLCHR.txt +++ b/internal/help/_CONTROLCHR.txt @@ -47,3 +47,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_CONTROLCHR_(function).txt b/internal/help/_CONTROLCHR_(function).txt index b62861509..b7904b85e 100644 --- a/internal/help/_CONTROLCHR_(function).txt +++ b/internal/help/_CONTROLCHR_(function).txt @@ -22,3 +22,4 @@ The [[_CONTROLCHR (function)|_CONTROLCHR]] function returns the current state of {{PageNavigation}} +< diff --git a/internal/help/_COPYIMAGE.txt b/internal/help/_COPYIMAGE.txt index 47b99e6c9..de7842f05 100644 --- a/internal/help/_COPYIMAGE.txt +++ b/internal/help/_COPYIMAGE.txt @@ -6,7 +6,7 @@ The [[_COPYIMAGE]] function creates an identical designated image in memory with : newhandle& = [[_COPYIMAGE]][({{Parameter|imageHandle&}}[, {{Parameter|mode%}})]] -{{PageParameters}} +{{Parameters}} * The [[LONG]] ''newhandle&'' value returned will be different than the source handle value supplied. * If ''imageHandle&'' parameter is omitted or zero is designated, the current software [[_DEST|destination]] screen or image is copied. * If 1 is designated instead of an ''imageHandle&'', it designates the last OpenGL hardware surface to copy. @@ -48,7 +48,7 @@ DO: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" : ''Note:'' Only free valid handle values with [[_FREEIMAGE]] AFTER a new [[SCREEN]] mode is being used by the program. -''Example 2:'' Program that copies desktop to a hardware image to form a 3D triangle: +''Example 2:'' Program that copies desktop to a hardware image to form a 3D triangle ('''version 1.000 and up'''): {{CodeStart}} '' '' {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) my_hardware_handle = {{Cl|_COPYIMAGE}}({{Cl|_SCREENIMAGE}}, 33) 'take a screenshot and use it as our texture @@ -70,3 +70,4 @@ my_hardware_handle = {{Cl|_COPYIMAGE}}({{Cl|_SCREENIMAGE}}, 33) 'take a screensh {{PageNavigation}} +< diff --git a/internal/help/_COPYPALETTE.txt b/internal/help/_COPYPALETTE.txt index 1087d045e..53a129761 100644 --- a/internal/help/_COPYPALETTE.txt +++ b/internal/help/_COPYPALETTE.txt @@ -28,3 +28,4 @@ The [[_COPYPALETTE]] statement copies the color palette intensities from one 4 o {{PageNavigation}} +< diff --git a/internal/help/_CV.txt b/internal/help/_CV.txt index 98e3912ef..ae9006fad 100644 --- a/internal/help/_CV.txt +++ b/internal/help/_CV.txt @@ -6,8 +6,8 @@ The [[_CV]] function is used to convert [[_MK$]], [[ASCII]], [[STRING]] values t :{{Parameter|result}} = [[_CV]]({{Parameter|numericalType}}, {{Parameter|MKstringValue$}}) -{{PageParameters}} -* {{Parameter|numericalType}} is any number type: [[INTEGER]], [[LONG]], [[SINGLE]], [[DOUBLE]], [[_INTEGER64]], [[_FLOAT]], [[_BYTE]] or [[_OFFSET]]. +{{Parameters}} +* {{Parameter|numericalType}} is any number type: [[INTEGER]], [[LONG]], [[SINGLE]], [[DOUBLE]], [[_INTEGER64]], [[_FLOAT]], [[_BYTE]] or [[_BIT]]. * Integer, Long, Byte and Bit values can be signed or [[_UNSIGNED]]. * The {{Parameter|MKstringvalue$}} parameter must be a string value generated by [[_MK$]] @@ -53,3 +53,4 @@ _CV: 2305843009213693952 {{PageNavigation}} +< diff --git a/internal/help/_CWD$.txt b/internal/help/_CWD$.txt index 51bce1307..5111cd840 100644 --- a/internal/help/_CWD$.txt +++ b/internal/help/_CWD$.txt @@ -48,3 +48,4 @@ And now we're back in C:\QB64 {{PageNavigation}} +< diff --git a/internal/help/_D2G.txt b/internal/help/_D2G.txt index e0d2eb744..e203b1e77 100644 --- a/internal/help/_D2G.txt +++ b/internal/help/_D2G.txt @@ -6,8 +6,8 @@ The [[_D2G]] function converts a '''degree''' value into a '''gradient''' value. : {{Parameter|result}} = [[_D2G]]({{Parameter|num}}) -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -31,3 +31,4 @@ That angle in Gradient is 66.66666 {{PageNavigation}} +< diff --git a/internal/help/_D2R.txt b/internal/help/_D2R.txt index dec1c060b..2383477a0 100644 --- a/internal/help/_D2R.txt +++ b/internal/help/_D2R.txt @@ -6,8 +6,8 @@ The [[_D2R]] function converts a '''degree''' value into a '''radian''' value. :: {{Parameter|result}} = [[_D2R]]({{Parameter|num}}) -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -31,3 +31,4 @@ That angle in Radians is 1.047198 {{PageNavigation}} +< diff --git a/internal/help/_DEFAULTCOLOR.txt b/internal/help/_DEFAULTCOLOR.txt index 787d8d558..fb7ce947d 100644 --- a/internal/help/_DEFAULTCOLOR.txt +++ b/internal/help/_DEFAULTCOLOR.txt @@ -18,7 +18,7 @@ The [[_DEFAULTCOLOR]] function returns the current default text color for an ima {{Cl|SCREEN}} 12 {{Cl|OUT}} {{Cl|&H}}3C8, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 63: {{Cl|OUT}} {{Cl|&H}}3C9, 63: {{Cl|OUT}} {{Cl|&H}}3C9, 63 'assign background RGB intensities {{Cl|OUT}} {{Cl|&H}}3C8, 8: {{Cl|OUT}} {{Cl|&H}}3C9, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 0 'assign RGB intensities to COLOR 8 -{{Cl|_PRINTMODE }} _KEEPBACKGROUND +{{Cl|_PRINTMODE }} {{Cl|_KEEPBACKGROUND}} {{Cl|COLOR}} 8 'assign color 8 to text foreground {{Cl|PRINT}} "The default color is attribute"; {{Cl|_DEFAULTCOLOR}} '' '' {{CodeEnd}} @@ -32,3 +32,4 @@ The [[_DEFAULTCOLOR]] function returns the current default text color for an ima {{PageNavigation}} +< diff --git a/internal/help/_DEFINE.txt b/internal/help/_DEFINE.txt index 0ac36ba54..edaa873ff 100644 --- a/internal/help/_DEFINE.txt +++ b/internal/help/_DEFINE.txt @@ -3,10 +3,10 @@ {{PageSyntax}} -:[[_DEFINE]] {{Parameter|letter}}[{{Parameter|-range}}, ...] [[AS]] [{{KW|_UNSIGNED}}] data[[Variable Types|type]] +:[[_DEFINE]] {{Parameter|letter}}[{{Parameter|-range}}, ...] [[AS]] [{{KW|_UNSIGNED}}] data[[type]] -{{PageParameters}} +{{Parameters}} * Variable start ''letter range'' is in the form firstletter-endingletter (like A-C) or just a single letter. * ''Data types'': [[INTEGER]], [[SINGLE]], [[DOUBLE]], [[LONG]], [[STRING]], [[_BIT]], [[_BYTE]], [[_INTEGER64]], [[_FLOAT]], [[_OFFSET]], [[_MEM]] * Can also use the [[_UNSIGNED]] definition for positive whole [[INTEGER]] type numerical values. @@ -14,9 +14,9 @@ {{PageDescription}} * '''When a variable has not been defined or has no type suffix, the value defaults to a [[SINGLE]] precision floating point value.''' -* _DEFINE sets the [[Variable Types|type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). -* '''NOTE: Many QBasic keyword variable names CAN be used with a [[STRING]] suffix ($)! You cannot use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements.''' -* '''QBasic's IDE''' added DEF statements before any [[SUB]] or [[FUNCTION]]. '''QB64''' (like QB) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding the proper DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. +* _DEFINE sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures). +* '''NOTE: Many Qbasic keyword variable names CAN be used with a [[STRING]] suffix ($)! You cannot use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements.''' +* '''Qbasic's IDE''' added DEF statements before any [[SUB]] or [[FUNCTION]]. '''QB64''' (like QB) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding the proper DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures. * May also affect [[$INCLUDE]] procedures. @@ -30,7 +30,7 @@ {{Cl|END}} {{Cl|FUNCTION}} Add2 (one, two) - Add2 = one + two +Add2 = one + two {{Cl|END FUNCTION}} '' '' {{CodeEnd}} {{OutputStart}}65533 @@ -46,3 +46,4 @@ {{PageNavigation}} +< diff --git a/internal/help/_DEFLATE$.txt b/internal/help/_DEFLATE$.txt index 74beac176..ed20b60ad 100644 --- a/internal/help/_DEFLATE$.txt +++ b/internal/help/_DEFLATE$.txt @@ -11,8 +11,8 @@ The [[_DEFLATE$]] function compresses a [[STRING|string]]. * To decompress the resulting string, use [[_INFLATE$]]. -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -28,7 +28,7 @@ a$ = "The quick brown fox jumps over the lazy dog. " b$ = {{Cl|_DEFLATE$}}(a$) {{Cl|PRINT}} "After using _DEFLATE$ to compress it, LEN ="; {{Cl|LEN}}(b$) -{{Cl|PRINT USING}} "(compressed size is #.###% of the original)"; (({{Cl|LEN}}(b$) * 100) / {{Cl|LEN}}(a$)) +{{Cl|PRINT}} {{Cl|USING}} "(compressed size is #.###% of the original)"; (({{Cl|LEN}}(b$) * 100) / {{Cl|LEN}}(a$)) c$ = {{Cl|_INFLATE$}}(b$) PRINT "After using _INFLATE$ to decompress it, LEN ="; {{Cl|LEN}}(c$) {{CodeEnd}} @@ -46,3 +46,4 @@ After using _INFLATE$ to decompress it, LEN = 1474560 {{PageNavigation}} +< diff --git a/internal/help/_DELAY.txt b/internal/help/_DELAY.txt index 29ebea9da..bab0a8b75 100644 --- a/internal/help/_DELAY.txt +++ b/internal/help/_DELAY.txt @@ -1,17 +1,14 @@ {{DISPLAYTITLE:_DELAY}} -The [[_DELAY]] statement suspends program execution for the specified number of seconds. +The [[_DELAY]] statement suspends program execution for a [[SINGLE]] value of seconds. {{PageSyntax}} :[[_DELAY]] {{Parameter|seconds!}} -{{Parameters}} -* {{Parameter|seconds!}} is the time to wait, accurate to nearest millisecond (.001). - - {{PageDescription}} -* While waiting, CPU cycles are relinquished to other applications. +* {{Parameter|seconds!}} is the time to wait, accurate to nearest millisecond (.001). +* While waiting, cpu cycles are relinquished to other applications. * Delays are not affected by midnight timer corrections. @@ -22,3 +19,4 @@ The [[_DELAY]] statement suspends program execution for the specified number of {{PageNavigation}} +< diff --git a/internal/help/_DEPTHBUFFER.txt b/internal/help/_DEPTHBUFFER.txt index 476f8f627..380145769 100644 --- a/internal/help/_DEPTHBUFFER.txt +++ b/internal/help/_DEPTHBUFFER.txt @@ -25,3 +25,4 @@ The [[_DEPTHBUFFER]] statement turns depth buffering ON or OFF, LOCKs or _CLEARS {{PageNavigation}} +< diff --git a/internal/help/_DESKTOPHEIGHT.txt b/internal/help/_DESKTOPHEIGHT.txt index 13ab7bf3c..66d3f352b 100644 --- a/internal/help/_DESKTOPHEIGHT.txt +++ b/internal/help/_DESKTOPHEIGHT.txt @@ -11,8 +11,8 @@ The [[_DESKTOPHEIGHT]] function returns the height of the users current desktop. * This returns the height of the user's desktop, not the size of any screen or window which might be open on that desktop. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -35,3 +35,4 @@ The [[_DESKTOPHEIGHT]] function returns the height of the users current desktop. {{PageNavigation}} +< diff --git a/internal/help/_DESKTOPWIDTH.txt b/internal/help/_DESKTOPWIDTH.txt index 6ee2d47be..13cb55c0b 100644 --- a/internal/help/_DESKTOPWIDTH.txt +++ b/internal/help/_DESKTOPWIDTH.txt @@ -11,8 +11,8 @@ The [[_DESKTOPWIDTH]] function returns the width of the users current desktop. * This returns the width of the user's desktop, not the size of any screen or window which might be open on that desktop. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -35,3 +35,4 @@ The [[_DESKTOPWIDTH]] function returns the width of the users current desktop. {{PageNavigation}} +< diff --git a/internal/help/_DEST.txt b/internal/help/_DEST.txt index 0502cc349..cf9c839d3 100644 --- a/internal/help/_DEST.txt +++ b/internal/help/_DEST.txt @@ -111,3 +111,4 @@ ya = ya + ym {{PageNavigation}} +< diff --git a/internal/help/_DEST_(function).txt b/internal/help/_DEST_(function).txt index 949b19ce9..3a3163400 100644 --- a/internal/help/_DEST_(function).txt +++ b/internal/help/_DEST_(function).txt @@ -20,3 +20,4 @@ The [[_DEST]] function returns the handle value of the current write page (the i {{PageNavigation}} +< diff --git a/internal/help/_DEVICE$.txt b/internal/help/_DEVICE$.txt index 1ccb931cc..a235586d5 100644 --- a/internal/help/_DEVICE$.txt +++ b/internal/help/_DEVICE$.txt @@ -66,3 +66,4 @@ Buttons: 9 Axis: 6 Wheels: 0 {{PageNavigation}} +< diff --git a/internal/help/_DEVICEINPUT.txt b/internal/help/_DEVICEINPUT.txt index 7f366091a..46a1b3488 100644 --- a/internal/help/_DEVICEINPUT.txt +++ b/internal/help/_DEVICEINPUT.txt @@ -7,7 +7,7 @@ The '''_DEVICEINPUT''' function returns the device number when a controller devi : {{Parameter|device_active%}} = [[_DEVICEINPUT]]({{Parameter|device_number%}}) -{{PageParameters}} +{{Parameters}} * Use the _DEVICEINPUT {{Parameter|device%}} [[INTEGER]] returned to find the number of the controller device being used. * A literal specific {{Parameter|device_number%}} parameter can be used to return -1 if active or 0 if inactive. {{text|EX: '''WHILE _DEVICEINPUT(2)'''|green}} @@ -106,3 +106,4 @@ controller: {{PageNavigation}} +< diff --git a/internal/help/_DEVICES.txt b/internal/help/_DEVICES.txt index 63b5ab05e..9ee87ffb4 100644 --- a/internal/help/_DEVICES.txt +++ b/internal/help/_DEVICES.txt @@ -43,3 +43,4 @@ Buttons: 3 {{PageNavigation}} +< diff --git a/internal/help/_DIR$.txt b/internal/help/_DIR$.txt index 6219f9fa0..757213de7 100644 --- a/internal/help/_DIR$.txt +++ b/internal/help/_DIR$.txt @@ -6,8 +6,8 @@ The [[_DIR$]] function returns common paths in '''Windows''' only such as My Doc : {{Parameter|d$}} = [[_DIR$]]("{{Parameter|folderspecification}}") -{{PageParameters}} -* ''folderspecification'' may be "desktop", "download", "documents", "music", "video", "pictures", "appdata", "program data", "local data", "program files", "program files (x86)", "temp". +{{Parameters}} +* ''folderspecification'' may be "desktop", "download", "documents", "music", "video", "pictures", "appdata", "program data", "local data". * Some variation is accepted for the folder specification: :: MY DOCUMENTS, TEXT, DOCUMENT, DOCUMENTS, DOWNLOAD, DOWNLOADS :: MY MUSIC, MUSIC, AUDIO, SOUND, SOUNDS @@ -31,7 +31,7 @@ Example: Displaying default paths in Windows only. {{Cl|PRINT}} "MUSIC=" + {{Cl|_DIR$}}("music") {{Cl|PRINT}} "VIDEO=" + {{Cl|_DIR$}}("video") {{Cl|PRINT}} "APPLICATION DATA=" + {{Cl|_DIR$}}("data") -{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data") +{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data" {{CodeEnd}} {{OutputStart}}DESKTOP=C:\Documents and Settings\Administrator\Desktop\ DOWNLOADS=C:\Documents and Settings\Administrator\Downloads\ @@ -50,3 +50,4 @@ LOCAL APPLICATION DATA=C:\Documents and Settings\Administrator\Local Settings\Ap {{PageNavigation}} +< diff --git a/internal/help/_DIREXISTS.txt b/internal/help/_DIREXISTS.txt index 937d9907a..44f1703d8 100644 --- a/internal/help/_DIREXISTS.txt +++ b/internal/help/_DIREXISTS.txt @@ -12,7 +12,8 @@ The [[_DIREXISTS]] function determines if a designated file path or folder exist * The function reads the system information directly without using a [[SHELL]] procedure. * The function will use the appropriate Operating System path separators. [[_OS$]] can determine the operating system. * '''This function does not guarantee that a path can be accessed, only that it exists.''' -* '''NOTE: Checking if a folder exists in a CD drive may cause the tray to open automatically to request a disk when empty.''' +* '''NOTE: Checking if a folder exists in a CD drive may cause the tray to open automatically to request a disk when empty.''' To find drives in Windows, use this API Library: [[Windows Libraries#Disk Drives|Disk Drives]] + {{PageExamples}} {{Parameter|Example:'' Checks if a folder exists before proceeding. @@ -30,3 +31,4 @@ The [[_DIREXISTS]] function determines if a designated file path or folder exist {{PageNavigation}} +< diff --git a/internal/help/_DISPLAY.txt b/internal/help/_DISPLAY.txt index 46da5483d..994e0004c 100644 --- a/internal/help/_DISPLAY.txt +++ b/internal/help/_DISPLAY.txt @@ -80,3 +80,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_DISPLAYORDER.txt b/internal/help/_DISPLAYORDER.txt index 9d869e9ea..d3795749f 100644 --- a/internal/help/_DISPLAYORDER.txt +++ b/internal/help/_DISPLAYORDER.txt @@ -6,7 +6,7 @@ The [[_DISPLAYORDER]] statement defines the order to render software, hardware a : [[_DISPLAYORDER]] [{_SOFTWARE|_HARDWARE|_HARDWARE1|_GLRENDER}][, ...][, ...][, ...][, ...] -{{PageParameters}} +{{Parameters}} * _SOFTWARE refers to software created surfaces or [[SCREEN]]s. * _HARDWARE and _HARDWARE1 refer to surfaces created by OpenGL hardware acceleration. * _GLRENDER refers to OpenGL code rendering order @@ -25,8 +25,8 @@ The [[_DISPLAYORDER]] statement defines the order to render software, hardware a * Rendering the same content twice consecutively in a combination is not allowed. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageSeeAlso}} @@ -38,3 +38,4 @@ The [[_DISPLAYORDER]] statement defines the order to render software, hardware a {{PageNavigation}} +< diff --git a/internal/help/_DISPLAY_(function).txt b/internal/help/_DISPLAY_(function).txt index 03e919336..fda296b01 100644 --- a/internal/help/_DISPLAY_(function).txt +++ b/internal/help/_DISPLAY_(function).txt @@ -48,3 +48,4 @@ SetupCursor {{PageNavigation}} +< diff --git a/internal/help/_DONTBLEND.txt b/internal/help/_DONTBLEND.txt index 8fd04fa84..930949931 100644 --- a/internal/help/_DONTBLEND.txt +++ b/internal/help/_DONTBLEND.txt @@ -6,7 +6,7 @@ The [[_DONTBLEND]] statement turns off 32 bit alpha blending for the current ima : [[_DONTBLEND]] [{{Parameter|imageHandle&}}] -{{PageParameters}} +{{Parameters}} * If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current [[_DEST]]ination write page. @@ -100,3 +100,4 @@ ph = 0 {{PageNavigation}} +< diff --git a/internal/help/_DONTWAIT.txt b/internal/help/_DONTWAIT.txt index 60aef2bc1..0829f2b77 100644 --- a/internal/help/_DONTWAIT.txt +++ b/internal/help/_DONTWAIT.txt @@ -10,7 +10,7 @@ *Runs the command/program specified in {{Parameter|commandline$}} and lets the calling program continue at the same time in its current screen format. *Especially useful when CMD /C or START is used in a SHELL command line to run another program. * '''QB64''' automatically uses CMD /C or COMMAND /C when using SHELL. -* '''QB64''' program screens will not get distorted or minimized like QBasic fullscreen modes would. +* '''QB64''' program screens will not get distorted or minimized like Qbasic fullscreen modes would. {{PageExamples}} @@ -39,3 +39,4 @@ {{PageNavigation}} +< diff --git a/internal/help/_DROPPEDFILE.txt b/internal/help/_DROPPEDFILE.txt index 6c8187f85..c56dfd371 100644 --- a/internal/help/_DROPPEDFILE.txt +++ b/internal/help/_DROPPEDFILE.txt @@ -17,8 +17,8 @@ The [[_DROPPEDFILE]] function returns the list of items (files or folders) dropp * '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -61,3 +61,4 @@ The [[_DROPPEDFILE]] function returns the list of items (files or folders) dropp {{PageNavigation}} +< diff --git a/internal/help/_ECHO.txt b/internal/help/_ECHO.txt index 7b354d899..d3db30189 100644 --- a/internal/help/_ECHO.txt +++ b/internal/help/_ECHO.txt @@ -11,8 +11,8 @@ The [[_ECHO]] statement allows outputting text to a [[$CONSOLE]] window without * To output numbers, use the [[STR$]] function. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -30,3 +30,4 @@ The [[_ECHO]] statement allows outputting text to a [[$CONSOLE]] window without {{PageNavigation}} +< diff --git a/internal/help/_ENVIRONCOUNT.txt b/internal/help/_ENVIRONCOUNT.txt index 312c0fdb0..931841834 100644 --- a/internal/help/_ENVIRONCOUNT.txt +++ b/internal/help/_ENVIRONCOUNT.txt @@ -1,21 +1 @@ -{{DISPLAYTITLE:_ENVIRONCOUNT}} -The [[_ENVIRONCOUNT]] function returns the number of items (key/value pairs) currently stored in the system environment variables table. - - -{{PageSyntax}} -: {{Parameter|totalKeys&}} = [[_ENVIRONCOUNT]] - - -{{PageDescription}} -* Any changes made at runtime to the environment table are discarded when your program ends - - -{{PageAvailability}} -* Version 2.0 and up. - - -{{PageSeeAlso}} -* [[ENVIRON$]], [[ENVIRON]] - - -{{PageNavigation}} +< diff --git a/internal/help/_ERRORLINE.txt b/internal/help/_ERRORLINE.txt index 1e190e8ef..2fc7c91d5 100644 --- a/internal/help/_ERRORLINE.txt +++ b/internal/help/_ERRORLINE.txt @@ -28,10 +28,11 @@ DebugLine: {{PageSeeAlso}} * [[ON ERROR]] -* [[_INCLERRORLINE]], [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]] +* [[_INCLERRORLINE]], [[_INCLERRORFILE$]] * [[ERR]], [[ERL]] * [[ERROR]] * [[ERROR Codes]] {{PageNavigation}} +< diff --git a/internal/help/_ERRORMESSAGE$.txt b/internal/help/_ERRORMESSAGE$.txt index a581e329f..931841834 100644 --- a/internal/help/_ERRORMESSAGE$.txt +++ b/internal/help/_ERRORMESSAGE$.txt @@ -1,42 +1 @@ -{{DISPLAYTITLE:_ERRORMESSAGE$}} -The [[_ERRORMESSAGE$]] function returns a human-readable description of the most recent runtime error, or the description of an arbitrary error code passed to it. - - -{{PageSyntax}} -:{{Parameter|e$}} = [[_ERRORMESSAGE$]] -:{{Parameter|e$}} = [[_ERRORMESSAGE$]]({{Parameter|errorCode%}}) - - -{{PageDescription}} -* Used in program error troubleshooting. -* The message returned is identical to the message shown in the dialog box that appears if your program has no error handler. See [[ERROR Codes]] for the full list of error codes and their messages. - -{{PageExamples}} -''Example 1:'' Using an error handler that ignores any error. - -{{CodeStart}} '' '' - {{Cl|ON ERROR}} {{Cl|GOTO}} Errhandler - ' Main module program error simulation code - {{Cl|ERROR}} 7 ' simulate an Out of Memory Error - PRINT "Error handled...ending program" - {{Cl|SLEEP}} 4 - {{Cl|SYSTEM}} ' end of program code - - Errhandler: 'error handler sub program line label - PRINT "Error"; {{Cl|ERR}}; "on program file line"; {{Cl|_ERRORLINE}} - PRINT "Description: "; {{Cl|_ERRORMESSAGE$}}; "." - {{Cl|BEEP}} ' warning beep - {{Cl|RESUME}} NEXT ' moves program to code following the error. '' '' -{{CodeEnd}} - - -{{PageSeeAlso}} -* [[ON ERROR]] -* [[_ERRORLINE]] -* [[_INCLERRORLINE]], [[_INCLERRORFILE$]] -* [[ERR]], [[ERL]] -* [[ERROR]] -* [[ERROR Codes]] - - -{{PageNavigation}} +< diff --git a/internal/help/_EXIT_(function).txt b/internal/help/_EXIT_(function).txt index 9a35a5178..aff42db18 100644 --- a/internal/help/_EXIT_(function).txt +++ b/internal/help/_EXIT_(function).txt @@ -65,3 +65,4 @@ LOOP '' '' {{PageNavigation}} +< diff --git a/internal/help/_FILEEXISTS.txt b/internal/help/_FILEEXISTS.txt index 4f7340bcc..00c441d3b 100644 --- a/internal/help/_FILEEXISTS.txt +++ b/internal/help/_FILEEXISTS.txt @@ -30,3 +30,4 @@ The '''_FILEEXISTS''' function determines if a designated file name exists and r {{PageNavigation}} +< diff --git a/internal/help/_FINISHDROP.txt b/internal/help/_FINISHDROP.txt index b34083c85..c70bd13c4 100644 --- a/internal/help/_FINISHDROP.txt +++ b/internal/help/_FINISHDROP.txt @@ -10,8 +10,8 @@ The [[_FINISHDROP]] statement resets [[_TOTALDROPPEDFILES]] and clears the [[_DR * '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -54,3 +54,4 @@ The [[_FINISHDROP]] statement resets [[_TOTALDROPPEDFILES]] and clears the [[_DR {{PageNavigation}} +< diff --git a/internal/help/_FLOAT.txt b/internal/help/_FLOAT.txt index 10e08c8f5..26a8bf168 100644 --- a/internal/help/_FLOAT.txt +++ b/internal/help/_FLOAT.txt @@ -28,3 +28,4 @@ {{PageNavigation}} +< diff --git a/internal/help/_FONT.txt b/internal/help/_FONT.txt index 708edc33d..b4a745940 100644 --- a/internal/help/_FONT.txt +++ b/internal/help/_FONT.txt @@ -6,7 +6,7 @@ The [[_FONT]] statement sets the current [[_LOADFONT]] function font handle to b : [[_FONT]] {{Parameter|fontHandle&}}[, {{Parameter|imageHandle&}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|fontHandle&}} is the handle retrieved from [[_LOADFONT]] function, the [[_FONT (function)|_FONT]] function, or a predefined handle. * If the image handle is omitted the current image [[_DEST]]ination is used. Zero can designate the current program [[SCREEN]]. @@ -79,3 +79,4 @@ ClearFont: {{PageNavigation}} +< diff --git a/internal/help/_FONTHEIGHT.txt b/internal/help/_FONTHEIGHT.txt index cfbcebb2e..eaaff90bb 100644 --- a/internal/help/_FONTHEIGHT.txt +++ b/internal/help/_FONTHEIGHT.txt @@ -55,3 +55,4 @@ TextHeight& = {{Cl|_FONTHEIGHT}} 'can measure normal text block heights also {{PageNavigation}} +< diff --git a/internal/help/_FONTWIDTH.txt b/internal/help/_FONTWIDTH.txt index 654489f38..962eeb583 100644 --- a/internal/help/_FONTWIDTH.txt +++ b/internal/help/_FONTWIDTH.txt @@ -21,3 +21,4 @@ The [[_FONTWIDTH]] function returns the font width of a MONOSPACE font handle cr {{PageNavigation}} +< diff --git a/internal/help/_FONT_(function).txt b/internal/help/_FONT_(function).txt index f281fb6c4..d7e4136e0 100644 --- a/internal/help/_FONT_(function).txt +++ b/internal/help/_FONT_(function).txt @@ -1,9 +1,9 @@ {{DISPLAYTITLE:_FONT (function)}} -The [[_FONT (function)|_FONT]] function retrieves the font handle from the specified image handle or the current [[_DEST]]ination page's font. +The [[_FONT]] function retrieves the font handle from the specified image handle or the current [[_DEST]]ination page's font. {{PageSyntax}} -:{{Parameter|fontHandle&}} = [[_FONT (function)|_FONT]][({{Parameter|imageHandle&}})] +:{{Parameter|fontHandle&}} = [[_FONT]][({{Parameter|imageHandle&}})] {{PageDescription}} @@ -16,3 +16,4 @@ The [[_FONT (function)|_FONT]] function retrieves the font handle from the speci {{PageNavigation}} +< diff --git a/internal/help/_FREEFONT.txt b/internal/help/_FREEFONT.txt index 683ba3c4d..d8dd21548 100644 --- a/internal/help/_FREEFONT.txt +++ b/internal/help/_FREEFONT.txt @@ -97,3 +97,4 @@ ClearFont: {{PageNavigation}} +< diff --git a/internal/help/_FREEIMAGE.txt b/internal/help/_FREEIMAGE.txt index bb50e48e1..eb1f97ca9 100644 --- a/internal/help/_FREEIMAGE.txt +++ b/internal/help/_FREEIMAGE.txt @@ -38,3 +38,4 @@ s& = {{Cl|_LOADIMAGE}}("SPLASH.BMP",32) 'load 32 bit(24 BPP) image {{PageNavigation}} +< diff --git a/internal/help/_FREETIMER.txt b/internal/help/_FREETIMER.txt index 7d1835bb3..48b61cb3e 100644 --- a/internal/help/_FREETIMER.txt +++ b/internal/help/_FREETIMER.txt @@ -17,3 +17,4 @@ The [[_FREETIMER]] function returns a free [[TIMER]] number for multiple [[ON TI {{PageNavigation}} +< diff --git a/internal/help/_FULLSCREEN.txt b/internal/help/_FULLSCREEN.txt index 860806bea..c666fa19c 100644 --- a/internal/help/_FULLSCREEN.txt +++ b/internal/help/_FULLSCREEN.txt @@ -6,7 +6,7 @@ The [[_FULLSCREEN]] statement attempts to make the program window fullscreen. :[[_FULLSCREEN]] [''_STRETCH | _SQUAREPIXELS| _OFF''][, ''_SMOOTH''] -{{PageParameters}} +{{Parameters}} * {{Parameter|_STRETCH}} default first choice attempts to mimic QBasic's full screens if possible. [[_FULLSCREEN (function)]] returns 1. * {{Parameter|_SQUAREPIXELS}} alternate choice enlarges the pixels into squares on some monitors. [[_FULLSCREEN (function)|_FULLSCREEN]] returns 2 * {{Parameter|_OFF}} turns _FULLSCREEN off after full screen has been enabled. [[_FULLSCREEN (function)]] returns 0. @@ -119,7 +119,7 @@ ClearFont: {{Cl|_FULLSCREEN}} _STRETCH, _SMOOTH {{Cl|CASE}} 5 {{Cl|_FULLSCREEN}} _SQUAREPIXELS, _SMOOTH - {{Cl|END SELECT}} + {{Cl|END}} {{Cl|SELECT}} {{Cl|_LIMIT}} 30 {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|_EXIT (function)|_EXIT}} {{Cl|SYSTEM}}{{CodeEnd}} @@ -134,3 +134,4 @@ ClearFont: {{PageNavigation}} +< diff --git a/internal/help/_FULLSCREEN_(function).txt b/internal/help/_FULLSCREEN_(function).txt index 772f9e778..9fd48b130 100644 --- a/internal/help/_FULLSCREEN_(function).txt +++ b/internal/help/_FULLSCREEN_(function).txt @@ -106,3 +106,4 @@ f& = currentf& {{PageNavigation}} +< diff --git a/internal/help/_G2D.txt b/internal/help/_G2D.txt index 30d74c16e..3898e511e 100644 --- a/internal/help/_G2D.txt +++ b/internal/help/_G2D.txt @@ -6,8 +6,8 @@ The [[_G2D]] function converts a '''gradient''' value into a '''degree''' value. : {{Parameter|result}} = [[_G2D]]({{Parameter|num}}) -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -30,3 +30,4 @@ That angle in Degrees is 54 {{PageNavigation}} +< diff --git a/internal/help/_G2R.txt b/internal/help/_G2R.txt index fdd78b13e..86495d62d 100644 --- a/internal/help/_G2R.txt +++ b/internal/help/_G2R.txt @@ -6,8 +6,8 @@ The [[_G2R]] function converts a '''gradient''' value into a '''radian''' value. : {{Parameter|result}} = [[_G2R]]({{Parameter|num}}) -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -30,3 +30,4 @@ That angle in Radians is .9424778 {{PageNavigation}} +< diff --git a/internal/help/_GL.txt b/internal/help/_GL.txt index be21c3b47..931841834 100644 --- a/internal/help/_GL.txt +++ b/internal/help/_GL.txt @@ -1,48 +1 @@ -{{DISPLAYTITLE:_GL}} -In order to use OpenGL drawing commands, you must do so from inside a [[SUB]] procedure called '''_GL''', which enables the commands to be rendered. - - -{{PageSyntax}} -:[[SUB]] _GL -:: ''REM Your OpenGL code here -: [[END]] [[SUB]] - -{{PageDescription}} -* OpenGL commands are valid outside of '''SUB _GL''', as long as the sub procedure exists in your code. -* Attempting to use OpenGL commands without having '''SUB _GL''' in a program will result in a '''Syntax error''', even if the syntax is valid. -* SUB '''_GL''' cannot be invoked manually. The code inside it will be called automatically at approximately 60 frames per second. -* Using [[INPUT]] inside SUB '''_GL''' will crash your program. -* If your program needs to perform any operations before SUB _GL must be run, it is recommended to use a shared variable as a flag to allow SUB _GL's contents to be run. See example below. - - -==Example== - -{{CodeStart}} '' '' -{{Cl|DIM}} allowGL {{Cl|AS}} {{Cl|_BYTE}} - -'perform startup routines like loading assets - -allowGL = -1 'sets allowGL to true so SUB _GL can run - -{{Cl|DO}} - {{Cl|_LIMIT}} 1 'runs the main loop at 1 cycle per second - 'notice how the main loop doesn't do anything, as SUB _GL will be running - 'continuously. -{{Cl|LOOP}} - -{{Cl|SUB}} {{Cl|_GL}} - {{Cl|IF}} NOT allowGL {{Cl|THEN}} {{Cl|EXIT}} {{Cl|SUB}} 'used to bypass running the code below until - ' startup routines are done in the main module - - 'OpenGL code starts here - 'The code in this area will be run automatically at ~60fps -{{Cl|END}} {{Cl|SUB}} '' '' -{{CodeEnd}} - - -{{PageSeeAlso}} -* [[_GLRENDER]] -* [[SUB]] - - -{{PageNavigation}} +< diff --git a/internal/help/_GLRENDER.txt b/internal/help/_GLRENDER.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_GLRENDER.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_GREEN.txt b/internal/help/_GREEN.txt index afdae45d2..535866123 100644 --- a/internal/help/_GREEN.txt +++ b/internal/help/_GREEN.txt @@ -29,3 +29,4 @@ The [[_GREEN]] function returns the palette index or the green component intensi {{PageNavigation}} +< diff --git a/internal/help/_GREEN32.txt b/internal/help/_GREEN32.txt index e84b360dd..30a7a14c5 100644 --- a/internal/help/_GREEN32.txt +++ b/internal/help/_GREEN32.txt @@ -22,3 +22,4 @@ The [[_GREEN32]] function returns the green component intensity of a 32-bit imag {{PageNavigation}} +< diff --git a/internal/help/_HEIGHT.txt b/internal/help/_HEIGHT.txt index eb91cbac2..449f8e8b2 100644 --- a/internal/help/_HEIGHT.txt +++ b/internal/help/_HEIGHT.txt @@ -22,3 +22,4 @@ The [[_HEIGHT]] function returns the height of an image handle or of the current {{PageNavigation}} +< diff --git a/internal/help/_HIDE.txt b/internal/help/_HIDE.txt index 523854e53..38c0f7dae 100644 --- a/internal/help/_HIDE.txt +++ b/internal/help/_HIDE.txt @@ -60,3 +60,4 @@ END SUB '' '' {{PageNavigation}} +< diff --git a/internal/help/_HYPOT.txt b/internal/help/_HYPOT.txt index 6592dd231..502cd2b80 100644 --- a/internal/help/_HYPOT.txt +++ b/internal/help/_HYPOT.txt @@ -6,7 +6,7 @@ The [[_HYPOT]] function returns the hypotenuse of a right-angled triangle whose : {{Parameter|result!}} = [[_HYPOT]]({{Parameter|x}}, {{Parameter|y}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|x}} and {{Parameter|y}} are the floating point values corresponding to the legs of a right-angled (90 degree) triangle for which the hypotenuse is computed. @@ -22,7 +22,7 @@ The [[_HYPOT]] function returns the hypotenuse of a right-angled triangle whose leg_x = 3 leg_y = 4 result = {{Cl|_HYPOT}}(leg_x, leg_y) -{{Cl|PRINT}} USING "## , ## and ## form a right-angled triangle."; leg_x; leg_y; result +{{Cl|PRINT}} {{Cl|USING}} "## , ## and ## form a right-angled triangle."; leg_x; leg_y; result {{CodeEnd}} {{OutputStart}} @@ -38,3 +38,4 @@ result = {{Cl|_HYPOT}}(leg_x, leg_y) {{PageNavigation}} +< diff --git a/internal/help/_ICON.txt b/internal/help/_ICON.txt index 4b91b9172..e406f855b 100644 --- a/internal/help/_ICON.txt +++ b/internal/help/_ICON.txt @@ -6,7 +6,7 @@ The [[_ICON]] statement uses an image handle from [[_LOADIMAGE]] for the program : [[_ICON]] [{{Parameter|mainImageHandle&}}[, {{Parameter|smallImageHandle&}}]] -{{PageParameters}} +{{Parameters}} * {{Parameter|mainImageHandle&}} is the [[LONG]] handle value of the OS icon and title bar image pre-loaded with [[_LOADIMAGE]] when used alone. * {{Parameter|smallImageHandle&}} is the [[LONG]] handle value of a different title bar image pre-loaded with [[_LOADIMAGE]] when used. * No image handle designates use of the default QB64 icon or the embedded icon set by [[$EXEICON]]. @@ -130,3 +130,4 @@ Icon2BMP = count ' return the number of icons available in the icon {{PageNavigation}} +< diff --git a/internal/help/_INCLERRORFILE$.txt b/internal/help/_INCLERRORFILE$.txt index 8cdafb977..0cf49b3ef 100644 --- a/internal/help/_INCLERRORFILE$.txt +++ b/internal/help/_INCLERRORFILE$.txt @@ -11,8 +11,8 @@ The [[_INCLERRORFILE$]] function returns the name of the original source code [[ If the last error occurred in the main module, [[_INCLERRORFILE$]] returns an empty string. -{{PageAvailability}} -* Version 1.1 and up. +==Availability== +* '''Version 1.1 and up'''. {{PageExamples}} @@ -44,7 +44,7 @@ ERROR 250 ON LINE: 9 {{PageSeeAlso}} -* [[_INCLERRORLINE]], [[_ERRORMESSAGE$]] +* [[_INCLERRORLINE]] * [[ON ERROR]], [[ERR]] * [[ERROR]] * [[ERROR Codes]] @@ -52,3 +52,4 @@ ERROR 250 ON LINE: 9 {{PageNavigation}} +< diff --git a/internal/help/_INCLERRORLINE.txt b/internal/help/_INCLERRORLINE.txt index b2978348a..845e384ef 100644 --- a/internal/help/_INCLERRORLINE.txt +++ b/internal/help/_INCLERRORLINE.txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:_INCLERRORLINE}} -The [[_INCLERRORLINE]] function returns the line number in an [[$INCLUDE]] file that caused the most recent error. +The [[_INCLERRORFILE$]] function returns the line number in an [[$INCLUDE]] file that caused the most recent error. @@ -12,8 +12,8 @@ The [[_INCLERRORLINE]] function returns the line number in an [[$INCLUDE]] file * By checking _INCLERRORLINE you can report exactly what line inside an included module caused the last error. -{{PageAvailability}} -* Version 1.1 and up. +==Availability== +* '''Version 1.1 and up'''. {{PageExamples}} @@ -45,7 +45,7 @@ ERROR 250 ON LINE: 9 {{PageSeeAlso}} -* [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]] +* [[_INCLERRORFILE$]] * [[ON ERROR]], [[ERR]] * [[ERROR]] * [[ERROR Codes]] @@ -54,3 +54,4 @@ ERROR 250 ON LINE: 9 {{PageNavigation}} +< diff --git a/internal/help/_INFLATE$.txt b/internal/help/_INFLATE$.txt index f559d3d3c..87ab8746f 100644 --- a/internal/help/_INFLATE$.txt +++ b/internal/help/_INFLATE$.txt @@ -12,8 +12,8 @@ The [[_INFLATE$]] function decompresses a [[STRING|string]] compressed by the [[ ** If unspecified, decompression still works as expected, but may use more steps and need to allocate more memory internally. -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -29,7 +29,7 @@ a$ = "The quick brown fox jumps over the lazy dog. " b$ = {{Cl|_DEFLATE$}}(a$) {{Cl|PRINT}} "After using _DEFLATE$ to compress it, LEN ="; {{Cl|LEN}}(b$) -{{Cl|PRINT USING}} "(compressed size is #.###% of the original)"; (({{Cl|LEN}}(b$) * 100) / {{Cl|LEN}}(a$)) +{{Cl|PRINT}} {{Cl|USING}} "(compressed size is #.###% of the original)"; (({{Cl|LEN}}(b$) * 100) / {{Cl|LEN}}(a$)) c$ = {{Cl|_INFLATE$}}(b$) PRINT "After using _INFLATE$ to decompress it, LEN ="; {{Cl|LEN}}(c$) {{CodeEnd}} @@ -46,3 +46,4 @@ After using _INFLATE$ to decompress it, LEN = 1474560 {{PageNavigation}} +< diff --git a/internal/help/_INSTRREV.txt b/internal/help/_INSTRREV.txt index 8c2da4d11..78166f243 100644 --- a/internal/help/_INSTRREV.txt +++ b/internal/help/_INSTRREV.txt @@ -6,7 +6,7 @@ The [[_INSTRREV]] function searches for a substring inside another string, but u : {{Parameter|position%}} = [[_INSTRREV]]([{{Parameter|start%}},] {{Parameter|baseString$}}, {{Parameter|subString$}}) -{{PageParameters}} +{{Parameters}} * The optional literal or variable [[INTEGER]] {{Parameter|start%}} indicates where in the {{Parameter|baseString$}} the search must start, counted from the left. * The {{Parameter|baseString$}} is a literal or variable [[STRING]] value to be searched for an exact match including [[UCASE$|letter cases]]. * The {{Parameter|subString$}} is a literal or variable [[STRING]] value being searched. @@ -71,3 +71,4 @@ Total spaces found: 13 {{PageNavigation}} +< diff --git a/internal/help/_INTEGER64.txt b/internal/help/_INTEGER64.txt index 12780db40..d5ad02a5a 100644 --- a/internal/help/_INTEGER64.txt +++ b/internal/help/_INTEGER64.txt @@ -26,3 +26,4 @@ {{PageNavigation}} +< diff --git a/internal/help/_KEYCLEAR.txt b/internal/help/_KEYCLEAR.txt index 700a6137b..2711914c9 100644 --- a/internal/help/_KEYCLEAR.txt +++ b/internal/help/_KEYCLEAR.txt @@ -4,7 +4,7 @@ {{PageSyntax}} :[[_KEYCLEAR]] {{Parameter|buffer&}} -{{PageParameters}} +{{Parameters}} *{{Parameter|buffer&}} indicates the buffer to be cleared: ** 1 - Clear the regular keyboard buffer, as used by all input command except the following: _KEYHIT, _KEYDOWN, INP(&H60. This is the same as the the emulated BIOS keyboard buffer, so legacy code reading from it via PEEK/POKE/CALL ABSOLUTE will also be affected. ** 2 - Clear the buffer used by _KEYHIT. @@ -55,3 +55,4 @@ PRINT "In _KEYHIT buffer, there is "; _KEYHIT 'read the _KEYHIT buffer {{PageNavigation}} +< diff --git a/internal/help/_KEYDOWN.txt b/internal/help/_KEYDOWN.txt index ed15ab4e4..829c22a11 100644 --- a/internal/help/_KEYDOWN.txt +++ b/internal/help/_KEYDOWN.txt @@ -11,6 +11,7 @@ The '''_KEYDOWN''' function returns whether modifying keys like CTRL, ALT, SHIFT * Unicode references: :* 1) What is the glyph represented by that UNICODE value: [http://www.fileformat.info/info/unicode/char/search.htm Unicode Format Info] :* 2) Which fonts support the characters I want to use: [http://en.wikipedia.org/wiki/Unicode_typefaces#Comparison_of_fonts Unicode Fonts] +:* 3) What was the format again?: [http://www.birds-eye.net/definition/u/unicode.shtml Unicode Formats] :* A UTF32 value is usually(but by no means always!) the same as a UTF16 value just with the top 2 bytes set to 0. * An important difference between [[INKEY$]] and [[_KEYHIT]] is how they work when '''CTRL, ALT''' or '''SHIFT''' are used. [[INKEY$]] returns a different code if you hold down CTRL, ALT or SHIFT before pressing F1 (for example). [[_KEYHIT]] will return the same code regardless of which modifiers were used but you can check _KEYDOWN to see which modifying keys are being used. * '''Keyboards with Alt Gr key:''' [[_KEYHIT]] may return both Alt(100307) and Ctrl(100306) codes when key is pressed or released. @@ -21,7 +22,7 @@ The '''_KEYDOWN''' function returns whether modifying keys like CTRL, ALT, SHIFT '''0-255''': [[ASCII|ASCII and Extended code]] values (Refer to [http://en.wikipedia.org/wiki/Code_page_437 CP437]) - '''256-65535''': [http://www.qb64.org/wiki/ASCII#Two_Byte_Codes] character codes (unaffected by SHIFT/ALT/CTRL modifiers) + '''256-65535''': [[ASCII#Two Byte Codes|ASCII 2-byte]] character codes (unaffected by SHIFT/ALT/CTRL modifiers) Use [[CVI]] to convert ASCII 2-byte codes to _KEYDOWN values. ' '''_KEYDOWN Keyboard Values''' @@ -170,3 +171,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_KEYHIT.txt b/internal/help/_KEYHIT.txt index 077423200..d2d626869 100644 --- a/internal/help/_KEYHIT.txt +++ b/internal/help/_KEYHIT.txt @@ -42,6 +42,10 @@ The [[_KEYHIT]] function returns [[ASCII]] one and two byte, OpenGL Virtual Key :* >= &H40000000: [[Unicode]]. +* Font '''cyberbit.ttf''', included with QB64 ('''version 0.92 and up'''), is required to facilitate the '''IME'''(in Chinese settings) only. The 12.7 MB font is free for '''non-commercial''' use and is not loaded unless the user switches to the '''Input Mode Editor'''. Set to "UNICODE". +<center>'''[http://www.fileformat.info/tip/microsoft/enter_unicode.htm Setting up the Unicode Input Method Editor in Windows]'''</center> +<center>If you need help with IME support in '''Vista''' see the following article: [http://blogs.msdn.com/b/michkap/archive/2006/07/20/671835.aspx Setting up IME in Vista]</center> +* QB64 can use several Windows fonts when '''cyberbit''' is not present so it is not necessary to include with program packages. * An '''important difference''' between [[INKEY$]] and _KEYHIT is how they work when '''CTRL, ALT''' or '''SHIFT''' are used. INKEY$ returns a different code if you hold down CTRL, ALT or SHIFT before pressing F1 (for example). _KEYHIT will return the same code regardless of which modifiers were used but you can check [[_KEYDOWN]] to see which modifying keys are being used. * '''Keyboards with an Alt Gr key note:''' _KEYHIT may return both Alt (100307) and Ctrl (100306) codes when AltGr key is pressed or released. @@ -111,3 +115,4 @@ unifont = {{Cl|_LOADFONT}}("cyberbit.ttf", 24, "UNICODE") {{PageNavigation}} +< diff --git a/internal/help/_LASTAXIS.txt b/internal/help/_LASTAXIS.txt index 21d924463..ecafbbe2f 100644 --- a/internal/help/_LASTAXIS.txt +++ b/internal/help/_LASTAXIS.txt @@ -42,3 +42,4 @@ Axis: 2 {{PageNavigation}} +< diff --git a/internal/help/_LASTBUTTON.txt b/internal/help/_LASTBUTTON.txt index 970ebc3f4..ccec16fe9 100644 --- a/internal/help/_LASTBUTTON.txt +++ b/internal/help/_LASTBUTTON.txt @@ -44,3 +44,4 @@ Buttons: 3 {{PageNavigation}} +< diff --git a/internal/help/_LASTWHEEL.txt b/internal/help/_LASTWHEEL.txt index 989d70ae8..a7fadf122 100644 --- a/internal/help/_LASTWHEEL.txt +++ b/internal/help/_LASTWHEEL.txt @@ -41,3 +41,4 @@ Wheels: 3 {{PageNavigation}} +< diff --git a/internal/help/_LIMIT.txt b/internal/help/_LIMIT.txt index ba6517b8e..ed6db58de 100644 --- a/internal/help/_LIMIT.txt +++ b/internal/help/_LIMIT.txt @@ -12,7 +12,7 @@ The [[_LIMIT]] statement sets the loop repeat rate of a program to so many per s * Loop cycle rates of 1000 or less can '''significantly reduce CPU usage''' in programs. * Do not use it to limit a loop to '''less than once every 60 seconds'''(.0167) or an [[ERROR Codes|ILLEGAL FUNCTION CALL error]] will occur. * Do not use _LIMIT as a timing delay outside of loops. Use [[_DELAY]] instead. -* Use _LIMIT to slow down old QBasic program loops that run too fast and use too much CPU. +* Use _LIMIT to slow down old Qbasic program loops that run too fast and use too much CPU. {{PageExamples}} @@ -39,3 +39,4 @@ To Quit press ESC key! {{PageNavigation}} +< diff --git a/internal/help/_LOADFONT.txt b/internal/help/_LOADFONT.txt index 7ce790b45..e3e171794 100644 --- a/internal/help/_LOADFONT.txt +++ b/internal/help/_LOADFONT.txt @@ -134,3 +134,4 @@ QuickUTF16toUTF32$ = b$ {{PageNavigation}} +< diff --git a/internal/help/_LOADIMAGE.txt b/internal/help/_LOADIMAGE.txt index 6ff9504dd..86eac2203 100644 --- a/internal/help/_LOADIMAGE.txt +++ b/internal/help/_LOADIMAGE.txt @@ -1,12 +1,15 @@ {{DISPLAYTITLE:_LOADIMAGE}} + The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG]] image handle values that are less than -1. {{PageSyntax}} + :{{Parameter|handle&}} = [[_LOADIMAGE]]({{Parameter|filename$}}[, {{Parameter|mode%}}]) -{{PageParameters}} +{{Parameters}} + *{{Parameter|filename$}} is literal or variable [[STRING]] file name value. *Optional {{Parameter|mode%}} [[INTEGER]] values can be: **32 = 32-bit @@ -14,6 +17,7 @@ The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG] {{PageDescription}} + *Various common image file formats supported, like BMP, JPG, PNG, etc. A path can also be given. *The {{Parameter|mode%}} can designate 32-bit color or 33 ('''version 1.000 and up'''). Omit to use the current graphic screen settings. *Mode 33 images are '''hardware''' accelerated and are created using [[_LOADIMAGE]] or [[_COPYIMAGE]] ('''version 1.000 and up'''). @@ -25,6 +29,7 @@ The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG] {{PageErrors}} + *Some picture file images may not load when a {{Parameter|mode%}} value is designated. Try loading it without a {{Parameter|mode%}} designation. *'''It is important to free unused or discarded images with [[_FREEIMAGE]] to prevent CPU memory overflow errors.''' *'''In text-only [[SCREEN]] 0, {{Parameter|mode%}} 32 must be specified.''' When loading an [[_ICON]] image use 32 for the {{Parameter|mode%}} too. @@ -41,7 +46,7 @@ i& = {{Cl|_LOADIMAGE}}("mypic.jpg", 32) ''Example 2:'' [[DRAW]]ing and rotating an image 360 degrees using Turn Angle. [[POINT]] is used to read the invisible image source. {{CodeStart}} {{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32) -img& = {{Cl|_LOADIMAGE}}("QB64.PNG") 'load the image file to be drawn +img& = {{Cl|_LOADIMAGE}}("QB64.PNG") 'use any 24/32 bit image wide% = {{Cl|_WIDTH (function)|_WIDTH}}(img&): deep% = {{Cl|_HEIGHT}}(img&) TLC$ = "BL" + {{Cl|STR$}}(wide% \ 2) + "BU" + {{Cl|STR$}}(deep% \ 2) 'start draw at top left corner @@ -64,8 +69,6 @@ DO {{CodeEnd}} {{small|Code by Ted Weissgerber}} -:''NOTE:'' Speed varies with image size. - ===More examples=== @@ -75,6 +78,7 @@ DO {{PageSeeAlso}} + *[[_FREEIMAGE]], [[_ICON]] *[[_PUTIMAGE]], [[_MAPTRIANGLE]] *[[_NEWIMAGE]], [[_COPYIMAGE]] @@ -86,3 +90,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_MAPTRIANGLE.txt b/internal/help/_MAPTRIANGLE.txt index 7c11d4dbc..27a064810 100644 --- a/internal/help/_MAPTRIANGLE.txt +++ b/internal/help/_MAPTRIANGLE.txt @@ -12,7 +12,7 @@ The [[_MAPTRIANGLE]] statement maps a triangular portion of an image onto a dest :[[_MAPTRIANGLE]] [{_CLOCKWISE|_ANTICLOCKWISE}] [{_SEAMLESS}] '''('''{{Parameter|sx1}}''',''' {{Parameter|sy1}}''')-('''{{Parameter|sx2}}''',''' {{Parameter|sy2}}''')-('''{{Parameter|sx3}}''',''' {{Parameter|sy3}}'''),''' {{Parameter|source&}} '''TO ('''{{Parameter|dx1}}''',''' {{Parameter|dy1}}''',''' {{Parameter|dz1}}''')-('''{{Parameter|dx2}}''',''' {{Parameter|dy2}}''',''' {{Parameter|dz2}}''')-('''{{Parameter|dx3}}''',''' {{Parameter|dy3}}''',''' {{Parameter|dz3}}''')'''[, {{Parameter|destination&}}][{_SMOOTH|_SMOOTHSHRUNK|_SMOOTHSTRETCHED}]] -{{PageParameters}} +{{Parameters}} * The '''_SEAMLESS''' option makes the triangle skip the right-most and bottom-most pixels of the triangle. When you make larger objects using several triangles, there can be a "seam" where they overlap when using alpha transparency and the seam would be twice as bright. '''_SEAMLESS''' is ignored when rendering 3D content and is not yet supported when drawing 2D hardware images.''' * For 3D drawing use the '''_CLOCKWISE''' and '''_ANTICLOCKWISE''' arguments to only draw triangles in the correct direction. See ''Example 4''. * Coordinates are [[SINGLE]] values where whole numbers represent the exact center of a pixel of the source texture. @@ -33,11 +33,11 @@ The [[_MAPTRIANGLE]] statement maps a triangular portion of an image onto a dest {{PageExamples}} -''Example 1:'' Rotating an image using a rotation and zoom SUB with _MAPTRIANGLE. +''Example 1:'' Rotating the an image using a rotation and zoom SUB with _MAPTRIANGLE. {{CodeStart}} '' '' {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32) -Image& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image +Image& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any 24/32 bit image {{Cl|DO}} {{Cl|CLS}} @@ -149,7 +149,7 @@ PLANECOL(5) = 8 ' {{Cl|_TITLE}} "QB64 _MAPTRIANGLE CUBE DEMO" {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32) -TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png") ''''<<<< '''replace with your own image +TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any 24/32 bit image '{{Cl|_PUTIMAGE}} , Image& DO @@ -359,7 +359,7 @@ DO {{CodeEnd}}{{small|Demo by Andrew L. Ayers}} -''Example 3:'' A 3D Spinning Cube demo using a hardware image and '''QB64GL''' hardware acceleration with [[_MAPTRIANGLE]]: +''Example 3:'' A 3D Spinning Cube demo using a hardware image and '''QB64GL''' hardware acceleration with [[_MAPTRIANGLE]]: {{CodeStart}} '' '' ' Copyright (C) 2011 by Andrew L. Ayers @@ -437,7 +437,7 @@ PLANECOL(5) = 8 {{Cl|_TITLE}} "QB64 {{Cl|_MAPTRIANGLE}} CUBE DEMO" {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32) -TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png", 32)'replace with your own image +TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png", 32) 'any 24/32 bit image {{Cl|_SETALPHA}} 128, , TextureImage& TextureImage& = {{Cl|_COPYIMAGE}}(TextureImage&, 33)'copy of hardware image @@ -705,3 +705,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_MAPUNICODE.txt b/internal/help/_MAPUNICODE.txt index be81a4775..577b542ab 100644 --- a/internal/help/_MAPUNICODE.txt +++ b/internal/help/_MAPUNICODE.txt @@ -59,3 +59,4 @@ Microsoft_pc_cpMIK: {{PageNavigation}} +< diff --git a/internal/help/_MAPUNICODE_(function).txt b/internal/help/_MAPUNICODE_(function).txt index d3b8711d2..91791cfa7 100644 --- a/internal/help/_MAPUNICODE_(function).txt +++ b/internal/help/_MAPUNICODE_(function).txt @@ -37,3 +37,4 @@ Unicode&(ascii) = {{Cl|_MAPUNICODE (function)|_MAPUNICODE}}(ascii) 'read {{PageNavigation}} +< diff --git a/internal/help/_MEM.txt b/internal/help/_MEM.txt index 28d2cf2e4..f8146a9ba 100644 --- a/internal/help/_MEM.txt +++ b/internal/help/_MEM.txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:_MEM}} -The [[_MEM]] variable type can be used when working with memory blocks. It has no variable [[Variable Types|type]] suffix. +The [[_MEM]] variable type can be used when working with memory blocks. It has no variable [[type]] suffix. {{PageSyntax}} @@ -8,46 +8,54 @@ The [[_MEM]] variable type can be used when working with memory blocks. It has n {{PageDescription}} ''Variable TYPE:'' -* Memory DOT values are actually part of the built in memory variable [[Variable Types|type]] in QB64. The following [[TYPE]] is built in: +* Memory DOT values are actually part of the built in memory variable [[type]] in QB64. The following [[TYPE]] is built in: {{WhiteStart}}TYPE memory_type OFFSET AS _OFFSET 'start location of block(changes with byte position) SIZE AS _OFFSET 'size of block remaining at offset(changes with position) - TYPE AS _OFFSET 'type description of variable used(never changes) + TYPE AS LONG 'type description of variable used(never changes) ELEMENTSIZE AS _OFFSET 'byte size of values inside the block(never changes) IMAGE AS LONG 'the image handle used when _MEMIMAGE(handle) is used - SOUND AS LONG 'the sound handle used when _MEMSOUND(handle) is used END TYPE {{text|The above [[TYPE]] is for clarification purposes only. It '''doesn't need''' to be pasted in a program to use _MEM.|red}} + +{{text|''IMPORTANT NOTE: As of Build 20170802/57 onward, mem.TYPE has been changed to be an _OFFSET, just as mem.SIZE and mem.ELEMENTSIZE.''|red}} {{WhiteEnd}} ===Usage=== * The _MEM type contains the following '''read-only''' elements where ''name'' is the _MEM variable name: :: ''name'''''.OFFSET''' is the current start position in the memory block AS [[_OFFSET]]. Add bytes to change position. :: ''name'''''.SIZE''' is the remaining size of the block at current position in bytes AS [[_OFFSET]] -:: ''name'''''.TYPE''' is the type (represented as bits combined to form a value) AS [[_OFFSET]]: +:: ''name'''''.TYPE''' is the type (represented as bits combined to form a value) AS [[LONG]]: -==.TYPE values == -:::* [bit 0] 1* byte types (_BYTE) -:::* [bit 1] 2* byte types (INTEGER) -:::* [bit 2] 4* byte types (LONG or SINGLE) -:::* [bit 3] 8* byte types (DOUBLE or _INTEGER64) -:::* [bit 4] 16* byte types (reserved for future use) -:::* [bit 5] 32* byte types (_FLOAT) -:::* [bit 6] 64* byte types (reserved for future use) -:::* [bit 7] 128 = integer types (_BYTE, INTEGER, LONG, _INTEGER64) (added to *) -:::* [bit 8] 256 = floating point types (SINGLE, DOUBLE, _FLOAT) (added to *) -:::* [bit 9] 512 = STRING types (fixed length or variable length) -:::* [bit 10] 1024 = _UNSIGNED types (added to *+128) -:::* [bit 11] 2048 = pixel data usually from _MEMIMAGE (added to 1+128+1024 for 256 color screens, or 2+128+1024 for text screens, or 4+128+1024 for 32-bit color screens) -:::* [bit 12] 4096 = _MEM TYPE structure (NOT added to 32768) -:::* [bit 13] 8192 = _OFFSET type (added to 4+128+[1024] or 8+128+[1024] or future_size+128+[1024]) -:::* [bit 14] 16384 = data created/defined by _MEMNEW(size) or _MEMNEW(offset,size) -:::* [bit 15] 32768 = a custom, user defined type (ie. created with TYPE name ... END TYPE) -:::* [bit 16] 65536 = an array of data (added to other type values defining the array's data type) +==.TYPE values (version 1.000 and up)== +:::* 0 = UDT ([[TYPE|user defined type]]) or memory created by [[_MEMNEW]] +:::* 1 = 1 bit ELEMENT.SIZE=1 *Only used along with specific types (currently integers or floats) +:::* 2 = 2 bit. ELEMENT.SIZE=2 * +:::* 4 = 4 bit. ELEMENT.SIZE=4 * +:::* 8 = 8 bit. ELEMENT.SIZE=8 * +:::* 16 = 16 bit. ELEMENT.SIZE=16 * +:::* 32 = 32 bit. ELEMENT.SIZE=32 * +:::* 64 = 64 bit. ELEMENT.SIZE=64 * +:::* 128 = 128 bit. ELEMENT.SIZE=128 * +:::* 256 = 256 bit. ELEMENT.SIZE=256 * +:::* 512(+ bit*) = integer types only(ie. whole numbers) +:::* 1024(+ bit*) = floating point types only(ie. numbers that can have a decimal point) +:::* 2048 = [[STRING]] type only +:::* 4096(+ 512 + bit*) = [[_UNSIGNED]] integer type only +:::* 8192 = [[_MEM]] type only +:::* 16384(+ 512 + bit*)= [[_OFFSET]] type only ''Note: If a future integer, float or other type doesn't have a size that is 1,2,4,8,16,32,64,128 or 256 it won't have a size-bit set.'' -* '''Note: [[_OFFSET]] values cannot be cast to other variable [[Variable Types|type]]s reliably. _MEM is a reserved custom variable [[Variable Types|type]].''' +===Versions prior to 1.000=== +:::* 1 = Integer types such as [[_BYTE]], [[INTEGER]], [[LONG]], [[_INTEGER64]] or [[_OFFSET]] +:::* 2 = [[_UNSIGNED]] variable types. Value must be added to the variable type value.(2 cannot be used by itself) +:::* 3 = ALL [[_UNSIGNED]] [[INTEGER]] type values.(add 1 + 2) +:::* 4 = Floating point types such as [[SINGLE]], [[DOUBLE]] or [[_FLOAT]] +:::* 8 = [[STRING]] +:::* 0 = unknown(eg. created with [[_MEMNEW]]) or [[TYPE|user-defined-types]] + +* '''Note: [[_OFFSET]] values cannot be cast to other variable [[type]]s reliably. _MEM is a reserved custom variable [[type]].''' * '''[[_MEM (function)|_MEM]] cannot reference variable length [[STRING]] variable values. String values must be designated as a fixed-[[LEN|length]] string.''' @@ -129,7 +137,7 @@ END FUNCTION {{CodeEnd}} -''Explanation:'' The above will print two numbers which should match. These numbers will vary, as they're representations of where X is stored in memory, and that position is going to vary every time the program is run. What it should illustrate, however, is a way to convert _OFFSET to _INTEGER64 values, which can sometimes be useful when trying to run calculations involving mem.SIZE, mem.TYPE, or mem.ELEMENTSIZE. +''Explanation:'' The above will print two numbers for us which should match. These numbers will vary, as they're representations of where X is stored in memory, and that position is going to vary every time the program is run. What it should illustrate, however, is a way to convert _OFFSET to _INTEGER64 values, which can sometimes be useful when trying to run calculations involving mem.SIZE, mem.TYPE, or mem.ELEMENTSIZE. @@ -137,9 +145,9 @@ END FUNCTION * [[_MEM (function)]] * [[_MEMELEMENT]], [[_MEMCOPY]] * [[_MEMIMAGE]], [[_MEMNEW]] -* [[_MEMSOUND]] * [[_MEMGET]], [[_MEMPUT]] * [[_MEMFILL]], [[_MEMFREE]] {{PageNavigation}} +< diff --git a/internal/help/_MEMCOPY.txt b/internal/help/_MEMCOPY.txt index b062a4944..58bfef3a0 100644 --- a/internal/help/_MEMCOPY.txt +++ b/internal/help/_MEMCOPY.txt @@ -6,7 +6,7 @@ The [[_MEMCOPY]] statement copies a block of bytes from one memory offset to ano : [[_MEMCOPY]] {{Parameter|sourceBlock}}, {{Parameter|sourceBlock.OFFSET}}, {{Parameter|sourceBlock.SIZE}} [[TO]] {{Parameter|destBlock}}, {{Parameter|destBlock.OFFSET}} -{{PageParameters}} +{{Parameters}} * {{Parameter|sourceBlock}} is the source memory block name created AS [[_MEM]]. * {{Parameter|sourceBlock.OFFSET}} is the dot [[_OFFSET]] within the source memory block to read from. * {{Parameter|sourceBlock.SIZE}} is the total number of bytes to transfer based on actual size. @@ -71,3 +71,4 @@ b$ = {{Cl|SPACE$}}(10) {{PageNavigation}} +< diff --git a/internal/help/_MEMELEMENT.txt b/internal/help/_MEMELEMENT.txt index 909ce69a6..6991e40af 100644 --- a/internal/help/_MEMELEMENT.txt +++ b/internal/help/_MEMELEMENT.txt @@ -83,3 +83,4 @@ m2 = {{Cl|_MEMELEMENT}}(a(50)) 'function returns information about the specific {{PageNavigation}} +< diff --git a/internal/help/_MEMEXISTS.txt b/internal/help/_MEMEXISTS.txt index f91a44970..6a8c040fc 100644 --- a/internal/help/_MEMEXISTS.txt +++ b/internal/help/_MEMEXISTS.txt @@ -21,3 +21,4 @@ The [[_MEMEXISTS]] function returns true (-1) if the memory block variable name {{PageNavigation}} +< diff --git a/internal/help/_MEMFILL.txt b/internal/help/_MEMFILL.txt index 2ea0f18cc..3692116bf 100644 --- a/internal/help/_MEMFILL.txt +++ b/internal/help/_MEMFILL.txt @@ -6,12 +6,12 @@ The [[_MEMFILL]] statement converts a value to a specified type, then fills memo : [[_MEMFILL]] {{Parameter|memoryBlock}}, {{Parameter|memoryBlock.OFFSET}}, {{Parameter|fillBytes}}, {{Parameter|value}} [AS {{Parameter|variableType}}] -{{PageParameters}} +{{Parameters}} * The {{Parameter|memoryBlock}} [[_MEM]] memory block is the block referenced to be filled. * {{Parameter|memoryBlock.OFFSET}} is the starting offset of the above referenced memory block. * The {{Parameter|fillBytes}} is the number of bytes to fill the memory block. * The {{Parameter|value}} is the value to place in the memory block at the designated OFFSET position. -* A literal or variable {{Parameter|value}} can be optionally set [[AS]] a variable [[Variable Types|type]] appropriate for the memory block. +* A literal or variable {{Parameter|value}} can be optionally set [[AS]] a variable [[type]] appropriate for the memory block. {{PageDescription}} @@ -46,3 +46,4 @@ mema = {{Cl|_MEM (function)|_MEM}}(b()) {{PageNavigation}} +< diff --git a/internal/help/_MEMFREE.txt b/internal/help/_MEMFREE.txt index ff77f9c63..99aa5ffa9 100644 --- a/internal/help/_MEMFREE.txt +++ b/internal/help/_MEMFREE.txt @@ -6,7 +6,7 @@ The [[_MEMFREE]] statement frees the designated memory block [[_MEM]] value and : [[_MEMFREE]] {{Parameter|memoryVariable}} -{{PageParameters}} +{{Parameters}} * ALL designated [[_MEM]] type {{Parameter|memoryVariable}} values must be freed to conserve memory when they are no longer used or needed. @@ -25,3 +25,4 @@ The [[_MEMFREE]] statement frees the designated memory block [[_MEM]] value and {{PageNavigation}} +< diff --git a/internal/help/_MEMGET.txt b/internal/help/_MEMGET.txt index 37d69b977..326001b3a 100644 --- a/internal/help/_MEMGET.txt +++ b/internal/help/_MEMGET.txt @@ -8,18 +8,18 @@ The [[_MEMGET]] statement reads a portion of a memory block at an OFFSET positio * {{Parameter|memoryBlock}} is a [[_MEM]] variable type memory block name created by [[_MEMNEW]] or the [[_MEM (function)|_MEM]] function. * {{Parameter|bytePosition}} is the {{Parameter|memoryBlock}}.[[OFFSET]] memory start position plus any bytes to move into the block. -* {{Parameter|destinationVariable}} is the variable assigned to hold the data. The number of bytes read is determined by the variable [[Variable Types|type]] used. +* {{Parameter|destinationVariable}} is the variable assigned to hold the data. The number of bytes read is determined by the variable [[type]] used. {{PageDescription}} * The [[_MEMGET]] statement is similar to the [[GET]] statement used in files, but the position is required. * The memory block name.[[OFFSET]] returns the starting byte position of the block. Add bytes to move into the block. * The variable type held in the memory block can determine the next {{Parameter|bytePosition}} to read. -* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[Variable Types|type]]s regardless of the value held. +* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[type]]s regardless of the value held. * [[STRING]] values should be of a defined length. Variable length strings can actually move around in memory and not be found. -{{PageExamples}} +{{PageExamples]] ''Example:'' Shows how to read the PSET color values from a program's [[SCREEN]] memory to an array. {{CodeStart}} '' '' {{Cl|SCREEN}} 13 @@ -50,3 +50,4 @@ m = {{Cl|_MEMIMAGE}} '0 or no handle necessary when accessing the current progr {{PageNavigation}} +< diff --git a/internal/help/_MEMGET_(function).txt b/internal/help/_MEMGET_(function).txt index aa661e8ae..89b606a14 100644 --- a/internal/help/_MEMGET_(function).txt +++ b/internal/help/_MEMGET_(function).txt @@ -6,7 +6,7 @@ The [[_MEMGET]] function returns a value from a specific memory block name at th : {{Parameter|returnValue}} = [[_MEMGET]]({{Parameter|memoryBlock}}, {{Parameter|bytePosition}}, {{Parameter|variableType}}) -{{PageParameters}} +{{Parameters}} * Returns a value of the {{Parameter|variableType}} designated. The holding variable must match that [[TYPE]]. * {{Parameter|memoryBlock}} is a [[_MEM]] variable type memory block name created by [[_MEMNEW]] or the [[_MEM (function)|_MEM]] function. * {{Parameter|bytePosition}} is the {{Parameter|memoryBlock}}.[[OFFSET]] memory start position plus any bytes to move into the block. @@ -16,9 +16,9 @@ The [[_MEMGET]] function returns a value from a specific memory block name at th {{PageDescription}} * {{Parameter|memoryBlock}}.[[OFFSET]] returns the starting byte position of the block. Add bytes to move into the block. * The variable type held in the memory block can determine the next {{Parameter|bytePosition}} to read. -* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[Variable Types|type]]s regardless of the value held. +* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[type]]s regardless of the value held. * [[STRING]] values should be of a defined length. Variable length strings can actually move around in memory and not be found. -* '''_MEMGET variable values that are assigned a variable [[Variable Types|type]] other than a memory type do not need to be freed.''' +* '''_MEMGET variable values that are assigned a variable [[type]] other than a memory type do not need to be freed.''' {{PageExamples}} @@ -43,3 +43,4 @@ v = {{Cl|_MEMGET (function)|_MEMGET}}(o, o.OFFSET + 1, {{Cl|_UNSIGNED}} {{Cl|_BY {{PageNavigation}} +< diff --git a/internal/help/_MEMIMAGE.txt b/internal/help/_MEMIMAGE.txt index ff931f1ff..fa043ecc5 100644 --- a/internal/help/_MEMIMAGE.txt +++ b/internal/help/_MEMIMAGE.txt @@ -6,14 +6,14 @@ The [[_MEMIMAGE]] function returns a [[_MEM]] value referring to an image's memo : {{Parameter|imageBlock}} = [[_MEMIMAGE]][({{Parameter|imageHandle&}})] -{{PageParameters}} +{{Parameters}} * The {{Parameter|imageBlock}} [[_MEM]] type variable holds the read-only elements .OFFSET, .SIZE, .TYPE and .ELEMENTSIZE. * If the optional {{Parameter|imageHandle&}} isn't passed, it is assumed to be the current [[_DEST]]ination program screen image. {{PageDescription}} * Use the function to place images into memory access blocks for faster data access. -* All values created by this function must be freed using [[_MEMFREE]] with a valid [[_MEM]] [[Variable Types|type]] variable. +* All values created by this function must be freed using [[_MEMFREE]] with a valid [[_MEM]] [[type]] variable. * Image handle values and the memory used must still be freed using [[_FREEIMAGE]] when no longer required. @@ -89,3 +89,4 @@ x1$ = {{Cl|_MEMGET (function)|_MEMGET}}(m, m.OFFSET, {{Cl|STRING}} * 11) 'conver {{PageNavigation}} +< diff --git a/internal/help/_MEMNEW.txt b/internal/help/_MEMNEW.txt index dc4031d4a..4eebdd448 100644 --- a/internal/help/_MEMNEW.txt +++ b/internal/help/_MEMNEW.txt @@ -6,8 +6,8 @@ The [[_MEMNEW]] function allocates new memory and returns a [[_MEM]] memory bloc : {{Parameter|memoryBlock}} = [[_MEMNEW]]({{Parameter|byteSize}}) -{{PageParameters}} -* The {{Parameter|byteSize}} parameter is the desired byte size of the memory block based on the variable [[Variable Types|type]] it will hold. +{{Parameters}} +* The {{Parameter|byteSize}} parameter is the desired byte size of the memory block based on the variable [[type]] it will hold. {{PageDescription}} @@ -52,3 +52,4 @@ f = Doggy 5 {{OutputEnd}} {{PageNavigation}} +< diff --git a/internal/help/_MEMPUT.txt b/internal/help/_MEMPUT.txt index c1d01fe95..012e68367 100644 --- a/internal/help/_MEMPUT.txt +++ b/internal/help/_MEMPUT.txt @@ -6,7 +6,7 @@ The [[_MEMPUT]] statement writes data to a portion of a designated memory block : [[_MEMPUT]] {{Parameter|memoryBlock}}, {{Parameter|bytePosition}}, {{Parameter|sourceVariable}} [AS {{Parameter|type}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|memoryBlock}} is a [[_MEM]] variable type memory block name created by [[_MEMNEW]] or the [[_MEM (function)|_MEM]] function. * {{Parameter|bytePosition}} is the {{Parameter|memoryBlock}}.[[OFFSET]] start position plus any bytes needed to read specific values. * The {{Parameter|sourceVariable}} type designates the size and {{Parameter|bytePosition}} it should be written to. It can be a variable, [[arrays|array]] or user defined type. @@ -17,7 +17,7 @@ The [[_MEMPUT]] statement writes data to a portion of a designated memory block * The _MEMPUT statement is similar to the [[PUT]] file statement, but {{Parameter|bytePosition}} is required. * The {{Parameter|memoryBlock}}.[[OFFSET]] returns the starting byte position of the block. Add bytes to move into the block. * The variable type held in the memory block can determine the next ''byte position'' to write a value. -* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[Variable Types|type]]s regardless of the value held. +* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[type]]s regardless of the value held. * [[STRING]] values should be of a defined length. Variable length strings can actually move around in memory and not be found. @@ -41,3 +41,4 @@ v = {{Cl|_MEMGET (function)|_MEMGET}}(o, o.OFFSET + 1, {{Cl|_UNSIGNED}} {{Cl|_BY {{PageNavigation}} +< diff --git a/internal/help/_MEMSOUND.txt b/internal/help/_MEMSOUND.txt index 8eee43e02..931841834 100644 --- a/internal/help/_MEMSOUND.txt +++ b/internal/help/_MEMSOUND.txt @@ -1,88 +1 @@ -{{DISPLAYTITLE:_MEMSOUND}} -The [[_MEMSOUND]] function returns a [[_MEM]] value referring to a sound's raw data in memory using a designated sound handle created by the [[_SNDOPEN]] function. - - -{{PageSyntax}} -: {{Parameter|imageBlock}} = [[_MEMSOUND]][({{Parameter|soundHandle&}}, {{Parameter|channel%}})] - - -{{PageParameters}} -* The {{Parameter|imageBlock}} [[_MEM]] type variable holds the read-only elements .OFFSET, .SIZE, .ELEMENTSIZE, and .SOUND. -** .ELEMENTSIZE will contain the number of bytes-per-sample the audio contains. Usually returns 2 (16-bit audio). -** .SOUND will contain the same handle value as returned by the [[_SNDOPEN]] function. -* The second parameter {{Parameter| channel%}} must be 1 (left channel/mono) or 2 (right channel, for stereo files). - - -{{PageDescription}} -* Use the function to access raw sound data in memory for direct access. -* Sound handle values and the memory used must still be freed using [[_SNDCLOSE]] when no longer required. -* If .SIZE returns 0, that means the data could not be accessed. It may happen if you try to access the right channel in a mono file, for example. - - -{{PageAvailability}} -* Version 1.5 and up. - - -{{PageExamples}} -''Example 1:'' Checking that a sound file is stereo. -{{CodeStart}} '' '' -song& = {{Cl|_SNDOPEN}}("song.wav") 'replace song.wav with a sound file you have -{{Cl|IF}} song& = 0 {{Cl|THEN}} {{Cl|PRINT}} "Load failed.": {{Cl|END}} - -{{Cl|DIM}} leftchannel {{Cl|AS}} {{Cl|_MEM}}, rightchannel {{Cl|AS}} {{Cl|_MEM}} -leftchannel = {{Cl|_MEMSOUND}}(song&, 1) -rightchannel = {{Cl|_MEMSOUND}}(song&, 2) - -{{Cl|IF}} rightchannel.SIZE > 0 {{Cl|THEN}} {{Cl|PRINT}} "This file is STEREO" -{{Cl|IF}} rightchannel.SIZE = 0 {{Cl|AND}} leftchannel.SIZE > 0 {{Cl|THEN}} - {{Cl|PRINT}} "This file is MONO" -{{Cl|ELSEIF}} rightchannel.SIZE = 0 {{Cl|AND}} leftchannel.SIZE = 0 {{Cl|THEN}} - {{Cl|PRINT}} "An error occurred." -{{Cl|END IF}} - -{{Cl|_SNDCLOSE}} song& 'closing the sound releases the mem blocks '' '' -{{CodeEnd}} - - -''Example 2:'' Plotting a sound's waves. -{{CodeStart}} '' '' -{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 327, 32) -song& = {{Cl|_SNDOPEN}}("drums.ogg") 'replace drums.ogg with a sound file you have -{{Cl|IF}} song& = 0 {{Cl|THEN}} {{Cl|PRINT}} "Load failed.": {{Cl|END}} - -{{Cl|DIM}} leftchannel {{Cl|AS}} {{Cl|_MEM}} -leftchannel = {{Cl|_MEMSOUND}}(song&, 1) - -{{Cl|IF}} leftchannel.SIZE = 0 {{Cl|THEN}} - {{Cl|PRINT}} "An error occurred." - {{Cl|END}} -{{Cl|END IF}} - -{{Cl|DIM}} i {{Cl|AS}} {{Cl|_OFFSET}} -i = 0 -{{Cl|DO}} - {{Cl|_MEMGET}} leftchannel, leftchannel.OFFSET + i, a% 'get sound data - {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} i; "/"; leftchannel.SIZE - {{Cl|LINE}} (x, {{Cl|_HEIGHT}} / 2)-{{Cl|STEP}}(0, a% / 100), {{Cl|_RGB32}}(0, 111, 0) 'plot wave - x = x + 1 - {{Cl|IF}} x > {{Cl|_WIDTH}} {{Cl|THEN}} - x = 0 - {{Cl|LINE}} (0, 0)-({{Cl|_WIDTH}}, {{Cl|_HEIGHT}}), {{Cl|_RGB32}}(0, 120), BF 'fade out screen - {{Cl|END}} {{Cl|IF}} - i = i + 2 - {{Cl|IF}} i + 2 > leftchannel.SIZE {{Cl|THEN}} {{Cl|EXIT}} {{Cl|DO}} - {{Cl|_LIMIT}} 500 -{{Cl|LOOP}} - -{{Cl|_SNDCLOSE}} song& 'closing the sound releases the mem blocks '' '' -{{CodeEnd}} - - -{{PageSeeAlso}} -* [[_MEM]], [[_MEMIMAGE]] -* [[_MEMNEW]] -* [[_MEMGET]], [[_MEMPUT]] -* [[_MEMFREE]] -* [[$CHECKING]] - -{{PageNavigation}} +< diff --git a/internal/help/_MEM_(function).txt b/internal/help/_MEM_(function).txt index a318e9d0b..fbb70cc1b 100644 --- a/internal/help/_MEM_(function).txt +++ b/internal/help/_MEM_(function).txt @@ -9,7 +9,7 @@ The [[_MEM]] function returns a _MEM block referring to the largest possible con : {{Parameter|memoryBlock}} = [[_MEM]]({{Parameter|offset}}, {{Parameter|byteSize}}) -{{PageParameters}} +{{Parameters}} * The {{Parameter|memoryBlock}} created will hold the {{Parameter|referenceVariable}} or [[arrays|array]] value(s), type and byte size in a separate memory area. * The secure syntax {{Parameter|referenceVariable}} is an existing variable's referenced memory block. * The unsecure syntax's designated {{Parameter|offset}} and {{Parameter|byteSize}} cannot be guaranteed. '''Avoid if possible.''' @@ -68,3 +68,4 @@ Saved(3) = n3 {{PageNavigation}} +< diff --git a/internal/help/_MK$.txt b/internal/help/_MK$.txt index 2ea5c3e19..83c03680f 100644 --- a/internal/help/_MK$.txt +++ b/internal/help/_MK$.txt @@ -6,8 +6,8 @@ The [[_MK$]] function can convert any numerical type into an [[ASCII]] [[STRING] :{{Parameter|string_value$}} = [[_MK$]]({{Parameter|numericalType}}, {{Parameter|numericalValue}}) -{{PageParameters}} -* {{Parameter|numericalType}} is any QB64 numerical type: [[INTEGER]], [[LONG]], [[SINGLE]], [[DOUBLE]], [[_INTEGER64]], [[_BYTE]] and [[_OFFSET]]. +{{Parameters}} +* {{Parameter|numericalType}} is any QB64 numerical type: [[INTEGER]], [[LONG]], [[SINGLE]], [[DOUBLE]], [[_INTEGER64]], [[_BYTE]] or [[_BIT]]. * Whole integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} must match the {{Parameter|numericalType}} used. @@ -29,3 +29,4 @@ The [[_MK$]] function can convert any numerical type into an [[ASCII]] [[STRING] {{PageNavigation}}{{DISPLAYTITLE:}} +< diff --git a/internal/help/_MOUSEBUTTON.txt b/internal/help/_MOUSEBUTTON.txt index d84c74b15..42a3c8f86 100644 --- a/internal/help/_MOUSEBUTTON.txt +++ b/internal/help/_MOUSEBUTTON.txt @@ -6,7 +6,7 @@ The [[_MOUSEBUTTON]] function returns the button status of a specified mouse but : {{Parameter|buttonStatus%%}} = [[_MOUSEBUTTON]]({{Parameter|buttoNumber}}) -{{PageParameters}} +{{Parameters}} * [[INTEGER]] {{Parameter|buttoNumber}} designates the mouse button to read (See [[_DEVICES]] for more than 3). ** 1 = Left mouse button ** 2 = Right mouse button @@ -171,3 +171,4 @@ y = {{Cl|_MOUSEY}} {{PageNavigation}} +< diff --git a/internal/help/_MOUSEHIDE.txt b/internal/help/_MOUSEHIDE.txt index 0e7a81bba..88d5fa9bd 100644 --- a/internal/help/_MOUSEHIDE.txt +++ b/internal/help/_MOUSEHIDE.txt @@ -13,3 +13,4 @@ The [[_MOUSEHIDE]] statement hides the mouse cursor. {{PageNavigation}} +< diff --git a/internal/help/_MOUSEINPUT.txt b/internal/help/_MOUSEINPUT.txt index 6b481f90c..a9d81270e 100644 --- a/internal/help/_MOUSEINPUT.txt +++ b/internal/help/_MOUSEINPUT.txt @@ -85,3 +85,4 @@ count = 0 {{PageNavigation}} +< diff --git a/internal/help/_MOUSEMOVE.txt b/internal/help/_MOUSEMOVE.txt index 421c0e3ac..bf012a60d 100644 --- a/internal/help/_MOUSEMOVE.txt +++ b/internal/help/_MOUSEMOVE.txt @@ -6,7 +6,7 @@ The [[_MOUSEMOVE]] statement moves the mouse pointer to a new position on the sc :[[_MOUSEMOVE]] {{Parameter|column%}}, {{Parameter|row%}} -{{PageParameters}} +{{Parameters}} * {{Parameter|column%}} is the horizontal pixel coordinate to place the mouse pointer and can be any value from 0 to [[_WIDTH (function)|_WIDTH]](0) - 1. * {{Parameter|row%}} is the vertical pixel position to place the mouse pointer and can be any value from 0 to [[_HEIGHT]](0) - 1 @@ -18,9 +18,9 @@ The [[_MOUSEMOVE]] statement moves the mouse pointer to a new position on the sc * Does not require [[_MOUSEINPUT]] to be used, but all moves will be remembered and can be read by mouse functions. -{{PageAvailability}} -* Versions prior to 1.000 (Version 1.000 had this function disabled for compatibility reasons). -* Version 1.1 and up. +==Availability== +* '''Versions prior to 1.000''' (Version 1.000 had this function disabled for compatibility reasons.) +* '''Version 1.1 and up''' {{PageExamples}} @@ -53,3 +53,4 @@ DO: {{Cl|_LIMIT}} 30 {{PageNavigation}} +< diff --git a/internal/help/_MOUSEMOVEMENTX.txt b/internal/help/_MOUSEMOVEMENTX.txt index 82b441a4f..8fca624fb 100644 --- a/internal/help/_MOUSEMOVEMENTX.txt +++ b/internal/help/_MOUSEMOVEMENTX.txt @@ -7,8 +7,10 @@ The [[_MOUSEMOVEMENTX]] function returns the relative horizontal position of the * Returns the relative horizontal cursor pixel position compared to the previous cursor position. Negative values are moves to the left. +* '''Note:''' A [[_MOUSESHOW]] statement will disable [[_MOUSEMOVEMENTX]] or [[_MOUSEMOVEMENTY]] relative mouse movement reads. * Can also be used to check for any mouse movements to enable a program or close [[Screen Saver Programs]]. -* On Windows only, [[_MOUSEMOVEMENTX]] will continue to track the mouse when it is outside the program window. +* Sets the mouse to a relative movement mode which can be read by [[_WHEEL]] instead of [[_AXIS]] as mouse [[_DEVICES|device]] 2. + {{PageExamples}} ''Example 1:'' Since values returned are relative to the last position, the returns can be positive or negative. @@ -56,3 +58,4 @@ PX = 320: PY = 240 'center position {{PageNavigation}} +< diff --git a/internal/help/_MOUSEMOVEMENTY.txt b/internal/help/_MOUSEMOVEMENTY.txt index 3542b7b9e..a692754f8 100644 --- a/internal/help/_MOUSEMOVEMENTY.txt +++ b/internal/help/_MOUSEMOVEMENTY.txt @@ -7,8 +7,9 @@ The [[_MOUSEMOVEMENTY]] function returns the relative vertical position of the m * Returns the relative vertical cursor pixel position compared to the previous cursor position. Negative values are up moves. +* '''Note:''' A [[_MOUSESHOW]] statement will disable [[_MOUSEMOVEMENTX]] or [[_MOUSEMOVEMENTY]] relative mouse movement reads. * Can also be used to check for any mouse movements to enable a program or close [[Screen Saver Programs]]. -* On Windows only, [[_MOUSEMOVEMENTY]] will continue to track the mouse when it is outside the program window. +* Sets the mouse to a relative movement mode which can be read by [[_WHEEL]] instead of [[_AXIS]] as mouse [[_DEVICES|device]] 2. ''Example:'' MOD is used to keep vertical movement of circle and cursor inside of the SCREEN 13 window(200). @@ -40,3 +41,4 @@ The [[_MOUSEMOVEMENTY]] function returns the relative vertical position of the m {{PageNavigation}} +< diff --git a/internal/help/_MOUSEPIPEOPEN.txt b/internal/help/_MOUSEPIPEOPEN.txt new file mode 100644 index 000000000..311a25365 --- /dev/null +++ b/internal/help/_MOUSEPIPEOPEN.txt @@ -0,0 +1,103 @@ +{{DISPLAYTITLE: _MOUSEPIPEOPEN}} + +The [[_MOUSEPIPEOPEN]] function creates a pipe handle value for a mouse when using a virtual keyboard. + + +{{PageSyntax}} +: vkMousePipe = [[_MOUSEPIPEOPEN]] + + +{{PageDescription}} +* The pipe handle value can be used optionally with [[_MOUSEINPUT]], [[_MOUSEX]], [[_MOUSEY]], and [[_MOUSEBUTTON]] when required. + + +{{PageExamples}} +''Snippet:'' The following snippet isn't runnable/compilable, but it showcases the use of the [[_MOUSEPIPEOPEN]] function. +{{CodeStart}} + mDown = 0 + mUp = 0 + mEvent = 0 + +{{Cl|IF...THEN|IF}} VkMousePipe = 0 {{Cl|THEN}} + VkMousePipe = {{Cl|_MOUSEPIPEOPEN}} 'create new pipe +{{Cl|END IF}} + + {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}(VkMousePipe) + mb = {{Cl|_MOUSEBUTTON}}(1, VkMousePipe) + + mx = {{Cl|_MOUSEX}}(VkMousePipe) + my = {{Cl|_MOUSEY}}(VkMousePipe) + + {{Cl|IF...THEN|IF}} {{Cl|_PIXELSIZE}} = 0 {{Cl|THEN}} 'screen 0 adjustment + mx = mx * 8 - 4 + my = my * 16 - 8 + {{Cl|END IF}} + {{Cl|IF...THEN|IF}} mb = -1 {{Cl|AND (boolean)|AND}} omb = 0 {{Cl|THEN}} mDown = -1: mEvent = 1: {{Cl|EXIT DO}} + + if VkMousePipeCapture=0 then + {{Cl|_MOUSEINPUTPIPE}} VkMousePipe + end if + + {{Cl|IF...THEN|IF}} mb = 0 {{Cl|AND (boolean)|AND}} omb = -1 {{Cl|THEN}} + VkMousePipeCapture=0 + mUp = -1 + mEvent = 1 + {{Cl|EXIT DO}} + end if + + {{Cl|LOOP}} + omb = mb + + + rootId = VkByRole("ROOT") + editMode = VK(rootId).locked + + {{Cl|IF...THEN|IF}} mDown {{Cl|THEN}} + mDownX = mx + mDownY = my + i2 = 0 + + {{Cl|FOR...NEXT|FOR}} internal = 1 {{Cl|TO}} 0 {{Cl|STEP}} -1 + {{Cl|FOR...NEXT|FOR}} i = VkLast {{Cl|TO}} 1 {{Cl|STEP}} -1 + {{Cl|IF...THEN|IF}} VK(i).active {{Cl|THEN}} + {{Cl|IF...THEN|IF}} VK(i).internal = internal {{Cl|THEN}} + x = VK(i).x * VkUnitSize + y = VK(i).y * VkUnitSize + w = VK(i).w + h = VK(i).h + x1 = {{Cl|INT}}(x) + x2 = {{Cl|INT}}(x + VkUnitSize * w) - 1 + y1 = sy - 1 - {{Cl|INT}}(y) + y2 = sy - 1 - {{Cl|INT}}(y + VkUnitSize * h) + 1 + {{Cl|IF...THEN|IF}} mx >= x1 {{Cl|AND (boolean)|AND}} mx <= x2 {{Cl|AND (boolean)|AND}} my >= y2 {{Cl|AND (boolean)|AND}} my <= y1 {{Cl|THEN}} + i2 = i + {{Cl|EXIT}} {{Cl|FOR...NEXT|FOR}} + {{Cl|END IF}} + {{Cl|END IF}} + {{Cl|END IF}} + {{Cl|NEXT}} + {{Cl|IF...THEN|IF}} i2 {{Cl|THEN}} {{Cl|EXIT}} {{Cl|FOR...NEXT|FOR}} + {{Cl|NEXT}} + {{Cl|IF...THEN|IF}} i2 {{Cl|THEN}} + VkI = i2 + VKoldX = VK(i2).x + VKoldY = VK(i2).y + VKdragging = 0 + VKstart = {{Cl|TIMER (statement)|TIMER}}(0.001) + 'VK(i2).held = -1 + VkKeyDown i2 + VkMousePipeCapture=1 + {{Cl|END IF}} + IF VkMousePipeCapture = 0 THEN {{Cl|_MOUSEINPUTPIPE}} VkMousePipe + {{Cl|END}} I + +{{TextEnd}} +: When using the [[$VIRTUALKEYBOARD|virtual keyboard]], the keyboard captures mouse input appropriately whilst selectively letting presses originating on non-key areas of the screen filter through to the default mouse queue. + + +{{PageSeeAlso}} +* [[$VIRTUALKEYBOARD]] + + +{{PageNavigation}} +< diff --git a/internal/help/_MOUSESHOW.txt b/internal/help/_MOUSESHOW.txt index c3612d02b..7c641b48c 100644 --- a/internal/help/_MOUSESHOW.txt +++ b/internal/help/_MOUSESHOW.txt @@ -7,8 +7,8 @@ The [[_MOUSESHOW]] statement displays the mouse cursor and can change its shape. {{PageDescription}} -* Simply use the statement without a parameter whenever [[_MOUSEHIDE]] has been used previously. -* The following {{Parameter|cursorShape$}} can be displayed: +* Simply use the statement whenever [[_MOUSEHIDE]] has been used previously. +* In '''version 1.000 and up''' the following {{Parameter|cursorShape$}} can be displayed: ::_MOUSESHOW "LINK" will display an upward pointing hand cursor used to denote hypertext ::_MOUSESHOW "TEXT" will display the I cursor often used in text entry areas ::_MOUSESHOW "CROSSHAIR" will display a crosshair cursor @@ -16,12 +16,17 @@ The [[_MOUSESHOW]] statement displays the mouse cursor and can change its shape. ::_MOUSESHOW "HORIZONTAL" will display horizontal arrow cursor for movement ::_MOUSESHOW "TOPLEFT_BOTTOMRIGHT" will display bottom diagonal arrow cursor for movement ::_MOUSESHOW "TOPRIGHT_BOTTOMLEFT" will display bottom diagonal arrow cursor for movement -::_MOUSESHOW "WAIT" will display an hourglass or spinning circle used to indicate the program is busy with a task -::_MOUSESHOW "HELP" will display a question mark cursor used to denote more information available ::_MOUSESHOW "DEFAULT" can be used after a mouse cursor statement above was previously used. +* This statement will also disable [[_MOUSEMOVEMENTX]] or [[_MOUSEMOVEMENTY]] relative mouse movement reads. +* The mouse cursor will not interfere with any print or graphic screen changes in '''QB64'''. + + +===QBasic/QuickBASIC=== +* _MOUSEHIDE statements do not accumulate like they did with [[ABSOLUTE]] or [[INTERRUPT]] in QBasic. + {{PageExamples}} -''Example 1:'' Special cursors can be displayed by using special string parameters: +''Example 1:'' '''QB64 1.000 and up''' allow special cursors to be displayed by using special string parameters: {{CodeStart}} {{Cl|_MOUSESHOW}} "default": {{Cl|_DELAY}} 0.5 {{Cl|_MOUSESHOW}} "link": {{Cl|_DELAY}} 0.5 'a hand, typically used in web browsers @@ -31,10 +36,8 @@ The [[_MOUSESHOW]] statement displays the mouse cursor and can change its shape. {{Cl|_MOUSESHOW}} "horizontal": {{Cl|_DELAY}} 0.5 {{Cl|_MOUSESHOW}} "topleft_bottomright": {{Cl|_DELAY}} 0.5 {{Cl|_MOUSESHOW}} "topright_bottomleft": {{Cl|_DELAY}} 0.5 -{{Cl|_MOUSESHOW}} "wait": {{Cl|_DELAY}} 0.5 -{{Cl|_MOUSESHOW}} "help": {{Cl|_DELAY}} 0.5 {{CodeEnd}} -: '''Note:''' The hourglass and question mark cursors are available in v1.5 and above. +: '''Note:''' There is no hourglass, stopwatch or spinning colorful wheel in the list. The fact is that these typically only appear in a program when something has gone terribly wrong and the program has crashed or frozen. {{PageSeeAlso}} @@ -48,3 +51,4 @@ The [[_MOUSESHOW]] statement displays the mouse cursor and can change its shape. {{PageNavigation}} +< diff --git a/internal/help/_MOUSEWHEEL.txt b/internal/help/_MOUSEWHEEL.txt index b84883867..9ee5d8cc3 100644 --- a/internal/help/_MOUSEWHEEL.txt +++ b/internal/help/_MOUSEWHEEL.txt @@ -64,3 +64,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_MOUSEX.txt b/internal/help/_MOUSEX.txt index 7a119e6bb..9759d1176 100644 --- a/internal/help/_MOUSEX.txt +++ b/internal/help/_MOUSEX.txt @@ -13,7 +13,7 @@ The [[_MOUSEX]] function returns the current horizontal (column) mouse cursor po * [[_MOUSEINPUT]] must be used to detect any changes in the mouse position and is '''required''' for any coordinate returns. -{{PageQBasic}} +==QBasic/QuickBASIC== * In [[SCREEN]] 0, QBasic's [[ABSOLUTE]] returned graphic coordinates. QB64 mouse functions return the text coordinates. @@ -52,3 +52,4 @@ tm$ = " Column = ### Row = ### Button1 = ## Button2 = ## Button3 = ##" {{PageNavigation}} +< diff --git a/internal/help/_MOUSEY.txt b/internal/help/_MOUSEY.txt index da049cbd7..f37f3ba46 100644 --- a/internal/help/_MOUSEY.txt +++ b/internal/help/_MOUSEY.txt @@ -13,7 +13,7 @@ The [[_MOUSEY]] function returns the current vertical (row) mouse cursor positio * [[_MOUSEINPUT]] must be used to detect any changes in the mouse position and is '''required''' for any coordinate returns. -{{PageQBasic}} +==QBasic/QuickBASIC== * In [[SCREEN]] 0, QBasic's [[ABSOLUTE]] returned graphic coordinates. QB64 mouse functions return the text coordinates. @@ -61,3 +61,4 @@ addr& = (x1 - 1 + (y - 1) * {{Cl|_WIDTH (function)|_WIDTH}}) * 2 + 1 {{PageNavigation}} +< diff --git a/internal/help/_NEWIMAGE.txt b/internal/help/_NEWIMAGE.txt index cfe074e9e..9e60444a5 100644 --- a/internal/help/_NEWIMAGE.txt +++ b/internal/help/_NEWIMAGE.txt @@ -6,7 +6,7 @@ The [[_NEWIMAGE]] function prepares a window image surface and returns the [[LON : {{Parameter|handle&}} = [[_NEWIMAGE]]({{Parameter|width&}}, {{Parameter|height&}}[, {''0''|''1''|''2''|''7''|''8''|''9''|''10''|''11''|''12''|''13''|''256''|''32''}]) -{{PageParameters}} +{{Parameters}} * Minimum [[LONG]] screen dimensions are {{Parameter|width&}} >= 1, {{Parameter|height&}} >= 1 measured in pixels as [[INTEGER]] or [[LONG]] values. ** For mode 0 (text), {{Parameter|width&}} and {{Parameter|height&}} are measured in character blocks, not pixels. * Mode is either a QBasic type [[SCREEN|screen]] mode (0 to 2 or 7 to 13), 256 colors or 32 bit (16 million colors) compatible. @@ -99,3 +99,4 @@ mode2& = {{Cl|_NEWIMAGE}} (300, 200, 13) {{PageNavigation}} +< diff --git a/internal/help/_NUMLOCK.txt b/internal/help/_NUMLOCK.txt index 601fc0795..fa09256f1 100644 --- a/internal/help/_NUMLOCK.txt +++ b/internal/help/_NUMLOCK.txt @@ -6,7 +6,7 @@ The [[_NUMLOCK]] statement sets the state of the Num Lock key. : [[_NUMLOCK]] {ON|OFF|_TOGGLE} -{{PageAvailability}} +==Availability== * Version 1.4 and up. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -17,3 +17,4 @@ The [[_NUMLOCK]] statement sets the state of the Num Lock key. {{PageNavigation}} +< diff --git a/internal/help/_NUMLOCK_(function).txt b/internal/help/_NUMLOCK_(function).txt index 91b26a67b..7ec19ef29 100644 --- a/internal/help/_NUMLOCK_(function).txt +++ b/internal/help/_NUMLOCK_(function).txt @@ -6,7 +6,7 @@ The [[_NUMLOCK (function)| _NUMLOCK]] function returns the current state of the : {{Parameter|keyStatus%%}} = [[_NUMLOCK (function)| _NUMLOCK]] -{{PageAvailability}} +==Availability== * Version 1.4 and up. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -17,3 +17,4 @@ The [[_NUMLOCK (function)| _NUMLOCK]] function returns the current state of the {{PageNavigation}} +< diff --git a/internal/help/_OFFSET.txt b/internal/help/_OFFSET.txt index 85abe9683..2af22c798 100644 --- a/internal/help/_OFFSET.txt +++ b/internal/help/_OFFSET.txt @@ -10,7 +10,7 @@ The [[_OFFSET]] variable type stores the location of a value in memory. The byte * _OFFSET types can be created as signed or [[_UNSIGNED]] at the programmer's discretion. * The type suffix for _OFFSET is '''%&''' which designates the integer value's flexible size. * Offset values are only useful when used in conjunction with [[_MEM]] or [[DECLARE LIBRARY]] procedures. -* OFFSET values are used as a part of the [[_MEM]] variable [[Variable Types|type]] in QB64. Variable.OFFSET returns or sets the current position in memory. +* OFFSET values are used as a part of the [[_MEM]] variable [[type]] in QB64. Variable.OFFSET returns or sets the current position in memory. * API [[DECLARE LIBRARY|LIBRARY]] parameter or [[TYPE|type]] names may include '''lp, ptr''' or '''p''' which designates them as a pointer type. * '''Warning: _OFFSET values cannot be cast to other variable type values reliably.''' * '''Warning: Variable length [[STRING]] values can move about in memory at any time.''' If you get the _OFFSET of a variable length sting on one code line and use it on the next it may not be there anymore.''' To be safe, move variable length strings into fixed length strings first.''' @@ -72,3 +72,4 @@ o = SHBrowseForFolder(b) {{PageNavigation}} +< diff --git a/internal/help/_OFFSET_(function).txt b/internal/help/_OFFSET_(function).txt index 478f08a98..d171a0b48 100644 --- a/internal/help/_OFFSET_(function).txt +++ b/internal/help/_OFFSET_(function).txt @@ -12,7 +12,7 @@ The [[_OFFSET]] function returns the memory offset of/within a given variable. * _OFFSET function return values should be stored in [[_OFFSET]] type variables. As no other variable type is 'elastic' like [[_OFFSET]], there can be no guarantee that any other variable type can hold the value of an _OFFSET. * Returns the memory offset of variables, user-defined-types & elements, arrays & indices and the base offset of [[STRING]]s. * Offset values are currently only useful when used in conjunction with [[_MEM]] or [[DECLARE LIBRARY]] procedures. -* OFFSET values are used as a part of the [[_MEM]] variable [[Variable Types|type]] in QB64; {{Parameter|variable}}.OFFSET returns or sets the current position in memory. +* OFFSET values are used as a part of the [[_MEM]] variable [[type]] in QB64; {{Parameter|variable}}.OFFSET returns or sets the current position in memory. * '''Warning:''' QB64 variable length strings can move about in memory at any time. If you get the _OFFSET of a variable length sting on one line and use it on the next it may not be there anymore.''' To be safe, move variable length strings into fixed length strings first.''' @@ -41,3 +41,4 @@ memcpy {{Cl|_OFFSET (function)|_OFFSET}}(a$) + 5, {{Cl|_OFFSET (function)|_OFFSE {{PageNavigation}} +< diff --git a/internal/help/_OPENCLIENT.txt b/internal/help/_OPENCLIENT.txt index a0fe5dc8c..2aeb00f73 100644 --- a/internal/help/_OPENCLIENT.txt +++ b/internal/help/_OPENCLIENT.txt @@ -1,22 +1,11 @@ -{{DISPLAYTITLE:_OPENCLIENT}} -The [[_OPENCLIENT]] function connects to a Host on the Internet as a Client and returns the Client status handle. - - -{{PageSyntax}} -: {{Parameter|clientHandle&}} = [[_OPENCLIENT]]('''"TCP/IP:8080:12:30:1:10"''') - - - +The [[_OPENCLIENT]] function connects to a Host on the Internet as a Client and returns the Client status handle.{{PageSyntax}} +:{{Parameter|clientHandle&}} = [[_OPENCLIENT]]('''"TCP/IP:8080:12:30:1:10"''') {{PageDescription}} -* An [[ERROR Codes|Illegal Function Call]] error will be triggered if the function is called with a string argument of the wrong syntax. -* Connects to a host somewhere on the internet as a client. -* Valid {{Parameter|clientHandle&}} values are negative. 0 means that the connection failed. Always check that the handle returned is not 0. -* [[CLOSE]] client_handle closes the client. A failed handle of value 0 does not need to be closed. - - -{{PageExamples}} -''Example 1:'' Attempting to connect to a local host(your host) as a client. A zero return indicates failure. -{{CodeStart}} +*An [[ERROR Codes|Illegal Function Call]] error will be triggered if the function is called with a string argument of the wrong syntax. +*Connects to a host somewhere on the internet as a client. +*Valid {{Parameter|clientHandle&}} values are negative. 0 means that the connection failed. Always check that the handle returned is not 0. +*[[CLOSE]] client_handle closes the client. A failed handle of value 0 does not need to be closed. +{{PageExamples}}''Example 1:'' Attempting to connect to a local host(your host) as a client. A zero return indicates failure.{{CodeStart}} client = {{Cl|_OPENCLIENT}}("TCP/IP:7319:localhost") {{Cl|IF...THEN|IF}} client {{Cl|THEN}} @@ -26,10 +15,7 @@ client = {{Cl|_OPENCLIENT}}("TCP/IP:7319:localhost") {{CodeEnd}} :'''NOTE:''' Try a valid TCP/IP port setting to test this routine! - - -''Example 2:'' Using a "raw" Download function to download the QB64 bee image and displays it. -{{CodeStart}} +''Example 2:'' Using a "raw" Download function to download the QB64 bee image and displays it.{{CodeStart}} '' '' 'replace the fake image address below with a real image address you want to download {{Cl|IF...THEN|IF}} Download("www.qb64.org/qb64.png", "qb64logo.png", 10) {{Cl|THEN}} ' timelimit = 10 seconds @@ -82,15 +68,10 @@ t! = {{Cl|TIMER}} ' start time {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|TIMER}} > t! + timelimit ' (in seconds) {{Cl|CLOSE}} client {{Cl|END FUNCTION}} '' '' -{{CodeEnd}} - - - -{{PageSeeAlso}} -* [[_OPENHOST]], [[_OPENCONNECTION]] -* [[_CONNECTED]], [[_CONNECTIONADDRESS$]] -* [[Email Demo]], [[Inter-Program Data Sharing Demo]] -* [[Downloading Files]] - - +{{CodeEnd}}{{PageSeeAlso}} +*[[_OPENHOST]], [[_OPENCONNECTION]] +*[[_CONNECTED]], [[_CONNECTIONADDRESS$]] +*[[Email Demo]], [[Inter-Program Data Sharing Demo]] +*[[Downloading Files]] {{PageNavigation}} +< diff --git a/internal/help/_OPENCONNECTION.txt b/internal/help/_OPENCONNECTION.txt index 2f891c81e..be19da248 100644 --- a/internal/help/_OPENCONNECTION.txt +++ b/internal/help/_OPENCONNECTION.txt @@ -22,3 +22,4 @@ The [[_OPENCONNECTION]] function opens a connection from a client that the host {{PageNavigation}} +< diff --git a/internal/help/_OPENHOST.txt b/internal/help/_OPENHOST.txt index 5bd11c0cb..974c12d30 100644 --- a/internal/help/_OPENHOST.txt +++ b/internal/help/_OPENHOST.txt @@ -24,3 +24,4 @@ The [[_OPENHOST]] function opens a Host which listens for new connections and re {{PageNavigation}} +< diff --git a/internal/help/_OS$.txt b/internal/help/_OS$.txt index 376420634..40ab9a672 100644 --- a/internal/help/_OS$.txt +++ b/internal/help/_OS$.txt @@ -10,6 +10,7 @@ The [[_OS$]] function returns the operating system and QB64 compiler bit version * Allows a BAS program to be compiled with QB64 in Windows, Linux or MacOSX using different OS or language specifications. * Use the return {{Parameter|compilerVersion$}} to specify the current OS code to use when a BAS program is compiled using another version of the QB64 compiler. * Windows can use either a 32 (default) or 64 bit compiler. Linux and Mac use 64 bit by default. +<!-- * Explanation by Galleon: http://www.qb64.net/forum/index.php?topic=12193.msg105406#msg105406 --> {{PageSeeAlso}} @@ -17,3 +18,4 @@ The [[_OS$]] function returns the operating system and QB64 compiler bit version {{PageNavigation}} +< diff --git a/internal/help/_PALETTECOLOR.txt b/internal/help/_PALETTECOLOR.txt index 6fdb7f5d4..40c46c85d 100644 --- a/internal/help/_PALETTECOLOR.txt +++ b/internal/help/_PALETTECOLOR.txt @@ -73,3 +73,4 @@ The [[_PALETTECOLOR]] statement sets the color value of a palette entry of an im {{PageNavigation}} +< diff --git a/internal/help/_PALETTECOLOR_(function).txt b/internal/help/_PALETTECOLOR_(function).txt index bb420b1a2..706479e7a 100644 --- a/internal/help/_PALETTECOLOR_(function).txt +++ b/internal/help/_PALETTECOLOR_(function).txt @@ -15,9 +15,9 @@ The [[_PALETTECOLOR (function)|_PALETTECOLOR]] function is used to return the 32 {{PageExamples}} -''Example:'' How _PALETTECOLOR works on 32 bit RGB compared to a 4 BPP(SCREEN 12) QBasic procedure. +''Example:'' How _PALETTECOLOR works on 32 bit RGB compared to a 4 BPP(SCREEN 12) Qbasic procedure. {{CodeStart}} '' '' -SCREEN 12 'can use any QBasic legacy screen mode +SCREEN 12 'can use any Qbasic legacy screen mode DIM RGB(0 TO 47) AS INTEGER 'color intensity array FOR c& = 0 TO 15 'OUT &H3C7, c& 'set color attribute to read @@ -48,3 +48,4 @@ END '' '' {{PageNavigation}} +< diff --git a/internal/help/_PI.txt b/internal/help/_PI.txt index 01cc1fa27..7981adee8 100644 --- a/internal/help/_PI.txt +++ b/internal/help/_PI.txt @@ -6,7 +6,7 @@ The [[_PI]] function returns '''&pi;''' as a [[_FLOAT]] value with an option : {{Parameter|circumference}} = [[_PI]][({{Parameter|multiplier}})] -{{PageParameters}} +{{Parameters}} * Optional {{Parameter|multiplier}} (''2 * radius'' in above syntax) allows multiplication of the π value. @@ -33,3 +33,4 @@ PRINT circlearea {{PageNavigation}} +< diff --git a/internal/help/_PIXELSIZE.txt b/internal/help/_PIXELSIZE.txt index 02a566501..35e445ca9 100644 --- a/internal/help/_PIXELSIZE.txt +++ b/internal/help/_PIXELSIZE.txt @@ -48,3 +48,4 @@ GetImage& = h& {{PageNavigation}} +< diff --git a/internal/help/_PRESERVE.txt b/internal/help/_PRESERVE.txt index ce2012c17..0b93b57c6 100644 --- a/internal/help/_PRESERVE.txt +++ b/internal/help/_PRESERVE.txt @@ -66,3 +66,4 @@ filename$ = "Readme.txt" 'Qb64 information text file {{PageNavigation}} +< diff --git a/internal/help/_PRINTIMAGE.txt b/internal/help/_PRINTIMAGE.txt index 01c7945c2..14a59ff2f 100644 --- a/internal/help/_PRINTIMAGE.txt +++ b/internal/help/_PRINTIMAGE.txt @@ -168,3 +168,4 @@ Srow = 16 * (Trow - 1): Scol = 8 * (Tcol - 1) 'convert text to graphic coordinat {{PageNavigation}} +< diff --git a/internal/help/_PRINTMODE.txt b/internal/help/_PRINTMODE.txt index 8701fbc00..c41560fb4 100644 --- a/internal/help/_PRINTMODE.txt +++ b/internal/help/_PRINTMODE.txt @@ -6,7 +6,7 @@ The [[_PRINTMODE]] statement sets the text or [[_FONT]] printing mode on a backg : [[_PRINTMODE]] {''_KEEPBACKGROUND''|''_ONLYBACKGROUND''|''_FILLBACKGROUND''}[, {{Parameter|imageHandle&}}] -{{PageParameters}} +{{Parameters}} * One of 3 mode keywords is mandatory when using this statement to deal with the text background. **''_KEEPBACKGROUND'' (mode 1): Text background transparent. Only the text is displayed over anything behind it. **''_ONLYBACKGROUND'' (mode 2): Text background only is displayed. Text is transparent to anything behind it. @@ -39,3 +39,4 @@ The [[_PRINTMODE]] statement sets the text or [[_FONT]] printing mode on a backg {{PageNavigation}} +< diff --git a/internal/help/_PRINTMODE_(function).txt b/internal/help/_PRINTMODE_(function).txt index 27f47feca..c89455661 100644 --- a/internal/help/_PRINTMODE_(function).txt +++ b/internal/help/_PRINTMODE_(function).txt @@ -6,7 +6,7 @@ The [[_PRINTMODE (function)|_PRINTMODE]] function returns the current [[_PRINTM : {{Parameter|currentPrintMode}} = [[_PRINTMODE (function)|_PRINTMODE]][({{Parameter|imageHandle&}})] -{{PageParameters}} +{{Parameters}} * If no {{Parameter|imageHandle&}} is given, the current [[_DEST|destination]] [[SCREEN]] page or image is assumed. @@ -26,3 +26,4 @@ The [[_PRINTMODE (function)|_PRINTMODE]] function returns the current [[_PRINTM {{PageNavigation}} +< diff --git a/internal/help/_PRINTSTRING.txt b/internal/help/_PRINTSTRING.txt index 4aae006ad..2276325e0 100644 --- a/internal/help/_PRINTSTRING.txt +++ b/internal/help/_PRINTSTRING.txt @@ -6,7 +6,7 @@ The [[_PRINTSTRING]] statement prints text [[STRING|strings]] using graphic colu : [[_PRINTSTRING]]({{Parameter|column}}, {{Parameter|row}}), {{Parameter|textExpression$}}[, {{Parameter|imageHandle&}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|column}} and {{Parameter|row}} are [[INTEGER]] or [[LONG]] starting PIXEL (graphic) column and row coordinates to set text or custom fonts. * {{Parameter|textExpression$}} is any literal or variable [[STRING|string]] value of text to be displayed. * {{Parameter|imageHandle&}} is the optional image or destination to use. Zero designates current [[SCREEN (statement)|SCREEN]] page. @@ -24,9 +24,12 @@ The [[_PRINTSTRING]] statement prints text [[STRING|strings]] using graphic colu * In SCREEN 0 (text only), [[_PRINTSTRING]] works as one-line replacement for '''LOCATE x, y: PRINT text$''', without changing the current cursor position. +==Availability== +* In versions of QB64 prior to 1.000 _PRINTSTRING can only be used in graphic, 256 color or 32 bit screen modes, not SCREEN 0.'' + {{PageExamples}} -''Example 1:'' Printing those unprintable [[ASCII]] control characters is no longer a problem. +''Example 1:'' Printing those unprintable [[ASCII]] control characters is no longer a problem! {{CodeStart}} '' '' {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 256) @@ -45,7 +48,38 @@ The [[_PRINTSTRING]] statement prints text [[STRING|strings]] using graphic colu {{OutputEnd}} -''Example 2:'' Rotating a text string around a graphic object. +''Example 2:'' Making any '''QB64 program window''' larger using a SUB that easily converts PRINT to [[_PRINTSTRING]]. +{{CodeStart}} +Scr13& = {{Cl|_NEWIMAGE}}(320, 200, 13) 'this is the old SCREEN 13 image page to set the image +Big13& = {{Cl|_NEWIMAGE}}(640, 480, 256) 'use 4 X 3 aspect ratio that Qbasic used when full screen + +{{Cl|SCREEN (statement)|SCREEN}} Big13& +{{Cl|_DEST}} Scr13& +image1& = {{Cl|_LOADIMAGE}}("Howie.BMP", 256) +image2& = {{Cl|_LOADIMAGE}}("Howie2.BMP", 256) +{{Cl|_PUTIMAGE}} (10, 20), image1&, Scr13& +{{Cl|_PUTIMAGE}} (160, 20), image2&, Scr13& +{{Cl|_COPYPALETTE}} image1&, Scr13& +{{Cl|COLOR}} 151: {{Cl|LOCATE}} 2, 4: PRINTS "Screen 13 Height Reduction to 83%" +{{Cl|LOCATE}} 22, 22: PRINTS {{Cl|CHR$}}(24) + " 4 X 3 Proportion" 'use {{Cl|concatenation}} +{{Cl|LOCATE}} 24, 21: PRINTS {{Cl|CHR$}}(27) + " Stretched at 100%" 'instead of a {{Cl|semicolon}}! +{{Cl|_COPYPALETTE}} Scr13&, Big13& 'required when imported image colors are used +{{Cl|_PUTIMAGE}} , Scr13&, Big13& 'stretches the screen to double the size +K$ = {{Cl|INPUT$}}(1) +{{Cl|END}} + +{{Cl|SUB}} PRINTS (Text$) +row% = ({{Cl|CSRLIN}} - 1) * {{Cl|_FONTHEIGHT}} 'finds current screen page text or font row height +col% = ({{Cl|POS}}(0) - 1) * {{Cl|_PRINTWIDTH}}("W") 'finds current page text or font column width +{{Cl|_PRINTSTRING}} (col%, row%), Text$ +{{Cl|END SUB}} '' '' +{{CodeEnd}} +{{small|Code by Ted Weissgerber}} +: ''Explanation:'' The procedure above creates a larger version of a SCREEN 13 window by stretching it with [[_PUTIMAGE]]. It cannot stretch PRINTed text so [[_PRINTSTRING]] must be used instead. [[LOCATE]] sets the PRINT cursor position for [[CSRLIN]] and [[POS]](0) to read. The SUB then converts the coordinates to graphical ones. Then '''change''' [[PRINT]] to PRINTS using the IDE '''Search Menu'''. +<center>[https://www.dropbox.com/s/tcdik1ajegbeiz4/HOWIE.zip?dl=0 Download of Example 2 Bitmap images]</center> + + +''Example 3:'' Rotating a text string around a graphic object. {{CodeStart}} '' '' {{Cl|SCREEN (statement)|SCREEN}} 12 '' '' {{Cl|DIM}} row {{Cl|AS}} {{Cl|INTEGER}}, cnt {{Cl|AS}} {{Cl|INTEGER}}, cstart {{Cl|AS}} {{Cl|SINGLE}}, cend {{Cl|AS}} {{Cl|SINGLE}} @@ -83,3 +117,4 @@ row = 1 {{PageNavigation}} +< diff --git a/internal/help/_PRINTWIDTH.txt b/internal/help/_PRINTWIDTH.txt index cf4dd2640..99fbb6a83 100644 --- a/internal/help/_PRINTWIDTH.txt +++ b/internal/help/_PRINTWIDTH.txt @@ -50,3 +50,4 @@ TextHeight& = {{Cl|_FONTHEIGHT}} 'can measure normal text block heig {{PageNavigation}} +< diff --git a/internal/help/_PUTIMAGE.txt b/internal/help/_PUTIMAGE.txt index 8ba453178..e97589fc5 100644 --- a/internal/help/_PUTIMAGE.txt +++ b/internal/help/_PUTIMAGE.txt @@ -25,8 +25,8 @@ ::Note: The top-left corner position designates the leftmost and topmost portion of the image to use. -{{PageParameters}} -* Relative coordinates to a previous graphical object can be designated using [[STEP]] as opposed to literal surface coordinates. +{{Parameters}} +* Relative coordinates to a previous graphical object can be designated using [[STEP]] as opposed to literal surface coordinates (version '''1.000''' and up). * Coordinates ''dx'' and ''dy'' map the box area of the [[_DEST|destination]] area to use. When omitted the entire desination area is used. If only one coordinate is used, the source is placed with its original dimensions. Coordinates can be set to flip or resize the image. ** {{Parameter|dx1}} = the column coordinate at which the insertion of the source will begin (leftmost); when larger than ''dx2'', reverses image. ** {{Parameter|dy1}} = the row coordinate at which the insertion of the source will begin (topmost); when larger than ''dy2'', inverts image. @@ -39,7 +39,7 @@ ** {{Parameter|sy1}} = the row coordinate of the upper-most pixel to include of the source. When omitted, the entire image is used ** {{Parameter|sx2}} = the column coordinate of the right-most pixel to include of the source. Can be omitted to get rest of image. ** {{Parameter|sy2}} = the row coordinate of the bottom-most pixel to include of the source. Can be omitted to get rest of image. -* ''_SMOOTH'' applies linear filtering. +* ''_SMOOTH'' applies linear filtering ('''version 1.000 and up'''). <center>'''Note: The [[PUT (graphics statement)|PUT]] options PSET, PRESET, AND, OR and XOR are not available with _PUTIMAGE. QB64 can use [[_ALPHA|transparency]] of colors to achieve the same results.'''</center> @@ -82,18 +82,20 @@ {{CodeStart}} '' '' {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) {{Cl|CLS}} , {{Cl|_RGB}}(0, 255, 0) -i = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''') +i = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''') 'any 32 bit image (ie. with alpha channel) {{Cl|_PUTIMAGE}} (0, 0), i ' places image at upper left corner of window w/o stretching it '' '' {{CodeEnd}} '' '' +: ''Explanation:'' When QB64 loads a 256 color .PNG file containing a transparent color, that color will be treated as transparent when _PUTIMAGE is used to put it onto another image. So actually, you can use a 256-color .PNG file containing transparency information in a 256 color screen mode in QB64. + ''Example 3:'' Flipping and enlarging an image with _PUTIMAGE by swapping or increasing the desination coordinates. {{CodeStart}} '' '' {{Cl|DEFLNG}} A-Z dest_handle = {{Cl|_NEWIMAGE}}(640, 480, 32) {{Cl|SCREEN (statement)|SCREEN}} dest_handle '32 bit Screen 12 dimensions -source_handle = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''', 32) +source_handle = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''', 32) 'any 32 bit image (ie. with alpha channel) dx1 = 0: dy1 = 0 dx2 = {{Cl|_WIDTH (function)|_WIDTH}}(source_handle) - 1: dy2 = {{Cl|_HEIGHT}}(source_handle) - 1 'image dimensions - 1 {{Cl|LOCATE}} 29, 33: {{Cl|PRINT}} "Press any Key!"; @@ -154,7 +156,7 @@ DO {{Cl|CASE}} "6": x = x + 10: {{Cl|IF...THEN|IF}} x > 1280 {{Cl|THEN}} x = 1280 {{Cl|CASE}} "8": y = y - 10: {{Cl|IF...THEN|IF}} y < 0 {{Cl|THEN}} y = 0 {{Cl|CASE}} "2": y = y + 10: {{Cl|IF...THEN|IF}} y > 720 {{Cl|THEN}} y = 720 - {{Cl|CASE}} {{Cl|CHR$}}(27): {{Cl|SYSTEM}} + {{Cl|CASE}} {{Cl|CHR$}}(32): {{Cl|SYSTEM}} {{Cl|END SELECT}} {{Cl|_DISPLAY}} {{Cl|LOOP}} '' '' @@ -189,3 +191,4 @@ h& = {{Cl|_NEWIMAGE}}(640, 480, 256) {{PageNavigation}} +< diff --git a/internal/help/_R2D.txt b/internal/help/_R2D.txt index ef3e1247d..6ce3fd0ab 100644 --- a/internal/help/_R2D.txt +++ b/internal/help/_R2D.txt @@ -6,8 +6,8 @@ The [[_R2D]] function converts a '''radian''' value into a '''degree''' value. : {{Parameter|result!}} = [[_R2D]]({{Parameter|num}}) -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -31,3 +31,4 @@ That angle in Degrees is 28.64789 {{PageNavigation}} +< diff --git a/internal/help/_R2G.txt b/internal/help/_R2G.txt index 2198b0141..f57fdacb0 100644 --- a/internal/help/_R2G.txt +++ b/internal/help/_R2G.txt @@ -6,8 +6,8 @@ The [[_R2G]] function converts a '''radian''' value into a '''gradient''' value. : {{Parameter|result!}} = [[_R2G]]({{Parameter|num}}) -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up.''' {{PageExamples}} @@ -31,3 +31,4 @@ That angle in Gradient is 31.83099 {{PageNavigation}} +< diff --git a/internal/help/_READBIT.txt b/internal/help/_READBIT.txt index db325776c..2e203a42e 100644 --- a/internal/help/_READBIT.txt +++ b/internal/help/_READBIT.txt @@ -6,7 +6,7 @@ The [[_READBIT]] function is used to check the state of a specified bit of a int :{{Parameter|result}} = [[_READBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|numericalVariable}} is the variable to read the state of a bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]]. * Integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} the number of the bit to be read. @@ -17,8 +17,8 @@ The [[_READBIT]] function is used to check the state of a specified bit of a int * Returns -1 if the bit is set(1), otherwise returns 0 if the bit is not set(0) * Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on) -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -55,3 +55,4 @@ B& in binary is: 00000000110000000001101000000111 * [[_RESETBIT]], [[_TOGGLEBIT]] {{PageNavigation}} +< diff --git a/internal/help/_RED.txt b/internal/help/_RED.txt index 79f1b9486..dfb41dd66 100644 --- a/internal/help/_RED.txt +++ b/internal/help/_RED.txt @@ -18,7 +18,7 @@ The [[_RED]] function returns the palette index or the red component intensity o * Uses index parameters passed by the [[_RGB]], [[_RGBA]], [[_RGB32]] or [[_RGBA32]] functions. -{{PageExamples]] +{{PageExamples}} * See the example in [[POINT]]. @@ -29,3 +29,4 @@ The [[_RED]] function returns the palette index or the red component intensity o {{PageNavigation}} +< diff --git a/internal/help/_RED32.txt b/internal/help/_RED32.txt index 23af0c2b8..eeff13e68 100644 --- a/internal/help/_RED32.txt +++ b/internal/help/_RED32.txt @@ -22,3 +22,4 @@ The [[_RED32]] function returns the red component intensity of a 32-bit image or {{PageNavigation}} +< diff --git a/internal/help/_RESETBIT.txt b/internal/help/_RESETBIT.txt index aef5a44c1..9e5556e24 100644 --- a/internal/help/_RESETBIT.txt +++ b/internal/help/_RESETBIT.txt @@ -6,7 +6,7 @@ The [[_RESETBIT]] function is used to set a specified bit of a numerical value t :{{Parameter|result}} = [[_RESETBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|numericalVariable}} is the variable to set the bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]]. * Integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} the number of the bit to be set. @@ -17,8 +17,8 @@ The [[_RESETBIT]] function is used to set a specified bit of a numerical value t * Resetting a bit that is already set to 0 will have no effect. * Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on) -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -44,3 +44,4 @@ A~%% = {{Cl|_RESETBIT}}(A~%%,6) 'Reset the seventh bit of A~%% * [[_READBIT]], [[_TOGGLEBIT]] {{PageNavigation}} +< diff --git a/internal/help/_RESIZE.txt b/internal/help/_RESIZE.txt index b1533ab7b..df4822bf6 100644 --- a/internal/help/_RESIZE.txt +++ b/internal/help/_RESIZE.txt @@ -6,7 +6,7 @@ The [[_RESIZE]] statement sets resizing of the window ON or OFF and sets the met : [[_RESIZE]] [{ON|OFF}][, {_STRETCH|_SMOOTH}] -{{PageParameters}} +{{Parameters}} * When resizing is turned OFF no method is listed. * When resizing is turned ON or left empty, a ''_STRETCH'' or ''_SMOOTH'' method can be used. @@ -24,3 +24,4 @@ The [[_RESIZE]] statement sets resizing of the window ON or OFF and sets the met {{PageNavigation}} +< diff --git a/internal/help/_RESIZEHEIGHT.txt b/internal/help/_RESIZEHEIGHT.txt index 3e28944f8..5a0946f0c 100644 --- a/internal/help/_RESIZEHEIGHT.txt +++ b/internal/help/_RESIZEHEIGHT.txt @@ -11,8 +11,8 @@ The [[_RESIZEHEIGHT]] function returns the user resized screen pixel height if [ * The program should decide if the request is allowable for proper program interaction. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up'''. {{PageExamples}} @@ -23,7 +23,7 @@ The [[_RESIZEHEIGHT]] function returns the user resized screen pixel height if [ s& = {{Cl|_NEWIMAGE}}(300, 300, 32) {{Cl|SCREEN}} s& -bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image +bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any image {{Cl|DO}} {{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN @@ -52,3 +52,4 @@ bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image {{PageNavigation}} +< diff --git a/internal/help/_RESIZEWIDTH.txt b/internal/help/_RESIZEWIDTH.txt index 95d01a7b6..3ebb2ef52 100644 --- a/internal/help/_RESIZEWIDTH.txt +++ b/internal/help/_RESIZEWIDTH.txt @@ -11,8 +11,8 @@ The [[_RESIZEWIDTH]] function returns the user resized screen pixel width if [[$ * The program should decide if the request is allowable for proper program interaction. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up'''. {{PageExamples}} @@ -23,7 +23,7 @@ The [[_RESIZEWIDTH]] function returns the user resized screen pixel width if [[$ s& = {{Cl|_NEWIMAGE}}(300, 300, 32) {{Cl|SCREEN}} s& -bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image +bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any image {{Cl|DO}} {{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN @@ -52,3 +52,4 @@ bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image {{PageNavigation}} +< diff --git a/internal/help/_RESIZE_(function).txt b/internal/help/_RESIZE_(function).txt index e8c3d33ad..2442e7a27 100644 --- a/internal/help/_RESIZE_(function).txt +++ b/internal/help/_RESIZE_(function).txt @@ -12,8 +12,8 @@ The [[_RESIZE]] function returns true (-1) when a user has attempted to resize t * The [[$RESIZE]]:ON [[metacommand]] must be used so the program is created with a user resizable window. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up'''. {{PageExamples}} @@ -24,7 +24,7 @@ The [[_RESIZE]] function returns true (-1) when a user has attempted to resize t s& = {{Cl|_NEWIMAGE}}(300, 300, 32) {{Cl|SCREEN}} s& -bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image +bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any image {{Cl|DO}} {{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN @@ -36,7 +36,7 @@ bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image {{Cl|CLS}} - 'Center the image: + 'Center the QB64 bee image: x = {{Cl|_WIDTH (function)|_WIDTH}} / 2 - _WIDTH(bee&) / 2 y = {{Cl|_HEIGHT}} / 2 - _HEIGHT(bee&) / 2 {{Cl|_PUTIMAGE}} (x, y), bee& @@ -53,3 +53,4 @@ bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image {{PageNavigation}} +< diff --git a/internal/help/_RGB.txt b/internal/help/_RGB.txt index 429f67e68..f9390e458 100644 --- a/internal/help/_RGB.txt +++ b/internal/help/_RGB.txt @@ -64,3 +64,4 @@ The [[_RGB]] function returns the closest palette attribute index (legacy SCREEN {{PageNavigation}} +< diff --git a/internal/help/_RGB32.txt b/internal/help/_RGB32.txt index 62bd81f32..87d702df1 100644 --- a/internal/help/_RGB32.txt +++ b/internal/help/_RGB32.txt @@ -16,7 +16,7 @@ The [[_RGB32]] function returns the 32-bit ''RGBA'' color value with specified r :{{Parameter|color32value~&}} = [[_RGB32]]({{Parameter|intensity&}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|red&}} specifies the red [[LONG]] component intensity from 0 to 255. * {{Parameter|green&}} specifies the green [[LONG]] component intensity from 0 to 255. * {{Parameter|blue&}} specifies the blue [[LONG]] component intensity from 0 to 255. @@ -32,8 +32,8 @@ The [[_RGB32]] function returns the 32-bit ''RGBA'' color value with specified r * '''NOTE: Default 32-bit backgrounds are clear black or [[_RGB32]](0, 0). Use [[CLS]] to make the black opaque.''' -{{PageAvailability}} -* Alternative syntax available with version 1.3 and up. +==Availability== +* Alternative syntaxes available with '''version 1.3 and up'''. {{PageExamples}} @@ -140,3 +140,4 @@ SYSTEM '' '' {{PageNavigation}} +< diff --git a/internal/help/_RGBA.txt b/internal/help/_RGBA.txt index 7936bec52..496aba0cc 100644 --- a/internal/help/_RGBA.txt +++ b/internal/help/_RGBA.txt @@ -50,3 +50,4 @@ Y% = 20 {{PageNavigation}} +< diff --git a/internal/help/_RGBA32.txt b/internal/help/_RGBA32.txt index c56030b01..f5e14b2b2 100644 --- a/internal/help/_RGBA32.txt +++ b/internal/help/_RGBA32.txt @@ -14,7 +14,7 @@ The [[_RGBA32]] function returns the 32-bit ''RGBA'' color value with the specif * {{Parameter|blue&}} specifies the blue component intensity from 0 to 255. * {{Parameter|alpha&}} specifies the [[_ALPHA|''alpha'']] component transparency value from 0 (fully transparent) to 255 (opaque). * Alpha or intensity values outside of the valid range of 0 to 255 are clipped. -* Returns [[LONG]] 32-bit hexadecimal values from '''&H00000000''' to '''&HFFFFFFFF''' with varying [[_ALPHA]] transparency. +* Returns [[LONG]] 32-bit 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 varying [[_ALPHA]] transparency. * When [[LONG]] values are [[PUT]] to file, the ARGB values become BGRA. Use [[LEFT$]]([[MKL$]]({{Parameter|color32value~&}}), 3) to place 3 colors. * '''NOTE: Default 32-bit backgrounds are clear black or [[_RGBA]](0, 0, 0, 0). Use [[CLS]] to make the black opaque.''' @@ -24,7 +24,7 @@ The [[_RGBA32]] function returns the 32-bit ''RGBA'' color value with the specif {{CodeStart}} '' '' {{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(600, 400, 32) -img& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'from http://www.qb64.org/images/qb64bee.png (or use any 24/32 bit image) +img& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'use any 24/32 bit image 'Turn off auto display {{Cl|_DISPLAY}} @@ -57,3 +57,4 @@ img& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'from http://www.qb64.org/images {{PageNavigation}} +< diff --git a/internal/help/_ROUND.txt b/internal/help/_ROUND.txt index 7b897d7a0..75d731ef4 100644 --- a/internal/help/_ROUND.txt +++ b/internal/help/_ROUND.txt @@ -36,3 +36,4 @@ The [[_ROUND]] function rounds to the closest even [[INTEGER]], [[LONG]] or [[_I {{PageNavigation}} +< diff --git a/internal/help/_SCREENCLICK.txt b/internal/help/_SCREENCLICK.txt index 675c5842c..5b9aae1ff 100644 --- a/internal/help/_SCREENCLICK.txt +++ b/internal/help/_SCREENCLICK.txt @@ -21,3 +21,4 @@ The [[_SCREENCLICK]] statement simulates clicking on a pixel coordinate on the d {{PageNavigation}} +< diff --git a/internal/help/_SCREENEXISTS.txt b/internal/help/_SCREENEXISTS.txt index 4e8e2beb5..f9567f357 100644 --- a/internal/help/_SCREENEXISTS.txt +++ b/internal/help/_SCREENEXISTS.txt @@ -13,7 +13,7 @@ The [[_SCREENEXISTS]] function returns true (-1) once a screen has been created. {{PageExamples}} -''Example:'' The loop busy-waits until the screen exists to add the title. +''Example:'' The loop waits until the screen exists to add the title. {{CodeStart}} '' '' {{Cl|SCREEN}} 12 {{Cl|DO}}: {{Cl|LOOP}} {{Cl|UNTIL}} _{{Cl|SCREENEXISTS}} @@ -29,3 +29,4 @@ The [[_SCREENEXISTS]] function returns true (-1) once a screen has been created. {{PageNavigation}} +< diff --git a/internal/help/_SCREENHIDE.txt b/internal/help/_SCREENHIDE.txt index bab203f7c..5c0a980ff 100644 --- a/internal/help/_SCREENHIDE.txt +++ b/internal/help/_SCREENHIDE.txt @@ -19,3 +19,4 @@ The '''_SCREENHIDE''' statement can be used to hide the main program window in a {{PageNavigation}} +< diff --git a/internal/help/_SCREENICON.txt b/internal/help/_SCREENICON.txt index 0758d4a34..dbb7cb35f 100644 --- a/internal/help/_SCREENICON.txt +++ b/internal/help/_SCREENICON.txt @@ -10,8 +10,8 @@ The [[_SCREENICON]] statement can be used to minimize the main program window to * Use [[_SCREENICON]] to minimize the main program window to the taskbar. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up'''. {{PageSeeAlso}} @@ -21,3 +21,4 @@ The [[_SCREENICON]] statement can be used to minimize the main program window to {{PageNavigation}} +< diff --git a/internal/help/_SCREENICON_(function).txt b/internal/help/_SCREENICON_(function).txt index ab1b6d6c7..52724d39f 100644 --- a/internal/help/_SCREENICON_(function).txt +++ b/internal/help/_SCREENICON_(function).txt @@ -18,3 +18,4 @@ The [[_SCREENICON (function)|_SCREENICON]] function returns true (-1) or false ( {{PageNavigation}} +< diff --git a/internal/help/_SCREENIMAGE.txt b/internal/help/_SCREENIMAGE.txt index a753de182..a27190945 100644 --- a/internal/help/_SCREENIMAGE.txt +++ b/internal/help/_SCREENIMAGE.txt @@ -48,3 +48,4 @@ The [[_SCREENIMAGE]] function stores the current desktop image or a portion of i {{PageNavigation}} +< diff --git a/internal/help/_SCREENMOVE.txt b/internal/help/_SCREENMOVE.txt index 4ce60dcdf..25c06ded3 100644 --- a/internal/help/_SCREENMOVE.txt +++ b/internal/help/_SCREENMOVE.txt @@ -6,7 +6,7 @@ The [[_SCREENMOVE]] statement positions the program window on the desktop using : [[_SCREENMOVE]] {{{Parameter|column&}}, {{Parameter|row&}}|_MIDDLE} -{{PageParameters}} +{{Parameters}} * Positions the program window on the desktop using the {{Parameter|column&}} and {{Parameter|row&}} pixel coordinates for the upper left corner. * '''_MIDDLE''' can be used instead to automatically center the program window on the desktop, in any screen resolution. @@ -67,3 +67,4 @@ high2& = {{Cl|_HEIGHT}}(img2&) {{PageNavigation}} +< diff --git a/internal/help/_SCREENPRINT.txt b/internal/help/_SCREENPRINT.txt index 6772d439f..d87b70a38 100644 --- a/internal/help/_SCREENPRINT.txt +++ b/internal/help/_SCREENPRINT.txt @@ -84,3 +84,4 @@ The [[_SCREENPRINT]] statement simulates typing text into a Windows focused prog {{PageNavigation}} +< diff --git a/internal/help/_SCREENSHOW.txt b/internal/help/_SCREENSHOW.txt index 38e32efe6..f619db93a 100644 --- a/internal/help/_SCREENSHOW.txt +++ b/internal/help/_SCREENSHOW.txt @@ -1,18 +1,22 @@ -{{DISPLAYTITLE:_SCREENSHOW}} -The [[_SCREENSHOW]] statement can be used to display the main program window in a section of code. +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}} +< diff --git a/internal/help/_SCREENX.txt b/internal/help/_SCREENX.txt index a5655b1d7..b9b354d93 100644 --- a/internal/help/_SCREENX.txt +++ b/internal/help/_SCREENX.txt @@ -29,3 +29,4 @@ The [[_SCREENX]] function returns the current column pixel coordinate of the pro {{PageNavigation}} +< diff --git a/internal/help/_SCREENY.txt b/internal/help/_SCREENY.txt index 89ad9218a..df33e6d7d 100644 --- a/internal/help/_SCREENY.txt +++ b/internal/help/_SCREENY.txt @@ -29,3 +29,4 @@ The [[_SCREENY]] function returns the current row pixel coordinate of the progra {{PageNavigation}} +< diff --git a/internal/help/_SCROLLLOCK.txt b/internal/help/_SCROLLLOCK.txt index f553c1df2..05bf6f01c 100644 --- a/internal/help/_SCROLLLOCK.txt +++ b/internal/help/_SCROLLLOCK.txt @@ -6,7 +6,7 @@ The [[_SCROLLLOCK]] statement sets the state of the Scroll Lock key. : [[_SCROLLLOCK]] {ON|OFF|_TOGGLE} -{{PageAvailability}} +==Availability== * Version 1.4 and up. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -17,3 +17,4 @@ The [[_SCROLLLOCK]] statement sets the state of the Scroll Lock key. {{PageNavigation}} +< diff --git a/internal/help/_SCROLLLOCK_(function).txt b/internal/help/_SCROLLLOCK_(function).txt index 4723d1c32..5412cc424 100644 --- a/internal/help/_SCROLLLOCK_(function).txt +++ b/internal/help/_SCROLLLOCK_(function).txt @@ -6,7 +6,7 @@ The [[_SCROLLLOCK (function)| _SCROLLLOCK]] function returns the current state o : {{Parameter|keyStatus%%}} = [[_SCROLLLOCK (function)| _SCROLLLOCK]] -{{PageAvailability}} +==Availability== * Version 1.4 and up. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. @@ -17,3 +17,4 @@ The [[_SCROLLLOCK (function)| _SCROLLLOCK]] function returns the current state o {{PageNavigation}} +< diff --git a/internal/help/_SETALPHA.txt b/internal/help/_SETALPHA.txt index 83413ea4e..3f4f76e1b 100644 --- a/internal/help/_SETALPHA.txt +++ b/internal/help/_SETALPHA.txt @@ -6,7 +6,7 @@ The [[_SETALPHA]] statement sets the alpha channel transparency level of some or : [[_SETALPHA]] {{Parameter|alpha&}}[, {{Parameter|color1&}}][ [[TO]] {{Parameter|colour2&}}] [, {{Parameter|imageHandle&}}] -{{PageParameters}} +{{Parameters}} * {{Parameter|alpha&}} is the new alpha level to set, ranging from 0 (transparent) to 255 (opaque). * {{Parameter|color1&}} designates the 32-bit [[LONG]] color value or range of color values {{Parameter|color1&}} TO {{Parameter|colour2&}} to set the transparency. * If no color value or range of colors is given, the entire image's alpha is changed, including any [[_CLEARCOLOR]] settings. @@ -65,3 +65,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_SETBIT.txt b/internal/help/_SETBIT.txt index 1ec976572..23d0680ed 100644 --- a/internal/help/_SETBIT.txt +++ b/internal/help/_SETBIT.txt @@ -6,7 +6,7 @@ The [[_SETBIT]] function is used to set a specified bit of a numerical value to :{{Parameter|result}} = [[_SETBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|numericalVariable}} is the variable to set the bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]]. * Integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} the number of the bit to be set. @@ -17,8 +17,8 @@ The [[_SETBIT]] function is used to set a specified bit of a numerical value to * Setting a bit that is already set to 1 will have no effect. * Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on) -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -41,3 +41,4 @@ A~%% = {{Cl|_SETBIT}}(A~%%,6) 'set the seventh bit of A~%% * [[_RESETBIT]], [[_TOGGLEBIT]] {{PageNavigation}} +< diff --git a/internal/help/_SHELLHIDE.txt b/internal/help/_SHELLHIDE.txt index 90c8967ca..b9af7a118 100644 --- a/internal/help/_SHELLHIDE.txt +++ b/internal/help/_SHELLHIDE.txt @@ -6,7 +6,7 @@ The [[_SHELLHIDE]] function hides the console window and returns any [[INTEGER]] : {{Parameter|returnCode%}} = [[_SHELLHIDE]]({{Parameter|externalCommand$}}) -{{PageParameters}} +{{Parameters}} * The literal or variable [[STRING]] {{Parameter|externalCommand$}} parameter can be any external command or call to another program. @@ -35,3 +35,4 @@ returncode% = {{Cl|_SHELLHIDE}}("DesktopSize") 'replace call with your program E {{PageNavigation}} +< diff --git a/internal/help/_SHL.txt b/internal/help/_SHL.txt index 22817309d..d9f65c6ec 100644 --- a/internal/help/_SHL.txt +++ b/internal/help/_SHL.txt @@ -6,7 +6,7 @@ The [[_SHL]] function is used to shift the bits of a numerical value to the left :{{Parameter|result}} = [[_SHL]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|numericalVariable}} is the variable to shift the bits of and can be of the following types: [[INTEGER]], [[LONG]],[[_INTEGER64]], or [[_BYTE]]. * Integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} is the number of places to shift the bits. @@ -19,8 +19,8 @@ The [[_SHL]] function is used to shift the bits of a numerical value to the left * The type of variable used to store the results should match the type of the variable being shifted. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -43,7 +43,7 @@ B~%% = {{Cl|_SHL}}(A~%%,8) 'shift the bit off the left 'edge' A~%% = 1 {{Cl|FOR}} I%% = 0 {{Cl|TO}} 8 {{Cl|PRINT}} {{Cl|_SHL}}(A~%%, I%%) -{{Cl|NEXT}} I%% +{{Cl|FOR...NEXT|NEXT}} I%% {{CodeEnd}} {{OutputStart}} 1 @@ -65,3 +65,4 @@ A~%% = 1 {{PageNavigation}} +< diff --git a/internal/help/_SHR.txt b/internal/help/_SHR.txt index f5faecd93..50424a63c 100644 --- a/internal/help/_SHR.txt +++ b/internal/help/_SHR.txt @@ -6,7 +6,7 @@ The [[_SHR]] function is used to shift the bits of a numerical value to the righ :{{Parameter|result}} = [[_SHR]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|numericalVariable}} is the variable to shift the bits of and can be of the following types: [[INTEGER]], [[LONG]], [[_INTEGER64]], or [[_BYTE]]. * Integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} the number of places to shift the bits. @@ -19,8 +19,8 @@ The [[_SHR]] function is used to shift the bits of a numerical value to the righ * The type of variable used to store the results should match the type of the variable being shifted. * NOTE: When dealing with SIGNED variables, shifting the bits right will leave the sign bit set. This is due to how C++ deals with bit shifting under the hood. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -42,7 +42,7 @@ The [[_SHR]] function is used to shift the bits of a numerical value to the righ A~%% = 128 {{Cl|FOR}} I%% = 0 {{Cl|TO}} 8 {{Cl|PRINT}} {{Cl|_SHR}}(A~%%, I%%) -{{Cl|NEXT}} I%% +{{Cl|FOR...NEXT|NEXT}} I%% {{CodeEnd}} {{OutputStart}} 128 @@ -62,3 +62,4 @@ A~%% = 128 {{PageNavigation}} +< diff --git a/internal/help/_SNDBAL.txt b/internal/help/_SNDBAL.txt index bb452085a..9c4334106 100644 --- a/internal/help/_SNDBAL.txt +++ b/internal/help/_SNDBAL.txt @@ -6,7 +6,7 @@ The [[_SNDBAL]] statement attempts to set the balance or 3D position of a sound. : [[_SNDBAL]] {{Parameter|handle&}}[, {{Parameter|x!}}][, {{Parameter|y!}}][, {{Parameter|z!}}][, {{Parameter|channel&}}]] -{{PageParameters}} +{{Parameters}} * ''handle&'' is a valid sound handle created by the [[_SNDOPEN]] function. * {{Parameter|x!}} distance values go from left (negative) to right (positive). * {{Parameter|y!}} distance values go from below (negative) to above (positive). @@ -99,3 +99,4 @@ LOOP {{PageNavigation}} +< diff --git a/internal/help/_SNDCLOSE.txt b/internal/help/_SNDCLOSE.txt index 147e58ced..4c24220be 100644 --- a/internal/help/_SNDCLOSE.txt +++ b/internal/help/_SNDCLOSE.txt @@ -17,3 +17,4 @@ The [[_SNDCLOSE]] statement frees and unloads an open sound using a [[_SNDOPEN]] {{PageNavigation}} +< diff --git a/internal/help/_SNDCOPY.txt b/internal/help/_SNDCOPY.txt index 32d9afe3f..672fc7113 100644 --- a/internal/help/_SNDCOPY.txt +++ b/internal/help/_SNDCOPY.txt @@ -10,6 +10,7 @@ The [[_SNDCOPY]] function copies a sound to a new handle so that two or more of * Returns a new handle to the a copy in memory of the sound data referred to by the source handle. * No changes to the source handle (such as a volume change) are inherited. * The sound data referred to by the handle and its copies are not freed until all of them are closed. +* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"SYNC" capability]] to use this function. {{PageSeeAlso}} @@ -18,3 +19,4 @@ The [[_SNDCOPY]] function copies a sound to a new handle so that two or more of {{PageNavigation}} +< diff --git a/internal/help/_SNDGETPOS.txt b/internal/help/_SNDGETPOS.txt index ed5e039d8..c0bf59915 100644 --- a/internal/help/_SNDGETPOS.txt +++ b/internal/help/_SNDGETPOS.txt @@ -32,3 +32,4 @@ LOOP UNTIL {{Cl|_KEYDOWN}}(27) OR {{Cl|NOT}} {{Cl|_SNDPLAYING}}(SoundFile&) {{PageNavigation}} +< diff --git a/internal/help/_SNDLEN.txt b/internal/help/_SNDLEN.txt index 1d7ee3c53..d2a483f78 100644 --- a/internal/help/_SNDLEN.txt +++ b/internal/help/_SNDLEN.txt @@ -16,3 +16,4 @@ The [[_SNDLEN]] function returns the length in seconds of a loaded sound using a {{PageNavigation}} +< diff --git a/internal/help/_SNDLIMIT.txt b/internal/help/_SNDLIMIT.txt index 7e90df98e..e4f9f70ab 100644 --- a/internal/help/_SNDLIMIT.txt +++ b/internal/help/_SNDLIMIT.txt @@ -6,7 +6,7 @@ The [[_SNDLIMIT]] statement stops playing a sound after it has been playing for : [[_SNDLIMIT]] {{Parameter|handle&}}, {{Parameter|numberOfSeconds!}} -{{PageParameters}} +{{Parameters}} * The {{Parameter|handle&}} variable name is created using the [[_SNDOPEN]] function from a loaded sound file. * {{Parameter|numberOfSeconds!}} is a [[SINGLE]] value of seconds that the sound will play. @@ -28,3 +28,4 @@ The [[_SNDLIMIT]] statement stops playing a sound after it has been playing for {{PageNavigation}} +< diff --git a/internal/help/_SNDLOOP.txt b/internal/help/_SNDLOOP.txt index a1df18a9f..68c946b37 100644 --- a/internal/help/_SNDLOOP.txt +++ b/internal/help/_SNDLOOP.txt @@ -29,3 +29,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_SNDOPEN.txt b/internal/help/_SNDOPEN.txt index c9618876b..286b2efe4 100644 --- a/internal/help/_SNDOPEN.txt +++ b/internal/help/_SNDOPEN.txt @@ -10,11 +10,9 @@ The [[_SNDOPEN]] function loads a sound file into memory and returns a [[LONG]] * Returns a [[LONG]] {{Parameter|soundHandle&}} value to the sound file in memory. '''A zero value means the sound could not be loaded.''' * The literal or variable [[STRING]] sound {{Parameter|fileName$}} can be '''WAV, OGG or MP3''' file types. * '''Always check the handle value returned is greater than zero before attempting to play the sound.''' -** Make sure the variable is set to 0 before using _SNDOPEN. * The handle can be used by most of the _SND sound playing functions and statements in QB64 except [[_SNDPLAYFILE]] which plays a sound file directly from the disk and does not use a handle value. * Handles can be closed with [[_SNDCLOSE]] when the sound is no longer necessary. * If a WAV sound file won't play, try it using the Windows [[Windows_Libraries#Play_WAV_Sounds|Play WAV sounds library]] to check it or convert the sound file to OGG. -* The raw audio data can be accessed with [[_MEMSOUND]]. {{PageExamples}} @@ -107,7 +105,7 @@ LOOP * [[_SNDBAL]], [[_SNDLEN]], [[_SNDVOL]] * [[_SNDPLAYFILE]] {{text|(plays a named sound file directly and closes)}} * [[_SNDRAW]], [[_SNDRATE]], [[_SNDRAWLEN]] {{text|(raw sounds without files)}} -* [[_MEMSOUND]] {{PageNavigation}} +< diff --git a/internal/help/_SNDOPENRAW.txt b/internal/help/_SNDOPENRAW.txt index 22306d8d1..a7d04c3be 100644 --- a/internal/help/_SNDOPENRAW.txt +++ b/internal/help/_SNDOPENRAW.txt @@ -34,3 +34,4 @@ b = {{Cl|_SNDOPENRAW}} {{PageNavigation}} +< diff --git a/internal/help/_SNDPAUSE.txt b/internal/help/_SNDPAUSE.txt index fd294f997..6028a0050 100644 --- a/internal/help/_SNDPAUSE.txt +++ b/internal/help/_SNDPAUSE.txt @@ -17,3 +17,4 @@ The [[_SNDPAUSE]] statement pauses a sound using a handle from the [[_SNDOPEN]] {{PageNavigation}} +< diff --git a/internal/help/_SNDPAUSED.txt b/internal/help/_SNDPAUSED.txt index 0a5a165ed..0bfae7c6c 100644 --- a/internal/help/_SNDPAUSED.txt +++ b/internal/help/_SNDPAUSED.txt @@ -22,3 +22,4 @@ The [[_SNDPAUSED]] function checks if a sound is paused. Uses a handle parameter {{PageNavigation}} +< diff --git a/internal/help/_SNDPLAY.txt b/internal/help/_SNDPLAY.txt index fc0a58346..7bae6b459 100644 --- a/internal/help/_SNDPLAY.txt +++ b/internal/help/_SNDPLAY.txt @@ -22,3 +22,4 @@ The [[_SNDPLAY]] statement plays a sound designated by a file handle created by {{PageNavigation}} +< diff --git a/internal/help/_SNDPLAYCOPY.txt b/internal/help/_SNDPLAYCOPY.txt index 85ba5eae3..f93b5f0fb 100644 --- a/internal/help/_SNDPLAYCOPY.txt +++ b/internal/help/_SNDPLAYCOPY.txt @@ -6,7 +6,7 @@ The [[_SNDPLAYCOPY]] statement copies a sound, plays it, and automatically close : [[_SNDPLAYCOPY]] {{Parameter|handle&}}[, {{Parameter|volume!}}] -{{PageParameters}} +{{Parameters}} * The [[LONG]] {{Parameter|handle&}} value is returned by [[_SNDOPEN]] using a specific sound file. * The {{Parameter|volume!}} parameter can be any [[SINGLE]] value from 0 (no volume) to 1 (full volume). @@ -42,3 +42,4 @@ _SNDPLAYCOPY chomp&, 0.5 + RND * 0.49 '' '' {{PageNavigation}} +< diff --git a/internal/help/_SNDPLAYFILE.txt b/internal/help/_SNDPLAYFILE.txt index 0ca557bfb..c38f86f6a 100644 --- a/internal/help/_SNDPLAYFILE.txt +++ b/internal/help/_SNDPLAYFILE.txt @@ -29,3 +29,4 @@ The [[_SNDPLAYFILE]] statement is used to play a sound file without generating a {{PageNavigation}} +< diff --git a/internal/help/_SNDPLAYING.txt b/internal/help/_SNDPLAYING.txt index be8ab948f..495cce982 100644 --- a/internal/help/_SNDPLAYING.txt +++ b/internal/help/_SNDPLAYING.txt @@ -23,3 +23,4 @@ The [[_SNDPLAYING]] function returns whether a sound is being played. Uses a han {{PageNavigation}} +< diff --git a/internal/help/_SNDRATE.txt b/internal/help/_SNDRATE.txt index 2178c28fd..c3e0ec7b9 100644 --- a/internal/help/_SNDRATE.txt +++ b/internal/help/_SNDRATE.txt @@ -21,3 +21,4 @@ The [[_SNDRATE]] function returns the sample rate frequency per second of the cu {{PageNavigation}} +< diff --git a/internal/help/_SNDRAW.txt b/internal/help/_SNDRAW.txt index c6ce6ed3f..5544c0274 100644 --- a/internal/help/_SNDRAW.txt +++ b/internal/help/_SNDRAW.txt @@ -6,7 +6,7 @@ The [[_SNDRAW]] statement plays sound wave sample frequencies created by a progr : [[_SNDRAW]] {{Parameter|leftSample}}[, {{Parameter|rightSample}}][, {{Parameter|pipeHandle&}}] -{{PageParameters}} +{{Parameters}} * The {{Parameter|leftSample}} and {{Parameter|rightSample}} value(s) can be any [[SINGLE]] or [[DOUBLE]] literal or variable frequency value from -1.0 to 1.0. * The {{Parameter|pipeHandle&}} parameter refers to the sound pipe opened using [[_SNDOPENRAW]]. @@ -112,3 +112,4 @@ SndLoop! = 0 {{PageNavigation}} +< diff --git a/internal/help/_SNDRAWDONE.txt b/internal/help/_SNDRAWDONE.txt index 2931dc556..9d6142823 100644 --- a/internal/help/_SNDRAWDONE.txt +++ b/internal/help/_SNDRAWDONE.txt @@ -10,8 +10,8 @@ * Use to force playing small buffers of [[_SNDRAW]] data. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up''' {{PageSeeAlso}} @@ -22,3 +22,4 @@ {{PageNavigation}} +< diff --git a/internal/help/_SNDRAWLEN.txt b/internal/help/_SNDRAWLEN.txt index 52da43a6f..cfeeeb8a4 100644 --- a/internal/help/_SNDRAWLEN.txt +++ b/internal/help/_SNDRAWLEN.txt @@ -24,3 +24,4 @@ The [[_SNDRAWLEN]] function returns the length, in seconds, of a [[_SNDRAW]] sou {{PageNavigation}} +< diff --git a/internal/help/_SNDSETPOS.txt b/internal/help/_SNDSETPOS.txt index fe5d05923..5d365d568 100644 --- a/internal/help/_SNDSETPOS.txt +++ b/internal/help/_SNDSETPOS.txt @@ -31,3 +31,4 @@ LOOP UNTIL {{Cl|_KEYDOWN}}(27) OR {{Cl|NOT}} {{Cl|_SNDPLAYING}}(SoundFile&) {{PageNavigation}} +< diff --git a/internal/help/_SNDSTOP.txt b/internal/help/_SNDSTOP.txt index 81d6855a3..07d98ac00 100644 --- a/internal/help/_SNDSTOP.txt +++ b/internal/help/_SNDSTOP.txt @@ -22,3 +22,4 @@ The [[_SNDSTOP]] statement stops a playing or paused sound using a handle from t {{PageNavigation}} +< diff --git a/internal/help/_SNDVOL.txt b/internal/help/_SNDVOL.txt index d95629075..a339fb94b 100644 --- a/internal/help/_SNDVOL.txt +++ b/internal/help/_SNDVOL.txt @@ -24,3 +24,4 @@ h& = {{Cl|_SNDOPEN}}("bell.wav") {{PageNavigation}} +< diff --git a/internal/help/_SOURCE.txt b/internal/help/_SOURCE.txt index 6d611c533..50d22e6b3 100644 --- a/internal/help/_SOURCE.txt +++ b/internal/help/_SOURCE.txt @@ -42,3 +42,4 @@ See the examples in: {{PageNavigation}} +< diff --git a/internal/help/_SOURCE_(function).txt b/internal/help/_SOURCE_(function).txt index d10a6b571..dfa0fd255 100644 --- a/internal/help/_SOURCE_(function).txt +++ b/internal/help/_SOURCE_(function).txt @@ -24,3 +24,4 @@ See the examples in: {{PageNavigation}} +< diff --git a/internal/help/_STARTDIR$.txt b/internal/help/_STARTDIR$.txt index 7468d26aa..36eb82bfc 100644 --- a/internal/help/_STARTDIR$.txt +++ b/internal/help/_STARTDIR$.txt @@ -1,20 +1,16 @@ {{DISPLAYTITLE:_STARTDIR$}} -The [[_STARTDIR$]] function returns the user's working directory when the program was started. +The [[_STARTDIR$]] function returns the path a user called a QB64 program from. {{PageSyntax}} : {{Parameter|callPath$}} = [[_STARTDIR$]] {{PageDescription}} -The user's working directory depends on how the program was launched. Note that these are ultimately controlled by the launching environment, so might differ in non-standard setups. -* If the program was run from a graphical file manager, _STARTDIR$ will be the path to the directory of the binary file. -* If launched from the command line, _STARTDIR$ is the shell's current working directory, as manipulated by the 'cd' command. -* If launched via a shortcut on Windows _STARTDIR$ will be the "Start in" property, which defaults to the location of the shortcut's target file. +* Returns a [[STRING]] representing the user's program calling path. -The value of [[_STARTDIR$]] may differ from [[_CWD$]] even at program start, because QB64 program change their current directory to the binary's location. _STARTDIR$ is the directory inherited from the user's environment, while [[_CWD$]] will start off as the location of the program binary file. Because files are opened relative to [[_CWD$]], this can be useful for programs that expect to open e.g. graphical or sound assets, but problematic for programs that want to interpret paths supplied by the user as relative to the user's current directory. In the latter case, add a 'CHDIR _STARTDIR$' to the top of the program. This will change back to the working directory inherited from the environment. -{{PageAvailability}} -* Version 1.000 and up. +==Availability== +* '''Version 1.000 and up'''. {{PageExamples}} @@ -35,3 +31,4 @@ The value of [[_STARTDIR$]] may differ from [[_CWD$]] even at program start, bec {{PageNavigation}} +< diff --git a/internal/help/_STRCMP.txt b/internal/help/_STRCMP.txt index 3846b1d42..a1cac8117 100644 --- a/internal/help/_STRCMP.txt +++ b/internal/help/_STRCMP.txt @@ -20,3 +20,4 @@ The [[_STRCMP]] function compares the relationship between two strings, comparin {{PageNavigation}} +< diff --git a/internal/help/_STRICMP.txt b/internal/help/_STRICMP.txt index 5c4bc4082..25773407b 100644 --- a/internal/help/_STRICMP.txt +++ b/internal/help/_STRICMP.txt @@ -20,3 +20,4 @@ The [[_STRICMP]] function compares the relationship between two strings, ignorin {{PageNavigation}} +< diff --git a/internal/help/_TITLE$.txt b/internal/help/_TITLE$.txt index d27eb7853..fc29a7c1f 100644 --- a/internal/help/_TITLE$.txt +++ b/internal/help/_TITLE$.txt @@ -1,5 +1,5 @@ {{DISPLAYTITLE:_TITLE$}} -The [[_TITLE$]] function returns the program window's title-bar text as last set by the [[_TITLE]] statement. +The [[_TITLE$]] function returns the program title last set by the [[_TITLE]] statement. {{PageSyntax}} @@ -7,11 +7,11 @@ The [[_TITLE$]] function returns the program window's title-bar text as last set {{PageDescription}} -* The title bar will display "Untitled" if no title has been set and this function will return an empty [[STRING|string]] (""). +* If no title has been set, the title bar will say "Untitled" and this function will return an empty [[STRING|string]] (""). -{{PageAvailability}} -* Build 20170924/68 and up. +==Availability== +* '''Build 20170924/68.''' {{PageSeeAlso}} @@ -20,3 +20,4 @@ The [[_TITLE$]] function returns the program window's title-bar text as last set {{PageNavigation}} +< diff --git a/internal/help/_TITLE.txt b/internal/help/_TITLE.txt index 1f1c2e1d0..03aea4f1f 100644 --- a/internal/help/_TITLE.txt +++ b/internal/help/_TITLE.txt @@ -1,23 +1,24 @@ {{DISPLAYTITLE:_TITLE}} -The [[_TITLE]] statement sets the program window's title-bar text. +The [[_TITLE]] statement provides the program name in the title bar of the program window. {{PageSyntax}} : [[_TITLE]] {{Parameter|text$}} -{{PageParameters}} -* {{Parameter|text$}} can be any literal or variable [[STRING]] value. +{{Parameters}} +* {{Parameter|text$}} can be any literal or variable [[STRING]] or [[ASCII]] character value. {{PageDescription}} -* The title bar will display "Untitled" if a title is not set with this statement. -* The title of created [[$CONSOLE]] windows can be set using [[_CONSOLETITLE]]. -* Note: A [[_DELAY|delay]] may be required before the title can be set. See [[_SCREENEXISTS]]. +* The title can be changed anywhere in a program procedure. +* The title bar will say "Untitled" if a title is not set. +* Change the title of the [[$CONSOLE]] windows created using [[_CONSOLETITLE]] +* '''Note: A [[_DELAY|delay]] may be required before the title can be set.''' See [[_SCREENEXISTS]]. {{PageExamples}} -''Example 1:'' How to set the program window's title-bar text. +''Example 1:'' How to create the window title bar. {{CodeStart}} '' '' {{Cl|_TITLE}} "My New Program" '' '' {{CodeEnd}} @@ -34,25 +35,25 @@ The [[_TITLE]] statement sets the program window's title-bar text. {{Cl|FUNCTION}} TITLE$ '=== SHOW CURRENT PROGRAM - {{Cl|SHARED}} PATH$ - {{Cl|DECLARE LIBRARY}} 'Directory Information using KERNEL32 provided by Dav - {{Cl|FUNCTION}} GetModuleFileNameA ({{Cl|BYVAL}} Module {{Cl|AS}} {{Cl|LONG}}, FileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}}) - {{Cl|DECLARE LIBRARY|END DECLARE}} +{{Cl|SHARED}} PATH$ +{{Cl|DECLARE LIBRARY}} 'Directory Information using KERNEL32 provided by Dav + {{Cl|FUNCTION}} GetModuleFileNameA ({{Cl|BYVAL}} Module {{Cl|AS}} {{Cl|LONG}}, FileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}}) +{{Cl|DECLARE LIBRARY|END DECLARE}} - FileName$ = {{Cl|SPACE$}}(256) - Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$)) - {{Cl|IF...THEN|IF}} Result {{Cl|THEN}} - PATH$ = {{Cl|LEFT$}}(FileName$, Result) - start = 1 - {{Cl|DO}} - posit = {{Cl|INSTR}}(start, PATH$, "\") - {{Cl|IF...THEN|IF}} posit {{Cl|THEN}} last = posit - start = posit + 1 - {{Cl|LOOP}} {{Cl|UNTIL}} posit = 0 - TITLE$ = {{Cl|MID$}}(PATH$, last + 1) - PATH$ = {{Cl|LEFT$}}(PATH$, last) - {{Cl|ELSE}} TITLE$ = "": PATH$ = "" - {{Cl|END IF}} +FileName$ = {{Cl|SPACE$}}(256) +Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$)) +{{Cl|IF...THEN|IF}} Result {{Cl|THEN}} + PATH$ = {{Cl|LEFT$}}(FileName$, Result) + start = 1 + DO + posit = {{Cl|INSTR}}(start, PATH$, "\") + {{Cl|IF...THEN|IF}} posit {{Cl|THEN}} last = posit + start = posit + 1 + {{Cl|LOOP}} {{Cl|UNTIL}} posit = 0 + TITLE$ = {{Cl|MID$}}(PATH$, last + 1) + PATH$ = {{Cl|LEFT$}}(PATH$, last) +{{Cl|ELSE}} TITLE$ = "": PATH$ = "" +{{Cl|END IF}} {{Cl|END FUNCTION}} '' '' {{CodeEnd}} : ''Note:'' The actual module file name is returned. Not necessarily the Title value. The value returned can be used however. @@ -68,3 +69,4 @@ The [[_TITLE]] statement sets the program window's title-bar text. {{PageNavigation}} +< diff --git a/internal/help/_TOGGLEBIT.txt b/internal/help/_TOGGLEBIT.txt index 2cee60c6f..319220e37 100644 --- a/internal/help/_TOGGLEBIT.txt +++ b/internal/help/_TOGGLEBIT.txt @@ -6,7 +6,7 @@ The [[_TOGGLEBIT]] function is used to toggle a specified bit of a numerical val :{{Parameter|result}} = [[_TOGGLEBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}}) -{{PageParameters}} +{{Parameters}} * {{Parameter|numericalVariable}} is the variable to toggle the bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]]. * Integer values can be signed or [[_UNSIGNED]]. * {{Parameter|numericalValue}} the number of the bit to be set. @@ -17,8 +17,8 @@ The [[_TOGGLEBIT]] function is used to toggle a specified bit of a numerical val * A bit set to 1 is changed to 0 and a bit set to 0 is changed to 1. * Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on) -{{PageAvailability}} -* Version 1.4 and up. +==Availability== +* '''Version 1.4 and up'''. {{PageExamples}} @@ -44,3 +44,4 @@ A~%% = {{Cl|_TOGGLEBIT}}(A~%%,4) 'toggle the fourth bit of A~%% * [[_RESETBIT]], [[_READBIT]] {{PageNavigation}} +< diff --git a/internal/help/_TOTALDROPPEDFILES.txt b/internal/help/_TOTALDROPPEDFILES.txt index 4e5ae6089..e253fe4e4 100644 --- a/internal/help/_TOTALDROPPEDFILES.txt +++ b/internal/help/_TOTALDROPPEDFILES.txt @@ -14,8 +14,8 @@ The [[_TOTALDROPPEDFILES]] function returns the number of items (files or folder * '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''. -{{PageAvailability}} -* Version 1.3 and up. +==Availability== +* '''Version 1.3 and up'''. {{PageExamples}} @@ -27,3 +27,4 @@ The [[_TOTALDROPPEDFILES]] function returns the number of items (files or folder {{PageNavigation}} +< diff --git a/internal/help/_TRIM$.txt b/internal/help/_TRIM$.txt index 6f31a173c..64b19bf4b 100644 --- a/internal/help/_TRIM$.txt +++ b/internal/help/_TRIM$.txt @@ -36,3 +36,4 @@ text$ = {{Cl|SPACE$}}(10) + "some text" + {{Cl|SPACE$}}(10) {{PageNavigation}} +< diff --git a/internal/help/_UNSIGNED.txt b/internal/help/_UNSIGNED.txt index 7a78a3586..98e6e7d8b 100644 --- a/internal/help/_UNSIGNED.txt +++ b/internal/help/_UNSIGNED.txt @@ -19,8 +19,8 @@ <center>How negative values affect the [[_UNSIGNED]] value returned by a [[_BYTE]] (8 bits). </center> {{WhiteStart}} - 00000001 - unsigned & signed are both 1     - 01111111 - unsigned & signed are both 127   + 00000001 - unsigned & signed are both 1 + 01111111 - unsigned & signed are both 127 11111111 - unsigned is 255 but signed is -1 11111110 - unsigned is 254 but signed is -2 11111101 - unsigned is 253 but signed is -3 @@ -87,3 +87,4 @@ i~% = 70000 {{PageNavigation}} +< diff --git a/internal/help/_WHEEL.txt b/internal/help/_WHEEL.txt index a2081dd36..a513cc0d1 100644 --- a/internal/help/_WHEEL.txt +++ b/internal/help/_WHEEL.txt @@ -68,3 +68,4 @@ DO: {{Cl|_LIMIT}} 30 'main loop {{PageNavigation}} +< diff --git a/internal/help/_WIDTH_(function).txt b/internal/help/_WIDTH_(function).txt index f7f6b8763..c8591291c 100644 --- a/internal/help/_WIDTH_(function).txt +++ b/internal/help/_WIDTH_(function).txt @@ -47,3 +47,4 @@ The [[_WIDTH (function)|_WIDTH]] function returns the width of an image handle o {{PageNavigation}} +< diff --git a/internal/help/_WINDOWHANDLE.txt b/internal/help/_WINDOWHANDLE.txt index 0deb932a9..10c640a60 100644 --- a/internal/help/_WINDOWHANDLE.txt +++ b/internal/help/_WINDOWHANDLE.txt @@ -3,17 +3,17 @@ The [[_WINDOWHANDLE]] function returns the window handle assigned to the current {{PageSyntax}} -: {{Parameter|hwnd%&}} = [[_WINDOWHANDLE]] +: {{Parameter|hwnd&&}} = [[_WINDOWHANDLE]] {{PageDescription}} -* The result is an [[_OFFSET]] number assigned by Windows to your running program. +* The result is an [[_INTEGER64]] number assigned by Windows to your running program. * Use it to make [[Windows Libraries|API calls]] that require a window handle to be passed. * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. -{{PageAvailability}} -* Build 20170924/68 and up. +==Availability== +* '''Build 20170924/68'''. {{PageExamples}} @@ -49,7 +49,7 @@ The [[_WINDOWHANDLE]] function returns the window handle assigned to the current '---------------------------------------------------------------------------------------- {{Cl|DECLARE LIBRARY|DECLARE DYNAMIC LIBRARY}} "user32" -{{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|_OFFSET}}, Message {{Cl|AS}} {{Cl|STRING}}, Title {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} MBType {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}}) +{{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|LONG}}, Message {{Cl|AS}} {{Cl|STRING}}, Title {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} MBType {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}}) {{Cl|DECLARE LIBRARY|END DECLARE}} DO @@ -94,3 +94,4 @@ MsgBox& = MessageBoxA&({{Cl|_WINDOWHANDLE}}, Message$, Title$, BoxType&a {{PageNavigation}} +< diff --git a/internal/help/_WINDOWHASFOCUS.txt b/internal/help/_WINDOWHASFOCUS.txt index 02401178d..58fe26e17 100644 --- a/internal/help/_WINDOWHASFOCUS.txt +++ b/internal/help/_WINDOWHASFOCUS.txt @@ -11,8 +11,8 @@ The [[_WINDOWHASFOCUS]] function returns true (-1) if the current program's wind * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in macOS]]. -{{PageAvailability}} -* Build 20170924/68 and up. +==Availability== +* '''Build 20170924/68'''. {{PageExamples}} @@ -40,3 +40,4 @@ DO {{PageNavigation}} +< diff --git a/internal/help/_glAccum.txt b/internal/help/_glAccum.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glAccum.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glAlphaFunc.txt b/internal/help/_glAlphaFunc.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glAlphaFunc.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glAreTexturesResident.txt b/internal/help/_glAreTexturesResident.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glAreTexturesResident.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glArrayElement.txt b/internal/help/_glArrayElement.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glArrayElement.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glBegin.txt b/internal/help/_glBegin.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glBegin.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glBindTexture.txt b/internal/help/_glBindTexture.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glBindTexture.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glBitmap.txt b/internal/help/_glBitmap.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glBitmap.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glBlendFunc.txt b/internal/help/_glBlendFunc.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glBlendFunc.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCallList.txt b/internal/help/_glCallList.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCallList.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCallLists.txt b/internal/help/_glCallLists.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCallLists.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClear.txt b/internal/help/_glClear.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClear.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClearAccum.txt b/internal/help/_glClearAccum.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClearAccum.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClearColor.txt b/internal/help/_glClearColor.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClearColor.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClearDepth.txt b/internal/help/_glClearDepth.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClearDepth.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClearIndex.txt b/internal/help/_glClearIndex.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClearIndex.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClearStencil.txt b/internal/help/_glClearStencil.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClearStencil.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glClipPlane.txt b/internal/help/_glClipPlane.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glClipPlane.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3b.txt b/internal/help/_glColor3b.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3b.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3bv.txt b/internal/help/_glColor3bv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3bv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3d.txt b/internal/help/_glColor3d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3dv.txt b/internal/help/_glColor3dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3f.txt b/internal/help/_glColor3f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3fv.txt b/internal/help/_glColor3fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3i.txt b/internal/help/_glColor3i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3iv.txt b/internal/help/_glColor3iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3s.txt b/internal/help/_glColor3s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3sv.txt b/internal/help/_glColor3sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3ub.txt b/internal/help/_glColor3ub.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3ub.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3ubv.txt b/internal/help/_glColor3ubv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3ubv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3ui.txt b/internal/help/_glColor3ui.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3ui.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3uiv.txt b/internal/help/_glColor3uiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3uiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3us.txt b/internal/help/_glColor3us.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3us.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor3usv.txt b/internal/help/_glColor3usv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor3usv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4b.txt b/internal/help/_glColor4b.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4b.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4bv.txt b/internal/help/_glColor4bv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4bv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4d.txt b/internal/help/_glColor4d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4dv.txt b/internal/help/_glColor4dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4f.txt b/internal/help/_glColor4f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4fv.txt b/internal/help/_glColor4fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4i.txt b/internal/help/_glColor4i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4iv.txt b/internal/help/_glColor4iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4s.txt b/internal/help/_glColor4s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4sv.txt b/internal/help/_glColor4sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4ub.txt b/internal/help/_glColor4ub.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4ub.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4ubv.txt b/internal/help/_glColor4ubv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4ubv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4ui.txt b/internal/help/_glColor4ui.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4ui.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4uiv.txt b/internal/help/_glColor4uiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4uiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4us.txt b/internal/help/_glColor4us.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4us.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColor4usv.txt b/internal/help/_glColor4usv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColor4usv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColorMask.txt b/internal/help/_glColorMask.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColorMask.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColorMaterial.txt b/internal/help/_glColorMaterial.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColorMaterial.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glColorPointer.txt b/internal/help/_glColorPointer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glColorPointer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCopyPixels.txt b/internal/help/_glCopyPixels.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCopyPixels.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCopyTexImage1D.txt b/internal/help/_glCopyTexImage1D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCopyTexImage1D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCopyTexImage2D.txt b/internal/help/_glCopyTexImage2D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCopyTexImage2D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCopyTexSubImage1D.txt b/internal/help/_glCopyTexSubImage1D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCopyTexSubImage1D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCopyTexSubImage2D.txt b/internal/help/_glCopyTexSubImage2D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCopyTexSubImage2D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glCullFace.txt b/internal/help/_glCullFace.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glCullFace.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDeleteLists.txt b/internal/help/_glDeleteLists.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDeleteLists.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDeleteTextures.txt b/internal/help/_glDeleteTextures.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDeleteTextures.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDepthFunc.txt b/internal/help/_glDepthFunc.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDepthFunc.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDepthMask.txt b/internal/help/_glDepthMask.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDepthMask.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDepthRange.txt b/internal/help/_glDepthRange.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDepthRange.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDisable.txt b/internal/help/_glDisable.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDisable.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDisableClientState.txt b/internal/help/_glDisableClientState.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDisableClientState.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDrawArrays.txt b/internal/help/_glDrawArrays.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDrawArrays.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDrawBuffer.txt b/internal/help/_glDrawBuffer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDrawBuffer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDrawElements.txt b/internal/help/_glDrawElements.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDrawElements.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glDrawPixels.txt b/internal/help/_glDrawPixels.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glDrawPixels.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEdgeFlag.txt b/internal/help/_glEdgeFlag.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEdgeFlag.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEdgeFlagPointer.txt b/internal/help/_glEdgeFlagPointer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEdgeFlagPointer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEdgeFlagv.txt b/internal/help/_glEdgeFlagv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEdgeFlagv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEnable.txt b/internal/help/_glEnable.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEnable.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEnableClientState.txt b/internal/help/_glEnableClientState.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEnableClientState.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEnd.txt b/internal/help/_glEnd.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEnd.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEndList.txt b/internal/help/_glEndList.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEndList.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord1d.txt b/internal/help/_glEvalCoord1d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord1d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord1dv.txt b/internal/help/_glEvalCoord1dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord1dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord1f.txt b/internal/help/_glEvalCoord1f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord1f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord1fv.txt b/internal/help/_glEvalCoord1fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord1fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord2d.txt b/internal/help/_glEvalCoord2d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord2d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord2dv.txt b/internal/help/_glEvalCoord2dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord2dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord2f.txt b/internal/help/_glEvalCoord2f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord2f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalCoord2fv.txt b/internal/help/_glEvalCoord2fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalCoord2fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalMesh1.txt b/internal/help/_glEvalMesh1.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalMesh1.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalMesh2.txt b/internal/help/_glEvalMesh2.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalMesh2.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalPoint1.txt b/internal/help/_glEvalPoint1.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalPoint1.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glEvalPoint2.txt b/internal/help/_glEvalPoint2.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glEvalPoint2.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFeedbackBuffer.txt b/internal/help/_glFeedbackBuffer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFeedbackBuffer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFinish.txt b/internal/help/_glFinish.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFinish.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFlush.txt b/internal/help/_glFlush.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFlush.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFogf.txt b/internal/help/_glFogf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFogf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFogfv.txt b/internal/help/_glFogfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFogfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFogi.txt b/internal/help/_glFogi.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFogi.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFogiv.txt b/internal/help/_glFogiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFogiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFrontFace.txt b/internal/help/_glFrontFace.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFrontFace.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glFrustum.txt b/internal/help/_glFrustum.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glFrustum.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGenLists.txt b/internal/help/_glGenLists.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGenLists.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGenTextures.txt b/internal/help/_glGenTextures.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGenTextures.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetBooleanv.txt b/internal/help/_glGetBooleanv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetBooleanv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetClipPlane.txt b/internal/help/_glGetClipPlane.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetClipPlane.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetDoublev.txt b/internal/help/_glGetDoublev.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetDoublev.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetError.txt b/internal/help/_glGetError.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetError.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetFloatv.txt b/internal/help/_glGetFloatv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetFloatv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetIntegerv.txt b/internal/help/_glGetIntegerv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetIntegerv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetLightfv.txt b/internal/help/_glGetLightfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetLightfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetLightiv.txt b/internal/help/_glGetLightiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetLightiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetMapdv.txt b/internal/help/_glGetMapdv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetMapdv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetMapfv.txt b/internal/help/_glGetMapfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetMapfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetMapiv.txt b/internal/help/_glGetMapiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetMapiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetMaterialfv.txt b/internal/help/_glGetMaterialfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetMaterialfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetMaterialiv.txt b/internal/help/_glGetMaterialiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetMaterialiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetPixelMapfv.txt b/internal/help/_glGetPixelMapfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetPixelMapfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetPixelMapuiv.txt b/internal/help/_glGetPixelMapuiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetPixelMapuiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetPixelMapusv.txt b/internal/help/_glGetPixelMapusv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetPixelMapusv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetPointerv.txt b/internal/help/_glGetPointerv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetPointerv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetPolygonStipple.txt b/internal/help/_glGetPolygonStipple.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetPolygonStipple.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetString.txt b/internal/help/_glGetString.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetString.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexEnvfv.txt b/internal/help/_glGetTexEnvfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexEnvfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexEnviv.txt b/internal/help/_glGetTexEnviv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexEnviv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexGendv.txt b/internal/help/_glGetTexGendv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexGendv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexGenfv.txt b/internal/help/_glGetTexGenfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexGenfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexGeniv.txt b/internal/help/_glGetTexGeniv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexGeniv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexImage.txt b/internal/help/_glGetTexImage.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexImage.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexLevelParameterfv.txt b/internal/help/_glGetTexLevelParameterfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexLevelParameterfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexLevelParameteriv.txt b/internal/help/_glGetTexLevelParameteriv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexLevelParameteriv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexParameterfv.txt b/internal/help/_glGetTexParameterfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexParameterfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glGetTexParameteriv.txt b/internal/help/_glGetTexParameteriv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glGetTexParameteriv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glHint.txt b/internal/help/_glHint.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glHint.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexMask.txt b/internal/help/_glIndexMask.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexMask.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexPointer.txt b/internal/help/_glIndexPointer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexPointer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexd.txt b/internal/help/_glIndexd.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexd.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexdv.txt b/internal/help/_glIndexdv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexdv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexf.txt b/internal/help/_glIndexf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexfv.txt b/internal/help/_glIndexfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexi.txt b/internal/help/_glIndexi.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexi.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexiv.txt b/internal/help/_glIndexiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexs.txt b/internal/help/_glIndexs.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexs.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexsv.txt b/internal/help/_glIndexsv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexsv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexub.txt b/internal/help/_glIndexub.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexub.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIndexubv.txt b/internal/help/_glIndexubv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIndexubv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glInitNames.txt b/internal/help/_glInitNames.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glInitNames.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glInterleavedArrays.txt b/internal/help/_glInterleavedArrays.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glInterleavedArrays.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIsEnabled.txt b/internal/help/_glIsEnabled.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIsEnabled.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIsList.txt b/internal/help/_glIsList.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIsList.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glIsTexture.txt b/internal/help/_glIsTexture.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glIsTexture.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightModelf.txt b/internal/help/_glLightModelf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightModelf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightModelfv.txt b/internal/help/_glLightModelfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightModelfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightModeli.txt b/internal/help/_glLightModeli.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightModeli.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightModeliv.txt b/internal/help/_glLightModeliv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightModeliv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightf.txt b/internal/help/_glLightf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightfv.txt b/internal/help/_glLightfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLighti.txt b/internal/help/_glLighti.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLighti.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLightiv.txt b/internal/help/_glLightiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLightiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLineStipple.txt b/internal/help/_glLineStipple.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLineStipple.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLineWidth.txt b/internal/help/_glLineWidth.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLineWidth.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glListBase.txt b/internal/help/_glListBase.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glListBase.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLoadIdentity.txt b/internal/help/_glLoadIdentity.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLoadIdentity.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLoadMatrixd.txt b/internal/help/_glLoadMatrixd.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLoadMatrixd.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLoadMatrixf.txt b/internal/help/_glLoadMatrixf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLoadMatrixf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLoadName.txt b/internal/help/_glLoadName.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLoadName.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glLogicOp.txt b/internal/help/_glLogicOp.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glLogicOp.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMap1d.txt b/internal/help/_glMap1d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMap1d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMap1f.txt b/internal/help/_glMap1f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMap1f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMap2d.txt b/internal/help/_glMap2d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMap2d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMap2f.txt b/internal/help/_glMap2f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMap2f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMapGrid1d.txt b/internal/help/_glMapGrid1d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMapGrid1d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMapGrid1f.txt b/internal/help/_glMapGrid1f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMapGrid1f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMapGrid2d.txt b/internal/help/_glMapGrid2d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMapGrid2d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMapGrid2f.txt b/internal/help/_glMapGrid2f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMapGrid2f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMaterialf.txt b/internal/help/_glMaterialf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMaterialf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMaterialfv.txt b/internal/help/_glMaterialfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMaterialfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMateriali.txt b/internal/help/_glMateriali.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMateriali.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMaterialiv.txt b/internal/help/_glMaterialiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMaterialiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMatrixMode.txt b/internal/help/_glMatrixMode.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMatrixMode.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMultMatrixd.txt b/internal/help/_glMultMatrixd.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMultMatrixd.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glMultMatrixf.txt b/internal/help/_glMultMatrixf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glMultMatrixf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNewList.txt b/internal/help/_glNewList.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNewList.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3b.txt b/internal/help/_glNormal3b.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3b.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3bv.txt b/internal/help/_glNormal3bv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3bv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3d.txt b/internal/help/_glNormal3d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3dv.txt b/internal/help/_glNormal3dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3f.txt b/internal/help/_glNormal3f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3fv.txt b/internal/help/_glNormal3fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3i.txt b/internal/help/_glNormal3i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3iv.txt b/internal/help/_glNormal3iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3s.txt b/internal/help/_glNormal3s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormal3sv.txt b/internal/help/_glNormal3sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormal3sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glNormalPointer.txt b/internal/help/_glNormalPointer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glNormalPointer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glOrtho.txt b/internal/help/_glOrtho.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glOrtho.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPassThrough.txt b/internal/help/_glPassThrough.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPassThrough.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelMapfv.txt b/internal/help/_glPixelMapfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelMapfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelMapuiv.txt b/internal/help/_glPixelMapuiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelMapuiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelMapusv.txt b/internal/help/_glPixelMapusv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelMapusv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelStoref.txt b/internal/help/_glPixelStoref.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelStoref.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelStorei.txt b/internal/help/_glPixelStorei.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelStorei.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelTransferf.txt b/internal/help/_glPixelTransferf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelTransferf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelTransferi.txt b/internal/help/_glPixelTransferi.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelTransferi.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPixelZoom.txt b/internal/help/_glPixelZoom.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPixelZoom.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPointSize.txt b/internal/help/_glPointSize.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPointSize.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPolygonMode.txt b/internal/help/_glPolygonMode.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPolygonMode.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPolygonOffset.txt b/internal/help/_glPolygonOffset.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPolygonOffset.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPolygonStipple.txt b/internal/help/_glPolygonStipple.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPolygonStipple.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPopAttrib.txt b/internal/help/_glPopAttrib.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPopAttrib.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPopClientAttrib.txt b/internal/help/_glPopClientAttrib.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPopClientAttrib.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPopMatrix.txt b/internal/help/_glPopMatrix.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPopMatrix.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPopName.txt b/internal/help/_glPopName.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPopName.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPrioritizeTextures.txt b/internal/help/_glPrioritizeTextures.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPrioritizeTextures.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPushAttrib.txt b/internal/help/_glPushAttrib.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPushAttrib.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPushClientAttrib.txt b/internal/help/_glPushClientAttrib.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPushClientAttrib.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPushMatrix.txt b/internal/help/_glPushMatrix.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPushMatrix.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glPushName.txt b/internal/help/_glPushName.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glPushName.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2d.txt b/internal/help/_glRasterPos2d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2dv.txt b/internal/help/_glRasterPos2dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2f.txt b/internal/help/_glRasterPos2f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2fv.txt b/internal/help/_glRasterPos2fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2i.txt b/internal/help/_glRasterPos2i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2iv.txt b/internal/help/_glRasterPos2iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2s.txt b/internal/help/_glRasterPos2s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos2sv.txt b/internal/help/_glRasterPos2sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos2sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3d.txt b/internal/help/_glRasterPos3d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3dv.txt b/internal/help/_glRasterPos3dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3f.txt b/internal/help/_glRasterPos3f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3fv.txt b/internal/help/_glRasterPos3fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3i.txt b/internal/help/_glRasterPos3i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3iv.txt b/internal/help/_glRasterPos3iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3s.txt b/internal/help/_glRasterPos3s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos3sv.txt b/internal/help/_glRasterPos3sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos3sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4d.txt b/internal/help/_glRasterPos4d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4dv.txt b/internal/help/_glRasterPos4dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4f.txt b/internal/help/_glRasterPos4f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4fv.txt b/internal/help/_glRasterPos4fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4i.txt b/internal/help/_glRasterPos4i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4iv.txt b/internal/help/_glRasterPos4iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4s.txt b/internal/help/_glRasterPos4s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRasterPos4sv.txt b/internal/help/_glRasterPos4sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRasterPos4sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glReadBuffer.txt b/internal/help/_glReadBuffer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glReadBuffer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glReadPixels.txt b/internal/help/_glReadPixels.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glReadPixels.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRectd.txt b/internal/help/_glRectd.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRectd.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRectdv.txt b/internal/help/_glRectdv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRectdv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRectf.txt b/internal/help/_glRectf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRectf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRectfv.txt b/internal/help/_glRectfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRectfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRecti.txt b/internal/help/_glRecti.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRecti.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRectiv.txt b/internal/help/_glRectiv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRectiv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRects.txt b/internal/help/_glRects.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRects.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRectsv.txt b/internal/help/_glRectsv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRectsv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRenderMode.txt b/internal/help/_glRenderMode.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRenderMode.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRotated.txt b/internal/help/_glRotated.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRotated.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glRotatef.txt b/internal/help/_glRotatef.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glRotatef.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glScaled.txt b/internal/help/_glScaled.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glScaled.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glScalef.txt b/internal/help/_glScalef.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glScalef.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glScissor.txt b/internal/help/_glScissor.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glScissor.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glSelectBuffer.txt b/internal/help/_glSelectBuffer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glSelectBuffer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glShadeModel.txt b/internal/help/_glShadeModel.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glShadeModel.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glStencilFunc.txt b/internal/help/_glStencilFunc.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glStencilFunc.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glStencilMask.txt b/internal/help/_glStencilMask.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glStencilMask.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glStencilOp.txt b/internal/help/_glStencilOp.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glStencilOp.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1d.txt b/internal/help/_glTexCoord1d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1dv.txt b/internal/help/_glTexCoord1dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1f.txt b/internal/help/_glTexCoord1f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1fv.txt b/internal/help/_glTexCoord1fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1i.txt b/internal/help/_glTexCoord1i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1iv.txt b/internal/help/_glTexCoord1iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1s.txt b/internal/help/_glTexCoord1s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord1sv.txt b/internal/help/_glTexCoord1sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord1sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2d.txt b/internal/help/_glTexCoord2d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2dv.txt b/internal/help/_glTexCoord2dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2f.txt b/internal/help/_glTexCoord2f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2fv.txt b/internal/help/_glTexCoord2fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2i.txt b/internal/help/_glTexCoord2i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2iv.txt b/internal/help/_glTexCoord2iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2s.txt b/internal/help/_glTexCoord2s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord2sv.txt b/internal/help/_glTexCoord2sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord2sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3d.txt b/internal/help/_glTexCoord3d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3dv.txt b/internal/help/_glTexCoord3dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3f.txt b/internal/help/_glTexCoord3f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3fv.txt b/internal/help/_glTexCoord3fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3i.txt b/internal/help/_glTexCoord3i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3iv.txt b/internal/help/_glTexCoord3iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3s.txt b/internal/help/_glTexCoord3s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord3sv.txt b/internal/help/_glTexCoord3sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord3sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4d.txt b/internal/help/_glTexCoord4d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4dv.txt b/internal/help/_glTexCoord4dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4f.txt b/internal/help/_glTexCoord4f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4fv.txt b/internal/help/_glTexCoord4fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4i.txt b/internal/help/_glTexCoord4i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4iv.txt b/internal/help/_glTexCoord4iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4s.txt b/internal/help/_glTexCoord4s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoord4sv.txt b/internal/help/_glTexCoord4sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoord4sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexCoordPointer.txt b/internal/help/_glTexCoordPointer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexCoordPointer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexEnvf.txt b/internal/help/_glTexEnvf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexEnvf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexEnvfv.txt b/internal/help/_glTexEnvfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexEnvfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexEnvi.txt b/internal/help/_glTexEnvi.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexEnvi.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexEnviv.txt b/internal/help/_glTexEnviv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexEnviv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexGend.txt b/internal/help/_glTexGend.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexGend.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexGendv.txt b/internal/help/_glTexGendv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexGendv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexGenf.txt b/internal/help/_glTexGenf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexGenf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexGenfv.txt b/internal/help/_glTexGenfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexGenfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexGeni.txt b/internal/help/_glTexGeni.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexGeni.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexGeniv.txt b/internal/help/_glTexGeniv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexGeniv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexImage1D.txt b/internal/help/_glTexImage1D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexImage1D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexImage2D.txt b/internal/help/_glTexImage2D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexImage2D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexParameterf.txt b/internal/help/_glTexParameterf.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexParameterf.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexParameterfv.txt b/internal/help/_glTexParameterfv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexParameterfv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexParameteri.txt b/internal/help/_glTexParameteri.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexParameteri.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexParameteriv.txt b/internal/help/_glTexParameteriv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexParameteriv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexSubImage1D.txt b/internal/help/_glTexSubImage1D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexSubImage1D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTexSubImage2D.txt b/internal/help/_glTexSubImage2D.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTexSubImage2D.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTranslated.txt b/internal/help/_glTranslated.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTranslated.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glTranslatef.txt b/internal/help/_glTranslatef.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glTranslatef.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2d.txt b/internal/help/_glVertex2d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2dv.txt b/internal/help/_glVertex2dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2f.txt b/internal/help/_glVertex2f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2fv.txt b/internal/help/_glVertex2fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2i.txt b/internal/help/_glVertex2i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2iv.txt b/internal/help/_glVertex2iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2s.txt b/internal/help/_glVertex2s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex2sv.txt b/internal/help/_glVertex2sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex2sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3d.txt b/internal/help/_glVertex3d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3dv.txt b/internal/help/_glVertex3dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3f.txt b/internal/help/_glVertex3f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3fv.txt b/internal/help/_glVertex3fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3i.txt b/internal/help/_glVertex3i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3iv.txt b/internal/help/_glVertex3iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3s.txt b/internal/help/_glVertex3s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex3sv.txt b/internal/help/_glVertex3sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex3sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4d.txt b/internal/help/_glVertex4d.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4d.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4dv.txt b/internal/help/_glVertex4dv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4dv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4f.txt b/internal/help/_glVertex4f.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4f.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4fv.txt b/internal/help/_glVertex4fv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4fv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4i.txt b/internal/help/_glVertex4i.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4i.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4iv.txt b/internal/help/_glVertex4iv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4iv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4s.txt b/internal/help/_glVertex4s.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4s.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertex4sv.txt b/internal/help/_glVertex4sv.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertex4sv.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glVertexPointer.txt b/internal/help/_glVertexPointer.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glVertexPointer.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/_glViewport.txt b/internal/help/_glViewport.txt new file mode 100644 index 000000000..931841834 --- /dev/null +++ b/internal/help/_glViewport.txt @@ -0,0 +1 @@ +< diff --git a/internal/help/links.bin b/internal/help/links.bin index 10ab72061..850720663 100644 --- a/internal/help/links.bin +++ b/internal/help/links.bin @@ -1,573 +1,927 @@ -_ACCEPTFILEDROP,_ACCEPTFILEDROP -_ACOS,_ACOS -_ACOSH,_ACOSH -_ALLOWFULLSCREEN,_ALLOWFULLSCREEN -_ALPHA,_ALPHA -_ALPHA32,_ALPHA32 -_ARCCOT,Mathematical_Operations -_ARCCSC,Mathematical_Operations -_ARCSEC,Mathematical_Operations -_ASIN,_ASIN -_ASINH,_ASINH -_ASSERT,_ASSERT -$ASSERTS,$ASSERTS -_ATAN2,_ATAN2 -_ATANH,_ATANH -_AUTODISPLAY,_AUTODISPLAY -_AUTODISPLAY,_AUTODISPLAY (function) -_AXIS,_AXIS -_BACKGROUNDCOLOR,_BACKGROUNDCOLOR -_BIT,_BIT -_BLEND,_BLEND -_BLEND,_BLEND (function) -_BLINK,_BLINK -_BLINK,_BLINK (function) -_BLUE,_BLUE -_BLUE32,_BLUE32 -_BUTTON,_BUTTON -_BUTTONCHANGE,_BUTTONCHANGE -_BYTE,_BYTE -_CAPSLOCK,_CAPSLOCK (function) -_CAPSLOCK,_CAPSLOCK -$CHECKING,$CHECKING -_CEIL,_CEIL -_CINP,_CINP -_CLEARCOLOR,_CLEARCOLOR (function) -_CLEARCOLOR,_CLEARCOLOR -_CLIP,_CLIP -_CLIPBOARD$,_CLIPBOARD$ -_CLIPBOARD$,_CLIPBOARD$ (statement) -_CLIPBOARDIMAGE,_CLIPBOARDIMAGE (function) -_CLIPBOARDIMAGE,_CLIPBOARDIMAGE -$COLOR,$COLOR -_COMMANDCOUNT,_COMMANDCOUNT -_CONNECTED,_CONNECTED -_CONNECTIONADDRESS$,_CONNECTIONADDRESS$ -$CONSOLE,$CONSOLE -_CONSOLE,_CONSOLE -_CONSOLEINPUT,_CONSOLEINPUT -_CONSOLETITLE,_CONSOLETITLE -_CONTINUE,_CONTINUE -_CONTROLCHR,_CONTROLCHR -_CONTROLCHR,_CONTROLCHR (function) -_COPYIMAGE,_COPYIMAGE -_COPYPALETTE,_COPYPALETTE -_COT,Mathematical_Operations -_COTH,Mathematical_Operations -_COSH,Mathematical_Operations -_CSC,Mathematical_Operations -_CSCH,Mathematical_Operations -_CV,_CV -_CWD$,_CWD$ -_D2G,_D2G -_D2R,_D2R -DECLARE,DECLARE LIBRARY -DECLARE,DECLARE DYNAMIC LIBRARY -$DEBUG,$DEBUG -_DEFAULTCOLOR,_DEFAULTCOLOR -_DEFINE,_DEFINE -_DEFLATE$,_DEFLATE$ -_DELAY,_DELAY -_DEPTHBUFFER,_DEPTHBUFFER -_DESKTOPHEIGHT,_DESKTOPHEIGHT -_DESKTOPWIDTH,_DESKTOPWIDTH -_DEST,_DEST -_DEST,_DEST (function) -_DEVICE$,_DEVICE$ -_DEVICEINPUT,_DEVICEINPUT -_DEVICES,_DEVICES -_DIR$,_DIR$ -_DIREXISTS,_DIREXISTS -_DISPLAY,_DISPLAY -_DISPLAY,_DISPLAY (function) -_DISPLAYORDER,_DISPLAYORDER -_DONTBLEND,_DONTBLEND -_DONTWAIT,_DONTWAIT -_DROPPEDFILE,_DROPPEDFILE -_ECHO,_ECHO -$ELSE,$ELSE -$ELSEIF,$ELSEIF -$END,$END IF -_ENVIRONCOUNT,_ENVIRONCOUNT -$ERROR,$ERROR -_ERRORLINE,_ERRORLINE -_ERRORMESSAGE$,_ERRORMESSAGE$ -$EXEICON,$EXEICON -_EXIT,_EXIT (function) -_FILEEXISTS,_FILEEXISTS -_FINISHDROP,_FINISHDROP -_FLOAT,_FLOAT -_FONT,_FONT -_FONT,_FONT (function) -_FONTHEIGHT,_FONTHEIGHT -_FONTWIDTH,_FONTWIDTH -_FREEFONT,_FREEFONT -_FREEIMAGE,_FREEIMAGE -_FREETIMER,_FREETIMER -_FULLSCREEN,_FULLSCREEN -_FULLSCREEN,_FULLSCREEN (function) -_G2D,_G2D -_G2R,_G2R -_GREEN,_GREEN -_GREEN32,_GREEN32 -_HEIGHT,_HEIGHT -_HIDE,_HIDE -_HYPOT,_HYPOT -$IF,$IF -_ICON,_ICON -_INCLERRORFILE$,_INCLERRORFILE$ -_INCLERRORLINE,_INCLERRORLINE -_INFLATE$,_INFLATE$ -_INSTRREV,_INSTRREV -_INTEGER64,_INTEGER64 -_KEYCLEAR,_KEYCLEAR -_KEYDOWN,_KEYDOWN -_KEYHIT,_KEYHIT -$LET,$LET -_LASTAXIS,_LASTAXIS -_LASTBUTTON,_LASTBUTTON -_LASTWHEEL,_LASTWHEEL -_LIMIT,_LIMIT -_LOADFONT,_LOADFONT -_LOADIMAGE,_LOADIMAGE -_MAPTRIANGLE,_MAPTRIANGLE -_MAPUNICODE,_MAPUNICODE -_MAPUNICODE,_MAPUNICODE (function) -_MEM,_MEM (function) -_MEM,_MEM -_MEMCOPY,_MEMCOPY -_MEMELEMENT,_MEMELEMENT -_MEMEXISTS,_MEMEXISTS -_MEMFILL,_MEMFILL -_MEMFREE,_MEMFREE -_MEMGET,_MEMGET -_MEMGET,_MEMGET (function) -_MEMIMAGE,_MEMIMAGE -_MEMNEW,_MEMNEW -_MEMPUT,_MEMPUT -_MEMSOUND,_MEMSOUND -_MIDDLE,_SCREENMOVE -_SCREENMOVE,_SCREENMOVE -_MK$,_MK$ -_MOUSEBUTTON,_MOUSEBUTTON -_MOUSEHIDE,_MOUSEHIDE -_MOUSEINPUT,_MOUSEINPUT -_MOUSEMOVE,_MOUSEMOVE -_MOUSEMOVEMENTX,_MOUSEMOVEMENTX -_MOUSEMOVEMENTY,_MOUSEMOVEMENTY -_MOUSESHOW,_MOUSESHOW -_MOUSEWHEEL,_MOUSEWHEEL -_MOUSEX,_MOUSEX -_MOUSEY,_MOUSEY -_NEWIMAGE,_NEWIMAGE -$NOPREFIX,$NOPREFIX -_NUMLOCK,_NUMLOCK (function) -_NUMLOCK,_NUMLOCK -_OFFSET,_OFFSET (function) -_OFFSET,_OFFSET -_OPENCLIENT,_OPENCLIENT -_OPENCONNECTION,_OPENCONNECTION -_OPENHOST,_OPENHOST -OPTION,OPTION _EXPLICIT -OPTION,OPTION _EXPLICITARRAY -_OS$,_OS$ -_PALETTECOLOR,_PALETTECOLOR -_PALETTECOLOR,_PALETTECOLOR (function) -_PI,_PI -_PIXELSIZE,_PIXELSIZE -_PRESERVE,_PRESERVE -_PRINTIMAGE,_PRINTIMAGE -_PRINTMODE,_PRINTMODE -_PRINTMODE,_PRINTMODE (function) -_PRINTSTRING,_PRINTSTRING -_PRINTWIDTH,_PRINTWIDTH -_PUTIMAGE,_PUTIMAGE -_R2D,_R2D -_R2G,_R2G -_RED,_RED -_RED32,_RED32 -_READBIT,_READBIT -_RESETBIT,_RESETBIT -$RESIZE,$RESIZE -_RESIZE,_RESIZE -_RESIZE,_RESIZE (function) -_RESIZEHEIGHT,_RESIZEHEIGHT -_RESIZEWIDTH,_RESIZEWIDTH -_RGB,_RGB -_RGB32,_RGB32 -_RGBA,_RGBA -_RGBA32,_RGBA32 -_ROUND,_ROUND -_SCREENCLICK,_SCREENCLICK -_SCREENEXISTS,_SCREENEXISTS -$SCREENHIDE,$SCREENHIDE -_SCREENHIDE,_SCREENHIDE -_SCREENICON,_SCREENICON (function) -_SCREENICON,_SCREENICON -_SCREENIMAGE,_SCREENIMAGE -_SCREENMOVE,_SCREENMOVE -_SCREENPRINT,_SCREENPRINT -$SCREENSHOW,$SCREENSHOW -_SCREENSHOW,_SCREENSHOW -_SCREENX,_SCREENX -_SCREENY,_SCREENY -_SCROLLLOCK,_SCROLLLOCK (function) -_SCROLLLOCK,_SCROLLLOCK -_SETALPHA,_SETALPHA -_SETBIT,_SETBIT -_SHELLHIDE,_SHELLHIDE -_SHL,_SHL -_SHR,_SHR -_SINH,Mathematical_Operations -_SNDBAL,_SNDBAL -_SNDCLOSE,_SNDCLOSE -_SNDCOPY,_SNDCOPY -_SNDGETPOS,_SNDGETPOS -_SNDLEN,_SNDLEN -_SNDLIMIT,_SNDLIMIT -_SNDLOOP,_SNDLOOP -_SNDOPEN,_SNDOPEN -_SNDOPENRAW,_SNDOPENRAW -_SNDPAUSE,_SNDPAUSE -_SNDPAUSED,_SNDPAUSED -_SNDPLAY,_SNDPLAY -_SNDPLAYCOPY,_SNDPLAYCOPY -_SNDPLAYFILE,_SNDPLAYFILE -_SNDPLAYING,_SNDPLAYING -_SNDRATE,_SNDRATE -_SNDRAW,_SNDRAW -_SNDRAWDONE,_SNDRAWDONE -_SNDRAWLEN,_SNDRAWLEN -_SNDSETPOS,_SNDSETPOS -_SNDSTOP,_SNDSTOP -_SNDVOL,_SNDVOL -_SOURCE,_SOURCE -_SOURCE,_SOURCE (function) -_STARTDIR$,_STARTDIR$ -_STRCMP,_STRCMP -_STRICMP,_STRICMP -_TANH,Mathematical_Operations -_TITLE,_TITLE -_TITLE$,_TITLE$ -_TOGGLEBIT,_TOGGLEBIT -_TOTALDROPPEDFILES,_TOTALDROPPEDFILES -_TRIM$,_TRIM$ -_UNSIGNED,_UNSIGNED -$VERSIONINFO,$VERSIONINFO -$VIRTUALKEYBOARD,$VIRTUALKEYBOARD -_WHEEL,_WHEEL -_WIDTH,_WIDTH (function) -_WINDOWHANDLE,_WINDOWHANDLE -_WINDOWHASFOCUS,_WINDOWHASFOCUS -ABS,ABS -ABSOLUTE,CALL ABSOLUTE -CALL,CALL ABSOLUTE -ACCESS,ACCESS -ALIAS,ALIAS -AND,AND -AND,AND (boolean) -APPEND,APPEND -AS,AS -ASC,ASC -ASC,ASC (statement) -ATN,ATN -BEEP,BEEP -BINARY,BINARY -BLOAD,BLOAD -BSAVE,BSAVE -BYVAL,BYVAL -CALL,CALL -CALL,CALL ABSOLUTE -CASE,CASE -CASE,CASE ELSE -CASE,CASE IS -CHAIN,CHAIN -CHDIR,CHDIR -CHR$,CHR$ -CINT,CINT -CIRCLE,CIRCLE -CLEAR,CLEAR -CLNG,CLNG -CLOSE,CLOSE -CLS,CLS -COLOR,COLOR -COMMAND$,COMMAND$ -COMMON,COMMON -CONST,CONST -COS,COS -CSNG,CSNG -CSRLIN,CSRLIN -CVD,CVD -CVDMBF,CVDMBF -CVI,CVI -CVL,CVL -CVS,CVS -CVSMBF,CVSMBF -DATA,DATA -DATE$,DATE$ -DECLARE,DECLARE LIBRARY -DECLARE,DECLARE DYNAMIC LIBRARY -DEF,DEF SEG -DEFDBL,DEFDBL -DEFINT,DEFINT -DEFLNG,DEFLNG -DEFSNG,DEFSNG -DEFSTR,DEFSTR -DIM,DIM -LOOP,DO...LOOP -DO,DO...LOOP -LOOP,DO...LOOP -DOUBLE,DOUBLE -DRAW,DRAW -$DYNAMIC,$DYNAMIC -ELSE,ELSE -ELSEIF,ELSEIF -END,END -END,IF...THEN -THEN,IF...THEN -IF,IF...THEN -ENVIRON,ENVIRON -ENVIRON$,ENVIRON$ -EOF,EOF -EQV,EQV -ERASE,ERASE -ERL,ERL -ERR,ERR -ERROR,ERROR -EXIT,EXIT -EXP,EXP -FIELD,FIELD -FILES,FILES -FIX,FIX -NEXT,FOR...NEXT -FOR,FOR...NEXT -NEXT,FOR...NEXT -FOR,FOR (file statement) -FREE,TIMER (statement) -TIMER,TIMER (statement) -FREEFILE,FREEFILE -FUNCTION,FUNCTION -GET,GET -GET,GET (TCP/IP statement) -GET,GET (graphics statement) -GOSUB,GOSUB -GOTO,GOTO -HEX$,HEX$ -THEN,IF...THEN -IF,IF...THEN -THEN,IF...THEN -IMP,IMP -$INCLUDE,$INCLUDE -INKEY$,INKEY$ -INP,INP -INPUT,INPUT -INPUT,INPUT (file mode) -INPUT,INPUT (file statement) -INPUT$,INPUT$ -INSTR,INSTR -INT,INT -INTEGER,INTEGER -INTERRUPT,INTERRUPT -INTERRUPTX,INTERRUPTX -KEY,KEY n -KEY,KEY(n) -KEY,KEY LIST -KILL,KILL -LBOUND,LBOUND -LCASE$,LCASE$ -LEFT$,LEFT$ -LEN,LEN -LET,LET -LINE,LINE -LINE,LINE INPUT -LINE,LINE INPUT (file statement) -LIST,KEY LIST -KEY,KEY LIST -LOC,LOC -LOCATE,LOCATE -LOCK,LOCK -LOF,LOF -LOG,LOG -LONG,LONG -LOOP,DO...LOOP -LOOP,DO...LOOP -DO,DO...LOOP -LPOS,LPOS -LPRINT,LPRINT -LPRINT,LPRINT USING -LSET,LSET -LTRIM$,LTRIM$ -MID$,MID$ -MID$,MID$ (statement) -MKD$,MKD$ -MKDIR,MKDIR -MKDMBF$,MKDMBF$ -MKI$,MKI$ -MKL$,MKL$ -MKS$,MKS$ -MKSMBF$,MKSMBF$ -MOD,MOD -NAME,NAME -NEXT,NEXT -NOT,NOT -OCT$,OCT$ -OFF,OFF -ON,ON ERROR -ON,ON KEY(n) -ON,ON STRIG(n) -ON,ON TIMER(n) -GOSUB,ON...GOSUB -ON,ON...GOSUB -GOSUB,ON...GOSUB -GOTO,ON...GOTO -ON,ON...GOTO -GOTO,ON...GOTO -OPEN,OPEN -OPEN,OPEN COM -OPTION,OPTION BASE -OR,OR -OR,OR (boolean) -OUT,OUT -OUTPUT,OUTPUT -PAINT,PAINT -PALETTE,PALETTE -PALETTE,PALETTE USING -PCOPY,PCOPY -PEEK,PEEK -PLAY,PLAY -PMAP,PMAP -POINT,POINT -POKE,POKE -POS,POS -PRESET,PRESET -PRINT,PRINT -PRINT,PRINT (file statement) -PRINT,PRINT USING -PRINT,PRINT USING (file statement) -PSET,PSET -PUT,PUT -PUT,PUT (TCP/IP statement) -PUT,PUT (graphics statement) -RANDOM,RANDOM -RANDOMIZE,RANDOMIZE -RANDOMIZE,RANDOMIZE -READ,READ -REDIM,REDIM -REM,REM -RESET,RESET -RESTORE,RESTORE -RESUME,RESUME -RETURN,RETURN -RIGHT$,RIGHT$ -RMDIR,RMDIR -RND,RND -RSET,RSET -RTRIM$,RTRIM$ -RUN,RUN -SADD,SADD -SCREEN,SCREEN (function) -SCREEN,SCREEN -SEEK,SEEK -SEEK,SEEK (statement) -SELECT,SELECT CASE -SGN,SGN -SHARED,SHARED -SHELL,SHELL -SHELL,SHELL (function) -SIN,SIN -SINGLE,SINGLE -SLEEP,SLEEP -SOUND,SOUND -SPACE$,SPACE$ -SPC,SPC -SQR,SQR -STATIC,STATIC -$STATIC,$STATIC -STEP,STEP -STICK,STICK -STOP,STOP -STR$,STR$ -STRIG,STRIG -STRIG,STRIG(n) -STRING,STRING -STRING$,STRING$ -SUB,SUB -SWAP,SWAP -SYSTEM,SYSTEM -TAB,TAB -TAN,TAN -THEN,THEN -TIME$,TIME$ -TIMER,TIMER -TIMER,TIMER (statement) -TO,TO -TYPE,TYPE -UBOUND,UBOUND -UCASE$,UCASE$ -UNLOCK,UNLOCK -UNTIL,UNTIL -VAL,VAL -VARPTR,VARPTR -VARPTR$,VARPTR$ -VARSEG,VARSEG -VIEW,VIEW -VIEW,VIEW PRINT -WAIT,WAIT -WEND,WEND -WHILE,WHILE -WEND,WHILE...WEND -WHILE,WHILE...WEND -WEND,WHILE...WEND -WIDTH,WIDTH -WINDOW,WINDOW -WRITE,WRITE -WRITE,WRITE (file statement) -XOR,XOR -;,Semicolon -",Quotation mark -?,Question mark -',Apostrophe -:,Colon -$,Dollar_Sign -,Parenthesis -+,+ -",Quotation mark -_,Underscore -$,STRING -STRING,STRING -!,SINGLE -SINGLE,SINGLE -#,DOUBLE -DOUBLE,DOUBLE -##,_FLOAT -_FLOAT,_FLOAT -~,_UNSIGNED -_UNSIGNED,_UNSIGNED -%,INTEGER -INTEGER,INTEGER -&,LONG -LONG,LONG -&&,_INTEGER64 -_INTEGER64,_INTEGER64 -`,_BIT -_BIT,_BIT -%%,_BYTE -_BYTE,_BYTE -%&,_OFFSET -_OFFSET,_OFFSET -&B,&B -&O,&O -&H,&H -+,+ --,- -*,* -/,/ -\,\ -^,^ -MOD,MOD -=,Equal -<>,Not_Equal ->,Greater_Than -<,Less_Than ->=,Greater_Than_Or_Equal -<=,Less_Than_Or_Equal +_ACCEPTFILEDROP,_ACCEPTFILEDROP +_ACOS,_ACOS +_ACOSH,_ACOSH +_ALLOWFULLSCREEN,_ALLOWFULLSCREEN +_ALPHA,_ALPHA +_ALPHA32,_ALPHA32 +_ARCCOT,Mathematical_Operations +_ARCCSC,Mathematical_Operations +_ARCSEC,Mathematical_Operations +_ASIN,_ASIN +_ASINH,_ASINH +_ASSERT,_ASSERT +$ASSERTS,$ASSERTS +_ATAN2,_ATAN2 +_ATANH,_ATANH +_AUTODISPLAY,_AUTODISPLAY +_AUTODISPLAY,_AUTODISPLAY (function) +_AXIS,_AXIS +_BACKGROUNDCOLOR,_BACKGROUNDCOLOR +_BIT,_BIT +_BLEND,_BLEND +_BLEND,_BLEND (function) +_BLINK,_BLINK +_BLINK,_BLINK (function) +_BLUE,_BLUE +_BLUE32,_BLUE32 +_BUTTON,_BUTTON +_BUTTONCHANGE,_BUTTONCHANGE +_BYTE,_BYTE +_CAPSLOCK,_CAPSLOCK (function) +_CAPSLOCK,_CAPSLOCK +$CHECKING,$CHECKING +_CEIL,_CEIL +_CINP,_CINP +_CLEARCOLOR,_CLEARCOLOR (function) +_CLEARCOLOR,_CLEARCOLOR +_CLIP,_CLIP +_CLIPBOARD$,_CLIPBOARD$ +_CLIPBOARD$,_CLIPBOARD$ (statement) +_CLIPBOARDIMAGE,_CLIPBOARDIMAGE (function) +_CLIPBOARDIMAGE,_CLIPBOARDIMAGE +$COLOR,$COLOR +_COMMANDCOUNT,_COMMANDCOUNT +_CONNECTED,_CONNECTED +_CONNECTIONADDRESS$,_CONNECTIONADDRESS$ +$CONSOLE,$CONSOLE +_CONSOLE,_CONSOLE +_CONSOLEINPUT,_CONSOLEINPUT +_CONSOLETITLE,_CONSOLETITLE +_CONTINUE,_CONTINUE +_CONTROLCHR,_CONTROLCHR +_CONTROLCHR,_CONTROLCHR (function) +_COPYIMAGE,_COPYIMAGE +_COPYPALETTE,_COPYPALETTE +_COT,Mathematical_Operations +_COTH,Mathematical_Operations +_COSH,Mathematical_Operations +_CSC,Mathematical_Operations +_CSCH,Mathematical_Operations +_CV,_CV +_CWD$,_CWD$ +_D2G,_D2G +_D2R,_D2R +DECLARE,DECLARE LIBRARY +DECLARE,DECLARE DYNAMIC LIBRARY +_DEFAULTCOLOR,_DEFAULTCOLOR +_DEFINE,_DEFINE +_DEFLATE$,_DEFLATE$ +_DELAY,_DELAY +_DEPTHBUFFER,_DEPTHBUFFER +_DESKTOPHEIGHT,_DESKTOPHEIGHT +_DESKTOPWIDTH,_DESKTOPWIDTH +_DEST,_DEST +_DEST,_DEST (function) +_DEVICE$,_DEVICE$ +_DEVICEINPUT,_DEVICEINPUT +_DEVICES,_DEVICES +_DIR$,_DIR$ +_DIREXISTS,_DIREXISTS +_DISPLAY,_DISPLAY +_DISPLAY,_DISPLAY (function) +_DISPLAYORDER,_DISPLAYORDER +_DONTBLEND,_DONTBLEND +_DONTWAIT,_DONTWAIT +_DROPPEDFILE,_DROPPEDFILE +_ECHO,_ECHO +$ELSE,$ELSE +$ELSEIF,$ELSEIF +$END,$END IF +_ERRORLINE,_ERRORLINE +$EXEICON,$EXEICON +_EXIT,_EXIT (function) +_FILEEXISTS,_FILEEXISTS +_FINISHDROP,_FINISHDROP +_FLOAT,_FLOAT +_FONT,_FONT +_FONT,_FONT (function) +_FONTHEIGHT,_FONTHEIGHT +_FONTWIDTH,_FONTWIDTH +_FREEFONT,_FREEFONT +_FREEIMAGE,_FREEIMAGE +_FREETIMER,_FREETIMER +_FULLSCREEN,_FULLSCREEN +_FULLSCREEN,_FULLSCREEN (function) +_G2D,_G2D +_G2R,_G2R +_GREEN,_GREEN +_GREEN32,_GREEN32 +_HEIGHT,_HEIGHT +_HIDE,_HIDE +_HYPOT,_HYPOT +$IF,$IF +_ICON,_ICON +_INCLERRORFILE$,_INCLERRORFILE$ +_INCLERRORLINE,_INCLERRORLINE +_INFLATE$,_INFLATE$ +_INSTRREV,_INSTRREV +_INTEGER64,_INTEGER64 +_KEYCLEAR,_KEYCLEAR +_KEYHIT,_KEYHIT +_KEYDOWN,_KEYDOWN +$LET,$LET +_LASTAXIS,_LASTAXIS +_LASTBUTTON,_LASTBUTTON +_LASTWHEEL,_LASTWHEEL +_LIMIT,_LIMIT +_LOADFONT,_LOADFONT +_LOADIMAGE,_LOADIMAGE +_MAPTRIANGLE,_MAPTRIANGLE +_MAPUNICODE,_MAPUNICODE +_MAPUNICODE,_MAPUNICODE (function) +_MEM,_MEM (function) +_MEM,_MEM +_MEMCOPY,_MEMCOPY +_MEMELEMENT,_MEMELEMENT +_MEMEXISTS,_MEMEXISTS +_MEMFILL,_MEMFILL +_MEMFREE,_MEMFREE +_MEMGET,_MEMGET +_MEMGET,_MEMGET (function) +_MEMIMAGE,_MEMIMAGE +_MEMNEW,_MEMNEW +_MEMPUT,_MEMPUT +_MIDDLE,_SCREENMOVE +_SCREENMOVE,_SCREENMOVE +_MK$,_MK$ +_MOUSEBUTTON,_MOUSEBUTTON +_MOUSEHIDE,_MOUSEHIDE +_MOUSEINPUT,_MOUSEINPUT +_MOUSEMOVE,_MOUSEMOVE +_MOUSEMOVEMENTX,_MOUSEMOVEMENTX +_MOUSEMOVEMENTY,_MOUSEMOVEMENTY +_MOUSEPIPEOPEN,_MOUSEPIPEOPEN +_MOUSESHOW,_MOUSESHOW +_MOUSEWHEEL,_MOUSEWHEEL +_MOUSEX,_MOUSEX +_MOUSEY,_MOUSEY +_NEWIMAGE,_NEWIMAGE +$NOPREFIX,$NOPREFIX +_NUMLOCK,_NUMLOCK (function) +_NUMLOCK,_NUMLOCK +_OFFSET,_OFFSET (function) +_OFFSET,_OFFSET +_OPENCLIENT,_OPENCLIENT +_OPENCONNECTION,_OPENCONNECTION +_OPENHOST,_OPENHOST +OPTION,OPTION _EXPLICIT +OPTION,OPTION _EXPLICITARRAY +_OS$,_OS$ +_PALETTECOLOR,_PALETTECOLOR +_PALETTECOLOR,_PALETTECOLOR (function) +_PI,_PI +_PIXELSIZE,_PIXELSIZE +_PRESERVE,_PRESERVE +_PRINTIMAGE,_PRINTIMAGE +_PRINTMODE,_PRINTMODE +_PRINTMODE,_PRINTMODE (function) +_PRINTSTRING,_PRINTSTRING +_PRINTWIDTH,_PRINTWIDTH +_PUTIMAGE,_PUTIMAGE +_R2D,_R2D +_R2G,_R2G +_RED,_RED +_RED32,_RED32 +_READBIT,_READBIT +_RESETBIT,_RESETBIT +$RESIZE,$RESIZE +_RESIZE,_RESIZE +_RESIZE,_RESIZE (function) +_RESIZEHEIGHT,_RESIZEHEIGHT +_RESIZEWIDTH,_RESIZEWIDTH +_RGB,_RGB +_RGB32,_RGB32 +_RGBA,_RGBA +_RGBA32,_RGBA32 +_ROUND,_ROUND +_SCREENCLICK,_SCREENCLICK +_SCREENEXISTS,_SCREENEXISTS +$SCREENHIDE,$SCREENHIDE +_SCREENHIDE,_SCREENHIDE +_SCREENICON,_SCREENICON (function) +_SCREENICON,_SCREENICON +_SCREENIMAGE,_SCREENIMAGE +_SCREENMOVE,_SCREENMOVE +_SCREENPRINT,_SCREENPRINT +$SCREENSHOW,$SCREENSHOW +_SCREENSHOW,_SCREENSHOW +_SCREENX,_SCREENX +_SCREENY,_SCREENY +_SCROLLLOCK,_SCROLLLOCK (function) +_SCROLLLOCK,_SCROLLLOCK +_SETALPHA,_SETALPHA +_SETBIT,_SETBIT +_SHELLHIDE,_SHELLHIDE +_SHL,_SHL +_SHR,_SHR +_SINH,Mathematical_Operations +_SNDBAL,_SNDBAL +_SNDCLOSE,_SNDCLOSE +_SNDCOPY,_SNDCOPY +_SNDGETPOS,_SNDGETPOS +_SNDLEN,_SNDLEN +_SNDLIMIT,_SNDLIMIT +_SNDLOOP,_SNDLOOP +_SNDOPEN,_SNDOPEN +_SNDOPENRAW,_SNDOPENRAW +_SNDPAUSE,_SNDPAUSE +_SNDPAUSED,_SNDPAUSED +_SNDPLAY,_SNDPLAY +_SNDPLAYCOPY,_SNDPLAYCOPY +_SNDPLAYFILE,_SNDPLAYFILE +_SNDPLAYING,_SNDPLAYING +_SNDRATE,_SNDRATE +_SNDRAW,_SNDRAW +_SNDRAWDONE,_SNDRAWDONE +_SNDRAWLEN,_SNDRAWLEN +_SNDSETPOS,_SNDSETPOS +_SNDSTOP,_SNDSTOP +_SNDVOL,_SNDVOL +_SOURCE,_SOURCE +_SOURCE,_SOURCE (function) +_STARTDIR$,_STARTDIR$ +_STRCMP,_STRCMP +_STRICMP,_STRICMP +_TANH,Mathematical_Operations +_TITLE,_TITLE +_TITLE$,_TITLE$ +_TOGGLEBIT,_TOGGLEBIT +_TOTALDROPPEDFILES,_TOTALDROPPEDFILES +_TRIM$,_TRIM$ +_UNSIGNED,_UNSIGNED +$VERSIONINFO,$VERSIONINFO +$VIRTUALKEYBOARD,$VIRTUALKEYBOARD +_WHEEL,_WHEEL +_WIDTH,_WIDTH (function) +_WINDOWHANDLE,_WINDOWHANDLE +_WINDOWHASFOCUS,_WINDOWHASFOCUS +ABS,ABS +ABSOLUTE,CALL ABSOLUTE +CALL,CALL ABSOLUTE +ACCESS,ACCESS +ALIAS,ALIAS +AND,AND +AND,AND (boolean) +APPEND,APPEND +AS,AS +ASC,ASC +ASC,ASC (statement) +ATN,ATN +BEEP,BEEP +BINARY,BINARY +BLOAD,BLOAD +BSAVE,BSAVE +BYVAL,BYVAL +CALL,CALL +CALL,CALL ABSOLUTE +CALLS,CALLS +CASE,CASE +CASE,CASE ELSE +CASE,CASE IS +CDBL,CDBL +CDECL,CDECL +CHAIN,CHAIN +CHDIR,CHDIR +CHR$,CHR$ +CINT,CINT +CIRCLE,CIRCLE +CLEAR,CLEAR +CLNG,CLNG +CLOSE,CLOSE +CLS,CLS +COLOR,COLOR +COMMAND$,COMMAND$ +COMMON,COMMON +CONST,CONST +COS,COS +CSNG,CSNG +CSRLIN,CSRLIN +CVD,CVD +CVDMBF,CVDMBF +CVI,CVI +CVL,CVL +CVS,CVS +CVSMBF,CVSMBF +DATA,DATA +DATE$,DATE$ +DATE$,DATE$ (statement) +DECLARE,DECLARE (non-BASIC statement) +DECLARE,DECLARE LIBRARY +DECLARE,DECLARE DYNAMIC LIBRARY +DEF,DEF SEG +DEFDBL,DEFDBL +DEFINT,DEFINT +DEFLNG,DEFLNG +DEFSNG,DEFSNG +DEFSTR,DEFSTR +DIM,DIM +LOOP,DO...LOOP +DO,DO...LOOP +LOOP,DO...LOOP +DOUBLE,DOUBLE +DRAW,DRAW +$DYNAMIC,$DYNAMIC +ELSE,ELSE +ELSEIF,ELSEIF +END,END +END,IF...THEN +THEN,IF...THEN +IF,IF...THEN +ENVIRON,ENVIRON +ENVIRON$,ENVIRON$ +EOF,EOF +EQV,EQV +ERASE,ERASE +ERDEV,ERDEV +ERDEV$,ERDEV$ +ERL,ERL +ERR,ERR +ERROR,ERROR +EXIT,EXIT +EXP,EXP +FIELD,FIELD +FILEATTR,FILEATTR +FILES,FILES +FIX,FIX +NEXT,FOR...NEXT +FOR,FOR...NEXT +NEXT,FOR...NEXT +FOR,FOR (file statement) +FRE,FRE +FREE,TIMER (statement) +TIMER,TIMER (statement) +FREEFILE,FREEFILE +FUNCTION,FUNCTION +GET,GET +GET,GET (TCP/IP statement) +GET,GET (graphics statement) +GOSUB,GOSUB +GOTO,GOTO +HEX$,HEX$ +THEN,IF...THEN +IF,IF...THEN +THEN,IF...THEN +IMP,IMP +$INCLUDE,$INCLUDE +INKEY$,INKEY$ +INP,INP +INPUT,INPUT +INPUT,INPUT (file mode) +INPUT,INPUT (file statement) +INPUT$,INPUT$ +INSTR,INSTR +INT,INT +INTEGER,INTEGER +INTERRUPT,INTERRUPT +INTERRUPTX,INTERRUPTX +IOCTL,IOCTL +IOCTL$,IOCTL$ +KEY,KEY n +KEY,KEY(n) +KEY,KEY LIST +KILL,KILL +LBOUND,LBOUND +LCASE$,LCASE$ +LEFT$,LEFT$ +LEN,LEN +LET,LET +LINE,LINE +LINE,LINE INPUT +LINE,LINE INPUT (file statement) +LIST,KEY LIST +KEY,KEY LIST +LOC,LOC +LOCATE,LOCATE +LOCK,LOCK +LOF,LOF +LOG,LOG +LONG,LONG +LOOP,DO...LOOP +LOOP,DO...LOOP +DO,DO...LOOP +LPOS,LPOS +LPRINT,LPRINT +LPRINT,LPRINT USING +LSET,LSET +LTRIM$,LTRIM$ +MID$,MID$ +MID$,MID$ (statement) +MKD$,MKD$ +MKDIR,MKDIR +MKDMBF$,MKDMBF$ +MKI$,MKI$ +MKL$,MKL$ +MKS$,MKS$ +MKSMBF$,MKSMBF$ +MOD,MOD +NAME,NAME +NEXT,NEXT +NOT,NOT +OCT$,OCT$ +OFF,OFF +ON,ON COM(n) +ON,ON ERROR +ON,ON KEY(n) +ON,ON PEN +ON,ON PLAY(n) +ON,ON STRIG(n) +ON,ON TIMER(n) +ON,ON UEVENT +GOSUB,ON...GOSUB +ON,ON...GOSUB +GOSUB,ON...GOSUB +GOTO,ON...GOTO +ON,ON...GOTO +GOTO,ON...GOTO +OPEN,OPEN +OPEN,OPEN COM +OPTION,OPTION BASE +OR,OR +OR,OR (boolean) +OUT,OUT +OUTPUT,OUTPUT +PAINT,PAINT +PALETTE,PALETTE +PALETTE,PALETTE USING +PCOPY,PCOPY +PEEK,PEEK +PEN,PEN +PEN,PEN (statement) +PLAY,PLAY(n) +PLAY,PLAY +PMAP,PMAP +POINT,POINT +POKE,POKE +POS,POS +PRESET,PRESET +PRINT,PRINT +PRINT,PRINT (file statement) +PRINT,PRINT USING +PRINT,PRINT USING (file statement) +PSET,PSET +PUT,PUT +PUT,PUT (TCP/IP statement) +PUT,PUT (graphics statement) +RANDOM,RANDOM +RANDOMIZE,RANDOMIZE +RANDOMIZE,RANDOMIZE +READ,READ +REDIM,REDIM +REM,REM +RESET,RESET +RESTORE,RESTORE +RESUME,RESUME +RETURN,RETURN +RIGHT$,RIGHT$ +RMDIR,RMDIR +RND,RND +RSET,RSET +RTRIM$,RTRIM$ +RUN,RUN +SADD,SADD +SCREEN,SCREEN (function) +SCREEN,SCREEN +SEEK,SEEK +SEEK,SEEK (statement) +SELECT,SELECT CASE +SETMEM,SETMEM +SGN,SGN +SHARED,SHARED +SHELL,SHELL +SHELL,SHELL (function) +SIGNAL,SIGNAL +SIN,SIN +SINGLE,SINGLE +SLEEP,SLEEP +SOUND,SOUND +SPACE$,SPACE$ +SPC,SPC +SQR,SQR +STATIC,STATIC +$STATIC,$STATIC +STEP,STEP +STICK,STICK +STOP,STOP +STR$,STR$ +STRIG,STRIG +STRIG,STRIG(n) +STRING,STRING +STRING$,STRING$ +SUB,SUB +SWAP,SWAP +SYSTEM,SYSTEM +TAB,TAB +TAN,TAN +THEN,THEN +TIME$,TIME$ +TIMER,TIMER +TIMER,TIMER (statement) +TO,TO +TYPE,TYPE +UBOUND,UBOUND +UCASE$,UCASE$ +UEVENT,UEVENT +UNLOCK,UNLOCK +UNTIL,UNTIL +VAL,VAL +VARPTR,VARPTR +VARPTR$,VARPTR$ +VARSEG,VARSEG +VIEW,VIEW +VIEW,VIEW PRINT +WAIT,WAIT +WEND,WEND +WHILE,WHILE +WEND,WHILE...WEND +WHILE,WHILE...WEND +WEND,WHILE...WEND +WIDTH,WIDTH +WINDOW,WINDOW +WRITE,WRITE +WRITE,WRITE (file statement) +XOR,XOR +_glAccum,_glAccum +_glAlphaFunc,_glAlphaFunc +_glAreTexturesResident,_glAreTexturesResident +_glArrayElement,_glArrayElement +_glBegin,_glBegin +_glBindTexture,_glBindTexture +_glBitmap,_glBitmap +_glBlendFunc,_glBlendFunc +_glCallList,_glCallList +_glCallLists,_glCallLists +_glClear,_glClear +_glClearAccum,_glClearAccum +_glClearColor,_glClearColor +_glClearDepth,_glClearDepth +_glClearIndex,_glClearIndex +_glClearStencil,_glClearStencil +_glClipPlane,_glClipPlane +_glColor3b,_glColor3b +_glColor3bv,_glColor3bv +_glColor3d,_glColor3d +_glColor3dv,_glColor3dv +_glColor3f,_glColor3f +_glColor3fv,_glColor3fv +_glColor3i,_glColor3i +_glColor3iv,_glColor3iv +_glColor3s,_glColor3s +_glColor3sv,_glColor3sv +_glColor3ub,_glColor3ub +_glColor3ubv,_glColor3ubv +_glColor3ui,_glColor3ui +_glColor3uiv,_glColor3uiv +_glColor3us,_glColor3us +_glColor3usv,_glColor3usv +_glColor4b,_glColor4b +_glColor4bv,_glColor4bv +_glColor4d,_glColor4d +_glColor4dv,_glColor4dv +_glColor4f,_glColor4f +_glColor4fv,_glColor4fv +_glColor4i,_glColor4i +_glColor4iv,_glColor4iv +_glColor4s,_glColor4s +_glColor4sv,_glColor4sv +_glColor4ub,_glColor4ub +_glColor4ubv,_glColor4ubv +_glColor4ui,_glColor4ui +_glColor4uiv,_glColor4uiv +_glColor4us,_glColor4us +_glColor4usv,_glColor4usv +_glColorMask,_glColorMask +_glColorMaterial,_glColorMaterial +_glColorPointer,_glColorPointer +_glCopyPixels,_glCopyPixels +_glCopyTexImage1D,_glCopyTexImage1D +_glCopyTexImage2D,_glCopyTexImage2D +_glCopyTexSubImage1D,_glCopyTexSubImage1D +_glCopyTexSubImage2D,_glCopyTexSubImage2D +_glCullFace,_glCullFace +_glDeleteLists,_glDeleteLists +_glDeleteTextures,_glDeleteTextures +_glDepthFunc,_glDepthFunc +_glDepthMask,_glDepthMask +_glDepthRange,_glDepthRange +_glDisable,_glDisable +_glDisableClientState,_glDisableClientState +_glDrawArrays,_glDrawArrays +_glDrawBuffer,_glDrawBuffer +_glDrawElements,_glDrawElements +_glDrawPixels,_glDrawPixels +_glEdgeFlag,_glEdgeFlag +_glEdgeFlagPointer,_glEdgeFlagPointer +_glEdgeFlagv,_glEdgeFlagv +_glEnable,_glEnable +_glEnableClientState,_glEnableClientState +_glEnd,_glEnd +_glEndList,_glEndList +_glEvalCoord1d,_glEvalCoord1d +_glEvalCoord1dv,_glEvalCoord1dv +_glEvalCoord1f,_glEvalCoord1f +_glEvalCoord1fv,_glEvalCoord1fv +_glEvalCoord2d,_glEvalCoord2d +_glEvalCoord2dv,_glEvalCoord2dv +_glEvalCoord2f,_glEvalCoord2f +_glEvalCoord2fv,_glEvalCoord2fv +_glEvalMesh1,_glEvalMesh1 +_glEvalMesh2,_glEvalMesh2 +_glEvalPoint1,_glEvalPoint1 +_glEvalPoint2,_glEvalPoint2 +_glFeedbackBuffer,_glFeedbackBuffer +_glFinish,_glFinish +_glFlush,_glFlush +_glFogf,_glFogf +_glFogfv,_glFogfv +_glFogi,_glFogi +_glFogiv,_glFogiv +_glFrontFace,_glFrontFace +_glFrustum,_glFrustum +_glGenLists,_glGenLists +_glGenTextures,_glGenTextures +_glGetBooleanv,_glGetBooleanv +_glGetClipPlane,_glGetClipPlane +_glGetDoublev,_glGetDoublev +_glGetError,_glGetError +_glGetFloatv,_glGetFloatv +_glGetIntegerv,_glGetIntegerv +_glGetLightfv,_glGetLightfv +_glGetLightiv,_glGetLightiv +_glGetMapdv,_glGetMapdv +_glGetMapfv,_glGetMapfv +_glGetMapiv,_glGetMapiv +_glGetMaterialfv,_glGetMaterialfv +_glGetMaterialiv,_glGetMaterialiv +_glGetPixelMapfv,_glGetPixelMapfv +_glGetPixelMapuiv,_glGetPixelMapuiv +_glGetPixelMapusv,_glGetPixelMapusv +_glGetPointerv,_glGetPointerv +_glGetPolygonStipple,_glGetPolygonStipple +_glGetString,_glGetString +_glGetTexEnvfv,_glGetTexEnvfv +_glGetTexEnviv,_glGetTexEnviv +_glGetTexGendv,_glGetTexGendv +_glGetTexGenfv,_glGetTexGenfv +_glGetTexGeniv,_glGetTexGeniv +_glGetTexImage,_glGetTexImage +_glGetTexLevelParameterfv,_glGetTexLevelParameterfv +_glGetTexLevelParameteriv,_glGetTexLevelParameteriv +_glGetTexParameterfv,_glGetTexParameterfv +_glGetTexParameteriv,_glGetTexParameteriv +_glHint,_glHint +_glIndexMask,_glIndexMask +_glIndexPointer,_glIndexPointer +_glIndexd,_glIndexd +_glIndexdv,_glIndexdv +_glIndexf,_glIndexf +_glIndexfv,_glIndexfv +_glIndexi,_glIndexi +_glIndexiv,_glIndexiv +_glIndexs,_glIndexs +_glIndexsv,_glIndexsv +_glIndexub,_glIndexub +_glIndexubv,_glIndexubv +_glInitNames,_glInitNames +_glInterleavedArrays,_glInterleavedArrays +_glIsEnabled,_glIsEnabled +_glIsList,_glIsList +_glIsTexture,_glIsTexture +_glLightModelf,_glLightModelf +_glLightModelfv,_glLightModelfv +_glLightModeli,_glLightModeli +_glLightModeliv,_glLightModeliv +_glLightf,_glLightf +_glLightfv,_glLightfv +_glLighti,_glLighti +_glLightiv,_glLightiv +_glLineStipple,_glLineStipple +_glLineWidth,_glLineWidth +_glListBase,_glListBase +_glLoadIdentity,_glLoadIdentity +_glLoadMatrixd,_glLoadMatrixd +_glLoadMatrixf,_glLoadMatrixf +_glLoadName,_glLoadName +_glLogicOp,_glLogicOp +_glMap1d,_glMap1d +_glMap1f,_glMap1f +_glMap2d,_glMap2d +_glMap2f,_glMap2f +_glMapGrid1d,_glMapGrid1d +_glMapGrid1f,_glMapGrid1f +_glMapGrid2d,_glMapGrid2d +_glMapGrid2f,_glMapGrid2f +_glMaterialf,_glMaterialf +_glMaterialfv,_glMaterialfv +_glMateriali,_glMateriali +_glMaterialiv,_glMaterialiv +_glMatrixMode,_glMatrixMode +_glMultMatrixd,_glMultMatrixd +_glMultMatrixf,_glMultMatrixf +_glNewList,_glNewList +_glNormal3b,_glNormal3b +_glNormal3bv,_glNormal3bv +_glNormal3d,_glNormal3d +_glNormal3dv,_glNormal3dv +_glNormal3f,_glNormal3f +_glNormal3fv,_glNormal3fv +_glNormal3i,_glNormal3i +_glNormal3iv,_glNormal3iv +_glNormal3s,_glNormal3s +_glNormal3sv,_glNormal3sv +_glNormalPointer,_glNormalPointer +_glOrtho,_glOrtho +_glPassThrough,_glPassThrough +_glPixelMapfv,_glPixelMapfv +_glPixelMapuiv,_glPixelMapuiv +_glPixelMapusv,_glPixelMapusv +_glPixelStoref,_glPixelStoref +_glPixelStorei,_glPixelStorei +_glPixelTransferf,_glPixelTransferf +_glPixelTransferi,_glPixelTransferi +_glPixelZoom,_glPixelZoom +_glPointSize,_glPointSize +_glPolygonMode,_glPolygonMode +_glPolygonOffset,_glPolygonOffset +_glPolygonStipple,_glPolygonStipple +_glPopAttrib,_glPopAttrib +_glPopClientAttrib,_glPopClientAttrib +_glPopMatrix,_glPopMatrix +_glPopName,_glPopName +_glPrioritizeTextures,_glPrioritizeTextures +_glPushAttrib,_glPushAttrib +_glPushClientAttrib,_glPushClientAttrib +_glPushMatrix,_glPushMatrix +_glPushName,_glPushName +_glRasterPos2d,_glRasterPos2d +_glRasterPos2dv,_glRasterPos2dv +_glRasterPos2f,_glRasterPos2f +_glRasterPos2fv,_glRasterPos2fv +_glRasterPos2i,_glRasterPos2i +_glRasterPos2iv,_glRasterPos2iv +_glRasterPos2s,_glRasterPos2s +_glRasterPos2sv,_glRasterPos2sv +_glRasterPos3d,_glRasterPos3d +_glRasterPos3dv,_glRasterPos3dv +_glRasterPos3f,_glRasterPos3f +_glRasterPos3fv,_glRasterPos3fv +_glRasterPos3i,_glRasterPos3i +_glRasterPos3iv,_glRasterPos3iv +_glRasterPos3s,_glRasterPos3s +_glRasterPos3sv,_glRasterPos3sv +_glRasterPos4d,_glRasterPos4d +_glRasterPos4dv,_glRasterPos4dv +_glRasterPos4f,_glRasterPos4f +_glRasterPos4fv,_glRasterPos4fv +_glRasterPos4i,_glRasterPos4i +_glRasterPos4iv,_glRasterPos4iv +_glRasterPos4s,_glRasterPos4s +_glRasterPos4sv,_glRasterPos4sv +_glReadBuffer,_glReadBuffer +_glReadPixels,_glReadPixels +_glRectd,_glRectd +_glRectdv,_glRectdv +_glRectf,_glRectf +_glRectfv,_glRectfv +_glRecti,_glRecti +_glRectiv,_glRectiv +_glRects,_glRects +_glRectsv,_glRectsv +_GLRENDER,_GLRENDER +_glRenderMode,_glRenderMode +_glRotated,_glRotated +_glRotatef,_glRotatef +_glScaled,_glScaled +_glScalef,_glScalef +_glScissor,_glScissor +_glSelectBuffer,_glSelectBuffer +_glShadeModel,_glShadeModel +_glStencilFunc,_glStencilFunc +_glStencilMask,_glStencilMask +_glStencilOp,_glStencilOp +_glTexCoord1d,_glTexCoord1d +_glTexCoord1dv,_glTexCoord1dv +_glTexCoord1f,_glTexCoord1f +_glTexCoord1fv,_glTexCoord1fv +_glTexCoord1i,_glTexCoord1i +_glTexCoord1iv,_glTexCoord1iv +_glTexCoord1s,_glTexCoord1s +_glTexCoord1sv,_glTexCoord1sv +_glTexCoord2d,_glTexCoord2d +_glTexCoord2dv,_glTexCoord2dv +_glTexCoord2f,_glTexCoord2f +_glTexCoord2fv,_glTexCoord2fv +_glTexCoord2i,_glTexCoord2i +_glTexCoord2iv,_glTexCoord2iv +_glTexCoord2s,_glTexCoord2s +_glTexCoord2sv,_glTexCoord2sv +_glTexCoord3d,_glTexCoord3d +_glTexCoord3dv,_glTexCoord3dv +_glTexCoord3f,_glTexCoord3f +_glTexCoord3fv,_glTexCoord3fv +_glTexCoord3i,_glTexCoord3i +_glTexCoord3iv,_glTexCoord3iv +_glTexCoord3s,_glTexCoord3s +_glTexCoord3sv,_glTexCoord3sv +_glTexCoord4d,_glTexCoord4d +_glTexCoord4dv,_glTexCoord4dv +_glTexCoord4f,_glTexCoord4f +_glTexCoord4fv,_glTexCoord4fv +_glTexCoord4i,_glTexCoord4i +_glTexCoord4iv,_glTexCoord4iv +_glTexCoord4s,_glTexCoord4s +_glTexCoord4sv,_glTexCoord4sv +_glTexCoordPointer,_glTexCoordPointer +_glTexEnvf,_glTexEnvf +_glTexEnvfv,_glTexEnvfv +_glTexEnvi,_glTexEnvi +_glTexEnviv,_glTexEnviv +_glTexGend,_glTexGend +_glTexGendv,_glTexGendv +_glTexGenf,_glTexGenf +_glTexGenfv,_glTexGenfv +_glTexGeni,_glTexGeni +_glTexGeniv,_glTexGeniv +_glTexImage1D,_glTexImage1D +_glTexImage2D,_glTexImage2D +_glTexParameterf,_glTexParameterf +_glTexParameterfv,_glTexParameterfv +_glTexParameteri,_glTexParameteri +_glTexParameteriv,_glTexParameteriv +_glTexSubImage1D,_glTexSubImage1D +_glTexSubImage2D,_glTexSubImage2D +_glTranslated,_glTranslated +_glTranslatef,_glTranslatef +_glVertex2d,_glVertex2d +_glVertex2dv,_glVertex2dv +_glVertex2f,_glVertex2f +_glVertex2fv,_glVertex2fv +_glVertex2i,_glVertex2i +_glVertex2iv,_glVertex2iv +_glVertex2s,_glVertex2s +_glVertex2sv,_glVertex2sv +_glVertex3d,_glVertex3d +_glVertex3dv,_glVertex3dv +_glVertex3f,_glVertex3f +_glVertex3fv,_glVertex3fv +_glVertex3i,_glVertex3i +_glVertex3iv,_glVertex3iv +_glVertex3s,_glVertex3s +_glVertex3sv,_glVertex3sv +_glVertex4d,_glVertex4d +_glVertex4dv,_glVertex4dv +_glVertex4f,_glVertex4f +_glVertex4fv,_glVertex4fv +_glVertex4i,_glVertex4i +_glVertex4iv,_glVertex4iv +_glVertex4s,_glVertex4s +_glVertex4sv,_glVertex4sv +_glVertexPointer,_glVertexPointer +_glViewport,_glViewport +;,Semicolon +",Quotation mark +?,Question mark +',Apostrophe +:,Colon +$,Dollar_Sign +,Parenthesis ++,+ +",Quotation mark +_,Underscore +$,STRING +STRING,STRING +!,SINGLE +SINGLE,SINGLE +#,DOUBLE +DOUBLE,DOUBLE +##,_FLOAT +_FLOAT,_FLOAT +~,_UNSIGNED +_UNSIGNED,_UNSIGNED +%,INTEGER +INTEGER,INTEGER +&,LONG +LONG,LONG +&&,_INTEGER64 +_INTEGER64,_INTEGER64 +`,_BIT +_BIT,_BIT +%%,_BYTE +_BYTE,_BYTE +%&,_OFFSET +_OFFSET,_OFFSET +&B,&B +&O,&O +&H,&H ++,+ +-,- +*,* +/,/ +\,\ +^,^ +MOD,MOD +=,Equal +<>,Not_Equal +>,Greater_Than +<,Less_Than +>=,Greater_Than_Or_Equal +<=,Less_Than_Or_Equal diff --git a/internal/source/bookmarks.bin b/internal/source/bookmarks.bin deleted file mode 100644 index e69de29bb..000000000 diff --git a/internal/source/files.txt b/internal/source/files.txt deleted file mode 100644 index e21d591b2..000000000 --- a/internal/source/files.txt +++ /dev/null @@ -1 +0,0 @@ -qb64.bas diff --git a/internal/source/paths.txt b/internal/source/paths.txt deleted file mode 100644 index efb3fcab4..000000000 --- a/internal/source/paths.txt +++ /dev/null @@ -1,4 +0,0 @@ -global -ide -subs_functions -utilities diff --git a/internal/source/recent.bin b/internal/source/recent.bin deleted file mode 100644 index d2b4721b4..000000000 --- a/internal/source/recent.bin +++ /dev/null @@ -1,6 +0,0 @@ - -D:\Repo\QB64pe\source\qb64.bas - -D:\Repo\QB64pe\source\ide\wiki\wiki_methods.bas - -D:\Repo\QB64pe\source\ide\ide_methods.bas diff --git a/internal/source/root.txt b/internal/source/root.txt deleted file mode 100644 index 2cac00ea7..000000000 --- a/internal/source/root.txt +++ /dev/null @@ -1 +0,0 @@ -D:\Repo\QB64pe diff --git a/internal/source/undo2.bin b/internal/source/undo2.bin deleted file mode 100644 index 67b26e4ec..000000000 Binary files a/internal/source/undo2.bin and /dev/null differ