Bad title
-The requested page title is empty or contains only the name of a namespace. -
Return to Main Page.
- -diff --git a/internal/help/$ASSERTS.txt b/internal/help/$ASSERTS.txt deleted file mode 100644 index 5eb211879..000000000 --- a/internal/help/$ASSERTS.txt +++ /dev/null @@ -1,46 +0,0 @@ -The [[$ASSERTS]] metacommand enables debug tests with the [[_ASSERT]] macro. - - -{{PageSyntax}} -:[[$ASSERTS]] -:[[$ASSERTS]]:CONSOLE - - -{{PageDescription}} -* If an error message is passed to the [[_ASSERT]] statement, it is displayed in the console window if [[$ASSERTS|$ASSERTS:CONSOLE]] is used. - - -==Availability== -* '''Version 1.4 and up'''. - - -{{PageExamples}} -''Example:'' Adding test checks for parameter inputs in a function. -{{CodeStart}} -{{Cl|$ASSERTS}}:CONSOLE - -{{Cl|DO}} - a = {{Cl|INT}}({{Cl|RND}} * 10) - b$ = myFunc$(a) - {{Cl|PRINT}} a, , b$ - {{Cl|_LIMIT}} 3 -{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|_KEYHIT}} - -{{Cl|FUNCTION}} myFunc$ (value {{Cl|AS}} {{Cl|SINGLE}}) - {{Cl|_ASSERT}} value > 0, "Value cannot be zero" - {{Cl|_ASSERT}} value <= 10, "Value cannot exceed 10" - - {{Cl|IF}} value > 1 {{Cl|THEN}} plural$ = "s" - myFunc$ = {{Cl|STRING$}}(value, "*") + {{Cl|STR$}}(value) + " star" + plural$ + " :-)" -{{Cl|END}} {{Cl|FUNCTION}} -{{CodeEnd}} - - -{{PageSeeAlso}} -* [[_ASSERT]] -* [[$CHECKING]] -* [[Relational Operations]] - - -{{PageNavigation}} -< diff --git a/internal/help/$ASSERTS_$1111111.txt b/internal/help/$ASSERTS_$1111111.txt new file mode 100644 index 000000000..71caabf3e --- /dev/null +++ b/internal/help/$ASSERTS_$1111111.txt @@ -0,0 +1,53 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:06:28}} +This metacommand enables debug tests with the [[_ASSERT]] statement. + + +{{PageSyntax}} +:[[$ASSERTS]][:CONSOLE] + + +{{PageDescription}} +* The metacommand does not require a comment or [[REM]] before it. There is no space after the colon. +* If this metacommand is used in a program and any of the set [[_ASSERT]] checkpoints will fail, then the program will stop with an '''{{Text|_ASSERT failed|#fc5454}}''' error. +* Detailed error messages passed to the [[_ASSERT]] statement will be displayed in the console window, but only if [[$ASSERTS|$ASSERTS:CONSOLE]] is used. + +;Note: This metacommand is the main switch to enable debug tests during development. Later just remove this metacommand to compile the program without debugging code, all the [[_ASSERT]] statements may remain in the code for later debugging sessions, they are simply ignored without this metacommand. + + +{{PageAvailability}} +* '''QB64 1.4 and up''' (QB64 Team) +* '''QBPE 0.5 and up''' (QB64 Phoenix Edition) + + +{{PageExamples}} +;Example:Adding test checks for parameter inputs in a function. +{{CodeStart}} +{{Cl|$ASSERTS}}:CONSOLE + +{{Cl|DO}} + a = {{Cl|INT}}({{Cl|RND}} * 10) + b$ = myFunc$(a) + {{Cl|PRINT}} a, , b$ + {{Cl|_LIMIT}} 3 +{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|_KEYHIT}} + +{{Cl|FUNCTION}} myFunc$ (value {{Cl|AS}} {{Cl|SINGLE}}) + {{Cl|_ASSERT}} value > 0, "Value cannot be zero" + {{Cl|_ASSERT}} value <= 10, "Value cannot exceed 10" + + {{Cl|IF}} value > 1 {{Cl|THEN}} plural$ = "s" + myFunc$ = {{Cl|STRING$}}(value, "*") + {{Cl|STR$}}(value) + " star" + plural$ + " :-)" +{{Cl|END}} {{Cl|FUNCTION}} +{{CodeEnd}} + + +{{PageSeeAlso}} +* [[_ASSERT]] +* [[$CHECKING]] +* [[Relational Operations]] +* [[ERROR Codes]] + + +{{PageNavigation}} + diff --git a/internal/help/$CHECKING.txt b/internal/help/$CHECKING_$11111111.txt similarity index 96% rename from internal/help/$CHECKING.txt rename to internal/help/$CHECKING_$11111111.txt index 671eb9119..980126c3d 100644 --- a/internal/help/$CHECKING.txt +++ b/internal/help/$CHECKING_$11111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:06:53}} The [[$CHECKING]] metacommand turns C++ event checking ON or OFF. @@ -24,4 +26,4 @@ The [[$CHECKING]] metacommand turns C++ event checking ON or OFF. {{PageNavigation}} -< + diff --git a/internal/help/$COLOR.txt b/internal/help/$COLOR.txt deleted file mode 100644 index 391ef62ab..000000000 --- a/internal/help/$COLOR.txt +++ /dev/null @@ -1,41 +0,0 @@ -[[$COLOR]] is a metacommand that adds named color [[CONST|constants]] in a program. - - -{{PageSyntax}} -: [[$COLOR]]:0 -: [[$COLOR]]:32 - - -{{PageDescription}} -* [[$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. -* Not compatible with [[$NOPREFIX]]. - - -{{PageExamples}} -''Example 1:'' Adding named color constants for SCREEN 0: -{{CodeStart}} -{{Cl|$COLOR}}:0 -{{Cl|COLOR}} BrightWhite, Red -{{Cl|PRINT}} "Bright white on red." - {{CodeEnd}} - - -''Example 2:'' Adding named color constants for 32-bit modes: -{{CodeStart}} -{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 400, 32) -{{Cl|$COLOR}}:32 -{{Cl|COLOR}} CrayolaGold, DarkCyan -{{Cl|PRINT}} "CrayolaGold on DarkCyan." - {{CodeEnd}} - - -{{PageSeeAlso}} -* [[COLOR]], [[SCREEN]] -* [[_NEWIMAGE]], [[$INCLUDE]] -* [[Metacommand]] - - -{{PageNavigation}} -< diff --git a/internal/help/$COLOR_$11111.txt b/internal/help/$COLOR_$11111.txt new file mode 100644 index 000000000..6e83764d9 --- /dev/null +++ b/internal/help/$COLOR_$11111.txt @@ -0,0 +1,61 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:07:06}} +[[$COLOR]] is a metacommand that adds named color [[CONST|constants]] in a program. + + +{{PageSyntax}} +: [[$COLOR]]:0 +: [[$COLOR]]:32 + + +{{PageDescription}} +* [[$COLOR]]:0 adds [[CONST|constants]] for colors 0-15. The actual constant names can be found in the file '''source/utilities/color0.bi'''. +* [[$COLOR]]:32 adds [[CONST|constants]] for 32-bit colors, similar to HTML color names. The actual constant names can be found in the file '''source/utilities/color32.bi'''. +* [[$COLOR]] is a shorthand to manually using [[$INCLUDE]] pointing to the files listed above. +* Prior to QBPE v0.5 (ό), [[$COLOR]] was not compatible with [[$NOPREFIX]]. +* Since QBPE v0.5, [[$COLOR]] can now be used with [[$NOPREFIX]], with a few notable differences to three conflicting colors -- Red, Green, Blue. + +:Red would conflict with [[_RED]], Green would conflict with [[_GREEN]], and Blue would conflict with [[_BLUE]], once the underscore was removed from those commands with [[$NOPREFIX]]. +: +:To prevent these conflicts, the [[COLOR]] values have had '''NP_''' prepended to the front of them, to distinguish them from the non-prefixed command names. All other color names remain the same, with only the three colors in conflict having to use '''NP_''' (for '''N'''o '''P'''refix) in front of them. +(ό) QBPE = QB64 Phoenix Edition + + +{{PageExamples}} +;Example 1:Adding named color constants for SCREEN 0. +{{CodeStart}} +{{Cl|$COLOR}}:0 +{{Cl|COLOR}} BrightWhite, Red +{{Cl|PRINT}} "Bright white on red." +{{CodeEnd}} +{{OutputStartBG4}} +{{Text|Bright white on red.|#fcfcfc}} +{{OutputEnd}} + +;Example 2:Adding named color constants for 32-bit modes. +{{CodeStart}} +{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 400, 32) +{{Cl|$COLOR}}:32 +{{Cl|COLOR}} CrayolaGold, DarkCyan +{{Cl|PRINT}} "CrayolaGold on DarkCyan." +{{CodeEnd}} + +;Example 3:Adding named color constants for 32-bit modes (with $NOPREFIX in effect). +{{CodeStart}} +{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 400, 32) +{{Cl|$COLOR}}:32 +{{Cl|$NOPREFIX}} +{{Cl|COLOR}} NP_Red, White 'notice the NP_ in front of Red? +'This is to distinguish the color from the command with $NOPREFIX. +{{Cl|PRINT}} "Red on White." +{{CodeEnd}} + + +{{PageSeeAlso}} +* [[COLOR]], [[SCREEN]] +* [[_NEWIMAGE]], [[$INCLUDE]] +* [[Metacommand]] + + +{{PageNavigation}} + diff --git a/internal/help/$CONSOLE.txt b/internal/help/$CONSOLE_$1111111.txt similarity index 87% rename from internal/help/$CONSOLE.txt rename to internal/help/$CONSOLE_$1111111.txt index d525ae658..42e8a09fa 100644 --- a/internal/help/$CONSOLE.txt +++ b/internal/help/$CONSOLE_$1111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:07:11}} The [[$CONSOLE]] [[Metacommand]] creates a console window that can be used throughout a QB64 program module. @@ -10,7 +12,7 @@ The [[$CONSOLE]] [[Metacommand]] creates a console window that can be used throu * [[_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. -* '''QB64 [[Metacommand]]s are not commented out with ' or REM, differently from Qbasic metacommands''' +* '''QB64 [[Metacommand]]s are not commented out with ' or REM, unlike QuickBASIC 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'' @@ -18,7 +20,7 @@ The [[$CONSOLE]] [[Metacommand]] creates a console window that can be used throu {{PageExamples}} ''Example 1:'' Hiding and displaying a console window. Use [[_DELAY]] to place console in front of main program window. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$CONSOLE}} {{Cl|_DELAY}} 4 @@ -27,28 +29,28 @@ The [[$CONSOLE]] [[Metacommand]] creates a console window that can be used throu {{Cl|_CONSOLE}} ON {{Cl|_DEST}} {{Cl|_CONSOLE}} -{{Cl|PRINT}} "Close this console window or click main window and press a key!" '' '' +{{Cl|PRINT}} "Close this console window or click main window and press a key!" {{CodeEnd}} ''Example 2:'' How to use a Console window to copy screen output using the ''Edit'' menu by right clicking the console title bar. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$CONSOLE}} {{Cl|_DEST}} {{Cl|_CONSOLE}} -c&& = -1: d& = -1: e% = -1: f%% = -1 +c&& = -1: d& = -1: e% = -1: f%% = -1 hx$ = {{Cl|HEX$}}(f%%) -{{Cl|PRINT}} "Max hex {{Cl|_BYTE}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) +{{Cl|PRINT}} "Max hex {{Cl|_BYTE}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) hx$ = {{Cl|HEX$}}(e%) -{{Cl|PRINT}} "Max hex {{Cl|INTEGER}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) -hx$ = {{Cl|HEX$}}(d&) -{{Cl|PRINT}} "Max hex {{Cl|LONG}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) -hx$ = {{Cl|HEX$}}(c&&) -{{Cl|PRINT}} "Max hex {{Cl|_INTEGER64}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) +{{Cl|PRINT}} "Max hex {{Cl|INTEGER}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) +hx$ = {{Cl|HEX$}}(d&) +{{Cl|PRINT}} "Max hex {{Cl|LONG}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) +hx$ = {{Cl|HEX$}}(c&&) +{{Cl|PRINT}} "Max hex {{Cl|_INTEGER64}} = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits ="; {{Cl|VAL}}("{{Cl|&H}}" + hx$) hx$ = {{Cl|HEX$}}(9223372036854775807) {{Cl|PRINT}} "Max {{Cl|_INTEGER64}} value = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits" hx$ = {{Cl|HEX$}}(-9223372036854775808) -{{Cl|PRINT}} "Min {{Cl|_INTEGER64}} value = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits" '' '' +{{Cl|PRINT}} "Min {{Cl|_INTEGER64}} value = "; hx$; " with"; {{Cl|LEN}}(hx$); "digits" {{CodeEnd}} {{OutputStart}}Max hex _BYTE = FF with 2 digits = 255 Max hex INTEGER = FFFF with 4 digits = 65535 @@ -74,4 +76,4 @@ Max hex _INTEGER64 = FFFFFFFFFFFFFFFF with 16 digits =-1 {{PageNavigation}} -< + diff --git a/internal/help/$DEBUG.txt b/internal/help/$DEBUG.txt deleted file mode 100644 index 931841834..000000000 --- a/internal/help/$DEBUG.txt +++ /dev/null @@ -1 +0,0 @@ -< diff --git a/internal/help/$DEBUG_$11111.txt b/internal/help/$DEBUG_$11111.txt new file mode 100644 index 000000000..762218eab --- /dev/null +++ b/internal/help/$DEBUG_$11111.txt @@ -0,0 +1,44 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:07:28}} +'''$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_$1111111.txt similarity index 95% rename from internal/help/$DYNAMIC.txt rename to internal/help/$DYNAMIC_$1111111.txt index e8b529757..007815cfd 100644 --- a/internal/help/$DYNAMIC.txt +++ b/internal/help/$DYNAMIC_$1111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:56}} The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (changeable) arrays. @@ -16,7 +18,7 @@ The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (cha {{PageExamples}} ''Example:'' [[REDIM]]ing a $DYNAMIC array using [[_PRESERVE]] to retain previous array values. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|REM}} {{Cl|$DYNAMIC}} 'create dynamic arrays only {{Cl|DIM}} array(10) 'create array with 11 elements {{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} 10 @@ -27,7 +29,7 @@ The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (cha {{Cl|FOR...NEXT|FOR}} i = 10 {{Cl|TO}} 20 {{Cl|PRINT}} array(i); {{Cl|NEXT}} -{{Cl|END}} '' '' +{{Cl|END}} {{CodeEnd}} {{OutputStart}}0 1 2 3 4 5 6 7 8 9 10 @@ -44,4 +46,4 @@ The [[$DYNAMIC]] [[Metacommand|metacommand]] allows the creation of dynamic (cha {{PageNavigation}} -< + diff --git a/internal/help/$END_IF.txt b/internal/help/$ELSEIF_$111111.txt similarity index 97% rename from internal/help/$END_IF.txt rename to internal/help/$ELSEIF_$111111.txt index 56d67944c..3475ea0e4 100644 --- a/internal/help/$END_IF.txt +++ b/internal/help/$ELSEIF_$111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:03}} '''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing. @@ -25,7 +27,7 @@ {{PageExamples}} ''Example 1:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$LET}} ScreenMode = 32 {{Cl|$IF}} ScreenMode = 0 THEN {{Cl|CONST}} Red = 4 @@ -45,7 +47,7 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall ''Example 2:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$IF}} WIN THEN {{Cl|CONST}} Slash = "\" {{Cl|$ELSE}} @@ -64,4 +66,4 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall {{PageNavigation}} -< + diff --git a/internal/help/$ELSE.txt b/internal/help/$ELSE_$1111.txt similarity index 97% rename from internal/help/$ELSE.txt rename to internal/help/$ELSE_$1111.txt index 56d67944c..8fe7ab024 100644 --- a/internal/help/$ELSE.txt +++ b/internal/help/$ELSE_$1111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:02}} '''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing. @@ -25,7 +27,7 @@ {{PageExamples}} ''Example 1:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$LET}} ScreenMode = 32 {{Cl|$IF}} ScreenMode = 0 THEN {{Cl|CONST}} Red = 4 @@ -45,7 +47,7 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall ''Example 2:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$IF}} WIN THEN {{Cl|CONST}} Slash = "\" {{Cl|$ELSE}} @@ -64,4 +66,4 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall {{PageNavigation}} -< + diff --git a/internal/help/$ELSEIF.txt b/internal/help/$END_IF_$111_11.txt similarity index 97% rename from internal/help/$ELSEIF.txt rename to internal/help/$END_IF_$111_11.txt index 56d67944c..a0baddd4c 100644 --- a/internal/help/$ELSEIF.txt +++ b/internal/help/$END_IF_$111_11.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:05}} '''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing. @@ -25,7 +27,7 @@ {{PageExamples}} ''Example 1:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$LET}} ScreenMode = 32 {{Cl|$IF}} ScreenMode = 0 THEN {{Cl|CONST}} Red = 4 @@ -45,7 +47,7 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall ''Example 2:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$IF}} WIN THEN {{Cl|CONST}} Slash = "\" {{Cl|$ELSE}} @@ -64,4 +66,4 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall {{PageNavigation}} -< + diff --git a/internal/help/$ERROR.txt b/internal/help/$ERROR.txt deleted file mode 100644 index 931841834..000000000 --- a/internal/help/$ERROR.txt +++ /dev/null @@ -1 +0,0 @@ -< diff --git a/internal/help/$ERROR_$11111.txt b/internal/help/$ERROR_$11111.txt new file mode 100644 index 000000000..252e3b1c6 --- /dev/null +++ b/internal/help/$ERROR_$11111.txt @@ -0,0 +1,36 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:06}} +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. + + +{{PageDescription}} +* If there is a particular situation where you know your program will not work properly, you can prevent the user compiling and give them a helpful error message instead by checking for the condition with [[$IF]]. +* An [[$ERROR]] directive not inside an [[$IF]] (or [[$ELSEIF]]) block is useless because the program will never compile. + + +{{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_$1111111.txt similarity index 86% rename from internal/help/$EXEICON.txt rename to internal/help/$EXEICON_$1111111.txt index a92f45f1e..cce94514b 100644 --- a/internal/help/$EXEICON.txt +++ b/internal/help/$EXEICON_$1111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:10}} '''$EXEICON''' pre-compiler metacommand embeds a designated icon file into the compiled EXE file to be viewed in Windows Explorer. @@ -11,7 +13,7 @@ {{PageDescription}} -* Calling [[_ICON]] without an {{Parameter|imageHandle&}} uses the embeded icon, if available. +* Calling [[_ICON]] without an {{Parameter|imageHandle&}} uses the embeded icon, if available. ** Starting with '''build 20170906/64''', the window will automatically use the icon embedded by [[$EXEICON]], without having to call _ICON. * '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''. @@ -31,4 +33,4 @@ {{PageNavigation}} -< + diff --git a/internal/help/$IF.txt b/internal/help/$IF_$11.txt similarity index 97% rename from internal/help/$IF.txt rename to internal/help/$IF_$11.txt index 56d67944c..64da5e3c8 100644 --- a/internal/help/$IF.txt +++ b/internal/help/$IF_$11.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:38}} '''$IF''' is precompiler [[Metacommand|metacommand]], which determines which sections of code inside its blocks are included into the final code for compliing. @@ -25,7 +27,7 @@ {{PageExamples}} ''Example 1:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$LET}} ScreenMode = 32 {{Cl|$IF}} ScreenMode = 0 THEN {{Cl|CONST}} Red = 4 @@ -45,7 +47,7 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall ''Example 2:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$IF}} WIN THEN {{Cl|CONST}} Slash = "\" {{Cl|$ELSE}} @@ -64,4 +66,4 @@ The [[$LET]] and $IF statements let the programmer control the code that actuall {{PageNavigation}} -< + diff --git a/internal/help/$INCLUDE.txt b/internal/help/$INCLUDE_$1111111.txt similarity index 97% rename from internal/help/$INCLUDE.txt rename to internal/help/$INCLUDE_$1111111.txt index 9e0a9e794..184d7a428 100644 --- a/internal/help/$INCLUDE.txt +++ b/internal/help/$INCLUDE_$1111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:13:39}} [[$INCLUDE]] is a metacommand that is used to insert a source code file into your program which is then executed at the point of the insertion. @@ -40,4 +42,4 @@ {{PageNavigation}} -< + diff --git a/internal/help/$LET.txt b/internal/help/$LET_$111.txt similarity index 95% rename from internal/help/$LET.txt rename to internal/help/$LET_$111.txt index b307bbb94..dc5689f3a 100644 --- a/internal/help/$LET.txt +++ b/internal/help/$LET_$111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:08:51}} [[$LET]] is precompiler command, which is now usable by modern day [[cavemen]] to help include and exclude which sections of code compiles in their program based on OS/bit-size or other predefined conditions. @@ -25,4 +27,4 @@ {{PageNavigation}} -< + diff --git a/internal/help/$NOPREFIX.txt b/internal/help/$NOPREFIX_$11111111.txt similarity index 87% rename from internal/help/$NOPREFIX.txt rename to internal/help/$NOPREFIX_$11111111.txt index 873ce7d53..28cafae1d 100644 --- a/internal/help/$NOPREFIX.txt +++ b/internal/help/$NOPREFIX_$11111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:09:37}} The [[$NOPREFIX]] metacommand allows all QB64 functions and statements to be used without the leading underscore (_). @@ -14,8 +16,9 @@ The [[$NOPREFIX]] metacommand allows all QB64 functions and statements to be use * [[$NOPREFIX]] must be the first line in a program. -==Availability== -* '''Version 1.4 and up'''. +{{PageAvailability}} +* '''QB64 1.4 and up''' (QB64 Team) +* '''QBPE 0.5 and up''' (QB64 Phoenix Edition) {{PageSeeAlso}} @@ -24,4 +27,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_$111111.txt similarity index 96% rename from internal/help/$RESIZE.txt rename to internal/help/$RESIZE_$111111.txt index 7bfd18b7f..9503913cb 100644 --- a/internal/help/$RESIZE.txt +++ b/internal/help/$RESIZE_$111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:10:13}} The [[$RESIZE]] [[Metacommand|metacommand]] determines if a program window can be resized by the user. @@ -27,7 +29,7 @@ The [[$RESIZE]] [[Metacommand|metacommand]] determines if a program window can b {{Cl|_DISPLAY}} ' CLEAR _RESIZE FLAG BY READING IT ONCE -temp& = {{Cl|_RESIZE (function)|_RESIZE}} +temp& = {{Cl|_RESIZE (function)|_RESIZE}} DO @@ -45,9 +47,9 @@ DO {{Cl|_DISPLAY}} - k& = {{Cl|_KEYHIT}} + k& = {{Cl|_KEYHIT}} -{{Cl|LOOP}} {{Cl|UNTIL}} k& = 27 {{Cl|OR (boolean)|OR}} k& = 32 +{{Cl|LOOP}} {{Cl|UNTIL}} k& = 27 {{Cl|OR (boolean)|OR}} k& = 32 {{Cl|SYSTEM}} @@ -112,4 +114,4 @@ DO {{PageNavigation}} -< + diff --git a/internal/help/$SCREENHIDE.txt b/internal/help/$SCREENHIDE_$1111111111.txt similarity index 82% rename from internal/help/$SCREENHIDE.txt rename to internal/help/$SCREENHIDE_$1111111111.txt index 877c4ef99..01fb97da1 100644 --- a/internal/help/$SCREENHIDE.txt +++ b/internal/help/$SCREENHIDE_$1111111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:10:28}} The [[$SCREENHIDE]] [[Metacommand|metacommand]] can be used to hide the main program window throughout a program. @@ -12,13 +14,13 @@ The [[$SCREENHIDE]] [[Metacommand|metacommand]] can be used to hide the main pro {{PageExamples}} ''Example:'' Hiding a program when displaying a message box in Windows. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|$SCREENHIDE}} {{Cl|DECLARE DYNAMIC LIBRARY}} "user32" - {{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hWnd%&, {{Cl|BYVAL}} lpText%&, {{Cl|BYVAL}} lpCaption%&, {{Cl|BYVAL}} uType~&) + {{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hWnd%&, {{Cl|BYVAL}} lpText%&, {{Cl|BYVAL}} lpCaption%&, {{Cl|BYVAL}} uType~&) {{Cl|DECLARE LIBRARY|END DECLARE}} {{Cl|DECLARE DYNAMIC LIBRARY}} "kernel32" - {{Cl|SUB}} ExitProcess ({{Cl|BYVAL}} uExitCode~&) + {{Cl|SUB}} ExitProcess ({{Cl|BYVAL}} uExitCode~&) {{Cl|DECLARE LIBRARY|END DECLARE}} {{Cl|DIM}} s0 {{Cl|AS}} {{Cl|STRING}} {{Cl|DIM}} s1 {{Cl|AS}} {{Cl|STRING}} @@ -35,4 +37,4 @@ ExitProcess MessageBoxA(0, {{Cl|_OFFSET (function)|_OFFSET}}(s0), {{Cl|_OFFSET(f {{PageNavigation}} -< + diff --git a/internal/help/$SCREENSHOW.txt b/internal/help/$SCREENSHOW_$1111111111.txt similarity index 90% rename from internal/help/$SCREENSHOW.txt rename to internal/help/$SCREENSHOW_$1111111111.txt index 9cc0789dc..09c5b4b40 100644 --- a/internal/help/$SCREENSHOW.txt +++ b/internal/help/$SCREENSHOW_$1111111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:10:36}} {{DISPLAYTITLE:_SCREENSHOW}} The [[_SCREENSHOW]] statement can be used to display the main program window in a section of code. @@ -16,4 +18,4 @@ The [[_SCREENSHOW]] statement can be used to display the main program window in {{PageNavigation}} -< + diff --git a/internal/help/$STATIC.txt b/internal/help/$STATIC_$111111.txt similarity index 87% rename from internal/help/$STATIC.txt rename to internal/help/$STATIC_$111111.txt index 0571d1902..295b692ee 100644 --- a/internal/help/$STATIC.txt +++ b/internal/help/$STATIC_$111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:16:45}} The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) arrays. @@ -6,7 +8,7 @@ The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) array ::: REM '''$STATIC''' -* 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]] code. * The array's type cannot be changed once [[DIM]] and a literal value sets the dimensions and element size. @@ -14,7 +16,7 @@ The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) array ''Example:'' When a variable is used, the array can be resized despite $STATIC. The array becomes [[$DYNAMIC]]. -{{CodeStart}} '' '' +{{CodeStart}} '{{Cl|$STATIC}} {{Cl|INPUT}} "Enter array size: ", size @@ -22,7 +24,7 @@ The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) array {{Cl|REDIM}} array(2 * size) -{{Cl|PRINT}} {{Cl|UBOUND}}(array) '' '' +{{Cl|PRINT}} {{Cl|UBOUND}}(array) {{CodeEnd}} : ''Note:'' [[DIM]] using a literal numerical size will create a Duplicate definition error. @@ -33,4 +35,4 @@ The '''$STATIC''' Metacommand allows the creation of STATIC(un-changeable) array {{PageNavigation}} -< + diff --git a/internal/help/$VERSIONINFO.txt b/internal/help/$VERSIONINFO_$11111111111.txt similarity index 68% rename from internal/help/$VERSIONINFO.txt rename to internal/help/$VERSIONINFO_$11111111111.txt index 75df784c8..aea3abfba 100644 --- a/internal/help/$VERSIONINFO.txt +++ b/internal/help/$VERSIONINFO_$11111111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:11:32}} {{DISPLAYTITLE:$VERSIONINFO}} The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resulting executable for identification purposes across the OS. Windows-only. @@ -7,8 +9,9 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul {{Parameters}} -* Text ''keys'' can be: '''CompanyName, FileDescription, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, Web, Comments''' +* Text ''keys'' can be: '''Comments, CompanyName, FileDescription, FileVersion, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, ProductVersion, Web''' * Numeric {{Parameter|keys}} can be:'''FILEVERSION#''' and '''PRODUCTVERSION#''' +**When provided, the numerical keys '''FILEVERSION#''' and '''PRODUCTVERSION#''' will also provide values to the text keys '''FileVersion''' and '''ProductVersion,''' if the text versions are not provided separately. (Phoenix Edition v0.6.0 and above) {{PageDescription}} @@ -17,8 +20,9 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul * [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]]. -==Availability== -* '''Build 20170429/52 and up'''. +{{PageAvailability}} +* '''QB64 1.2 and up''' (QB64 Team) +* '''QBPE 0.5 and up''' (QB64 Phoenix Edition) {{PageExamples}} @@ -37,4 +41,4 @@ The [[$VERSIONINFO]] [[Metacommand|metacommand]] adds text metadata to the resul {{PageNavigation}} -< + diff --git a/internal/help/$VIRTUALKEYBOARD.txt b/internal/help/$VIRTUALKEYBOARD_$111111111111111.txt similarity index 90% rename from internal/help/$VIRTUALKEYBOARD.txt rename to internal/help/$VIRTUALKEYBOARD_$111111111111111.txt index 31c29be79..a3ea52349 100644 --- a/internal/help/$VIRTUALKEYBOARD.txt +++ b/internal/help/$VIRTUALKEYBOARD_$111111111111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:11:34}} {{DISPLAYTITLE:$VIRTUALKEYBOARD}} [DEPRACATED] The [[$VIRTUALKEYBOARD]] [[Metacommand|metacommand]] turns the virtual keyboard ON or OFF. @@ -15,7 +17,7 @@ {{CodeStart}} {{Cl|$VIRTUALKEYBOARD}}:ON -{{Cl|DO}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) '' '' +{{Cl|DO}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) {{CodeEnd}} @@ -24,4 +26,4 @@ {{PageNavigation}} -< + diff --git a/internal/help/%26B.txt b/internal/help/%26B_%261.txt similarity index 82% rename from internal/help/%26B.txt rename to internal/help/%26B_%261.txt index 63c2be250..fb405277d 100644 --- a/internal/help/%26B.txt +++ b/internal/help/%26B_%261.txt @@ -1,8 +1,10 @@ -The '''&B''' prefix denotes that an integer value is expressed in a binary base 2 format using '''QB64''' only. +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:24:48}} +The '''&B''' prefix denotes that an integer value is expressed in a binary base 2 format using '''QB64''' only. {{PageSyntax}} -:::: a& = '''&B1110110000111111''' +:::: a& = '''&B1110110000111111''' * The base 2 numbering system uses binary digit values of 1 or 0, or bits on or bits off in computer register switches or memory. @@ -12,10 +14,10 @@ The '''&B''' prefix denotes that an integer value is expressed in a binary b ** [[INTEGER]]: 16 binary digits or a decimal value range from -32,768 to 32,767 ** [[LONG]]: 32 binary digits or a decimal value range from -2,147,483,648 to 2,147,483,647 ** [[_INTEGER64]]: 64 binary digits or decimal values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. -* [[LONG]] values can be returned by appending the & or ~%([[_UNSIGNED]] [[INTEGER]]) symbols after the binary number. -* [[VAL]] can be used to convert "&B" prefixed string values to decimal. +* [[LONG]] values can be returned by appending the & or ~%([[_UNSIGNED]] [[INTEGER]]) symbols after the binary number. +* [[VAL]] can be used to convert "&B" prefixed string values to decimal. -<center>'''[[_BIT|BITS]]'''</center> +
The requested page title is empty or contains only the name of a namespace. -
Return to Main Page.
- -([[#toc|Return to Table of Contents]])
+ +==RGB Palette Intensities== +RGB intensity values can be converted to hexadecimal values to create the [[LONG]] [[_PALETTECOLOR]] value in non-32-bit screens: +{{CodeStart}} +{{Cl|SCREEN}} 12 +alpha$ = "FF" 'solid alpha colors only +{{Cl|PRINT}} "Attribute = Hex value Red Green Blue " +{{Cl|PRINT}} +{{Cl|COLOR}} 7 +{{Cl|FOR...NEXT|FOR}} attribute = 1 {{Cl|TO}} 15 + {{Cl|OUT}} {{Cl|&H}}3C7, attribute 'set color attribute to read + red$ = {{Cl|HEX$}}({{Cl|INP}}({{Cl|&H}}3C9) * 4) 'convert port setting to 32 bit values + grn$ = {{Cl|HEX$}}({{Cl|INP}}({{Cl|&H}}3C9) * 4) + blu$ = {{Cl|HEX$}}({{Cl|INP}}({{Cl|&H}}3C9) * 4) + {{Cl|IF...THEN|IF}} {{Cl|LEN}}(red$) = 1 {{Cl|THEN}} red$ = "0" + red$ '2 hex digits required + {{Cl|IF...THEN|IF}} {{Cl|LEN}}(grn$) = 1 {{Cl|THEN}} grn$ = "0" + grn$ 'for low or zero hex values + {{Cl|IF...THEN|IF}} {{Cl|LEN}}(blu$) = 1 {{Cl|THEN}} blu$ = "0" + blu$ + hex32$ = "{{Cl|&H}}" + alpha$ + red$ + grn$ + blu$ + {{Cl|_PALETTECOLOR}} attribute, {{Cl|VAL}}(hex32$) 'VAL converts hex string to a LONG 32 bit value + {{Cl|IF...THEN|IF}} attribute {{Cl|THEN}} {{Cl|COLOR}} attribute 'exclude black color print + {{Cl|PRINT}} "{{Cl|COLOR}}" + {{Cl|STR$}}(attribute) + " = " + hex32$, red$, grn$, blu$ 'returns closest attribute +{{Cl|NEXT}} +{{CodeEnd}} +{{OutputStart}}Attribute Hex value Red Green Blue + +{{text|COLOR 1([[#toc|Return to Table of Contents]])
+ + +{{PageExamples}} +''Example 1:'' Reading the default RGB color settings of color attribute 15. +{{CodeStart}} + {{Cl|OUT}} &H3C7, 15 + red% = {{Cl|INP}}(&H3C9) + green% = {{Cl|INP}}(&H3C9) + blue% = {{Cl|INP}}(&H3C9) + {{Cl|PRINT}} red%, green%, blue% +{{CodeEnd}} + +{{OutputStart}} + 63 63 63 +{{OutputEnd}} + + +''Example 2:'' Changing the color settings of attribute 0 (the background) to blue in [[SCREEN]]s 12 or 13. +{{CodeStart}} +{{Cl|SCREEN}} 12 +{{Cl|OUT}} {{Cl|&H}}3C8, 0 'set color port attribute to write +{{Cl|OUT}} {{Cl|&H}}3C9, 0 'red intensity +{{Cl|OUT}} {{Cl|&H}}3C9, 0 'green intensity +{{Cl|OUT}} {{Cl|&H}}3C9, 42 'blue intensity + +{{Cl|OUT}} {{Cl|&H}}3C7, 0 +{{Cl|PRINT}} {{Cl|INP}}({{Cl|&H}}3C9); {{Cl|INP}}({{Cl|&H}}3C9); {{Cl|INP}}({{Cl|&H}}3C9) +{{Cl|END}} +{{CodeEnd}} +{{OutputStartBG1}} 0 0 42 {{OutputEnd}} + + +''Example 3:'' Printing in fullscreen SCREEN 0 mode with a color background under the text only. +{{CodeStart}} +{{Cl|SCREEN}} 0: {{Cl|_FULLSCREEN}} ' used for fullscreen instead of window +{{Cl|COLOR}} 14, 6: {{Cl|LOCATE}} 4, 4: {{Cl|PRINT}} "Hello!" +{{CodeEnd}} +{{OutputStart}} + + + {{Ot|Hello!|#fcfc54|#aa5500}} +{{OutputEnd}} + + +''Example 4:'' Using [[CLS]] after setting the background color in SCREEN 0 to make the color cover the entire screen. +{{CodeStart}} +{{Cl|SCREEN}} 0: {{Cl|_FULLSCREEN}} +{{Cl|COLOR}} , 7: {{Cl|CLS}} +{{Cl|COLOR}} 9: {{Cl|PRINT}} "Hello" +{{CodeEnd}} +{{OutputStartBG7}} +{{Text|Hello|#5454fc}} +{{OutputEnd}} + + +''Example 5:'' Using a different foreground color for each letter: +{{CodeStart}} +{{Cl|SCREEN}} 0 +{{Cl|COLOR}} 1: {{Cl|PRINT}} "H"; +{{Cl|COLOR}} 3: {{Cl|PRINT}} "E"; +{{Cl|COLOR}} 4: {{Cl|PRINT}} "L"; +{{Cl|COLOR}} 5: {{Cl|PRINT}} "L"; +{{Cl|COLOR}} 6: {{Cl|PRINT}} "O" +{{Cl|COLOR}} 9: {{Cl|PRINT}} "W"; +{{Cl|COLOR}} 11: {{Cl|PRINT}} "O"; +{{Cl|COLOR}} 12: {{Cl|PRINT}} "R"; +{{Cl|COLOR}} 13: {{Cl|PRINT}} "L"; +{{Cl|COLOR}} 14: {{Cl|PRINT}} "D" +{{CodeEnd}} + +{{OutputStart}} +{{text|H|#0000aa}}{{text|E|#00aaaa}}{{text|L|#aa0000}}{{text|L|#aa00aa}}{{text|O|#aa5500}} +{{text|W|#5454fc}}{{text|O|#54fcfc}}{{text|R|#fc5454}}{{text|L|#fc54fc}}{{text|D|#fcfc54}} +{{OutputEnd}} + + +{{PageSeeAlso}} +* [[$COLOR]] (metacommand) +* [[_RGB]], [[_RGBA]], [[_RGB32]], [[RGBA32]]. +* [[_RED]], [[_GREEN]], [[_BLUE]] +* [[_RED32]], [[_GREEN32]], [[_BLUE32]] +* [[_ALPHA]], [[_ALPHA32]], [[_CLEARCOLOR]] +* [[PRINT]], [[LOCATE]], [[SCREEN]] +* [[POINT]], [[SCREEN (function)]] +* [[OUT]], [[INP]], [[PALETTE]] +* [[_BLINK]] +* [[_DEFAULTCOLOR]] +* [[_BACKGROUNDCOLOR]] +* [[_PALETTECOLOR]] +* [[Windows_Libraries#Color_Dialog_Box|Color Dialog Box]] +* [http://www.w3schools.com/html/html_colornames.asp Hexadecimal Color Values] + + +{{PageNavigation}} + diff --git a/internal/help/COMMAND$.txt b/internal/help/COMMAND$_1111111$.txt similarity index 97% rename from internal/help/COMMAND$.txt rename to internal/help/COMMAND$_1111111$.txt index f184710bd..88479e171 100644 --- a/internal/help/COMMAND$.txt +++ b/internal/help/COMMAND$_1111111$.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:22}} The '''COMMAND$''' function returns the command line argument(s) passed when a program is run. @@ -24,13 +26,13 @@ K$ = {{Cl|INPUT$}}(1) {{Cl|SYSTEM}} {{CodeEnd}} : ''ProgramB'' checks for fullscreen parameter pass in QB64 and goes full screen. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|LOCATE}} 17, 36: {{Cl|PRINT}} "ProgramB" parameter$ = {{Cl|UCASE$}}({{Cl|COMMAND$}}) 'UCASE$ is needed in QB64 only, as QB4.5 will always return upper case {{Cl|LOCATE}} 20, 33: {{Cl|PRINT}} "Parameter = " + parameter$ {{Cl|IF...THEN|IF}} {{Cl|LEFT$}}(parameter$, 2) = "FS" {{Cl|THEN}} {{Cl|_FULLSCREEN}} 'parameter changes to full screen -{{Cl|END}} '' '' +{{Cl|END}} {{CodeEnd}} {{OutputStart}} ProgramB @@ -59,7 +61,7 @@ a data file cmd$ = {{Cl|COMMAND$}}(count) {{Cl|IF...THEN|IF}} cmd$ = "" {{Cl|THEN}} {{Cl|EXIT DO}} 'read until an empty return {{Cl|PRINT}} cmd$ 'or process commands sent -{{Cl|LOOP}} '' '' +{{Cl|LOOP}} count = count - 1 'save the number of parameters sent to this program when run {{CodeEnd}} @@ -71,4 +73,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_111111.txt similarity index 68% rename from internal/help/COMMON.txt rename to internal/help/COMMON_111111.txt index 8d0b3f91e..f1e16bd44 100644 --- a/internal/help/COMMON.txt +++ b/internal/help/COMMON_111111.txt @@ -1,13 +1,15 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:23}} [[COMMON]] shares common variable values with other linked or [[CHAIN]]ed modules. -==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.''' - - {{PageSyntax}} : [[COMMON]] [SHARED] variableList +{{PageLegacySupport}} +* The multi-modular technique goes back to when '''QBasic''' and '''QuickBASIC''' had module size constraints. In '''QB64''' the [[COMMON]] statement has been implemented so that that older code can still be compiled, though it is advisable to use single modules for a single project (not counting [[$INCLUDE]] libraries), for ease of sharing and also because the module size constraints no longer exist. + + {{PageDescription}} * COMMON must be called before any executable statements. * [[SHARED]] makes the variables shared within [[SUB]] and [[FUNCTION]] procedures within that module. @@ -23,4 +25,4 @@ * [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]] {{PageNavigation}} -< + diff --git a/internal/help/CONST.txt b/internal/help/CONST_11111.txt similarity index 98% rename from internal/help/CONST.txt rename to internal/help/CONST_11111.txt index 23ba5776b..9a271aa4a 100644 --- a/internal/help/CONST.txt +++ b/internal/help/CONST_11111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:24}} The [[CONST]] statement globally defines one or more named numeric or string values which will not change while the program is running. @@ -54,7 +56,7 @@ Enter the radius of a circle or zero to quit? ''0'' ''Example 2'': Using _RGB32 to set a constant's value. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|CONST}} Red = _RGB32(255,0,0) {{Cl|COLOR}} Red @@ -69,4 +71,4 @@ Enter the radius of a circle or zero to quit? ''0'' {{PageNavigation}} -< + diff --git a/internal/help/COS.txt b/internal/help/COS_111.txt similarity index 92% rename from internal/help/COS.txt rename to internal/help/COS_111.txt index c790b2f26..fd8640a5c 100644 --- a/internal/help/COS.txt +++ b/internal/help/COS_111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:25}} The [[COS]] function returns the horizontal component or the cosine of an angle measured in radians. @@ -10,15 +12,15 @@ The [[COS]] function returns the horizontal component or the cosine of an angle {{PageDescription}} -* To convert from degrees to radians, multiply degrees * π / 180. -* [[COS]]INE is the horizontal component of a unit vector in the direction theta (θ). +* To convert from degrees to radians, multiply degrees * γ / 180. +* [[COS]]INE is the horizontal component of a unit vector in the direction theta (ι). * COS(x) can be calculated in either [[SINGLE]] or [[DOUBLE]] precision depending on its argument. ::: COS(4) = -.6536436 ...... COS(4#) = -.6536436208636119 {{PageExamples}} ''Example 1:'' Converting degree angles to radians for QBasic's trig functions and drawing the line at the angle. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|SCREEN}} 12 PI = 4 * {{Cl|ATN}}(1) {{Cl|PRINT}} "PI = 4 * {{Cl|ATN}}(1) ="; PI @@ -35,7 +37,7 @@ PI = 4 * {{Cl|ATN}}(1) {{Cl|LINE}} (400, 240)-(400 + (50 * {{Cl|SIN}}(RADIANS)), 240 + (50 * {{Cl|COS}}(RADIANS))), 11 DEGREES% = RADIANS * 180 / PI {{Cl|PRINT}} "DEGREES% = RADIANS * 180 / PI ="; DEGREES% -{{Cl|LOOP}} {{Cl|UNTIL}} DEGREES% = 0 '' '' +{{Cl|LOOP}} {{Cl|UNTIL}} DEGREES% = 0 {{CodeEnd}} {{OutputStart}} PI = 4 * ATN(1) = 3.141593 @@ -52,7 +54,7 @@ DEGREES% = RADIANS * 180 / PI = 45 ''Example 2:'' Creating 12 analog clock hour points using [[CIRCLE]]s and [[PAINT]] -{{CodeStart}} '' '' +{{CodeStart}} PI2 = 8 * {{Cl|ATN}}(1) '2 * Ο arc! = PI2 / 12 'arc interval between hour circles {{Cl|SCREEN (statement)|SCREEN}} 12 @@ -61,14 +63,14 @@ DEGREES% = RADIANS * 180 / PI = 45 cy% = {{Cl|CINT}}({{Cl|SIN}}(t!) * 70) ' pixel rows {{Cl|CIRCLE}} (cx% + 320, cy% + 240), 3, 12 {{Cl|PAINT}} {{Cl|STEP}}(0, 0), 9, 12 - NEXT '' '' + NEXT {{CodeEnd}} {{small|Code by Ted Weissgerber}} ''Explanation:'' The 12 circles are placed at radian angles that are 1/12 of 6.28318 or .523598 radians apart. ''Example 3:'' Creating a rotating spiral with COS and [[SIN]]. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) {{Cl|DO...LOOP|DO}} @@ -89,7 +91,7 @@ DEGREES% = RADIANS * 180 / PI = 45 {{Cl|_DISPLAY}} {{Cl|_LIMIT}} 30 -{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INP}}({{Cl|&H}}60) = 1 'escape exit '' '' +{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INP}}({{Cl|&H}}60) = 1 'escape exit {{CodeEnd}} {{small|Code by Ben}} @@ -104,4 +106,4 @@ DEGREES% = RADIANS * 180 / PI = 45 {{PageNavigation}} -< + diff --git a/internal/help/CSNG.txt b/internal/help/CSNG_1111.txt similarity index 93% rename from internal/help/CSNG.txt rename to internal/help/CSNG_1111.txt index e76c343e2..80dc9d073 100644 --- a/internal/help/CSNG.txt +++ b/internal/help/CSNG_1111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:27}} [[CSNG]] converts a numerical value to the closest [[SINGLE]]-precision number. @@ -30,4 +32,4 @@ {{PageNavigation}} -< + diff --git a/internal/help/CSRLIN.txt b/internal/help/CSRLIN_111111.txt similarity index 95% rename from internal/help/CSRLIN.txt rename to internal/help/CSRLIN_111111.txt index 515ef3646..5788b2697 100644 --- a/internal/help/CSRLIN.txt +++ b/internal/help/CSRLIN_111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:28}} The [[CSRLIN]] function returns the current text row position of the [[PRINT]] cursor. @@ -16,13 +18,13 @@ The [[CSRLIN]] function returns the current text row position of the [[PRINT]] c {{PageExamples}} ''Example:'' A semicolon stops the print cursor immediately after the print. -{{CodeStart}} '' '' +{{CodeStart}} LOCATE 5, 5: PRINT "HELLO "; Y = {{Cl|CSRLIN}} 'save the row X = {{Cl|POS}}(0) 'save the column LOCATE 10, 10: PRINT "WORLD" LOCATE Y, X 'restore saved position - PRINT "GOODBYE" '' '' + PRINT "GOODBYE" {{CodeEnd}} {{OutputStart}} @@ -48,4 +50,4 @@ The [[CSRLIN]] function returns the current text row position of the [[PRINT]] c {{PageNavigation}} -< + diff --git a/internal/help/CVDMBF.txt b/internal/help/CVDMBF_111111.txt similarity index 97% rename from internal/help/CVDMBF.txt rename to internal/help/CVDMBF_111111.txt index ef0f1fed8..92da9e86c 100644 --- a/internal/help/CVDMBF.txt +++ b/internal/help/CVDMBF_111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:31}} The [[CVDMBF]] function decodes an 8-byte [[STRING]] generated by [[MKDMBF$]] (or read from a file) to [[DOUBLE]] numeric values. @@ -37,4 +39,4 @@ The string above, decoded using CVDMBF: 77000.24523213 {{PageNavigation}} -< + diff --git a/internal/help/CVD.txt b/internal/help/CVD_111.txt similarity index 96% rename from internal/help/CVD.txt rename to internal/help/CVD_111.txt index 52a924641..d96ef9128 100644 --- a/internal/help/CVD.txt +++ b/internal/help/CVD_111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:29}} The [[CVD]] function decodes an 8-byte [[STRING]] generated by [[MKD$]] (or read from a file) to [[DOUBLE]] numeric values. @@ -14,10 +16,10 @@ The [[CVD]] function decodes an 8-byte [[STRING]] generated by [[MKD$]] (or read {{PageExamples}} ''Example 1:'' Reading an 8-byte encoded string n$ from a file and obtaining the decoded [[DOUBLE]] value: -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|FIELD}} #1, 8 {{Cl|AS}} N$, 12 {{Cl|AS}} B$... {{Cl|GET}} #1 -Y# = {{Cl|CVD}}(N$) '' '' +Y# = {{Cl|CVD}}(N$) {{CodeEnd}} : ''Explanation:'' Reads a field from file #1, and converts the first eight bytes (N$) into an double-precision number assigned to the variable Y#. @@ -48,4 +50,4 @@ The string above, decoded using CVD: 77000.24523213 {{PageNavigation}} -< + diff --git a/internal/help/CVI.txt b/internal/help/CVI_111.txt similarity index 93% rename from internal/help/CVI.txt rename to internal/help/CVI_111.txt index faa62372b..c333a7a88 100644 --- a/internal/help/CVI.txt +++ b/internal/help/CVI_111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:32}} The [[CVI]] function decodes a 2-byte [[STRING]] generated by [[MKI$]] (or read from a file) to [[INTEGER]] numeric values. @@ -14,10 +16,10 @@ The [[CVI]] function decodes a 2-byte [[STRING]] generated by [[MKI$]] (or read {{PageExamples}} ''Example 1:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|FIELD}} #1, 2 {{Cl|AS}} N$, 12 {{Cl|AS}} B$... {{Cl|GET}} #1 'GET does not need a position or variable with successive FIELD buffer reads -Y = {{Cl|CVI}}(N$) '' '' +Y = {{Cl|CVI}}(N$) {{CodeEnd}} :''Explanation:'' Reads a field from file #1, and converts the first two bytes (N$) into an integer number assigned to the variable Y. :Since the representation of an integer number can use up to 5 ASCII characters (five bytes), writing to a file using [[MKI$]] conversion, and then reading back with the [[CVI]] conversion can save up to 3 bytes of storage space. @@ -31,12 +33,12 @@ Q = {{Cl|CHR$}}(34) ' create Print using templates to align the values returned tmp1$ = "1st character code = ### * 1 = ### " tmp2$ = "2nd character code = ### * 256 = ##### " -tmp3$ = " & " +tmp3$ = " & " tmp4$ = " CVI Total = ##### " {{Cl|DO...LOOP|DO}} {{Cl|COLOR}} 14: {{Cl|LOCATE}} 13, 20: {{Cl|INPUT}} "Enter an Integer from 1 to 32767(0 quits): ", number% - {{Cl|IF...THEN|IF}} number% < 1 {{Cl|THEN}} {{Cl|EXIT DO}} + {{Cl|IF...THEN|IF}} number% < 1 {{Cl|THEN}} {{Cl|EXIT DO}} {{Cl|CLS}} ASCII$ = {{Cl|MKI$}}(number%) ' create the 2 byte character string {{Cl|COLOR}} 11 @@ -50,7 +52,7 @@ tmp4$ = " CVI Total = ##### " {{Cl|LOCATE}} 20, 20: {{Cl|PRINT USING}} tmp3$; "-----" {{Cl|LOCATE}} 21, 20: {{Cl|PRINT USING}} tmp4$; asc1% + (256 * asc2%) {{Cl|LOOP}} -{{Cl|SYSTEM}} '' '' +{{Cl|SYSTEM}} {{CodeEnd}} {{small|Code by Ted Weissgerber}} :''Explanation:'' All [[ASCII]] characters can be displayed using [[_PRINTSTRING]] . The routine gets the [[ASCII]] code, which is the actual value needed by [[CVI]]. The first byte code is always between 0 and 255. The second byte can return 0 thru 127 and CVI multiplies that value by 256. This proves that you cannot just feed a string number value to [[CVI]] and get the result desired. ("90" gets decoded to 12345). @@ -63,4 +65,4 @@ tmp4$ = " CVI Total = ##### " {{PageNavigation}} -< + diff --git a/internal/help/CVL.txt b/internal/help/CVL_111.txt similarity index 88% rename from internal/help/CVL.txt rename to internal/help/CVL_111.txt index 7d1316a54..b9b0c8f8c 100644 --- a/internal/help/CVL.txt +++ b/internal/help/CVL_111.txt @@ -1,8 +1,10 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:33}} The [[CVL]] function decodes a 4-byte [[STRING]] generated by [[MKL$]] (or read from a file) to [[LONG]] numeric values. {{PageSyntax}} -: {{Parameter|result&}} = [[CVL]]({{Parameter|stringData$}}) +: {{Parameter|result&}} = [[CVL]]({{Parameter|stringData$}}) {{PageDescription}} @@ -14,21 +16,21 @@ The [[CVL]] function decodes a 4-byte [[STRING]] generated by [[MKL$]] (or read {{PageExamples}} ''Example 1: 4 byte [[ASCII]] character strings show how CVL multipliers convert [[MKL$]] values into a 4 byte [[LONG]] value. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|PRINT}} {{Cl|CVL}}({{Cl|CHR$}}(1) + {{Cl|STRING$}}(3, 0)) '{{Cl|ASC}}(CHR$(1)) * 1 = 1 {{Cl|PRINT}} {{Cl|CVL}}({{Cl|CHR$}}(0) + {{Cl|CHR$}}(1) + {{Cl|STRING$}}(2, 0)) '{{Cl|ASC}}(CHR$(1)) * 256 = 256 {{Cl|PRINT}} {{Cl|CVL}}({{Cl|STRING$}}(2, 0) + {{Cl|CHR$}}(1) + {{Cl|CHR$}}(0)) '{{Cl|ASC}}(CHR$(1)) * 256 * 256 = 65536 -{{Cl|PRINT}} {{Cl|CVL}}({{Cl|STRING$}}(3, 0) + {{Cl|CHR$}}(1)) '{{Cl|ASC}}(CHR$(1)) * 256 * 256 * 256 = 16777216 '' '' +{{Cl|PRINT}} {{Cl|CVL}}({{Cl|STRING$}}(3, 0) + {{Cl|CHR$}}(1)) '{{Cl|ASC}}(CHR$(1)) * 256 * 256 * 256 = 16777216 {{CodeEnd}} ''Example 2:'' -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|FIELD}} #1, 4 {{Cl|AS}} N$, 12 {{Cl|AS}} B$... {{Cl|GET}} #1 -Y& = {{Cl|CVL}}(N$) '' '' +Y& = {{Cl|CVL}}(N$) {{CodeEnd}} -:''Explanation:'' Reads a field from file #1, and converts the first four bytes (N$) into a long integer value assigned to the variable Y&. +:''Explanation:'' Reads a field from file #1, and converts the first four bytes (N$) into a long integer value assigned to the variable Y&. :Since the representation of a long number can use up to 10 ASCII characters (ten bytes), writing to a file using [[MKL$]] conversion, and then reading back with the [[CVL]] conversion can save up to 6 bytes of storage space. @@ -40,4 +42,4 @@ Y& = {{Cl|CVL}}(N$) '' '' {{PageNavigation}} -< + diff --git a/internal/help/CVSMBF.txt b/internal/help/CVSMBF_111111.txt similarity index 97% rename from internal/help/CVSMBF.txt rename to internal/help/CVSMBF_111111.txt index e35259d1c..1bac30ebe 100644 --- a/internal/help/CVSMBF.txt +++ b/internal/help/CVSMBF_111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:36}} The [[CVDMBF]] function decodes a 4-byte [[STRING]] generated by [[MKSMBF$]] (or read from a file) to [[SINGLE]] numeric values. @@ -35,4 +37,4 @@ The string above, decoded using CVSMBF: 700.2213 {{PageNavigation}} -< + diff --git a/internal/help/CVS.txt b/internal/help/CVS_111.txt similarity index 96% rename from internal/help/CVS.txt rename to internal/help/CVS_111.txt index e6f3bbf13..3ffb47b2d 100644 --- a/internal/help/CVS.txt +++ b/internal/help/CVS_111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:34}} The [[CVS]] function decodes a 4-byte [[STRING]] generated by [[MKS$]] (or read from a file) to [[SINGLE]] numeric values. @@ -35,4 +37,4 @@ The string above, decoded using CVS: 700.2213 {{PageNavigation}} -< + diff --git a/internal/help/Colon.txt b/internal/help/Colon_10000.txt similarity index 93% rename from internal/help/Colon.txt rename to internal/help/Colon_10000.txt index 6b56527c0..f61c345c0 100644 --- a/internal/help/Colon.txt +++ b/internal/help/Colon_10000.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:24:41}} A '''colon''' can be used to separate two unrelated procedure statements on the same line. @@ -20,4 +22,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_1111.txt similarity index 94% rename from internal/help/DATA.txt rename to internal/help/DATA_1111.txt index 4398a0145..2555ecacc 100644 --- a/internal/help/DATA.txt +++ b/internal/help/DATA_1111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:37}} The [[DATA]] statement creates a line of fixed program information separated by commas. The DATA can be later READ by the program at runtime. @@ -23,7 +25,7 @@ The [[DATA]] statement creates a line of fixed program information separated by {{PageExamples}} ''Example 1:'' Creating two DATA fields that can be [[READ]] repeatedly using [[RESTORE]] with the appropriate line label. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|RESTORE}} Database2 {{Cl|READ}} A$, B$, C$, D$ 'read 4 string values from second DATA field PRINT A$ + B$ + C$ + D$ 'note that quoted strings values are spaced @@ -41,7 +43,7 @@ Database1: {{Cl|DATA}} 2, 0, 0, 2, 2, 0, 2, 2, 2 : ' DATA line comments require a colon Database2: -{{Cl|DATA}} "Hello, ", "world! ", Goodbye, work! '' '' +{{Cl|DATA}} "Hello, ", "world! ", Goodbye, work! {{CodeEnd}} {{OutputStart}}Hello world! Goodbyework! 1 0 0 1 1 0 1 1 1 2 0 0 2 2 0 2 2 2 @@ -49,9 +51,9 @@ Database2: ''Example 2:'' How to [[RESTORE]] and [[READ]] DATA in a [[SUB]] procedure in QB64. Line labels can be used for multiple DATA fields. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|DIM}} {{Cl|SHARED}} num(10) 'shared array or must be passed as a parameter -ReadData 2 '<<<<<<< change value to 1 to read other data +ReadData 2 '<<<<<<< change value to 1 to read other data {{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 10 {{Cl|PRINT}} num(i); {{Cl|NEXT}} @@ -67,7 +69,7 @@ mydata1: {{Cl|DATA}} 1,2,3,4,5,6,7,8,9,10 mydata2: {{Cl|DATA}} 10,9,8,7,6,5,4,3,2,1 -{{Cl|END SUB}} '' '' +{{Cl|END SUB}} {{CodeEnd}} {{OutputStart}} 10 9 8 7 6 5 4 3 2 1 {{OutputEnd}} @@ -79,4 +81,4 @@ mydata2: {{PageNavigation}} -< + diff --git a/internal/help/DATE$_(statement).txt b/internal/help/DATE$_(statement).txt deleted file mode 100644 index 931841834..000000000 --- a/internal/help/DATE$_(statement).txt +++ /dev/null @@ -1 +0,0 @@ -< diff --git a/internal/help/DATE$.txt b/internal/help/DATE$_1111$.txt similarity index 89% rename from internal/help/DATE$.txt rename to internal/help/DATE$_1111$.txt index 5288e348a..694cf32c3 100644 --- a/internal/help/DATE$.txt +++ b/internal/help/DATE$_1111$.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:12:38}} The [[DATE$]] function returns the current computer date as a string in the format "mm-dd-yyyy". @@ -11,7 +13,7 @@ The [[DATE$]] function returns the current computer date as a string in the form {{PageExamples}} ''Example:'' Displaying the weekday and current date. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|PRINT}} {{Cl|DATE$}} month$ = {{Cl|LEFT$}}({{Cl|DATE$}}, 2): M = {{Cl|VAL}}(month$) day$ = {{Cl|MID$}}({{Cl|DATE$}}, 4, 2): D = {{Cl|VAL}}(day$) @@ -35,13 +37,13 @@ year$ = {{Cl|RIGHT$}}({{Cl|DATE$}}, 4): Y = {{Cl|VAL}}(year$) {{Cl|DEFINT}} A-Z {{Cl|FUNCTION}} WeekDay$ (M, D, Y) -{{Cl|IF}} M < 3 {{Cl|THEN}} M = M + 12: Y = Y - 1 'add 12 to Jan - Feb month, -1 year +{{Cl|IF}} M < 3 {{Cl|THEN}} M = M + 12: Y = Y - 1 'add 12 to Jan - Feb month, -1 year C = Y \ 100: Y = Y {{Cl|MOD}} 100 'split century and year number S1 = (C \ 4) - (2 * C) - 1 'century leap S2 = (5 * Y) \ 4 '4 year leap S3 = 26 * (M + 1) \ 10 'days in months WkDay = (S1 + S2 + S3 + D) {{Cl|MOD}} 7 'weekday total remainder -{{Cl|IF}} WkDay < 0 {{Cl|THEN}} WkDay = WkDay + 7 'Adjust negative results to 0 to 6 +{{Cl|IF}} WkDay < 0 {{Cl|THEN}} WkDay = WkDay + 7 'Adjust negative results to 0 to 6 {{Cl|SELECT CASE}} WkDay {{Cl|CASE}} 0: day$ = "Sunday" {{Cl|CASE}} 1: day$ = "Monday" @@ -52,7 +54,7 @@ WkDay = (S1 + S2 + S3 + D) {{Cl|MOD}} 7 'weekday total remainder {{Cl|CASE}} 6: day$ = "Saturday" {{Cl|END SELECT}} WeekDay$ = day$ -{{Cl|END FUNCTION}} '' '' +{{Cl|END FUNCTION}} {{CodeEnd}} {{small|Code by Ted Weissgerber}} {{OutputStart}} @@ -68,4 +70,4 @@ Today is Wednesday, June 2, 2010 {{PageNavigation}} -< + diff --git a/internal/help/DECLARE_(non-BASIC_statement).txt b/internal/help/DECLARE_(non-BASIC_statement).txt deleted file mode 100644 index 931841834..000000000 --- a/internal/help/DECLARE_(non-BASIC_statement).txt +++ /dev/null @@ -1 +0,0 @@ -< diff --git a/internal/help/DECLARE_DYNAMIC_LIBRARY.txt b/internal/help/DECLARE_DYNAMIC_LIBRARY_1111111_1111111_1111111.txt similarity index 87% rename from internal/help/DECLARE_DYNAMIC_LIBRARY.txt rename to internal/help/DECLARE_DYNAMIC_LIBRARY_1111111_1111111_1111111.txt index 77d1d9cc9..d84722c3e 100644 --- a/internal/help/DECLARE_DYNAMIC_LIBRARY.txt +++ b/internal/help/DECLARE_DYNAMIC_LIBRARY_1111111_1111111_1111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:07:31}} '''DECLARE DYNAMIC LIBRARY''' allows you to dynamically link your program to functions in dynamically linkable libraries. At present, only ''.DLL'' files are supported (support for ''.so'' will be added soon). These libraries are loaded when your program begins. @@ -34,9 +36,9 @@ {{PageExamples}} ''Example 1:'' This example plays Midi files using the ''playmidi32.dll'' documented here: [http://libertybasicuniversity.com/lbnews/nl110/midi3.htm Liberty Basic University]. Download the following DLL file to your main QB64 folder: [https://www.qb64.org/resources/Playmidi32.dll PlayMidi32.dll] -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|DECLARE DYNAMIC LIBRARY}} "playmidi32" - {{Cl|FUNCTION}} PlayMIDI& (filename {{Cl|AS}} {{Cl|STRING}}) + {{Cl|FUNCTION}} PlayMIDI& (filename {{Cl|AS}} {{Cl|STRING}}) {{Cl|DECLARE LIBRARY|END DECLARE}} result = PlayMIDI(".\samples\qb64\original\ps2battl.mid" + {{Cl|CHR$}}(0)) {{Cl|PRINT}} result @@ -45,12 +47,12 @@ result = PlayMIDI(".\samples\qb64\original\ps2battl.mid" + {{Cl|CHR$}}(0)) ''Example 2:'' Using a CUSTOMTYPE LIBRARY to return the [[Unicode]] version of the current running program's name. -{{CodeStart}} '' '' +{{CodeStart}} {{Cl|SCREEN}} 12 {{Cl|DECLARE DYNAMIC LIBRARY|DECLARE CUSTOMTYPE LIBRARY}} 'Directory Information using KERNEL32 provided by Dav - {{Cl|FUNCTION}} GetModuleFileNameA& ({{Cl|BYVAL}} hModule {{Cl|AS}} {{Cl|LONG}}, lpFileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}}) - {{Cl|FUNCTION}} GetModuleFileNameW& ({{Cl|BYVAL}} hModule {{Cl|AS}} {{Cl|LONG}}, lpFileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}}) + {{Cl|FUNCTION}} GetModuleFileNameA& ({{Cl|BYVAL}} hModule {{Cl|AS}} {{Cl|LONG}}, lpFileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}}) + {{Cl|FUNCTION}} GetModuleFileNameW& ({{Cl|BYVAL}} hModule {{Cl|AS}} {{Cl|LONG}}, lpFileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}}) {{Cl|DECLARE LIBRARY|END DECLARE}} '=== SHOW CURRENT PROGRAM @@ -82,14 +84,14 @@ b$ = {{Cl|STRING$}}({{Cl|LEN}}(a$) * 2, 0) {{Cl|ASC}}(b$, i * 4 - 2) = {{Cl|ASC}}(a$, i * 2) {{Cl|NEXT}} QuickUTF16toUTF32$ = b$ -{{Cl|END FUNCTION}} '' '' +{{Cl|END FUNCTION}} {{CodeEnd}} {{small|Code by Galleon}} : '''Note:''' SUB procedures using CUSTOMTYPE LIBRARY API procedures inside may error. Try DYNAMIC with "KERNEL32". -<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> +([[#toc|Return to Table of Contents]])
==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}} '' '' +{{CodeStart}} {{Cl|KEY n|KEY}} 1, "Help" {{Cl|KEY LIST}} INPUT "Press F1 or to quit press ENTER: ", a$ @@ -121,7 +123,7 @@ Press F1 or to quit press ENTER: HelpHelpHelpHelp ''Example 2:'' Trapping the Control + key combination. Use the Control Keyboard flag 4 and + key scancode 13. {{CodeStart}} -{{Cl|CLS}} '' '' +{{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 @@ -134,13 +136,13 @@ count = count + 1 control: 'NUMBER LOCK MUST BE OFF! {{Cl|PRINT}} "Control and + keys pressed!"; -{{Cl|RETURN}} '' '' +{{Cl|RETURN}} {{CodeEnd}} {{small|Code by Ted Weissgerber}} ''Example 3:'' Differentiating the extended cursor keypad arrows from the predefined Number Pad arrow keys. -{{CodeStart}} '' '' +{{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 @@ -195,12 +197,12 @@ COLOR 11: LOCATE 11, 26: PRINT "Right number pad" {{Cl|RETURN}} DnNum: COLOR 11: LOCATE 11, 26: PRINT "Down number pad " -{{Cl|RETURN}} '' '' +{{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> +([[#toc|Return to Table of Contents]])
{{PageSeeAlso}} @@ -211,4 +213,4 @@ COLOR 11: LOCATE 11, 26: PRINT "Down number pad " {{PageNavigation}} -< + diff --git a/internal/help/KEY_n.txt b/internal/help/KEY_n_111_0.txt similarity index 88% rename from internal/help/KEY_n.txt rename to internal/help/KEY_n_111_0.txt index 3cff545ab..144701372 100644 --- a/internal/help/KEY_n.txt +++ b/internal/help/KEY_n_111_0.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:13:57}} 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. {{PageSyntax}} @@ -7,9 +9,9 @@ The [[KEY n]] statement is used to assign a "soft key" string or a flag and scan : '''KEY ''n%'', CHR$(''keyFlag%'') + CHR$(''scanCode'')''' -==Function Soft Key Strings (1 to 10, 30 & 31)== +==Function Soft Key Strings (1 to 10, 30 & 31)== -<center>'''Assigning "Softkey" [[STRING]] values to function key press events'''</center> +([[#toc|Return to Table of Contents]])
==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}} '' '' +{{CodeStart}} {{Cl|KEY n|KEY}} 1, "Help" {{Cl|KEY LIST}} INPUT "Press F1 or to quit press ENTER: ", a$ @@ -121,7 +123,7 @@ Press F1 or to quit press ENTER: HelpHelpHelpHelp ''Example 2:'' Trapping the Control + key combination. Use the Control Keyboard flag 4 and + key scancode 13. {{CodeStart}} -{{Cl|CLS}} '' '' +{{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 @@ -134,13 +136,13 @@ count = count + 1 control: 'NUMBER LOCK MUST BE OFF! {{Cl|PRINT}} "Control and + keys pressed!"; -{{Cl|RETURN}} '' '' +{{Cl|RETURN}} {{CodeEnd}} {{small|Code by Ted Weissgerber}} ''Example 3:'' Differentiating the extended cursor keypad arrows from the predefined Number Pad arrow keys. -{{CodeStart}} '' '' +{{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 @@ -195,12 +197,12 @@ COLOR 11: LOCATE 11, 26: PRINT "Right number pad" {{Cl|RETURN}} DnNum: COLOR 11: LOCATE 11, 26: PRINT "Down number pad " -{{Cl|RETURN}} '' '' +{{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> +([[#toc|Return to Table of Contents]])
{{PageSeeAlso}} @@ -211,4 +213,4 @@ COLOR 11: LOCATE 11, 26: PRINT "Down number pad " {{PageNavigation}} -< + diff --git a/internal/help/KILL.txt b/internal/help/KILL_1111.txt similarity index 94% rename from internal/help/KILL.txt rename to internal/help/KILL_1111.txt index f5fd0ed6c..17dd23e7a 100644 --- a/internal/help/KILL.txt +++ b/internal/help/KILL_1111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:14:01}} The [[KILL]] statement deletes a file designated by a [[STRING]] value or variable. @@ -20,7 +22,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,4 +33,4 @@ KILL "C:\Qbasic\data\2000data.dat" {{PageNavigation}} -< + diff --git a/internal/help/Keyword_Reference_-_Alphabetical.txt b/internal/help/Keyword_Reference_-_Alphabetical_1000000_100000000_-_100000000000.txt similarity index 88% rename from internal/help/Keyword_Reference_-_Alphabetical.txt rename to internal/help/Keyword_Reference_-_Alphabetical_1000000_100000000_-_100000000000.txt index c6dfb0b08..e139a6683 100644 --- a/internal/help/Keyword_Reference_-_Alphabetical.txt +++ b/internal/help/Keyword_Reference_-_Alphabetical_1000000_100000000_-_100000000000.txt @@ -1,42 +1,45 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:06:11}} +__NOEDITSECTION__ __NOTOC__ -<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> +
'''Alphabetical QB64 Keyword Listings'''
Β Β Β Β '''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]] Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β
'''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]]Β Β Β
'''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]] Β Β Β Β Β
[[#symbols|Symbols]] '''Β Β Β -Β Β Β ''' [[#references|References]]
{{small|Menu Created by Cyperium}}
[[Keyword Reference - By usage|Go to keywords by Usage]]
-<p style="text-align: center">Keywords beginning with _underscores are QB64 specific. '''To use them without the prefix, use [[$NOPREFIX]].'''</p> +Keywords beginning with _underscores are QB64 specific. '''To use them without the prefix, use [[$NOPREFIX]].'''
-<p style="text-align: center">[[Keywords currently not supported by QB64]]</p> +[[Keywords currently not supported by QB64]]
-<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> +[[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords Not Supported in Linux or MAC versions]]
-<p style="text-align: center">Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.</p> +Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.
-<p style="text-align: center">For comments or suggestions about this WIKI goto the [http://qb64phoenix.com/forum/index.php QB64 Forum].</p> +For comments or suggestions about this WIKI goto the [http://qb64phoenix.com/forum/index.php QB64 Forum].
-<center> '''If code examples only display partial code, use the browser Refresh button'''</center> +The underscore prefix is reserved for QB64 _KEYWORDS only.
-<div id = "uA">_A</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uC">_C</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uD">_D</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uF">_F</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uH">_H</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uK">_K</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uM">_M</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uO">_O</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uR">_R</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uS">_S</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "uT">_T</div> +([[#toc|Return to Table of Contents]])
-<center>([[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to Top of QB64 specific keywords]])</center> +These QBasic keywords (with a few noted exceptions) will work in all versions of QB64.
''' -<div id = "A">A</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "C">C</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "D">D</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "E">E</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "F">F</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "H">H</div> -* [[HEX$]] (function) {{text|returns the hexadecimal(base 16) [[STRING]] representation of a decimal [[INTEGER]] value.}} +([[#toc|Return to Table of Contents]])
---- -<div id = "K">K</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "L">L</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "M">M</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "O">O</div> -* [[OCT$]] (function) {{text|returns the octal (base 8) [[STRING]] representation of a decimal [[INTEGER]] value.}} +([[#toc|Return to Table of Contents]])
---- -<div id = "P">P</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "R">R</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "S">S</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "T">T</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "V">V</div> +([[#toc|Return to Table of Contents]])
-<center>([[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]])</center> +([[#toc|Return to Table of Contents]])
---- -<div id = "glC">_glC</div> +([[#toc|Return to Table of Contents]])
* [[_glColor3s]] (statement) {{text|OpenGL command}} * [[_glColor3sv]] (statement) {{text|OpenGL command}} * [[_glColor3ub]] (statement) {{text|OpenGL command}} @@ -927,9 +935,9 @@ __NOTOC__ * [[_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> +([[#toc|Return to Table of Contents]])
---- -<div id = "glD">_glD</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glF">_glF</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glG">_glG</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glH">_glH</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glL">_glL</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glM">_glM</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glO">_glO</div> +([[#toc|Return to Table of Contents]])
---- -<div id = "glR">_glR</div> +([[#toc|Return to Table of Contents]])
* [[_glRasterPos4f]] (statement) {{text|OpenGL command}} * [[_glRasterPos4fv]] (statement) {{text|OpenGL command}} * [[_glRasterPos4i]] (statement) {{text|OpenGL command}} @@ -1163,14 +1171,13 @@ __NOTOC__ * [[_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> +([[#toc|Return to Table of Contents]])
---- -<div id = "glS">_glS</div> +([[#toc|Return to Table of Contents]])
* [[_glTexCoord3iv]] (statement) {{text|OpenGL command}} * [[_glTexCoord3s]] (statement) {{text|OpenGL command}} * [[_glTexCoord3sv]] (statement) {{text|OpenGL command}} @@ -1238,9 +1245,9 @@ __NOTOC__ * [[_glTranslated]] (statement) {{text|OpenGL command}} * [[_glTranslatef]] (statement) {{text|OpenGL command}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
---- -<div id = "glV">_glV</div> +([[#toc|Return to Table of Contents]])
-<div id = "symbols"></div> + ==Symbols:== -<center>'''QB64 and QB Symbols:'''</center> +([[#toc|Return to Table of Contents]])
:'''Variable Name Type Suffixes''' * [[STRING|$ STRING]] text character type: 1 byte @@ -1306,18 +1313,18 @@ __NOTOC__ * [[_FLOAT|## _FLOAT]] '''QB64''' decimal point numerical type (32 bytes) * [[_UNSIGNED|~ _UNSIGNED]] '''QB64''' [[INTEGER|whole]] positive numerical type when it precedes the 6 numerical suffixes below: * [[INTEGER|% INTEGER]] [[INTEGER|whole]] numerical type (2 bytes) -* [[LONG|& LONG]] [[INTEGER|whole]] numerical type (4 bytes} -* [[_INTEGER64|&& _INTEGER64]] '''QB64''' [[INTEGER|whole]] numerical type (8 bytes) +* [[LONG|& LONG]] [[INTEGER|whole]] numerical type (4 bytes} +* [[_INTEGER64|&& _INTEGER64]] '''QB64''' [[INTEGER|whole]] numerical type (8 bytes) * [[_BIT|` _BIT]] '''QB64''' [[INTEGER|whole]] numerical type (1 bit) (Key below tilde (~) or [[CHR$]](96)) * [[_BYTE|%% _BYTE]] '''QB64''' [[INTEGER|whole]] numerical type (1 byte) -* [[_OFFSET|%& _OFFSET]] '''QB64''' [[INTEGER|whole]] numerical pointer address type (any byte size required) +* [[_OFFSET|%& _OFFSET]] '''QB64''' [[INTEGER|whole]] numerical pointer address type (any byte size required) -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
:'''Numerical Base Prefixes''' -* [[&B|&B Binary]] Base 2: Digits 0 or 1 ['''QB64'''] -* [[&O|&O Octal]] Base 8: Digits 0 to 7 -* [[&H|&H Hexadecimal]] Base 16: Digits 0 to F +* [[&B|&B Binary]] Base 2: Digits 0 or 1 ['''QB64'''] +* [[&O|&O Octal]] Base 8: Digits 0 to 7 +* [[&H|&H Hexadecimal]] Base 16: Digits 0 to F :'''[[Mathematical Operations]]''' @@ -1332,18 +1339,18 @@ __NOTOC__ :'''[[Relational Operations]]''' * [[Equal|=]] Equal to condition -* [[Not_Equal|<>]] Not equal condition +* [[Not_Equal|<>]] Not equal condition * [[Greater_Than|>]] Greater than condition -* [[Less_Than|<]] Less than condition +* [[Less_Than|<]] Less than condition * [[Greater_Than_Or_Equal|>=]] Greater than or equal to condition -* [[Less_Than_Or_Equal|<=]] Less than or equal to condition +* [[Less_Than_Or_Equal|<=]] Less than or equal to condition -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
==References:== -<div id = "references"></div> + -<center>'''WIKI Pages''' +([[#toc|Return to Table of Contents]])
+ diff --git a/internal/help/Keyword_Reference_-_By_usage.txt b/internal/help/Keyword_Reference_-_By_usage_1000000_100000000_-_10_00000.txt similarity index 90% rename from internal/help/Keyword_Reference_-_By_usage.txt rename to internal/help/Keyword_Reference_-_By_usage_1000000_100000000_-_10_00000.txt index 52f3c073f..beabc16a8 100644 --- a/internal/help/Keyword_Reference_-_By_usage.txt +++ b/internal/help/Keyword_Reference_-_By_usage_1000000_100000000_-_10_00000.txt @@ -1,6 +1,9 @@ -{| align="Right" - | __TOC__ - |} +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:06:15}} +__NOEDITSECTION__ +{|align="Right" +|__TOC__ +|} @@ -15,7 +18,7 @@ == [[Arrays]] and Data Storage == -<center>'''Arrays'''</center> +([[#toc|Return to Table of Contents]])
== [[COLOR|Colors]] and Transparency == @@ -75,8 +78,8 @@ * [[CLS]] (statement) {{text|clears the screen and can set the background color in QB64.}} * [[COLOR]] (statement) {{text|sets the current text color attribute or [[_RGB]] value to be used or background colors in some screen modes.}} -* [[INP]] (function) {{text|returns the RGB color intensity values from color port register &H3C9 for a specific attributes.}} -* [[OUT]] (statement) {{text|sets the color port access mode and sets the RGB color intensity values using &H3C9.}} +* [[INP]] (function) {{text|returns the RGB color intensity values from color port register &H3C9 for a specific attributes.}} +* [[OUT]] (statement) {{text|sets the color port access mode and sets the RGB color intensity values using &H3C9.}} * [[PALETTE]] (statement) {{text|sets the Red, Green and Blue color attribute intensities using a RGB multiplier calculation.}} * [[PALETTE USING]] (statement) {{text|sets the color intensity settings using a designated [[arrays|array]].}} * [[POINT]] (function) {{text|returns a pixel coordinate color attribute or the [[LONG]] [[_RGB]] color value of a 32 bit color.}} @@ -84,7 +87,7 @@ * [[PSET]] (statement) {{text|sets a pixel coordinate a specified color or uses the current color when not designated.}} * [[SCREEN]] {{text|sets the screen mode of a program which may determine the number of colors available in legacy modes.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
==[[Console Window]]== * [[$CONSOLE]] (QB64 [[Metacommand]]) {{text|creates a console window throughout the program.}} @@ -98,7 +101,7 @@ * [[_SHELLHIDE]] (function) {{text|hides a DOS command or call to another program. Returns codes sent by [[END]] or [[SYSTEM]].}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Conditional Operations == @@ -112,10 +115,10 @@ {{Template:RelationalOperationsTable}} -<center>See also: [[#Logical Bitwise Operations|Logical Operations]] and [[Relational Operations]]</center> +([[#toc|Return to Table of Contents]])
== Definitions and Variable Types == @@ -123,9 +126,9 @@ * [[_BYTE]] {%% numerical [[TYPE|type]]) {{text|values from -128 to 127 (one byte or 8 [[_BIT]]s). [[_UNSIGNED|Unsigned]] from 0 to 255.}} * [[_DEFINE]] (statement) {{text|defines a range of untyped variable names according to their first character as a datatype.}} * [[_FLOAT]] {## numerical [[TYPE|type]]) {{text|values offer the maximum floating-point decimal precision available using QB64.}} -* [[_INTEGER64]] (&& numerical [[TYPE|type]]) {{text|values -9223372036854775808 to 9223372036854775807. [[_UNSIGNED|Unsigned]] to 18446744073709551615.}} +* [[_INTEGER64]] (&& numerical [[TYPE|type]]) {{text|values -9223372036854775808 to 9223372036854775807. [[_UNSIGNED|Unsigned]] to 18446744073709551615.}} * [[_MEM]] (variable type) {{text|contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.}} -* [[_OFFSET]](%& variable type) {{text|can store any memory offset integer value when using [[DECLARE LIBRARY]] or [[_MEM]]ory only.}} +* [[_OFFSET]](%& variable type) {{text|can store any memory offset integer value when using [[DECLARE LIBRARY]] or [[_MEM]]ory only.}} * [[_UNSIGNED]] {~ numerical [[TYPE|type]]) {{text|defines an integer numerical value as being positive only in QB64.}} * [[COMMON]] (statement) {{text|shares common variable values with other Linked or [[CHAIN]]ed programs.}} * [[COMMON SHARED]] (statement) {{text|shares common variable values with all sub-procedures and other Linked or CHAINed programs.}} @@ -138,7 +141,7 @@ * [[DIM]] {{text|defines a variable or size a [[$STATIC|static]] array and can define the type of value it returns.}} * [[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.}} +* [[LONG]] {& numerical [[TYPE|type]]) {{text|Integer values can be from -2147483648 to 2147483647. [[_UNSIGNED]] values to 4294967295.}} * [[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.}} @@ -148,9 +151,9 @@ * [[TYPE]] (statement) {{text|defines variable types that can hold more than one variable type value of a fixed byte length.}} -<center>See also: [[Variable Types|QB64 Variable Types]] and [[Libraries#C.2B.2B_Variable_Types|C++ Variable Types]]</center> +([[#toc|Return to Table of Contents]])
== External Disk and API calls == * [[_ACCEPTFILEDROP]] (statement) {{text|turns a program window into a valid drop destination for dragging files from Windows Explorer.}} @@ -189,7 +192,7 @@ * [[SHELL (function)|SHELL (QB64 function)]] {{text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Error Codes == @@ -289,7 +292,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 |- @@ -312,7 +315,7 @@ The following table describes the error codes that are reported by the '''QB64'' | 97 || (no error message) || Can be used to trigger an error trap event with [[ERROR]] 97, nothing else will cause this error, so create your own errors for [[ON ERROR]]. || none |- |} -<center>'''N/A means Not Available or Not Applicable to QB64.'''</center> +([[#toc|Return to Table of Contents]])
== Error Trapping == @@ -339,10 +342,10 @@ The following table describes the error codes that are reported by the '''QB64'' * [[RESUME]] (statement) {{text|error statement sends the program to the [[NEXT]] code line or a designated line number or label .}} -<center>See the [[ERROR Codes|Error Code Table]] reference.</center> +([[#toc|Return to Table of Contents]])
== Event Trapping == @@ -367,7 +370,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[TIMER (statement)]] {{text|enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers. }} * [[WAIT]] (statement) {{text|normally used to delay program display execution during or after vertical retrace periods.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== File Input and Output == @@ -410,7 +413,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[WIDTH]] (statement) {{text|sets the text width of a file.}} * [[WRITE (file statement)]] {{text|writes numerical and string data to a sequential file using comma separators.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Fonts == @@ -433,7 +436,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[WRITE]] (screen I/O statement) {{text|writes a comma-separated list of values to the screen.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Game Controller Input (Joystick) == * [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distance from device axis center 0.}} @@ -449,12 +452,12 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_MOUSEMOVEMENTY]] (function) {{text|returns the relative vertical position of the mouse cursor compared to the previous position.}} * [[_WHEEL]] (function) {{text|returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}} * [[ON STRIG(n)]] (event statement) {{text|directs program flow upon a button press event of a game controller device.}} -* [[STICK]] (function) {{text|returns the directional axis coordinate values from 1 to 254 of game port (&H201) or USB controller devices.}} -* [[STRIG]] (function) {{text|returns the True or False button press status of game port (&H201) or USB controller devices.}} +* [[STICK]] (function) {{text|returns the directional axis coordinate values from 1 to 254 of game port (&H201) or USB controller devices.}} +* [[STRIG]] (function) {{text|returns the True or False button press status of game port (&H201) or USB controller devices.}} * [[STRIG(n)]] (statement) {{text|enables, suspends or disables event trapping of STRIG button return values.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Graphic Commands == @@ -465,7 +468,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_MOUSESHOW]] (statement) {{text|a special string parameter after command in GL allows some special cursor shapes.}} * [[_PUTIMAGE]] (statement) {{text|can place GL surfaces and allows the _SMOOTH action to blend stretched surfaces.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Graphics and Imaging: == @@ -515,9 +518,9 @@ The following table describes the error codes that are reported by the '''QB64'' * [[WINDOW]] (statement) {{text|defines the coordinate dimensions of the current graphics viewport.}} -<center>'''See also: [[Bitmaps]], [[Icons and Cursors]], [[SAVEIMAGE]], [[GIF Images]]'''</center> +([[#toc|Return to Table of Contents]])
== Keyboard Input == * [[_CONTROLCHR]] (statement) {{text|[[OFF]] allows the control characters to be used as text characters. [[ON]](default) can use them as commands.}} @@ -531,7 +534,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[INKEY$]] (function) {{text|returns the [[ASCII]] [[STRING|string]] character of a keypress.}} * [[INPUT]] (statement) {{text|requests a [[STRING]] or numerical keyboard entry from a program user.}} * [[INPUT$]] (function) {{text|used to get a set number of keypress characters or bytes from a file.}} -* [[INP]] (function) {{text|returns a scan code value from keyboard register &H60(96) to determine key presses.}} +* [[INP]] (function) {{text|returns a scan code value from keyboard register &H60(96) to determine key presses.}} * [[KEY n]] (event statement) {{text|is used to assign a "softkey" string to a key and/or display them.}} * [[KEY(n)]] (event statement) {{text|assigns, enables, disables or suspends event trapping of a keypress.}} * [[KEY LIST]] (statement) {{text|lists the 12 Function key soft key string assignments going down left side of screen.}} @@ -540,10 +543,10 @@ The following table describes the error codes that are reported by the '''QB64'' * [[SLEEP]] (statement) {{text|pauses the program for a specified number of seconds or a until a key press.}} -<center>See also: [[Keyboard scancodes]], [[ASCII|ASCII Codes]] references or [[Windows_Libraries#Hot_Keys_.28maximize.29|Hot Keys for Windows]].</center> +([[#toc|Return to Table of Contents]])
== [[Libraries]] == @@ -558,13 +561,13 @@ The following table describes the error codes that are reported by the '''QB64'' * [[DECLARE LIBRARY| END DECLARE]] {{text|required at the END of the block of Library declarations in QB64.}} -<center>'''QB64 also supports [[$INCLUDE]] text code file Libraries. QB64 does not support QLB Libraries or OBJ files.'''</center> +([[#toc|Return to Table of Contents]])
== Logical Bitwise Operations == @@ -579,7 +582,7 @@ The following table describes the error codes that are reported by the '''QB64'' {{Template:LogicalTruthTable}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Mathematical Functions and Operations == @@ -611,9 +614,9 @@ The following table describes the error codes that are reported by the '''QB64'' * [[TAN]] (function) {{text|returns the ratio of [[SIN]]e to [[COS]]ine or tangent value of an angle measured in radians.}} -<center>See also: [[Mathematical Operations]] and [[#Logical Bitwise Operations:|Logical Operations:]] </center> +([[#toc|Return to Table of Contents]])
== Memory Handling and Clipboard == @@ -632,10 +635,10 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_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]]}} * [[_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.}} +* [[_OFFSET]](%& numerical type) {{text|can be used store the value of an offset in memory when using [[DECLARE LIBRARY]] or [[_MEM]] only.}} -<center>'''Functions and statements using QB64's emulated 16 bit memory'''</center> +([[#toc|Return to Table of Contents]])
== 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> +([[#toc|Return to Table of Contents]])
== Mouse Input == * [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distances from device center 0.}} @@ -691,15 +694,14 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_WHEEL]] (function) {{text|returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}} -* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.}} -* [[INTERRUPT]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented. }} +* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.}} +* [[INTERRUPT]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented. }} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Numerical Manipulation and Conversion == -* [[&B]] [[Binary]] {{text|base number prefix used in QB64 to represent [[_BIT]]s on as 1 or off as 0.}} * [[_CV]] (function) {{text|used to convert [[_MK$]] [[ASCII]] [[STRING|string]] values to specified numerical value types.}} * [[_MK$]] (function) {{text|converts a specified numerical type into an [[ASCII]] [[STRING|string]] value that must be converted back using [[_CV]].}} * [[_PRESERVE]] ([[REDIM]] action) {{text|preserves the current contents of an [[arrays|array]], when re-dimensioning it.}} @@ -708,6 +710,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[ABS]] (function) {{text|returns the the positive value of a variable or literal numerical value.}} * [[ASC]] (function) {{text|returns the [[ASCII]] code number of a certain [[STRING]] text character or a keyboard press.}} +* [[_BIN$]] (function) {{text|converts the [[INTEGER]] part of any value to binary [[STRING]] number value.}} * [[CDBL]] (function) {{text|converts a numerical value to the closest [[DOUBLE]]-precision value.}} * [[CHR$]] (function) {{text|returns the character associated with a certain [[ASCII]] character code as a [[STRING]].}} * [[CINT]] (function) {{text|returns the closest [[INTEGER]] value of a number.}} @@ -722,10 +725,10 @@ The following table describes the error codes that are reported by the '''QB64'' * [[CVSMBF]] (function) {{text|converts a 4-byte Microsoft Binary format [[STRING|string]] value to a [[SINGLE]]-precision number.}} * [[DIM]] (statement) {{text|used to declare a variable type or dimension a [[STATIC]] array.}} * [[ERASE]] (array statement) {{text|clears a [[STATIC]] array of all values and totally removes a [[$DYNAMIC]] array.}} -* [[HEX$]] (function) {{text|converts decimal [[INTEGER]] values to hexadecimal [[STRING]] number values. Prefix values with [[&H]]}} +* [[HEX$]] (function) {{text|converts the [[INTEGER]] part of any value to hexadecimal [[STRING]] number value.}} * [[INT]] (function) {{text|rounds a numeric value down to the next whole number or [[INTEGER]] value.}} * [[LEN]] (function) {{text|returns the byte size of strings or numerical variables.}} -* [[OCT$]] {{text|converts decimal numerical values to Octal [[STRING]] number values. Prefix values with [[&O]]}} +* [[OCT$]] (function) {{text|converts the [[INTEGER]] part of any value to octal [[STRING]] number value.}} * [[RANDOMIZE]] (statement) {{text|seeds the [[RND]] random number generation sequence.}} * [[REDIM]] (statement) {{text|re-dimensions the number of elements in a [[$DYNAMIC|dynamic]](resizeable) [[arrays|array]].}} * [[RND]] (function) {{text|returns a randomly generated number from 0 to .9999999}} @@ -735,7 +738,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[VAL]] (function) {{text|converts number [[STRING|strings]] into numerical values until it runs into a non-numeric character.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Port Input and Output (COM and LPT) == @@ -755,10 +758,10 @@ The following table describes the error codes that are reported by the '''QB64'' * [[PUT]] (file I/O statement) {{text|writes data into a [[RANDOM]] or [[BINARY]] port by byte or record position.}} -<center>'''See [[Port Access Libraries]] for other ways to access COM and LPT ports.'''.</center> +([[#toc|Return to Table of Contents]])
== Print formatting == @@ -770,7 +773,7 @@ The following table describes the error codes that are reported by the '''QB64'' {{PrintUsing}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Printer Output (LPT and USB) == @@ -782,10 +785,10 @@ The following table describes the error codes that are reported by the '''QB64'' * [[LPRINT USING]] (statement) {{text|prints template formatted [[STRING]] text to an LPT or USB printer page.}} -<center>'''QB64 will use the default system printer selected. [[_PRINTIMAGE]] images will be stretched to the paper size setting.'''</center> +([[#toc|Return to Table of Contents]])
== Program Flow and Loops == * [[_CONTINUE]] (statement) {{text|skips the remaining lines in a control block (DO/LOOP, FOR/NEXT or WHILE/WEND)}} @@ -826,7 +829,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[WHILE]] (statement) {{text|continues a DO LOOP procedure while a condition is true.}} * [[WHILE...WEND]] (statement) {{text|a loop procedure that repeats code while a condition is true.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Sounds and Music == @@ -858,7 +861,7 @@ The following table describes the error codes that are reported by the '''QB64'' * [[PLAY]] (music statement) {{text|uses a custom string statement to play musical notes.}} * [[SOUND]] (statement) {{text|creates sounds of a specified frequency for a set duration.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== String Text Manipulation and Conversion == @@ -898,11 +901,11 @@ The following table describes the error codes that are reported by the '''QB64'' * [[VAL]] (function) {{text|converts a string number value to a numerical value.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Sub procedures and Functions == -<center>'''Qbasic and QB64'''</center> +([[#toc|Return to Table of Contents]])
== TCP/IP Networking and Email == -<center>'''All Statements and Functions Compile in QB64 Only!'''</center> +([[#toc|Return to Table of Contents]])
== Text on Screen == * [[_CONTROLCHR]] {{text|[[OFF]] allows [[ASCII]] characters 0 to 31 to be used as text characters. [[ON]](default) resets to default usage.}} @@ -981,9 +984,9 @@ The following table describes the error codes that are reported by the '''QB64'' * [[WRITE]] (screen I/O statement) {{text|writes a comma-separated list of values to the screen.}} -<center> See also: [[#Fonts and Unicode:|Fonts and Unicode]] or [[ASCII|ASCII Code Table]]</center> +([[#toc|Return to Table of Contents]])
== Time, Date and Timing == @@ -1012,11 +1015,11 @@ The following table describes the error codes that are reported by the '''QB64'' * [[WAIT]] (statement) {{text|normally used to delay program display execution during or after vertical retrace periods.}} -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== Window and Desktop == -<center>'''All Statements and Functions except [[SCREEN]] Compile in QB64 Only!'''</center> +([[#toc|Return to Table of Contents]])
== QB64 Programming Symbols == -<center>'''QB64 and QB Symbols'''</center> +([[#toc|Return to Table of Contents]])
:'''Variable Name Type Suffixes''' * [[STRING|$ STRING]] text character type: 1 byte @@ -1083,17 +1086,17 @@ The following table describes the error codes that are reported by the '''QB64'' * [[_FLOAT|## _FLOAT]] '''QB64''' decimal point numerical type (32 bytes) * [[_UNSIGNED|~ _UNSIGNED]] '''QB64''' [[INTEGER|whole]] positive numerical type when it precedes the 6 numerical suffixes below: * [[INTEGER|% INTEGER]] [[INTEGER|whole]] numerical type (2 bytes) -* [[LONG|& LONG]] [[INTEGER|whole]] numerical type (4 bytes} -* [[_INTEGER64|&& _INTEGER64]] '''QB64''' [[INTEGER|whole]] numerical type (8 bytes) +* [[LONG|& LONG]] [[INTEGER|whole]] numerical type (4 bytes} +* [[_INTEGER64|&& _INTEGER64]] '''QB64''' [[INTEGER|whole]] numerical type (8 bytes) * [[_BIT|` _BIT]] '''QB64''' [[INTEGER|whole]] numerical type (1 bit)(Key below tilde(~) or [[CHR$]](96)) * [[_BYTE|%% _BYTE]] '''QB64''' [[INTEGER|whole]] numerical type (1 byte) -* [[_OFFSET|%& _OFFSET]] '''QB64''' [[INTEGER|whole]] numerical pointer address type (any byte size required) +* [[_OFFSET|%& _OFFSET]] '''QB64''' [[INTEGER|whole]] numerical pointer address type (any byte size required) -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
:'''Numerical Base Prefixes''' -* [[&B|&B Binary]] base 2 Digits 0 or 1 ['''QB64'''] -* [[&O|&O Octal]] base 8 Digits 0 to 7 -* [[&H|&H Hexadecimal]] base 16: Digits 0 to F +* [[&B|&B Binary]] base 2 Digits 0 or 1 ['''QB64'''] +* [[&O|&O Octal]] base 8 Digits 0 to 7 +* [[&H|&H Hexadecimal]] base 16: Digits 0 to F :'''[[Mathematical Operations]]''' @@ -1109,16 +1112,16 @@ The following table describes the error codes that are reported by the '''QB64'' :'''[[Relational Operations]]''' * [[Equal|=]] (Equal to condition) * [[Greater_Than|>]] (Greater than condition) -* [[Less_Than|<]] (Less than condition) -* [[Not_Equal|<>]] (Not equal to condition) +* [[Less_Than|<]] (Less than condition) +* [[Not_Equal|<>]] (Not equal to condition) * [[Greater_Than_Or_Equal|>=]] (Greater than or equal to condition) -* [[Less_Than_Or_Equal|<=]] (Less than or equal to condition) +* [[Less_Than_Or_Equal|<=]] (Less than or equal to condition) -<p style="text-align: center">([[#toc|Return to Table of Contents]])</p> +([[#toc|Return to Table of Contents]])
== QB64 Programming References == -<center>'''WIKI Pages''' +([[#toc|Return to Table of Contents]])
+ diff --git a/internal/help/LBOUND.txt b/internal/help/LBOUND_111111.txt similarity index 72% rename from internal/help/LBOUND.txt rename to internal/help/LBOUND_111111.txt index 308208ecc..0c58ef742 100644 --- a/internal/help/LBOUND.txt +++ b/internal/help/LBOUND_111111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:14:02}} The [[LBOUND]] function returns the smallest valid index (lower bound) of an array dimension. @@ -7,9 +9,9 @@ The [[LBOUND]] function returns the smallest valid index (lower bound) of an arr {{PageDescription}} * {{Parameter|arrayName}} specifies the name of the array. -* {{Parameter|dimension%}} specifies the dimension number, starting with <code>1</code> for the first dimension. -** If omitted, {{Parameter|dimension%}} is assumed to be <code>1</code>. -** If {{Parameter|dimension%}} is less than <code>1</code> or is greater than the number of dimensions, a [[ERROR Codes|subscript out of range]] error occurs. +* {{Parameter|dimension%}} specifies the dimension number, starting with '''1''' for the first dimension. +** If omitted, {{Parameter|dimension%}} is assumed to be '''1'''. +** If {{Parameter|dimension%}} is less than '''1''' or is greater than the number of dimensions, a [[ERROR Codes|subscript out of range]] error occurs. * [[LBOUND]] and [[UBOUND]] are used to determine the range of valid indexes of an array. @@ -31,4 +33,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$_11111$.txt similarity index 93% rename from internal/help/LCASE$.txt rename to internal/help/LCASE$_11111$.txt index fa3ddbdae..eff558676 100644 --- a/internal/help/LCASE$.txt +++ b/internal/help/LCASE$_11111$.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:14:03}} The [[LCASE$]] function outputs an all-lowercase version of a [[STRING]]. @@ -27,4 +29,4 @@ The [[LCASE$]] function outputs an all-lowercase version of a [[STRING]]. {{PageNavigation}} -< + diff --git a/internal/help/LEFT$.txt b/internal/help/LEFT$_1111$.txt similarity index 95% rename from internal/help/LEFT$.txt rename to internal/help/LEFT$_1111$.txt index c139ceea1..b4dc9c5d4 100644 --- a/internal/help/LEFT$.txt +++ b/internal/help/LEFT$_1111$.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:14:05}} The [[LEFT$]] string function returns a number of characters from the left of a [[STRING]]. @@ -18,18 +20,18 @@ The [[LEFT$]] string function returns a number of characters from the left of a {{PageExamples}} ''Example 1:'' Getting the left portion of a string value. -{{CodeStart}} '' '' +{{CodeStart}} name$ = "Tom Williams" First$ = LEFT$(name$, 3) -PRINT First$ '' '' +PRINT First$ {{CodeEnd}} {{OutputStart}}Tom {{OutputEnd}} ''Example 2:'' A replace function using LEFT$ and [[RIGHT$]] with [[INSTR]] to insert a different length word into an existing string. -{{CodeStart}} '' '' +{{CodeStart}} text$ = "This is my sentence to change my words." {{Cl|PRINT}} text$ oldword$ = "my" @@ -52,7 +54,7 @@ x = Replace(text$, oldword$, newword$) start = find {{Cl|LOOP}} {{Cl|WHILE}} find Replace = count 'function returns the number of replaced words. Comment out in SUB -{{Cl|END FUNCTION}} '' '' +{{Cl|END FUNCTION}} {{CodeEnd}} {{OutputStart}}This is my sentence to change my words. This is your sentence to change your words.{{OutputEnd}} @@ -67,4 +69,4 @@ This is your sentence to change your words.{{OutputEnd}} {{PageNavigation}} -< + diff --git a/internal/help/LEN.txt b/internal/help/LEN_111.txt similarity index 85% rename from internal/help/LEN.txt rename to internal/help/LEN_111.txt index 98beb77be..809dd8f43 100644 --- a/internal/help/LEN.txt +++ b/internal/help/LEN_111.txt @@ -1,3 +1,5 @@ +{{QBDLDATE:05-20-2022}} +{{QBDLTIME:23:14:06}} The [[LEN]] function returns the number of bytes used by a variable value and the number of characters in a [[STRING]]. @@ -17,7 +19,7 @@ The [[LEN]] function returns the number of bytes used by a variable value and th ** ''Note:'' [[_BIT]] variable types and bit multiples '''cannot be measured in bytes'''. * '''LEN cannot return lengths of literal numerical values and will create a "variable required" status error in the IDE.''' * '''LEN =''' can be used with a user defined [[TYPE]] variable to determine the number of bytes used in [[RANDOM]] file records: -:::: {{InlineCode}}[[OPEN]] file$ FOR [[RANDOM]] AS #n LEN <nowiki>=</nowiki> LEN(recordTypeVariable){{InlineCodeEnd}}''' +:::: {{InlineCode}}[[OPEN]] file$ FOR [[RANDOM]] AS #n LEN[[Keywords currently not supported by QB64]]
==Q: Does it have modern features? Do they HAVE to be used?== A: QB64 has plenty of modern features, but they do not have to be used. You may just want to run some of your old favorites. -<center>'''QB64 was created to run your old QBasic 4.5 (or less) programs on newer Operating Systems without any changes.'''</center> +([[#toc|Return to FAQ topics]])
==Q: How do I install QB64 on Windows, Linux, macOS?== A: QB64 supports the following Operating Systems: -<center>'''Windows NT (XP), Windows Vista, Windows 7, 8 or 10:'''</center> +([[#toc|Return to FAQ topics]])
---- -<center>'''macOS'''</center> +([[#toc|Return to FAQ topics]])
==Q: Why won't QB64 work on my computer?== @@ -114,11 +117,11 @@ QB64 currently supports Windows versions from XP to the latest version. Most Lin :'''QB64 does not change any settings on your machine. All required files are in the QB64 folder.''' -<p style="text-align: center">([[#toc|Return to FAQ topics]])</p> +([[#toc|Return to FAQ topics]])
==Q: Are there any known incompatibilities?== -A: There are some things that QB64 cannot do, like direct hardware access, which makes older more advanced programs that make use of [[ABSOLUTE]], [[INTERRUPT]], [[PEEK]], [[POKE]] and [[OUT]] not work properly. Although some older functionality is emulated, if your program doesn't use such statements you probably won't notice any difference between QB 4.5 and QB64 (and if you do, report it as a bug in the forums). You can expect the most common addresses for interrupts, etc. to be functioning. +A: There are some things that QB64 cannot do, like direct hardware access, which makes older more advanced programs that make use of [[CALL ABSOLUTE|ABSOLUTE]], [[INTERRUPT]], [[PEEK]], [[POKE]] and [[OUT]] not work properly. Although some older functionality is emulated, if your program doesn't use such statements you probably won't notice any difference between QB 4.5 and QB64 (and if you do, report it as a bug in the forums). You can expect the most common addresses for interrupts, etc. to be functioning. See: [[Keywords currently not supported by QB64]] @@ -137,7 +140,7 @@ You should be careful with '''CPU usage'''. QB64 is a lot faster than QBasic was QB64 can be fast when you need it to be, but take the time to consider the impact of your program on other programs as people seldom have only one program running and the OS has tasks it must do too. -<p style="text-align: center">([[#toc|Return to FAQ topics]])</p> +([[#toc|Return to FAQ topics]])
==Q: How do I update the information in QB64's help system?== @@ -151,10 +154,10 @@ A: If the libraries are pure QB 4.5 code then yes, otherwise no. QLB files are n [[DECLARE LIBRARY]] allows users to reference C, Windows, OpenGL and other DLL libraries. If you find some functions that you like please share them with us at the forum! The following pages list working functions our members have found and tested: -<center>[[C Libraries]], [[DLL Libraries]], [[Windows Libraries]]</center> +([[#toc|Return to FAQ topics]])
==Q: I can't get my QB 4.5 source code to work in QB64! Why?== @@ -162,25 +165,44 @@ A: QB64 is 99% compatible with QB4.5 programs. The commands that haven't been im See: [[Keywords currently not supported by QB64]] -<p style="text-align: center">([[#toc|Return to FAQ topics]])</p> +([[#toc|Return to FAQ topics]])
==Q: What files are required to run my QB64 compiled program in my Operating System?== A: Programs compiled by QB64 (version 1.000 and up) are stand-alone so no external files are required to be with your program's EXE file. -<p style="text-align: center">([[#toc|Return to FAQ topics]])</p> +([[#toc|Return to FAQ topics]])
-==Q: Is there a way to use the compiler without running my program or using the IDE?== +==Q: Is there a way to use QB64 from the command line?== -A: Yes! No other program files besides the BAS file are required. Use the following command to compile a program without running it: +A: Yes! Just type QB64 -? at the command prompt to see a list of available options. -*'''QB64 -c yourfile.BAS''' -*'''QB64 -x yourfile.BAS''' ''(compiles using the console only)'' -*'''QB64 -c yourfile.BAS -o destination_path\destination executable_name.exe''' ''(compiles the .BAS file and outputs the executable to a separate folder)'' +;Note:The '''-c''' and '''-x''' option do just compile a program without running it. +:The '''-z''' option does not even create an executable file, it performs the first compile pass only (syntax checking and generate C code). +{{FixedStart}} +Usage: qb64 [switches]": c = ASC(c$) - GOTO SpecialChr + FOR ii = i TO LEN(a$) - 1 + IF MID$(a$, ii, 1) = ">" THEN + wla$ = wikiLookAhead$(a$, ii + 1, "
") + IF INSTR(wla$, "#toc") > 0 OR INSTR(wla$, "to Top") > 0 THEN + i = ii + LEN(wla$) + 4 'ignore TOC links + ELSEIF INSTR(MID$(a$, i, ii - i), "center") > 0 THEN + Help_Center = 1: Help_CIndent$ = wikiBuildCIndent$(wla$) + Help_AddTxt SPACE$(ASC(Help_CIndent$, 1)), col, 0 'center (if in style) + Help_CIndent$ = MID$(Help_CIndent$, 2) + i = ii + END IF + EXIT FOR + END IF + NEXT + GOTO charDone + END IF + s$ = "" + IF c$(LEN(s$)) = s$ THEN + i = i + LEN(s$) - 1 + Help_Center = 0 + Help_NewLine + GOTO charDone + END IF + s$ = "" THEN i = ii: EXIT FOR + NEXT + GOTO charDone + END IF + s$ = "" + IF c$(LEN(s$)) = s$ THEN + i = i + LEN(s$) - 1 + GOTO charDone END IF - IF c$(2) = CHR$(194) + CHR$(160) THEN 'some kind of white-space formatting unicode combo + s$ = "