Start the IDE at the specified line number
- -p Purge all pre-compiled content first
- -z Generate C code without compiling to executable
-{{FixedEnd}}
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: How do I link modules or include SUB procedures in QB64?==
-
-A: QB64 allows you to [[$INCLUDE]] code or BAS modules into one module when it is compiled. Text .BI files containing SUB or FUNCTION code or entire BAS modules can be included in one module that will be compiled.
-
-After the EXE is compiled, you do not have to even use the added code anymore. The EXE will contain ALL of the program code as ONE stand-alone program. This also allows you to add SUB code to any program that you desire.
-
-
-See: [[$INCLUDE]]
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: Some screens look small. Can I enlarge them or make them fullscreen?==
-
-*You can use the [[_FULLSCREEN]] statement to make your programs run fullscreen.
-*[[$RESIZE]] can be added to a program so you can track window resize events.
-*You can also create custom sized screens with page flipping and up to 32 bit colors using [[_NEWIMAGE]].
-*Page flipping is available in most screens and the new [[_DISPLAY]] feature allows the images to be displayed when YOU desire.
-*Picture or image files such as BMP, PNG, JPEG and GIF are EASY to load using [[_LOADIMAGE]].
-*Once images are loaded, all you have to do is use the image handle with any of the new statements and functions.
-*[[_PUTIMAGE]] GETs and PUTs images fast in ONE call. It can even stretch or compress the image sizes.
-
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: Can I have background music as well as [[SOUND]], [[PLAY]] and [[BEEP]]?==
-
-A: Yes, they are emulated to use the soundcard.
-
-'''There also are a bunch of new sound capabilities that allow the use of WAV, OGG, MP3 files and more.'''
-
-Capabilities include:
-
-#Multiple sound tracks
-#Volume and speaker control
-#Background music
-
-
-'''Get started with [[_SNDOPEN|music]]:'''
-
-:[[_SNDCLOSE]] (statement), [[_SNDCOPY]] (function), [[_SNDGETPOS]] (function), [[_SNDLEN]] (function), [[_SNDLIMIT]] (statement)
-
-:[[_SNDLOOP]] (statement), [[_SNDOPEN]] (function), [[_SNDPAUSE]] (statement), [[_SNDPAUSED]] (function), [[_SNDPLAY]] (statement)
-
-:[[_SNDPLAYCOPY]] (statement), [[_SNDPLAYFILE]] (statement), [[_SNDPLAYING]] (function), [[_SNDSETPOS]] (statement)
-
-:[[_SNDRAW]] (statement), [[_SNDSTOP]] (statement), [[_SNDVOL]] (statement)
-
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: If QB64 creates Basic programs why is there no Immediate Window?==
-
-
-A: Because there is no '''QB64''' interpreter. All C code has to be compiled before it can be run.
-
-'''QB64''' uses the Immediate window area to suggest syntax for keyword entries and give the compiler status when compiling.
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: Does it work on Windows 98 or any OS older than Windows 2000?==
-
-A: No, it doesn't. QB64 is made to run on new systems (Windows XP and up, Linux and macOS).
-
-
-==Q: Does QB64 support CURRENCY values from PDS or VB programs?==
-
-A: Not directly, but [[_FLOAT]] currency values up to 4 decimal places can be multiplied by 10000(10 ^ 4) and converted to MKC$ string values using [[_MK$]] with an [[_INTEGER64]] value. [[_CV]] with an [[_INTEGER64]] value divided by 10000 converts it back to [[_FLOAT]] values.
-
-
-[[PUT]] can write a PDS or VB, 8 byte currency string by multiplying the currency amount by 10000 and using an [[_INTEGER64]] variable.
-
-[[GET]] can read a [[_FLOAT]] CURRENCY value as an [[INTEGER64]] variable value divided by 10000.
-
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: Do you provide changelogs?==
-
-We do.
-
-*For all recent changelogs, check at [http://github.com/QB64Team/qb64/blob/development/CHANGELOG.md GitHub]
-
-([[#toc|Return to FAQ topics]])
-
-
-==Q: Where I can view the C++ code before it gets compiled?==
-Look in the QB64 '''internal\temp''' folder for '''main.txt''' to get the C code used to compile the latest program.
-
-
-{{PageNavigation}}
diff --git a/internal/help/QB64_Help_Menu_1164_1000_1000.txt b/internal/help/QB64_Help_Menu_1164_1000_1000.txt
deleted file mode 100644
index cbfa08169..000000000
--- a/internal/help/QB64_Help_Menu_1164_1000_1000.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:35:55}}
-This is QB64's built-in help system. It's data is based on the QB64 Wiki. In fact, the pages shown here are cached copies of the online Wiki pages and are displayed here in a '''simplified''' form. Obviously we can't reproduce the detailed output of a full fledged web browser here, especially tables are too complex to handle it here. However, you can click the cyan colored '''View on Wiki''' button at any time to open the original online Wiki page in your standard browser.
-
-
-== Help Topics ==
-* [[Keyword Reference - Alphabetical]]
-* [[Keyword Reference - By usage]]
-* [[QB64 FAQ|Frequently asked questions about QB64]]
-;Note:As the QB64 Wiki is a vital resource maintained by our community, it might be a good idea to periodically use the '''Update All Pages...''' command from the '''Help''' menu to fetch the latest changes done in the online Wiki.
-
-
-== Community Links ==
-* [https://qb64phoenix.com/forum/index.php QB64 Phoenix Edition Forum]
-* [https://qb64phoenix.com/qb64wiki/index.php QB64 Phoenix Edition Wiki] '''(the source of this help)'''
-* [https://discord.gg/D2M7hepTSx QB64 Phoenix Edition Discord]
diff --git a/internal/help/Question_mark_10000000_0000.txt b/internal/help/Question_mark_10000000_0000.txt
deleted file mode 100644
index 12474d7f4..000000000
--- a/internal/help/Question_mark_10000000_0000.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:54}}
-A '''question mark''' can be used as a substitute shortcut to typing PRINT when creating code.
-
-
-''Usage:'' ?"Hello world"
-
-
-''Result:'' PRINT "Hello world"
-
-
-* When the IDE cursor moves to the next code line, the question mark is changed to PRINT and the prompt text and variable are spaced appropriately.
-* When an [[INPUT]] statement has no text, a question mark will appear before the input.
-* A [[semicolon]] after the [[INPUT]] prompt text will add a question mark after the statement.
-
-
-''See also:''
-
-* [[PRINT]]
-* [[Semicolon]], [[Comma]]
-* [[Quotation mark]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/Quotation_mark_100000000_0000.txt b/internal/help/Quotation_mark_100000000_0000.txt
deleted file mode 100644
index bb7a893dd..000000000
--- a/internal/help/Quotation_mark_100000000_0000.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:53}}
-A '''quotation mark''' delimits the start and end of a literal [[STRING]] value.
-
-
-''Usage:'' string_value$ = "This is a text STRING."
-
-
-* The quotation mark must delimit the ends of a string or text prompt in a [[PRINT]], [[WRITE]], [[INPUT]] or [[LINE INPUT]] statement.
-* The IDE may add a missing quotation mark at the end of a [[SUB|statement]] or [[FUNCTION|function]].
-* [[LINE INPUT]] allows quotation marks to be entered as user input. The [[LINE INPUT (file statement)]] can transfer quotation marks.
-* Quotation marks should be used when [[comma]]s are used in a literal [[WRITE]] or [[INPUT (file statement)]] text string.
-* To insert quotation marks in a [[PRINT]] statement insert [[CHR$]](34) using string [[concatenation]] or [[semicolon]]s.
-* String values can be [[concatenation|concatenated]] or added using the plus ([[+]]) operator. Cannot be used to combine numerical values!
-* Concatenation MUST be used when combining literal [[STRING|string]] values in a variable definition.
-* String values can be combined with other string or numerical values using [[semicolon]]s or [[comma]] tabs in a PRINT statement.
-* Literal [[DATA]] strings do not require quotation marks unless the value is a keyword, uses commas or has end spaces.
-
-
-''See also:''
-
-* [[STRING]], [[PRINT]], [[WRITE]]
-* [[CHR$]], [[LINE INPUT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RANDOMIZE_111111111.txt b/internal/help/RANDOMIZE_111111111.txt
deleted file mode 100644
index d2844238a..000000000
--- a/internal/help/RANDOMIZE_111111111.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:25}}
-'''RANDOMIZE''' is used with a seed value to generate different random number sequences using the [[RND]] function.
-
-
-{{PageSyntax}}
-:: '''RANDOMIZE''' [USING] '''{''seednumber''|TIMER}'''
-
-
-* The ''seed number'' can be ANY positive or negative numerical type value. The [[TIMER]] value is often used to change [[RND]] output each run.
-* If the ''seed number'' is omitted, the program will display: '''Random-number seed (-32768 to 32767)?''' request on screen.
-* '''USING''' resets a ''seed number'' sequence to the start of the sequence as if the program just started using that seed in '''QB64 only'''.
-* '''Note:''' The RANDOMIZE USING ''seed number'' MUST be designated or a {{text|Name already in use|blue}} status error will occur!
-* If the same initial seed number is used, the sequence of random numbers returned will be identical every program run.
-* The fact that random numbers would always be the same has been used for simple data encryption and decryption.
-* Using a [[TIMER]] starting value ensures that the initial return sequence values are different almost every time the program is run!
-* [[RUN]] should reset the [[RANDOMIZE]] sequence to the starting [[RND]] function value.(Not yet in QB64)
-
-
-''Example 1:'' Using RANDOMIZE '''TIMER''' to set a different starting sequence of [[RND|random]] numbers every run.
-{{CodeStart}}{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-{{Cl|DO...LOOP|DO}}
-randnum% = INT({{Cl|RND}} * 11) + 2 'add one to multiplier as INT rounds down and never equals 10
-PRINT randnum%
-K$ = {{Cl|INPUT$}}(1)
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|UCASE$}}(K$) = "Q" 'q = quit
-{{Cl|END}}
-{{CodeEnd}}
-:''Explanation:'' Procedure generates random integer values from 2 to 12 like a pair of dice.
-
-
-''Example 2:'' Repeating a random number sequence with RANDOMIZE '''USING''' and a specific seed value in '''QB64''' only.
-{{CodeStart}}seed = 10
-{{Cl|RANDOMIZE}} seed
-Print7
-{{Cl|RANDOMIZE}} seed
-Print7
-{{Cl|PRINT}} "Press a key to start sequence over!"
-K$ = {{Cl|INPUT$}}(1)
-{{Cl|RANDOMIZE}} '''USING''' seed
-Print7
-
-{{Cl|SUB}} Print7
-{{Cl|FOR...NEXT|FOR}} r = 1 TO 7
- {{Cl|PRINT}} {{Cl|RND}};
-{{Cl|NEXT}}
-{{Cl|PRINT}}: {{Cl|PRINT}}
-{{Cl|END SUB}}
-{{CodeEnd}}
-: ''Explanation:'' The second RANDOMIZE statement just continues the sequence where USING in the third restarts the sequence.
-
-
-''Example 3:'' Random fireworks explosions:
-{{CodeStart}}{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-{{Cl|DEFINT}} A-Z
-
-{{Cl|TYPE}} ftype
- vx {{Cl|AS}} {{Cl|SINGLE}}
- vy {{Cl|AS}} {{Cl|SINGLE}}
-{{Cl|END}} {{Cl|TYPE}}
-{{Cl|DIM}} frag(500) {{Cl|AS}} ftype 'fragments
-
-{{Cl|DIM}} pi {{Cl|AS}} {{Cl|SINGLE}}
-pi = 3.141593
-
-{{Cl|DIM}} x {{Cl|AS}} {{Cl|SINGLE}}, y {{Cl|AS}} {{Cl|SINGLE}}
-{{Cl|DIM}} t {{Cl|AS}} {{Cl|SINGLE}}, g {{Cl|AS}} {{Cl|SINGLE}}, p {{Cl|AS}} {{Cl|SINGLE}}
-t = 0
-g = 0.4 'gravity
-p = 15 'explosion power
-
-sw = 800
-sh = 600
-
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(sw, sh, 32)
-
-DO
- {{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} {{Cl|UBOUND}}(frag)
- frag(i).vx = {{Cl|RND}} * {{Cl|COS}}(2 * pi * {{Cl|RND}})
- frag(i).vy = {{Cl|RND}} * {{Cl|SIN}}(2 * pi * {{Cl|RND}})
- {{Cl|NEXT}}
-
- x = sw * {{Cl|RND}}
- y = sh * {{Cl|RND}}
-
- {{Cl|FOR...NEXT|FOR}} t = 0 {{Cl|TO}} 25 {{Cl|STEP}} 0.1
- {{Cl|LINE}} (0, 0)-(sw, sh), {{Cl|_RGB}}(0, 0, 0), BF
- {{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} {{Cl|UBOUND}}(frag)
- {{Cl|PSET}} (x + t * p * frag(i).vx, y + t * p * frag(i).vy + g * t * t), {{Cl|_RGB}}(255, 255, 0)
- {{Cl|NEXT}}
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 150
-
- {{Cl|IF...THEN|IF}} {{Cl|_KEYHIT}} = -27 {{Cl|THEN}} {{Cl|EXIT DO}}
- {{Cl|NEXT}}
-{{Cl|LOOP}}
-{{Cl|SYSTEM}}
-{{CodeEnd}}{{small|Code by Ben}}
-
-
-''See also:''
-* [[RND]], [[INT]], [[CINT]]
-* [[TIMER]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RANDOM_111111.txt b/internal/help/RANDOM_111111.txt
deleted file mode 100644
index d72af1001..000000000
--- a/internal/help/RANDOM_111111.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:24}}
-'''RANDOM''' is used in an [[OPEN]] statement to read([[GET]]) from or write([[PUT]]) to a file.
-
-
-
-{{PageSyntax}}
-:: OPEN Filename$ FOR RANDOM AS #1 [LEN = ''recordlength%'']
-
-
-* RANDOM is the Default mode if no mode is given in the [[OPEN]] statement.
-* It creates the file if the legal file name given does NOT exist.
-* As a RANDOM file, it can read or write any record using [[GET]] and/or [[PUT]] statements.
-* ''Recordlength%'' is determined by getting the LEN of a [[TYPE]] variable or a [[FIELD]] statement.
-:: [[STRING]] = 1 byte/character, [[INTEGER]] = 2 bytes, [[LONG]] = 4 bytes, [[SINGLE]] = 4 bytes [[DOUBLE]] = 8 bytes
-:: [[_BYTE]] = 1 byte, [[_INTEGER64]] = 8 bytes, [[_FLOAT]] = 10 bytes (so far)
-
-* If no record length is used in the [[OPEN]] statement, the default record size is 128 bytes except for the last record.
-* A record length cannot exceed 32767 or an [[ERROR Codes|error]] will occur!
-* To determine the number of records in a file the records% = [[LOF]] \ recordlength%.
-* When '''variable length strings''' are PUT into RANDOM files the record length must exceed the maximum string entry by:
-:: 2 bytes are reserved for recording variable string lengths up to 32767 bytes (LEN = longest + 2)
-:: 8 bytes are reserved for recording variable string lengths exceeding 32767 bytes (LEN = longest + 8)
-* A serial communication port can also be opened for RANDOM in an [[OPEN COM]] statement.
-
-
-''Example 1:'' Function that finds a RANDOM file's record number for a string value such as a phone number.
-{{CodeStart}}
-{{Cl|TYPE}} customer
- age {{Cl|AS}} {{Cl|INTEGER}}
- phone {{Cl|AS}} {{Cl|STRING}} * 10
-{{Cl|END}} {{Cl|TYPE}}
-
-{{Cl|DIM}} {{Cl|SHARED}} cust {{Cl|AS}} customer, recLEN
-recLEN = {{Cl|LEN}}(cust) 'get the length of the record type
-{{Cl|PRINT}} "Rec{{Cl|LEN}}:"; recLEN
-
-{{Cl|OPEN}} "randfile.rec" {{Cl|FOR...NEXT|FOR}} {{Cl|RANDOM}} {{Cl|AS}} #1 {{Cl|LEN}} = recLEN
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 4
- {{Cl|READ}} cust.age, cust.phone
- {{Cl|PUT}} #1, , cust
-{{Cl|NEXT}}
-{{Cl|CLOSE}} #1
-
-RP = RecordPos("randfile.rec", "2223456789") 'returns 0 if record not found!
-
-{{Cl|PRINT}} RP
-
-{{Cl|IF...THEN|IF}} RP {{Cl|THEN}}
- {{Cl|OPEN}} "randfile.rec" {{Cl|FOR...NEXT|FOR}} {{Cl|RANDOM}} {{Cl|AS}} #2 {{Cl|LEN}} = recLEN
- {{Cl|GET}} #2, RP, cust
- {{Cl|CLOSE}} #2
-{{Cl|PRINT}} cust.age, cust.phone
-{{Cl|END IF}}
-
-{{Cl|END}}
-
-{{Cl|DATA}} 59,2223456789,62,4122776477,32,3335551212,49,1234567890
-
-{{Cl|FUNCTION}} RecordPos (file$, search$)
-f = {{Cl|FREEFILE}}
-{{Cl|OPEN}} file$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #f
-FL = {{Cl|LOF}}(f)
-dat$ = {{Cl|INPUT$}}(FL, f)
-{{Cl|CLOSE}} f
-recpos = {{Cl|INSTR}}(dat$, search$)
-{{Cl|IF...THEN|IF}} recpos {{Cl|THEN}} RecordPos = recpos \ recLEN + 1 {{Cl|ELSE}} RecordPos = 0
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-:''Note:'' Random files can store records holding various variable types using a [[TYPE]] definition or a [[FIELD]] statement.
-
-
-''Example 2:'' When not using a [[TYPE]] or fixed length strings, QB4.5 allows RANDOM files to hold variable length strings up to 2 bytes less than the LEN = record length statement:
-{{CodeStart}}
-{{Cl|_CONTROLCHR}} OFF
-{{Cl|OPEN}} "myfile.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1: {{Cl|CLOSE}} #1: ' clears former file of all entries.
-{{Cl|OPEN}} "myfile.txt" {{Cl|FOR...NEXT|FOR}} {{Cl|RANDOM}} {{Cl|AS}} #1 {{Cl|LEN}} = 13 'strings can be up to 11 bytes with 2 byte padder
-
-a$ = {{Cl|CHR$}}(1) + {{Cl|CHR$}}(0) + "ABCDEFGHI"
-b$ = "ABCDEFGHI"
-c$ = "1234"
-
-{{Cl|PUT}} #1, 1, a$
-{{Cl|PUT}} #1, 2, b$
-{{Cl|PUT}} #1, 3, c$
-
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 3
- {{Cl|GET}} #1, i, a$
- {{Cl|PRINT}} a$, {{Cl|LEN}}(a$)
-{{Cl|NEXT}}
-
-{{Cl|CLOSE}}
-{{CodeEnd}}
-{{OutputStart}}☺ ABCDEFGHI 11
-ABCDEFGHI 9
-1234 4
-{{OutputEnd}}
-: ''Note:'' The 2 byte file padders before each string PUT will show the length of a string for GET as [[ASCII]] characters. Padders will always be 2 bytes and strings up to the last one will be 13 bytes each no matter the length up to 11, so the file size can be determined as (2 + 11) + (2 + 9 + 2) + (2 + 4) or 13 + 13 + 2 + 4 = 32 bytes.
-
-
-''See also:''
-* [[GET]], [[PUT]], [[FIELD]]
-* [[BINARY]]
-* [[SEEK]], [[SEEK (statement)]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/READ_1111.txt b/internal/help/READ_1111.txt
deleted file mode 100644
index 5ed8af288..000000000
--- a/internal/help/READ_1111.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:27}}
-The '''READ''' statement reads values from a [[DATA]] field and assigns them to one or a comma separated list of variables.
-
-
-{{PageSyntax}}
-::: [[READ]] value1$[, value2!, value3%, ...]
-
-
-* READ statements assign variables to [[DATA]] statement values on a one-to-one basis sequentially.
-* A single READ statement may access one or more [[DATA]] values. They are accessed in the order set.
-* Several READ statements may access the same [[DATA]] statement block at the following sequential position.
-* [[DATA]] can be READ using [[STRING]] or numerical [[TYPE]] variables singularly or in a comma separated list:
-:: [[STRING]] READ variables can read quoted or unquoted text or numerical DATA values!
-:: Numerical type READ variables can only read '''unquoted''' numerical DATA values!
-::'''If they do not agree, a [[ERROR Codes|"Syntax error"]] may result when run reading string data as numerical values!'''
-* If the number of variables specified is fewer than the number of elements in the DATA statement(s), subsequent READ statements begin reading data at the next unread element. If there are no subsequent READ statements, the extra data is ignored.
-* If variable reads exceed the number of elements in the DATA field(s), an [[ERROR Codes|"Out of data" error]] will occur!
-* Use the [[RESTORE]] statement to reread DATA statements from the start, with or without a line label as required.
-* [[ACCESS]] READ can be used in an [[OPEN]] statement to limit file access to read only, preserving file data.
-* '''WARNING! Do not place DATA fields after [[SUB]] or [[FUNCTION]] procedures! QB64 will FAIL to compile properly!'''
-: QBasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures.
-
-
-''Example 1:'' Placing data into an array.
-{{CodeStart}}
-{{Cl|DIM}} A(10) AS {{Cl|SINGLE}}
-{{Cl|FOR...NEXT|FOR}} I = 1 {{Cl|TO}} 10
- {{Cl|READ}} A(I)
-{{Cl|NEXT}} I
-{{Cl|FOR...NEXT|FOR}} J = 1 {{Cl|TO}} 10
- {{Cl|PRINT}} A(J);
-{{Cl|NEXT}}
-{{Cl|END}}
-
-{{Cl|DATA}} 3.08, 5.19, 3.12, 3.98, 4.24
-{{Cl|DATA}} 5.08, 5.55, 4.00, 3.16, 3.37
-{{CodeEnd}}
-{{OutputStart}}
- 3.08 5.19 3.12 3.98 4.24 5.08 5.55 4 3.16 3.37
-{{OutputEnd}}
-:''Explanation:'' This program reads the values from the DATA statements into array A. After execution, the value of A(1) is 3.08, and so on. The DATA statements may be placed anywhere in the program; they may even be placed ahead of the READ statement.
-
-
-''Example 2:'' Reading three pieces of data at once.
-{{CodeStart}}
- PRINT " CITY ", " STATE ", " ZIP"
- PRINT {{Cl|STRING$}}(30, "-") 'divider
- {{Cl|READ}} C$, S$, Z&
- PRINT C$, S$, Z&
-
- {{Cl|DATA}} "DENVER,", COLORADO, 80211
-{{CodeEnd}}
-{{OutputStart}}
- CITY STATE ZIP
- ------------------------------
- DENVER, COLORADO 80211
-{{OutputEnd}}
-:''Note:'' String DATA values do not require quotes unless they contain commas, end spaces or QBasic keywords.
-
-
-
-''See also:''
-* [[DATA]], [[RESTORE]]
-* [[PRINT USING]]
-* [[OPEN]] FOR [[INPUT (file mode)|INPUT]] {{text|(file statement)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/REDIM_11111.txt b/internal/help/REDIM_11111.txt
deleted file mode 100644
index a5d934f2a..000000000
--- a/internal/help/REDIM_11111.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:29}}
-A {{KW|REDIM}} statement can re-dimension one [[$DYNAMIC|dynamic]](flexible) [[Arrays|array]] or a [[comma]] separated list of arrays.
-
-
-{{PageSyntax}}
-:[[REDIM]] [{{KW|_PRESERVE}}] [{{KW|SHARED}}] ArrayName[''typesuffix''] ({''max_element''|low_element[{{KW|TO}} ''upper_element'', ...]}) [{{KW|AS}} {{KW|TYPE|Type}}]
-
-
-{{PageDescription}}
-* Can change the number of elements in an array (the present array data is lost unless [[_PRESERVE]] is used).
-* Dynamic array elements can also be sized or resized by a program user's entry.
-* The [[_PRESERVE]] option also allows the ''element'' range values to be moved upward or downward in '''QB64 only!'''
-* {{Parameter|Array}} is the name of the array to be dimensioned or re-dimensioned.
-* {{Parameter|elements}} is the number of elements the array should hold. Use the optional [[TO]] {{Parameter|elements2}} to set a range.
-* '''Always use the same array [[TYPE]] suffix ([[AS]] type) or a new array type with the same name may be created.'''
-* REDIM cannot change [[$STATIC]] arrays created with a [[DIM]] statement unless the [[$DYNAMIC]] [[Metacommand]] is used!
-* To create a dynamic array use the [[$DYNAMIC]] metacommand or use [[REDIM]] rather than [[DIM]] when first creating the array.
-* Use REDIM [[_PRESERVE]] to change the range or number of array elements without losing the remaining elements. Data may move up or down to accommodate those boundary changes.
-* '''REDIM [[_PRESERVE]] cannot change the number of array dimensions or type!'''
-* [[$DYNAMIC|Dynamic]] arrays MUST be [[REDIM]]ensioned if [[ERASE]] or [[CLEAR]] are used to clear the arrays as they no longer exist.
-* When [[AS]] is used to declare the type, use [[AS]] to retain that type or it will change to [[SINGLE]]!
-* '''NOTE: Many QBasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!'''
-* '''Warning! Do not use negative array upper bound index values as OS access or "Out of Memory" [[ERROR Codes|errors]] will occur!'''
-
-
-''Example 1:'' The [[$DYNAMIC]] Metacommand allows an array to be re-sized using [[DIM]] and REDIM.
-{{CodeStart}}
-'{{Cl|$DYNAMIC}}
-
-{{Cl|INPUT}} "Enter array size: ", size
-{{Cl|DIM}} Array(size)
-
-{{Cl|REDIM}} Array(2 * size)
-
-{{Cl|PRINT}} {{Cl|UBOUND}}(Array)
-{{CodeEnd}}
-
-
-''Example 2:'' Shows the difference between REDIM and REDIM [[_PRESERVE]].
-{{CodeStart}}
-{{Cl|REDIM}} array(20)
-array(10) = 24
-
-{{Cl|PRINT}} array(10)
-
-{{Cl|REDIM}} {{Cl|_PRESERVE}} array(30)
-{{Cl|PRINT}} array(10)
-
-{{Cl|REDIM}} array(15)
-{{Cl|PRINT}} array(10)
-{{CodeEnd}}
-{{OutputStart}}
- 24
- 24
- 0
-{{OutputEnd}}
-: ''Explanation:'' REDIM without _PRESERVE erases the array data and cannot change the number of dimensions.
-
-
-{{PageSeeAlso}}
-* [[Arrays]]
-* [[DIM]], [[SHARED]]
-* [[_PRESERVE]], [[ERASE]]
-* [[$DYNAMIC]], [[$STATIC]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/REM_111.txt b/internal/help/REM_111.txt
deleted file mode 100644
index 5bd150615..000000000
--- a/internal/help/REM_111.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:30}}
-'''REM''' or an apostrophe is used for programmer remarks, comments or to stop the execution of program code.
-
-
-{{PageSyntax}}
-:: REM program comment or ignore code
-
-
-{{PageDescription}}
-* Comments cannot be read by QBasic correctly and may cause syntax and other errors without REM!
-* Instead of REM you can use the {{KW|REM|'}} symbol which can be put anywhere.
-* Code can also be commented out for program testing purposes.
-* QBasic Metacommands such as {{KW|$DYNAMIC}} and {{KW|$INCLUDE}} require the use of REM or the apostrophe.
-
-
-''Example:'' Avoiding an END IF error.
-{{CodeStart}}
-{{Cl|REM}} This is a remark...
-' This is also a remark...
-{{Cl|IF...THEN|IF}} a = 0 {{Cl|THEN}} {{Cl|REM}} (REM follows syntax rules)
-{{Cl|IF...THEN|IF}} a = 0 {{Cl|THEN}} '(apostrophe doesn't follow syntax rules, so use END IF after this)
-{{Cl|END IF}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[Apostrophe]]
-* {{KW|$DYNAMIC}}, {{KW|$STATIC}}, {{KW|$INCLUDE|$INCLUDE:}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/RESET_11111.txt b/internal/help/RESET_11111.txt
deleted file mode 100644
index 4bebc10b7..000000000
--- a/internal/help/RESET_11111.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:32}}
-The '''RESET''' statement closes all files and writes the directory information to a diskette before it is removed from a disk drive.
-
-
-{{PageSyntax}}
-:: RESET
-
-
-* Always execute a RESET command before removing a diskette from a disk drive. Otherwise, when the diskette is used again, it will not have the current directory information written on the directory track.
-* RESET closes all open files on all drives and writes the directory track to every diskette with open files.
-
-
-''See also:''
-* [[OPEN]]
-* [[CLOSE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RESTORE_1111111.txt b/internal/help/RESTORE_1111111.txt
deleted file mode 100644
index c2d4f2384..000000000
--- a/internal/help/RESTORE_1111111.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:33}}
-The '''RESTORE''' statement is used to reset the DATA pointer to the beginning of the data.
-
-
-{{PageSyntax}}
-:: RESTORE [datafield]
-
-
-* The datafield line label or number enables a labeled data field to be [[READ]] more than once as required.
-* Datafield label names are not required when working with ONE or a progression of data fields in the main body of code.
-* Label multiple data fields to restore them to use them again when necessary.
-* If RESTORE is used with unlabeled data fields or no datafield is designated then the first data field is read.
-* Use RESTORE to avoid an [[ERROR Codes|"Out of Data" error]] when reading a data field!
-* See the [[DATA]] statement for [[STRING]] data value specifications.
-* '''Do not place [[DATA]] fields after [[SUB]] or [[FUNCTION]] procedures! QB64 will FAIL to [[RESTORE]] properly!'''
-: QBasic allowed programmers to add DATA fields anywhere because the IDE separated the main code from other procedures.
-
-
-''Example:'' Restoring a labeled DATA field to avoid going past the end of DATA.
-{{CodeStart}}
-DO
- {{Cl|INPUT}} "Enter a month number(1 to 12): ", monthnum%
-
- {{Cl|RESTORE}} Months
- FOR i = 1 TO monthnum%
- {{Cl|READ}} month$, days% 'variables must match data field types
- NEXT
- {{Cl|PRINT}} "The month "; month$; " has"; days%; "days."
-LOOP UNTIL monthnum% < 1 OR monthnum% > 12
-
- Months:
- {{Cl|DATA}} January, 31, February, 28, March, 31, April, 30, May, 31, June, 30
- {{Cl|DATA}} July, 31, August, 31, September, 30, October, 31, November, 30, December, 31
-{{CodeEnd}}
-{{OutputStart}}
-Enter a month number(1 to 12): 6
-The month June has 30 days.
-{{OutputEnd}}
-:''Note:'' String DATA values do not require quotes unless they have commas, end spaces or QBasic keywords in them.
-
-
-
-''Example:'' Using RESTORE to know the number of elements in the DATA in order to dimension and store the items in a array.
-{{CodeStart}}
-{{Cl|DO}}
-{{Cl|READ}} dummy$ 'we won't actually use this string for anything else than to know when there is no more DATA.
-count = count + 1
-{{Cl|LOOP}} {{Cl|UNTIL}} dummy$ = "stop" 'when dummy$ = "stop" then we know that it is the last entry so it only does the above loop until then.
-
-count = count - 1 'since the last string is "stop" and we don't want to store it in the array.
-
-{{Cl|PRINT}} "The number of relevant entries are:"; count
-
-{{Cl|DIM}} entry$(count) 'Now we know how many elements we need to make space for (DIM)
-
-{{Cl|RESTORE}} 'We restore it so that it begins reading from the first DATA again.
-
-
-{{Cl|FOR}} c = 1 {{Cl|TO}} count
-{{Cl|READ}} entry$(c) 'read the DATA and store it into the array.
-{{Cl|NEXT}}
-
-'we can now print the contents of the array:
-
-{{Cl|FOR}} c = 1 {{Cl|TO}} count
-{{Cl|PRINT}} entry$(c)
-{{Cl|NEXT}}
-
-{{Cl|END}}
-
-{{Cl|DATA}} "entry1", "entry2", "entry3", "stop"
-{{CodeEnd}}
-{{small|Code By: Cyperium}}
-
-{{OutputStart}}
-The number of relevant entries are: 3
-entry1
-entry2
-entry3
-{{OutputEnd}}
-''Note:'' Now we can add any number of entries without further compensation to the code.
-
-
-
-''See also''
-* [[DATA]], [[READ]]
-* [[line numbers]] / line labels
-
-
-{{PageNavigation}}
diff --git a/internal/help/RESUME_111111.txt b/internal/help/RESUME_111111.txt
deleted file mode 100644
index fbcb961c5..000000000
--- a/internal/help/RESUME_111111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:34}}
-The '''RESUME''' statement is used with '''NEXT''' or a line number or label in an error handling routine.
-
-
-{{PageSyntax}}
-: [[RESUME]] {'''NEXT'''|{{Parameter|lineLabel}}|{{Parameter|lineNumber}}}
-
-
-{{PageDescription}}
-* '''NEXT''' returns execution to the code immediately following the error.
-* A {{Parameter|lineLabel}} or {{Parameter|lineNumber}} is the code line to return to after an error.
-* If the line label or number is omitted or the line number = 0, the code execution resumes at the code that created the original error.
-* [[RESUME]]can only be used in ERROR handling routines. Use [[RETURN]] in normal [[GOSUB]] procedures.
-
-
-{{PageSeeAlso}}
-* [[ON ERROR]], [[ERROR]]
-* [[RETURN]], [[ERROR Codes]]
-* [[FOR...NEXT]] (counter loop)
-
-
-{{PageNavigation}}
diff --git a/internal/help/RETURN_111111.txt b/internal/help/RETURN_111111.txt
deleted file mode 100644
index 7e932ee25..000000000
--- a/internal/help/RETURN_111111.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:35}}
-'''RETURN''' is used in [[GOSUB]] procedures to return to the original call code line or a specified line label.
-
-
-{{PageSyntax}}
-:: '''RETURN''' [{''linelabel''|''linenumber''}]
-
-
-{{Parameters}}
-* RETURN without parameters returns to the code immediately following the original [[GOSUB]] call.
-* ''line number'' or ''linelabel'' after the RETURN statement returns code execution to that label.
-
-
-''Usage:''
-* Normally required at the end of a [[GOSUB]] procedure unless the procedure returns using a loop.
-* RETURN is not used in error handling procedures. Error procedures use [[RESUME]] ''line number'' or [[RESUME|RESUME NEXT]].
-* GOSUB procedures use line numbers or line labels designated with a colon after the number or label.
-* If RETURN is encountered without a previous [[GOSUB]] call a [[ERROR Codes|"RETURN without GOSUB" error]] is produced.
-* To avoid errors, place [[GOSUB]] procedures AFTER the main program code [[END]] or after an [[EXIT SUB]] or [[EXIT FUNCTION]] call.
-
-
-
-''Example 1:'' Returns after a Gosub.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} a = 1 {{Cl|TO}} 10
-{{Cl|PRINT}} a
-{{Cl|IF...THEN|IF}} a = 5 {{Cl|THEN}} {{Cl|GOSUB}} five
-{{Cl|NEXT}}
-{{Cl|END}} 'END or SYSTEM stop the program before the execution of a sub procedure
-
-five:
-{{Cl|PRINT}} "Aha! Five!"
-{{Cl|RETURN}}
-{{CodeEnd}}
-{{OutputStart}}
- 1
- 2
- 3
- 4
- 5
-Aha! Five!
- 6
- 7
- 8
- 9
- 10
-{{OutputEnd}}
-
-
-''Example 2:'' Returns to a specific line label.
-{{CodeStart}}
-{{Cl|GOSUB}} hey
-{{Cl|PRINT}} "it didn't go here."
-hoho:
-{{Cl|PRINT}} "it went here."
-{{Cl|END}}
-
-hey:
-{{Cl|RETURN}} hoho
-{{CodeEnd}}
-{{small|Code by Cyperium}}
-{{OutputStart}}
-it went here.
-{{OutputEnd}}
-
-
-
-
-''See also:''
-* [[GOSUB]], [[GOTO]]
-* [[RESUME]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RIGHT$_11111$.txt b/internal/help/RIGHT$_11111$.txt
deleted file mode 100644
index c16d0e8de..000000000
--- a/internal/help/RIGHT$_11111$.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:36}}
-The '''RIGHT$''' function returns a set number of characters in a [[STRING]] variable starting from the end and counting backwards.
-
-
-
-{{PageSyntax}}
-:: '''RIGHT$('''''stringvalue$, numberofcharacters%''''')'''
-
-
-{{Parameters}}
-* The ''stringvalue$'' can be any string of [[ASCII]] characters as a [[STRING]] variable.
-* The ''numberofcharacters'' [[INTEGER]] value determines the number of characters to return from the right end of the string.
-
-
-{{PageDescription}}
-* If the number of characters exceeds the string length([[LEN]]) the entire string is returned.
-* RIGHT$ returns always start at the last character of the string, even if a space. [[RTRIM$]] can remove ending spaces.
-* '''Number of characters cannot be a negative value.'''
-
-
-''Example 1:'' Getting the right portion of a string value such as a person's last name.
-{{CodeStart}}
-name$ = "Tom Williams"
-
-Last$ = {{Cl|RIGHT$}}(name$, {{Cl|LEN}}(name$) - {{Cl|INSTR}}(name$, " ")) 'subtract space position from string length
-
-{{Cl|PRINT}} Last$
-{{CodeEnd}}
-{{OutputStart}}Williams {{OutputEnd}}
-
-
-''Example 2:'' Adding the leading zero in single digit [[HEX$]] values using RIGHT to take the right two hexadecimal string digits.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) '32 bit screen modes ONLY!
-red = 255
-green = 0
-blue = 128
-
-Color32 red, green, blue
-{{Cl|PRINT}} "Colored text"
-
-{{Cl|SUB}} Color32 (R, G, B)
-R = R {{Cl|AND (boolean)|AND}} {{Cl|&H}}FF: G = G {{Cl|AND (boolean)|AND}} {{Cl|&H}}FF: B = B {{Cl|AND (boolean)|AND}} {{Cl|&H}}FF ' limit values to 0 to 255
-hexadecimal$ = "{{Cl|&H}}FF" + {{Cl|RIGHT$}}("0" + {{Cl|HEX$}}(R), 2) + {{Cl|RIGHT$}}("0" + {{Cl|HEX$}}(G), 2) + {{Cl|RIGHT$}}("0" + {{Cl|HEX$}}(B), 2)
-{{Cl|PRINT}} hexadecimal$
-{{Cl|COLOR}} {{Cl|VAL}}(hexadecimal$)
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{OutputStart}}'''{{text|&HFFFF0080|white}}'''
-'''{{text|Colored text|#FF0080}}'''{{OutputEnd}}
-: ''Note:'' When a single hexadecimal digit is returned the resulting value will need the leading zero added. Otherwise the hexa- decimal value created will have a byte missing from the value. EX: Color &HFF000000 is valid while &HFF000 is not.
-
-
-''See also:''
-* [[LEFT$]], [[MID$]]
-* [[LTRIM$]], [[RTRIM$]]
-* [[INSTR]], [[HEX$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RMDIR_11111.txt b/internal/help/RMDIR_11111.txt
deleted file mode 100644
index 42ff66181..000000000
--- a/internal/help/RMDIR_11111.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:37}}
-The {{KW|RMDIR}} statement deletes an empty directory using a designated path relative to the present path location.
-
-
-{{PageSyntax}}
-:{{KW|RMDIR}} {{Parameter|directory$}}
-
-
-{{PageDescription}}
-* {{Parameter|directory$}} is a relative path to the directory to delete.
-* Directory path must be a literal or variable [[STRING]] value designating the folder to be deleted.
-* If the directory contains files or folders, a [[ERROR Codes|file/path access error]] will occur.
-* If the directory path cannot be found, a [[ERROR Codes|path not found]] error occurs.
-
-
-{{PageExamples}}
-{{CodeStart}}
-
-{{Cl|ON ERROR|ON ERROR GOTO}} ErrorHandler
- DO
- ERRcode = 0
- {{Cl|INPUT}} "Enter path and name of directory to delete: "; directory$
- IF {{Cl|LEN}}(directory$) THEN 'valid user entry or quits
- {{Cl|RMDIR}} directory$ 'removes empty folder without a prompt
- IF ERRcode = 0 THEN PRINT "Folder "; directory$; " removed."
- END IF
- LOOP UNTIL ERRcode = 0 OR LEN(directory$) = 0
-{{Cl|SYSTEM}}
-
-
-ErrorHandler:
-ERRcode = {{Cl|ERR}} 'get error code returned
-{{Cl|SELECT CASE}} ERRcode
-{{Cl|CASE}} 75
- {{Cl|PRINT}} directory$ + " is not empty!"
-{{Cl|CASE}} 76
- {{Cl|PRINT}} directory$ + " does not exist!"
-{{Cl|CASE ELSE}}
- {{Cl|PRINT}} "Error"; ERRcode; "attempting to delete " + directory$
-{{Cl|END SELECT}}
-{{Cl|PRINT}}
-{{Cl|RESUME|RESUME NEXT}}
-
-{{CodeEnd}}
-
-: This Windows-specific output from two runs of the above program is typical, though your output may vary. User-entered text is in italics.
-
-{{OutputStart}}
-
-Enter path and name of directory to delete: ''Some\Folder\That\Doesnt\Exist''
-Some\folder\That\Doesnt\Exist does not exist!
-
-Enter path and name of directory to delete: ''C:\temp''
-C:\temp is not empty!
-
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[MKDIR]], [[CHDIR]]
-* [[KILL]], [[FILES]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RND_111.txt b/internal/help/RND_111.txt
deleted file mode 100644
index 1595b8f94..000000000
--- a/internal/help/RND_111.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:38}}
-The '''RND''' function returns a random number with a value between 0 (inclusive) and 1 (exclusive).
-
-
-{{PageSyntax}}
-:: result! = [[RND]] [(''n'')]
-
-
-{{Parameters}}
-* ''n'' is a [[SINGLE]] numeric value that defines the behavior of the RND function but is '''NOT normally required''':
-::n parameter omitted: Returns next random number in the sequence.
-::n = 0: Return the last value returned.
-::n < 0: Always returns the same value for any given n
-::n > 0: the sequence of numbers generated will not change unless [[RANDOMIZE]] is initiated.
-
-
-{{PageDescription}}
-* The random numbers generated range from 0 minimum to .9999999 maximum [[SINGLE]] values that never equal 1.
-* To get values in a range larger than 1, multiply RND with a number to get returns up to but not including that numerical value.
-* To get values starting at a certain number, add that number to the RND result as RND minimums can be 0.
-* If you need an integer range of numbers, like a dice roll, round it down to an [[INT]]. Add 1 to the maximum number with [[INT]].
-* The random sequence is 2 ^ 24 or 16,777,216 entries long, which can allow repeated patterns in some procedures.
-* Formulas for the [[INT|Integer]] or [[CINT|Closest Integer]] of ANY number range from ''min%''(lowest value) to ''max%''(greatest value):
-::* Using [[INT]]: randNum% = INT(RND * (max% - min% + 1)) + min%
-::* Using [[CINT]]: randNum% = CINT(RND * (max% - min%)) + min%
-* Use [[RANDOMIZE]] [[TIMER]] for different random number results each time a program is run.
-* [[RUN]] should reset the [[RANDOMIZE]] sequence to the starting [[RND]] function value.(Not yet in QB64)
-
-
-''Example 1:'' Generating a random integer value between 1 and 6 (inclusive) using INT.
-{{CodeStart}}
-dice% = {{Cl|INT}}({{Cl|RND}} * 6) + 1 'add one as INT value never reaches 6
-{{CodeEnd}}
-
-
-''Example 2:'' Using uniform random numbers to create random numbers with a gaussian distribution ([http://en.wikipedia.org/wiki/Marsaglia_polar_method| Marsaglia's polar method]).
-{{CodeStart}}
-{{Cl|DO}}
- u! = {{Cl|RND}} * 2 - 1
- v! = {{Cl|RND}} * 2 - 1
- s! = u! * u! + v! * v!
-{{Cl|LOOP}} {{Cl|WHILE}} s! >= 1 {{Cl|OR}} s! = 0
-s! = SQR(-2 * {{Cl|LOG}}(s!) / s!) * 0.5
-u! = u! * s!
-v! = v! * s!
-{{CodeEnd}}
-:''Explanation:'' Values ''u!'' and ''v!'' are now two independent random numbers with gaussian distribution, centered at 0.
-
-
-''Example 3:'' Random flashes from an explosion
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-BC = 120 ' BALL COUNT
-{{Cl|DIM}} ballx(1 {{Cl|TO}} BC)
-{{Cl|DIM}} bally(1 {{Cl|TO}} BC)
-{{Cl|DIM}} velx(1 {{Cl|TO}} BC)
-{{Cl|DIM}} vely(1 {{Cl|TO}} BC)
-{{Cl|DIM}} bsize(1 {{Cl|TO}} BC)
-Y = {{Cl|INT}}({{Cl|RND}} * (400 - 100 + 1)) + 100
-X0 = 325
-Y0 = 300
-Tmax = 150
-DO
- {{Cl|FOR...NEXT|FOR}} p = 1 {{Cl|TO}} BC
- T = {{Cl|INT}}({{Cl|RND}} * (Tmax - 50 + 1)) + 50
- X = {{Cl|INT}}({{Cl|RND}} * (1000 + 500 + 1)) - 500
- velx(p) = (X - X0) / T ' calculate velocity based on flight time
- vely(p) = -1 * (Y - .05 * (T ^ 2 + 20 * Y0)) / (T) ' verticle velocity
- {{Cl|NEXT}} p
-
- {{Cl|FOR...NEXT|FOR}} w = 1 {{Cl|TO}} BC
- bsize(w) = {{Cl|INT}}({{Cl|RND}} * (10 - 0 + 1)) + 0 'size
- {{Cl|NEXT}} w
-
- {{Cl|FOR...NEXT|FOR}} J = 1 {{Cl|TO}} Tmax
- {{Cl|_LIMIT}} 60
- {{Cl|CLS}}
- '{{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} 255 {{Cl|STEP}} .5
- '{{Cl|CIRCLE}} (X0, Y0), i, {{Cl|_RGB}}(255 - i, 0, 0), 0, 3.147
- ' {{Cl|NEXT}} i
-
- R = {{Cl|INT}}({{Cl|RND}} * (25 - 20 + 1)) + 20 'random glimmer
- {{Cl|FOR...NEXT|FOR}} z = 1 {{Cl|TO}} BC
- ballx(z) = X0 + velx(z) * J
- bally(z) = Y0 - vely(z) * J + .5 * .1 * J ^ 2
- {{Cl|NEXT}} z
-
- {{Cl|FOR...NEXT|FOR}} d = 1 {{Cl|TO}} BC
- RCOL = {{Cl|INT}}({{Cl|RND}} * (255 - 0 + 1)) 'color
- {{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} bsize(d) + 1 {{Cl|STEP}} .4 'draw balls
- {{Cl|CIRCLE}} (ballx(d), bally(d)), i, {{Cl|_RGBA}}(255, RCOL - (R * i), RCOL - R * i, 255)
- {{Cl|NEXT}} i
- {{Cl|NEXT}} d
-
- {{Cl|_DISPLAY}}
-
- {{Cl|NEXT}} J
-
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{CodeEnd}} {{small|Code by Falcon}}
-
-
-{{PageSeeAlso}}
-* [[RANDOMIZE]], [[TIMER]]
-* [[INT]], [[CINT]], [[FIX]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RSET_1111.txt b/internal/help/RSET_1111.txt
deleted file mode 100644
index 9622ee282..000000000
--- a/internal/help/RSET_1111.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:40}}
-The '''RSET''' statement right-justifies a string according to length of the string expression.
-
-
-{{PageSyntax}}
-:: RSET string_variable = string_expression
-
-
-
-* If the ''string_expression'' is longer than a fixed length string variable the value is truncated from the right side in [[LSET]] or RSET.
-* If the ''string_expression'' is smaller than the fixed length, spaces will occupy the extra positions in the string.
-* RSET can be used with a [[FIELD]] or [[TYPE]] string definition to set the buffer position before a [[PUT]].
-
-
-''Example:''
-{{CodeStart}}
-{{Cl|CLS}}
-{{Cl|DIM}} thestring {{Cl|AS}} {{Cl|STRING}} * 10
-{{Cl|PRINT}} "12345678901234567890"
-{{Cl|RSET}} thestring = "Hello!"
-{{Cl|PRINT}} thestring
-anystring$ = {{Cl|SPACE$}}(20)
-{{Cl|RSET}} anystring$ = "Hello again!"
-{{Cl|PRINT}} anystring$
-{{Cl|RSET}} thestring = "Over ten characters long"
-{{Cl|PRINT}} thestring
-{{CodeEnd}}
-{{OutputStart}}
-12345678901234567890
- Hello!
- Hello Again!
-Over ten c
-{{OutputEnd}}
-
-:''Explanation:'' Notice how "Hello!" ends at the tenth position because the length of ''thestring'' is 10. When we used SPACE$(20) the length of ''anystring$'' became 20 so "Hello Again!" ended at the 20th position. That is right-justified. The last line "Over ten c" is truncated as it didn't fit into ''thestring'''s length of only 10 characters.
-
-
-''See also:''
-* [[RTRIM$]], [[FIELD]]
-* [[LSET]], [[LTRIM$]]
-* [[PUT]], [[GET]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/RTRIM$_11111$.txt b/internal/help/RTRIM$_11111$.txt
deleted file mode 100644
index 029901836..000000000
--- a/internal/help/RTRIM$_11111$.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:41}}
-The {{KW|RTRIM$}} function removes trailing space characters from a {{KW|STRING}} value.
-
-
-{{PageSyntax}}
-:{{parameter|return$}} = {{KW|RTRIM$}}({{Parameter|value$}})
-
-
-{{PageDescription}}
-* {{Parameter|value$}} is the {{KW|STRING}} value to trim.
-* If {{Parameter|value$}} contains no trailing space characters, {{Parameter|value$}} is returned unchanged.
-* Convert fixed length {{KW|STRING}} values by using a different {{parameter|return$}} variable.
-
-
-
-{{PageExamples}}
-Trimming a fixed length string value for use by another string variable:
-{{CodeStart}}
-name$ = {{Cl|RTRIM$}}(contact.name) ' trims spaces from end of fixed length {{Cl|TYPE}} value.
-{{CodeEnd}}
-
-Trimming text string ends:
-{{CodeStart}}{{Cl|PRINT}} {{Cl|RTRIM$}}("some text") + "."
-{{Cl|PRINT}} {{Cl|RTRIM$}}("some text ") + "."
-{{Cl|PRINT}} {{Cl|RTRIM$}}("Tommy ")
-{{CodeEnd}}
-{{OutputStart}}some text.
-some text.
-Tommy
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* {{KW|LTRIM$}}, {{KW|STR$}}
-
-* {{KW|LSET}}, {{KW|RSET}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/RUN_111.txt b/internal/help/RUN_111.txt
deleted file mode 100644
index c26e140a2..000000000
--- a/internal/help/RUN_111.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:42}}
-'''RUN''' is a control flow statement that clears and restarts the program currently in memory or executes another specified program.
-
-The multi-modular technique goes back to when QBasic and QuickBASIC had module size constraints. In QB64 it 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}}
-:: '''RUN''' [{''line_number'' | ''filespec$''}] [''command_parameter(s)'']
-
-
-{{Parameters}}
-* ''line number'' specifies a line number in the main module code.
-* An optional ''filespec'' specifies a program to load into memory and run.
-: * BAS or EXE extensions are assumed to be the same as the calling module's extension, EXE or BAS (QBasic only).
-: * ''file names specs'' with other extensions must use the full filename. No extension requires a dot.
-* In '''QB64''' ''command line parameters'' can follow the program file name and be read using the [[COMMAND$]] function later.
-
-
-''Usage:''
-* The starting [[line number]] MUST be one used in the main module code, even if RUN is called from within a SUB or FUNCTION.
-* If no line number is given the currently loaded program runs from the first executable line.
-* In '''QB64''' RUN can open any kind of executable program and provide case sensitive program specific parameters.
-** Recommended practice to run external programs is to use [[SHELL]].
-* RUN closes all open files and closes the invoking program module before the called program starts.
-* RUN resets the [[RANDOMIZE]] sequence to the starting [[RND]] function value.
-* '''Note: Calling RUN repeatedly may cause a stack leak in QB64 if it is called from within a [[SUB]] or [[FUNCTION]]. Avoid when possible.'''
-
-
-''Example 1:'' Shows how RUN can reference multiple line numbers in the main module code. No line number executes first code line.
-{{CodeStart}}
-PRINT " A", " B", " C", " D"
-10 A = 1
-20 B = 2
-30 C = 3
-40 D = 4
-50 {{Cl|PRINT}} A, B, C, D
-60 {{Cl|IF...THEN|IF}} A = 0 {{Cl|THEN}} 70 {{Cl|ELSE}} {{Cl|RUN}} 20 'RUN clears all values
-70 {{Cl|IF...THEN|IF}} B = 0 {{Cl|THEN}} 80 {{Cl|ELSE}} {{Cl|RUN}} 30
-80 {{Cl|IF...THEN|IF}} C = 0 {{Cl|THEN}} 90 {{Cl|ELSE}} {{Cl|RUN}} 40
-90 {{Cl|IF...THEN|IF}} D = 0 {{Cl|THEN}} 100 {{Cl|ELSE}} {{Cl|RUN}} 50
-100 {{Cl|PRINT}}
-{{Cl|INPUT}} "Do you want to quit?(Y/N)", quit$
-{{Cl|IF...THEN|IF}} {{Cl|UCASE$}}(quit$) = "Y" {{Cl|THEN}} {{Cl|END}} {{Cl|ELSE}} {{Cl|RUN}} 'RUN without line number executes at first code line
-
-{{CodeEnd}}
-{{OutputStart}}A B C D
-1 2 3 4
-0 2 3 4
-0 0 3 4
-0 0 0 4
-0 0 0 0
-
-Do you want to quit?(Y/N)_
-{{OutputEnd}}
-
-
-''See also:''
-* [[CHAIN]], [[SHELL]]
-* [[COMMAND$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SADD_1111.txt b/internal/help/SADD_1111.txt
deleted file mode 100644
index 212f6ee42..000000000
--- a/internal/help/SADD_1111.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:43}}
-The '''SADD''' function returns the address of a [[STRING]] variable as an offset from the current data segment.
-
-
-{{PageSyntax}}
-:: SADD(stringvariable)
-
-
-* The argument may be a simple string variable or a single element of a string array. You may not use fixed-length strings.
-* Use this function carefully because strings can move in the BASIC string space storage area at any time.
-* Adding characters may produce a run-time error. Don't add characters to the ends of parameters.
-
-
-''See also:''
-* [[VARSEG]], [[VARPTR]], [[DEF SEG]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SCREEN_(function)_111111_(00000000).txt b/internal/help/SCREEN_(function)_111111_(00000000).txt
deleted file mode 100644
index 534041720..000000000
--- a/internal/help/SCREEN_(function)_111111_(00000000).txt
+++ /dev/null
@@ -1,93 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:44}}
-The '''SCREEN''' function returns the [[ASCII]] code of a text character or the color attribute at a set text location on the screen.
-
-
-{{PageSyntax}}
-:: codeorcolor% = '''SCREEN (''row%'', ''column%''''' [, colorflag%]''')'''
-
-
-{{Parameters}}
-* ''row'' and ''column'' are the [[INTEGER]] text coordinates of the [[SCREEN]] mode used.
-* Optional ''colorflag'' [[INTEGER]] value can be omitted or 0 for [[ASCII]] code values or 1 for color attributes.
-
-
-
-''Usage:''
-* The ''code'' value returned is the [[ASCII]] code from 0 to 255. Returns 32([[SPACE$|space]]) when no character is found at a coordinate.
-* If the ''colorflag'' value is omitted or it is 0, the function returns the [[ASCII]] code of the text character at the position designated.
-* When the ''flag'' value is greater than 0 in '''SCREEN 0''', the function returns the foreground and background color attribute of text position.
-:: * The foreground color(0 to 15) is the returned SCREEN color value AND 15: '''{{text|FG = SCREEN(1, 1, 1) AND 15|green}}'''
-:: * The background color(0 to 7) is the returned SCREEN color value \ 16: '''{{text|BG = SCREEN(1, 1, 1) \ 16|green}}'''
-* '''QB64''' can return color values in screen modes other than [[SCREEN]] 0. QBasic returned the wrong color values in graphic screen modes!
-
-
-''Example 1:'' Finding the text foreground and background colors in SCREEN 0 only:
-{{CodeStart}}
-{{Cl|SCREEN}} 0
-{{Cl|COLOR}} 0, 15
-{{Cl|CLS}}
-
-{{Cl|PRINT}} "{{Cl|SCREEN}} ="; {{Cl|SCREEN (function)|SCREEN}}(1, 1, 1)
-{{Cl|PRINT}} "FG color:"; {{Cl|SCREEN (function)|SCREEN}}(1, 1, 1) {{Cl|AND (boolean)|AND}} 15 'low nibble
-{{Cl|PRINT}} "BG color:"; {{Cl|SCREEN (function)|SCREEN}}(1, 1, 1) \ 16 'high nibble
-{{CodeEnd}}
-{{TextStart}}'''SCREEN = 112'''
-'''FG color: 0'''
-'''BG color: 7'''
-{{TextEnd}}
-: ''Note:'' How the SCREEN 0 background color can only be changed to colors 0 through 7! 7 * 16 = 112.
-
-
-''Example 2:'' Reading the [[ASCII]] code and color of a text character using the SCREEN function. Graphic colors were not reliable in QBasic!
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-row = 10: column = 10
-
-{{Cl|COLOR}} 9: {{Cl|LOCATE}} row, column: {{Cl|PRINT}} "Hello"
-code% = {{Cl|SCREEN (function)|SCREEN}}(row, column, 0) ' character code return parameter 0
-attrib% = {{Cl|SCREEN (function)|SCREEN}}(row, column, 1) ' character color return parameter 1
-{{Cl|COLOR}} 14: {{Cl|LOCATE}} 15, 10: {{Cl|PRINT}} "ASCII:"; code%, "COLOR:"; attrib%
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}
-{{Text| Hello|blue}}
-
-
-
-{{Text| ASCII: 72 COLOR: 9|yellow}}
-{{OutputEnd}}
-:''Explanation:'' The SCREEN function returns the [[ASCII]] code for "H" and the color 9.
-
-
-''Example 3:'' Finding the current program path placed on the screen using [[FILES]] and the SCREEN function in SCREEN 0.
-{{CodeStart}}
-{{Cl|SCREEN}} 0, 0, 0, 0
-{{Cl|CLS}}
-{{Cl|PRINT}} "This is a directory test..."
-{{Cl|SCREEN}} 0, 0, 1, 0
-{{Cl|COLOR}} 0 'blank out the screen text
-{{Cl|FILES}} "qb64.exe" 'the current program's filename can also be used
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 80
- a$ = a$ + {{Cl|CHR$}}({{Cl|SCREEN (function)|SCREEN}}(1, i)) 'scan the black text on the screen
-{{Cl|NEXT}}
-{{Cl|CLS}}
-{{Cl|COLOR}} 7
-a$ = {{Cl|RTRIM$}}(a$)
-{{Cl|SLEEP}}
-{{Cl|SCREEN (statement)|SCREEN}} 0, 0, 0, 0
-{{Cl|LOCATE}} 3, 1: {{Cl|PRINT}} "The current directory is: "; a$
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Pete from the N54 QB site}}
-:''Explanation:'' The SCREEN page one is used to hide the [[FILES]] display using COLOR 0. The [[SCREEN (function)|SCREEN]] function reads the top of the screen page text and creates the current path string. It is then printed on the visual page.
-
-
-''See also:''
-* [[PRINT]], [[SCREEN]]
-* [[COLOR]], [[CHR$]], [[POINT]]
-* [[CSRLIN]], [[POS]], [[ASCII]]
-* [[Screen Memory]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SCREEN_111111.txt b/internal/help/SCREEN_111111.txt
deleted file mode 100644
index 4b826ea18..000000000
--- a/internal/help/SCREEN_111111.txt
+++ /dev/null
@@ -1,194 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:45}}
-{| align="Right"
- | __TOC__
- |}
-The [[SCREEN]] statement sets the video display mode and size of the program window's workspace.
-
-
-{{PageSyntax}}
-
-: [[SCREEN]] {''mode%''|''imagehandle&''} [, , active_page, visual_page]
-
-
-{{Parameters}}
-* The SCREEN ''mode'' [[INTEGER]] values available today are 0 to 2 and 7 to 13 listed below.
-* '''QB64''' can use a [[LONG]] [[_NEWIMAGE]] page or [[_LOADIMAGE]] file ''image handle'' value instead.
-* The empty comma disables color when any value is used. '''DO NOT USE!''' Include the comma ONLY when using page flipping.
-* If the SCREEN mode supports pages, the ''active page'' is the page to be worked on while ''visual page'' is the one displayed.
-
-
-''Usage:''
-* No SCREEN statement in a program defaults to [[SCREEN]] 0 text ONLY mode.
-* A SCREEN statement that changes screen modes also clears the screen like [[CLS]]. Nothing on the screen is retained.
-* Some screen mode text sizes are adjustable with [[WIDTH]] and all '''QB64''' screens support [[PCOPY]] and page flipping.
-
-{{WhiteStart}} '''LEGACY SCREEN MODES AT A GLANCE'''
-
- '''Screen Text Graphics Colors Video Text Default'''
- '''Mode Rows Columns Width Height Attrib. BPP Pages Block QB64 Font'''
-
- 0 25/43/50 80/40 No graphics 16/16 DAC 4 0-7 ----- _FONT 16
- 1 25 40 320 200 16/4 BG 4 none 8 X 8 _FONT 8
- 2 25 80 640 200 2/mono 1 none 8 X 8 _FONT 8
- .................................................................................
- 7 25 40 320 200 16/16 DAC 4 0-7 8 X 8 _FONT 8
- 8 25 80 640 200 16/16 4 0-3 8 X 8 _FONT 8
- 9 25 80 640 350 16/64 DAC 4 0-1 8 X 14 _FONT 14
- 10 25 80 640 350 4/2 GScale 2 none 8 X 14 _FONT 14
- 11 30/60 80 640 480 2/mono 1 none 8 X 16 _FONT 16
- 12 30/60 80 640 480 16/262K 4 none 8 X 16 _FONT 16
- 13 25 40 320 200 256/65K 8 none 8 X 8 _FONT 8
-
- '''QB64 allows video paging and [[PCOPY]] in ALL screen modes!'''
-{{WhiteEnd}}
-
-==QB64 Custom Screen Modes==
-
-: [[SCREEN]] ''imagehandle&'' [, , ''active_page'', ''visual_page'']
-
-: [[SCREEN]] [[_NEWIMAGE]](''wide&'', ''high&''[, {''mode''|''256''|''32''}]) [, , ''active_page'', ''visual_page'']
-
-: [[SCREEN]] [[_LOADIMAGE]](''file$''[, {''mode''|''256''|''32''}]) [, , ''active_page'', ''visual_page'']
-
-
-* Custom screen modes can be created using a [[_NEWIMAGE]] or [[_LOADIMAGE]] function ''imagehandle'' return value.
-* '''QB64''' screen modes 0 to 2 and 7 to 13 can be emulated with the same color depth and text block size and different dimensions.
-* [[_NEWIMAGE]] screens can be any set size. A screen mode can be emulated or 256 or 32 bit colors can be designated.
-* The [[_LOADIMAGE]] screen size will be the size of the image loaded. Can designate a ''mode'' or 256 or 32 bit colors.
-* '''QB64''' allows page flipping or a [[PCOPY]] in ANY SCREEN mode. [[_DISPLAY]] can also be used to reduce flickering in animations.
-* All SCREEN modes are Windows in QB64. Use [[_FULLSCREEN]] to set the window area to full screen.
-* [[_SCREENMOVE]] can position a window or the _MIDDLE option can center it on the desktop.
-
-([[#toc|Return to Table of Contents]])
-
-==Legacy Screen Modes==
-
-* '''[[SCREEN]] 0''' (default mode) is a '''text only''' screen mode. 64 (VGA) colors with hi-intensity(blinking) colors 16 to 31. ([[DAC]] attrib 6, 8 to 15). 8 Background colors intensities only(0 - 7). No graphics are possible! Normally runs in a window. ALT-Enter switches from a window to fullscreen. To automatically run in '''QBasic''' fullscreen, use another Screen mode before using {{KW|SCREEN (statement)|SCREEN}} 0. Can use {{KW|PCOPY}} with video pages 0 to 7. Text is 25, 43 or 50 rows by 40 or 80 columns. Default is 25 by 80. See {{KW|WIDTH}}.
-
-: '''Note:''' Use [[OUT]] or [[_PALETTECOLOR]] to create higher intensity color backgrounds than [[COLOR]] , 7.
-
-:::'''All other available [[SCREEN]] modes can use text and graphics and are fullscreen in QBasic ONLY.'''
-
-* '''[[SCREEN]] 1''' has 4 background color attributes. 0 = black, 1 = blue, 2 = green, 3 = grey. White foreground only. Text is 25 by 40. White graphics is 320 by 200.
-
-* '''[[SCREEN]] 2''' is '''monochrome''' with black background and white foreground. Text is 25 by 80. White graphics 640 by 200. Â Â Â Â Â Â Â Â NO [[COLOR]] keyword allowed.
-
-* '''[[SCREEN]] 3 to 6 are no longer supported''' on most computers! Using them will cause a video [[ERROR Codes|error]]!
-
-* '''[[SCREEN]] 7''' has 16 color attributes ([[DAC]] attrib. 8 to 15) with background colors. Text 25 rows by 40 columns. Graphics 320 columns by 200 rows. Video pages 0 to 7 for flipping or {{KW|PCOPY}}.
-
-* '''[[SCREEN]] 8''' has 16 color attributes with background. Text is 25 by 80. Graphics is 640 by 200. Video pages 0 to 3.
-
-* '''[[SCREEN]] 9''' has 64 DAC color hues for ([[DAC]] attrib. 6, 8 to 15) with background colors. Text is 25 by 80. Graphics is 640 by 350. Video pages 0 and 1 for flipping or {{KW|PCOPY}}.
-
-* '''[[SCREEN]] 10''' has 4 gray scale color attributes with black background. 1 = normal white, 2 = blinking white and 3 = bright white. Text is 25 by 80. Graphics is 640 by 350.
-
-* '''[[SCREEN]] 11''' is '''monochrome''' with black background and white foreground. Text is 30 or 60 by 80 columns(see {{KW|WIDTH}}). White graphics is 640 by 480. NO [[COLOR]] keyword allowed.
-
-* '''[[SCREEN]] 12''' has 16 color attributes, black background. 256K possible color hues. Text is 30 or 60 by 80 columns(see {{KW|WIDTH}}). Graphics 640 by 480.
-
-* '''[[SCREEN]] 13''' has 256 color attributes, black background. 256K possible color hues. Text is 25 by 40. Graphics is 320 by 200.
-
-* '''[[SCREEN]] [[_NEWIMAGE]]'''(wide&, deep&, mode%) can imitate any size screen mode or use 32 bit or 256 color modes in '''QB64'''.
-
-* '''[[SCREEN]] [[_LOADIMAGE]]'''(imagehandle&, colors) can load a program screen of an image file handle in '''QB64''' using 256 or 32 bit.
-
-'''QB64 can use page flipping with any number of pages in any screen mode!'''
-
-([[#toc|Return to Table of Contents]])
-
-==Text and Graphics==
-
-
-:::::::::'''Text Coordinates:'''
-
-* Are a minimum of 1 and the values given above are the maximums. [[LOCATE]] 1, 1 is the top left [[SCREEN]] text position.
-* Text characters occupy a certain sized pixel box adjusted by [[WIDTH]] in some screen modes.
-* Text [[PRINT]] cursor positions can be read by {{KW|CSRLIN}} and {{KW|POS|POS(0)}} to [[LOCATE]] text [[PRINT]]s.
-* [[VIEW PRINT]] can be used to designate a text view port area.
-* In '''QB64''' the [[_WIDTH (function)|_WIDTH]] and [[_HEIGHT]] functions will return the text dimensions in SCREEN 0 only.
-
-
-:::::::::'''Graphic Coordinates:'''
-
-* The minimum on screen graphics pixel coordinates are 0 for columns and rows in the top left corner.
-* Maximum pixel coordinates are one less than the maximum dimensions above because the pixel count starts at 0.
-* Graphic objects such as [[PSET]], [[PRESET]], [[LINE]], [[CIRCLE]] and [[DRAW]] can be placed partially off of the screen.
-* [[GET (graphics statement)|GET]] and [[PUT (graphics statement)|PUT]] screen image operations MUST be located completely on the screen in QBasic!
-* [[VIEW]] can be used to designate a graphic view port area of the screen.
-* [[WINDOW]] can be used to set the graphics SCREEN coordinates to almost any size needed. Use the SCREEN option for normal row coordinate values. Row coordinates are Cartesian(decrease in value going down the screen) otherwise.
-* In '''QB64''' the [[_WIDTH (function)|_WIDTH]] and [[_HEIGHT]] functions will return the graphic pixel dimensions in SCREENs other than 0.
-
-
-:::::::'''QB64 Screen Statements and Functions:'''
-
-* For file image screens that adopt the image dimensions and image color settings use: [[_LOADIMAGE]]
-* To create custom sized screen modes or pages and 256 or 32 bit colors use: [[_NEWIMAGE]]
-* [[_PUTIMAGE]] can stretch or reduce the size of images to fit the SCREEN size.
-* [[PUT (graphics statement)|PUT]] can use [[_CLIP]] to set objects partially off screen. [[GET (graphics statement)|GET]] can read objects off screen as a color in QB64 ONLY.
-* A [[_DISPLAY]] statement can be used to only display an image after changes instead of using page flipping or [[PCOPY]].
-* The current desktop screen resolution can be found using the [[_SCREENIMAGE]] handle value with [[_WIDTH (function)|_WIDTH]] and [[_HEIGHT]].
-* '''NOTE: Default 32 bit backgrounds are clear black or [[_RGBA]](0, 0, 0, 0)! Use [[CLS]] to make the black opaque!'''
-
-([[#toc|Return to Table of Contents]])
-
-==Examples==
-
-:''Example 1:'' Shows an example of each legacy screen mode available to QBasic and QB64.
-{{CodeStart}}
-{{Cl|SCREEN}} 0
-{{Cl|PRINT}} "This is {{Cl|SCREEN}} 0 - only text is allowed!"
-{{Cl|FOR}} S = 1 {{Cl|TO}} 13
- {{Cl|IF}} S < 3 {{Cl|OR}} S > 6 {{Cl|THEN}}
- {{Cl|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
- {{Cl|SCREEN}} S
- {{Cl|PRINT}} "This is {{Cl|SCREEN}}"; S; " - can use text and graphics!"
- {{Cl|IF}} S = 2 {{Cl|OR}} S = 11 {{Cl|THEN}} {{Cl|PRINT}} "Monochrome - no {{Cl|COLOR}} statements!"
- {{Cl|IF}} S = 10 {{Cl|THEN}}
- {{Cl|COLOR}} 2: {{Cl|PRINT}} "This {{Cl|SCREEN}} has only 4 colors. Black and 3 white: 2 blinks.
- {{Cl|CIRCLE}} (100,100), 50, 2
- {{Cl|ELSE}} : {{Cl|CIRCLE}} (100,100), 100, S
- {{Cl|END IF}}
- {{Cl|END IF}}
-{{Cl|NEXT}}
-{{Cl|SLEEP}}
-{{Cl|SYSTEM}}
-{{CodeEnd}}
-{{OutputStart}}
-This is SCREEN 0 - only text is allowed!
-{{OutputEnd}}
-:Displays each {{KW|SCREEN (statement)|SCREEN}} mode one at a time with a {{KW|CIRCLE}} (except for {{KW|SCREEN (statement)|SCREEN}} 0)
-
-([[#toc|Return to Table of Contents]])
-
-==References==
-
-''See Examples:''
-
-* [[SAVEIMAGE]] {{text|(QB64 Image to Bitmap SUB by Galleon)}}
-
-* [[Program ScreenShots]] {{text|(Member program for legacy screen modes)}}
-
-* [[ThirtyTwoBit SUB]] {{text|(QB64 Image area to bitmap)}}
-
-* [[SelectScreen]] {{text|(Member Screen mode selection function)}}
-
-* [[ScreenMode]] {{text|(Member function to find current Screen mode)}}
-
-
-{{PageSeeAlso}}
-* [[COLOR]], [[CLS]], [[WIDTH]]
-* [[_NEWIMAGE]], [[_LOADIMAGE]], [[_SCREENIMAGE]]
-* [[_LOADFONT]], [[_FONT]]
-* [[_DISPLAY]], [[_COPYIMAGE]], [[_SCREENMOVE]]
-* [[_SCREENHIDE]], [[_SCREENSHOW]], [[_SCREENICON]]
-* [[PALETTE]], [[OUT]], [[PCOPY]],
-* [[GET (graphics statement)|GET]], [[PUT (graphics statement)|PUT]] {{text|(graphics)}}
-* [[VIEW]], [[WINDOW]] {{text|(graphic viewport)}}, [[VIEW PRINT]] {{text|(text view port)}}
-* [[SCREEN (function)]] {{text|(text only)}}, [[POINT]] {{text|(graphic pixel colors)}}
-* [[Screen Memory]], [[Screen Saver Programs]]
-* [[_CONSOLE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SEEK_(statement)_1111_(000000000).txt b/internal/help/SEEK_(statement)_1111_(000000000).txt
deleted file mode 100644
index e1c805a5f..000000000
--- a/internal/help/SEEK_(statement)_1111_(000000000).txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:48}}
-The '''SEEK''' statement sets the next byte or record position of a file for a read or write.
-
-
-
-{{PageSyntax}}
-:: SEEK ''filenumber&'', ''position''
-
-
-
-* ''filenumber'' must be the file number that is [[OPEN]] and being read or written to.
-* ''position'' is a byte in [[BINARY]] or sequencial files created in [[OUTPUT]], [[APPEND]] or [[INPUT (file mode)]]s. The first byte = 1.
-* ''position'' is the record in [[RANDOM]] files to read or write. Records can hold more than one variable defined in a [[TYPE]].
-* Since the first SEEK file position is 1 it may require adding one to an offset value when documentation uses that position as 0.
-* After a SEEK statement, the next file operation starts at that SEEK byte position.
-* The SEEK statement can work with the [[SEEK]] function to move around in a file.
-
-
-''Example:'' A SEEK statement using the [[SEEK]] function to move to the next random record in a file.
-
-{{CodeStart}}
- SEEK 1, {{Cl|SEEK}}(1) + 1
-{{CodeEnd}}
-
-
-
-''See also:''
-* [[SEEK]] {{text|(function)}}
-* [[GET]], [[PUT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SEEK_1111.txt b/internal/help/SEEK_1111.txt
deleted file mode 100644
index dabf3ecbc..000000000
--- a/internal/help/SEEK_1111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:47}}
-The '''SEEK''' function returns the current byte or record position in a file.
-
-
-
-{{PageSyntax}}
-:: byte = SEEK(filenumber&)
-
-
-* Filenumber is the number of an [[OPEN]] file in any mode.
-* In [[RANDOM]] files SEEK returns the current record position.
-* In [[BINARY]] or sequencial files SEEK returns the current byte position(first byte = 1).
-* Since the first file position is 1 it may require adding one to an offset value when documentation uses that position as 0.
-* Devices that do not support SEEK (SCRN, CONS, KBRD, COMn and LPTn) return 0.
-
-
-''See also:''
-*[[SEEK (statement)]]
-*[[LOC]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SELECT_CASE_111111_1111.txt b/internal/help/SELECT_CASE_111111_1111.txt
deleted file mode 100644
index 454995cd4..000000000
--- a/internal/help/SELECT_CASE_111111_1111.txt
+++ /dev/null
@@ -1,171 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:49}}
-[[SELECT CASE]] is used to determine the program flow by comparing the value of a variable to specific CASE values.
-
-
-{{PageSyntax}}
-:'''SELECT''' [EVERY]'''CASE''' {{Parameter|testExpression}}
-::'''CASE''' {{Parameter|expressionList1}}
-:::[statement-block1]
-::['''CASE''' {{Parameter|expressionList2}}
-:::[statement-block2]]...
-::['''CASE ELSE'''
-:::[statementblock-n]]
-:'''END SELECT'''
-
-
-
-* '''SELECT CASE''' evaluates {{Parameter|testExpression}} and executes the first matching [[CASE]] or [[CASE ELSE]] block and exits.
-* '''SELECT EVERYCASE''' allows the execution of all matching [[CASE]] blocks from top to bottom or the [[CASE ELSE]] block.
-* The literal, variable or expression {{Parameter|testExpression}} comparison can result in any string or numerical type.
-* '''Note:''' A {{Parameter|testExpression}} variable value can be changed inside of true CASE evaluations in SELECT EVERYCASE.
-* A {{Parameter|testExpression}} derived from an expression or [[FUNCTION]] will only be determined once at the start of the block execution.
-* Supports individual CASE values and ranges or lists of literal values as below:
-** '''CASE''' casevalue: code {{text|''''case compares one numerical or text value'''}}
-** '''CASE''' casevalue1 [[TO]] casevalue2: code {{text|''''case compares a range of values '''}}
-** '''CASE''' casevalue1, casevalue2, casevalue3: code {{text|''''case compares a list of values separated by commas'''}}
-** '''CASE IS''' > casevalue: code {{text|''''case compares a value as =, <>, < or > '''}}
-** '''CASE ELSE''': code {{text|''''bottom case statement executes only when no other CASE is executed.}}'''
-* The CASE values should cover the normal ranges of the comparison {{Parameter|testExpression}} values.
-* Use '''CASE ELSE''' before '''END SELECT''' if an alternative is necessary when no other case matches.
-* CASEs should be listed in an ascending or descending values for best and fastest results.
-* [[STRING]] comparisons will be based on their respective [[ASCII]] code values where capital letters are valued less than lower case.
-* Use '''SELECT CASE''' when [[IF...THEN]] statements get too long or complicated.
-* '''SELECT CASE''' and '''EVERYCASE''' statement blocks must '''always''' be ended with [[END SELECT]].
-* Use '''[[colon]]s''' to execute multiple statements in one line.
-* An '''[[underscore]]''' can be used anywhere after the code on one line to continue it to the next line in '''QB64'''.
-
-
-{{PageExamples}}
-''Example 1:'' SELECT CASE can use literal or variable [[STRING]] or numerical values in CASE comparisons:
-{{CodeStart}}
-{{Cl|INPUT}} "Enter a whole number value from 1 to 40: ", value
-value1 = 10
-value2 = 20
-value3 = 30
-
-{{Cl|SELECT CASE}} value
- {{Cl|CASE}} value1: {{Cl|PRINT}} "Ten only"
- {{Cl|CASE}} value1 {{Cl|TO}} value2: {{Cl|PRINT}} "11 to 20 only" '10 is already evaluated
- {{Cl|CASE}} value1, value2, value3: {{Cl|PRINT}} "30 only" '10 and 20 are already evaluated
- {{Cl|CASE IS}} > value2: {{Cl|PRINT}} "greater than 20 but not 30" '30 is already evaluated
- {{Cl|CASE ELSE}}: {{Cl|PRINT}} "Other value" 'values less than 10
-{{Cl|END SELECT}}
-{{CodeEnd}}
-: ''Explanation:'' The first true CASE is executed and SELECT CASE is exited. "Other value" is printed for values less than 10.
-
-
-''Example 2:'' SELECT CASE will execute the first CASE statement that is true and ignore all CASE evaluations after that:
-{{CodeStart}}
-a = 100
-{{Cl|SELECT CASE}} a 'designate the value to compare
- {{Cl|CASE}} 1, 3, 5, 7, 9
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE}} 10
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE}} 50
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE}} 100
- {{Cl|PRINT}} "This will be displayed when a equals 100"
- {{Cl|PRINT}} "(and no other case will be checked)"
- {{Cl|CASE}} 150
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE IS}} < 150
- {{Cl|PRINT}} "This will not be shown as a previous case was true"
- {{Cl|CASE}} 50 {{Cl|TO}} 150
- {{Cl|PRINT}} "This will not be shown as a previous case was true"
- {{Cl|CASE ELSE}}
- {{Cl|PRINT}} "This will only print if it gets this far!"
-{{Cl|END SELECT}}
-{{CodeEnd}}
-{{OutputStart}}This will be displayed when a equals 100
-(and no other case will be checked)
-{{OutputEnd}}
-:''Explanation:'' The first case where a value is true is shown, the remainder are skipped. Try changing the value of ''a''.
-
-
-''Example 3:'' Same as Example 2 but, SELECT EVERYCASE will execute every CASE statement that is true.
-{{CodeStart}}
-a = 100
-{{Cl|SELECT CASE|SELECT EVERYCASE}} a 'designate the value to compare
- {{Cl|CASE}} 1, 3, 5, 7, 9
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE}} 10
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE}} 50
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE}} 100
- {{Cl|PRINT}} "This will be displayed when a equals 100"
- {{Cl|PRINT}} "(and other cases will be checked)"
- {{Cl|CASE}} 150
- {{Cl|PRINT}} "This will not be shown."
- {{Cl|CASE IS}} < 150
- {{Cl|PRINT}} "This will be shown as 100 is less than 150"
- {{Cl|CASE}} 50 {{Cl|TO}} 150
- {{Cl|PRINT}} "This will be shown as 100 is between 50 and 150"
- {{Cl|CASE ELSE}}
- {{Cl|PRINT}} "This will only print if no other CASE is true!"
-{{Cl|END SELECT}}
-{{CodeEnd}}
-{{OutputStart}}This will be displayed when a equals 100
-(and other cases will be checked)
-This will be shown as 100 is less than 150
-This will be shown as 100 is between 50 and 150
-{{OutputEnd}}
-:''Explanation:'' [[CASE ELSE]] will only execute if no other CASE was true. See Example 5 for more usages.
-
-
-''Example 4:'' SELECT CASE evaluates string values by the [[ASC]] code value according to [[ASCII]].
-{{CodeStart}}
-{{Cl|PRINT}} "Enter a letter, number or punctuation mark from the keyboard: ";
-valu$ = {{Cl|INPUT$}}(1)
-{{Cl|PRINT}} value$
-value1$ = "A"
-value2$ = "m"
-value3$ = "z"
-
-{{Cl|SELECT CASE}} value$
- {{Cl|CASE}} value1$: {{Cl|PRINT}} "A only"
- {{Cl|CASE}} value1$ {{Cl|TO}} value2$: {{Cl|PRINT}} "B to m" 'A is already evaluated
- {{Cl|CASE}} value1$, value2$, value3$: {{Cl|PRINT}} "z only" 'A and m are already evaluated
- {{Cl|CASE IS}} > value2$: {{Cl|PRINT}} "greater than m but not z" 'z is already evaluated
- {{Cl|CASE ELSE}}: {{Cl|PRINT}} "other value" 'key entry below A including all numbers
-{{Cl|END SELECT}}
-{{CodeEnd}}
-: ''Notes:'' [[STRING]] values using multiple characters will be compared by the [[ASCII]] code values sequentially from left to right. Once the equivalent code value of one string is larger than the other the evaluation stops. This allows string values to be compared and sorted alphabetically using [[Greater Than|>]] or [[Less Than|<]] and to [[SWAP]] values in [[arrays]] regardless of the string lengths.
-
-
-''Example 5:'' EVERYCASE is used to draw sections of digital numbers in a simulated LED readout using numbers from 0 to 9:
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-DO
- {{Cl|LOCATE}} 1, 1: {{Cl|INPUT}} "Enter a number 0 to 9: ", num
- {{Cl|CLS}}
- {{Cl|SELECT CASE|SELECT EVERYCASE}} num
- {{Cl|CASE}} 0, 2, 3, 5 {{Cl|TO}} 9: {{Cl|PSET}} (20, 20), 12
- {{Cl|DRAW}} "E2R30F2G2L30H2BR5P12,12" 'top horiz
- {{Cl|CASE}} 0, 4 {{Cl|TO}} 6, 8, 9: {{Cl|PSET}} (20, 20), 12
- {{Cl|DRAW}} "F2D30G2H2U30E2BD5P12,12" 'left top vert
- {{Cl|CASE}} 0, 2, 6, 8: {{Cl|PSET}} (20, 54), 12
- {{Cl|DRAW}} "F2D30G2H2U30E2BD5P12, 12" 'left bot vert
- {{Cl|CASE}} 2 {{Cl|TO}} 6, 8, 9: {{Cl|PSET}} (20, 54), 12
- {{Cl|DRAW}} "E2R30F2G2L30H2BR5P12, 12" 'middle horiz
- {{Cl|CASE}} 0 {{Cl|TO}} 4, 7 {{Cl|TO}} 9: {{Cl|PSET}} (54, 20), 12
- {{Cl|DRAW}} "F2D30G2H2U30E2BD5P12,12" 'top right vert
- {{Cl|CASE}} 0, 1, 3 {{Cl|TO}} 9: {{Cl|PSET}} (54, 54), 12
- {{Cl|DRAW}} "F2D30G2H2U30E2BD5P12,12" 'bottom right vert
- {{Cl|CASE}} 0, 2, 3, 5, 6, 8: {{Cl|PSET}} (20, 88), 12
- {{Cl|DRAW}} "E2R30F2G2L30H2BR5P12,12" 'bottom horiz
- {{Cl|CASE ELSE}}
- {{Cl|LOCATE}} 20, 20: {{Cl|PRINT}} "Goodbye!"; num
- {{Cl|END SELECT}}
-{{Cl|LOOP}} {{Cl|UNTIL}} num > 9
-{{CodeEnd}}
-: '''Note:''' [[CASE ELSE]] will only execute if no other CASE is true! Changing the comparison value in a CASE may affect later CASE evaluations. '''Beware of duplicate variables inside of cases affecting the comparison values and remaining cases.'''
-
-
-{{PageSeeAlso}}
-* [[IF...THEN]], [[Boolean]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SGN_111.txt b/internal/help/SGN_111.txt
deleted file mode 100644
index f7955fedd..000000000
--- a/internal/help/SGN_111.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:50}}
-The '''SGN''' function returns the sign of a number value.
-
-
-
-{{PageSyntax}}
-:: sign% = SGN(value)
-
-
-
-* Returns -1 when a sign is negative, 0 when a value is zero, or 1 when a value is positive.
-* Function is used to store the original sign of a number.
-* '''QB64''' allows programs to return only [[_UNSIGNED]] variable values using a [[_DEFINE]] statement.
-
-
-
-''Example:'' Checking and changing negative values to positive ones.
-{{CodeStart}}
-n = -100
-{{Cl|IF...THEN|IF}} {{Cl|SGN}}(n) = -1 THEN n = {{Cl|ABS}}(n)
-PRINT n
-{{CodeEnd}}
-{{OutputStart}} 100
-{{OutputEnd}}
-
-
-''See also:''
-* [[ABS]]
-* [[_DEFINE]], [[_UNSIGNED]]
-* [[Mathematical Operations]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SHARED_111111.txt b/internal/help/SHARED_111111.txt
deleted file mode 100644
index 193938a92..000000000
--- a/internal/help/SHARED_111111.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:51}}
-The '''SHARED''' statement allows variables to be passed automatically to any [[SUB]] or [[FUNCTION]] procedure.
-
-
-
-{{PageSyntax}}
-:: DIM SHARED Qt AS STRING * 1
-
-
-* [[DIM]]ensioned variables are shared with all procedures in the program module.
-* When used with [[DIM]] in the main module, it eliminates the need to pass a parameter variable to a [[SUB]] or [[FUNCTION]].
-* Use [[COMMON SHARED]] to share a list of variable values with sub-procedures or other modules. See also: [[COMMON]]
-* SHARED ('''without [[DIM]]''') can share a list of variables inside of [[SUB]] or [[FUNCTION]] procedures with the main module only.
-:'''Note: SHARED variables in sub-procedures will not be passed to other sub-procedures, only the main module.'''
-
-
-''Example 1:'' Defining variable types with [[AS]] or type suffixes.
-{{CodeStart}}
-{{Cl|DIM}} {{Cl|SHARED}} Qt AS {{Cl|STRING}} * 1, price AS {{Cl|DOUBLE}}, ID AS {{Cl|INTEGER}}
-{{Cl|DIM}} {{Cl|SHARED}} Q$, prices#, IDs%
-{{CodeEnd}}
-
-
-''Example 2:'' The DIR$ function returns a filename or a list when more than one exist. The file spec can use a path and/or wildcards.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 2
- {{Cl|LINE INPUT}} "Enter a file spec: ", spec$
- file$ = DIR$(spec$) 'use a file spec ONCE to find the last file name listed
- {{Cl|PRINT}} DIRCount%, file$, 'function can return the file count using SHARED variable
- {{Cl|DO}}
- K$ = {{Cl|INPUT$}}(1)
- file$ = DIR$("") 'use an empty string parameter to return a list of files!
- {{Cl|PRINT}} file$,
- {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|LEN}}(file$) = 0 'file list ends with an empty string
-{{Cl|NEXT}}
-{{Cl|END}}
-
-{{Cl|FUNCTION}} DIR$ (spec$)
-{{Cl|CONST}} TmpFile$ = "DIR$INF0.INF", ListMAX% = 500 'change maximum to suit your needs
-{{Cl|SHARED}} DIRCount% 'returns file count if desired
-{{Cl|STATIC}} Ready%, Index%, DirList$()
-{{Cl|IF}} {{Cl|NOT}} Ready% {{Cl|THEN}} {{Cl|REDIM}} DirList$(ListMax%): Ready% = -1 'DIM array first use
-{{Cl|IF}} spec$ > "" {{Cl|THEN}} 'get file names when a spec is given
- {{Cl|SHELL}} {{Cl|_HIDE}} "DIR " + spec$ + " /b > " + TmpFile$
- Index% = 0: DirList$(Index%) = "": ff% = {{Cl|FREEFILE}}
- {{Cl|OPEN}} TmpFile$ {{Cl|FOR (file statement)|FOR}} {{Cl|APPEND}} {{Cl|AS}} #ff%
- size& = {{Cl|LOF}}(ff%)
- {{Cl|CLOSE}} #ff%
- {{Cl|IF}} size& = 0 {{Cl|THEN}} {{Cl|KILL}} TmpFile$: {{Cl|EXIT FUNCTION}}
- {{Cl|OPEN}} TmpFile$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #ff%
- {{Cl|DO}} {{Cl|WHILE}} {{Cl|NOT}} {{Cl|EOF}}(ff%) {{Cl|AND (boolean)|AND}} Index% < ListMAX%
- Index% = Index% + 1
- {{Cl|LINE INPUT (file statement)|LINE INPUT}} #ff%, DirList$(Index%)
- {{Cl|LOOP}}
- DIRCount% = Index% 'SHARED variable can return the file count
- {{Cl|CLOSE}} #ff%
- {{Cl|KILL}} TmpFile$
-{{Cl|ELSE}} {{Cl|IF}} Index% > 0 {{Cl|THEN}} Index% = Index% - 1 'no spec sends next file name
-{{Cl|END IF}}
-DIR$ = DirList$(Index%)
-{{Cl|END FUNCTION}}
-{{CodeEnd}}{{small|Code by Ted Weissgerber}}
-: ''Explanation:'' The SHARED variable value ''DIRcount%'' can tell the main program how many files were found using a wildcard spec.
-
-
-''See also:''
-* [[DIM]], [[REDIM]]
-* [[COMMON]], [[COMMON SHARED]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SHELL_(function)_11111_(00000000).txt b/internal/help/SHELL_(function)_11111_(00000000).txt
deleted file mode 100644
index 7c1eb7760..000000000
--- a/internal/help/SHELL_(function)_11111_(00000000).txt
+++ /dev/null
@@ -1,62 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:54}}
-The '''SHELL''' function displays the console and returns the [[INTEGER]] code value sent when the external program exits.
-
-
-{{PageSyntax}}
-::: return_code = '''SHELL(''DOScommand$'')'''
-
-
-{{Parameters}}
-* The literal or variable [[STRING]] ''command'' parameter can be any valid external command or call to another program.
-
-
-''Usage:''
-* A SHELL to a QB64 EXE program with an exit return code parameter after [[END]] or [[SYSTEM]] will return that code value.
-* The return_code is usually 0 when the external program ends with no errors.
-* The console window may appear when using the SHELL function. The [[_SHELLHIDE]] function will hide the console from view.
-
-
-''Example:'' Shelling to another QB64 program will return the exit code when one is set in the program that is run.
-{{TextStart}}''''DesktopSize.BAS ''' Compile in Windows with QB64 first
-
-{{Cb|CONST}} SM_CXSCREEN = 0
-{{Cb|CONST}} SM_CYSCREEN = 1
-
-{{Cb|DECLARE LIBRARY}}
- {{Cb|FUNCTION}} GetSystemMetrics& ({{Cb|BYVAL}} n {{Cb|AS}} {{Cb|LONG}})
-{{Cb|DECLARE LIBRARY|END DECLARE}}
-
-{{Cb|PRINT}} trimstr$(GetSystemMetrics(SM_CXSCREEN)); "X"; trimstr$(GetSystemMetrics(SM_CYSCREEN))
-
-s& = {{Cb|_SCREENIMAGE}}
-{{Cb|PRINT}} {{Cb|_WIDTH (function)|_WIDTH}}(s&); "X"; {{Cb|_HEIGHT}}(s&)
-
-{{Cb|END}} 3 '<<<<<< add a code to return after END or SYSTEM in any program
-
-{{Cb|FUNCTION}} trimstr$ (whatever)
-trimstr = {{Cb|LTRIM$}}({{Cb|RTRIM$}}({{Cb|STR$}}(whatever)))
-{{Cb|END FUNCTION}}
-{{TextEnd}}
-: ''Explanation:'' To set a program exit code use an [[INTEGER]] parameter value after [[END]] or [[SYSTEM]] in the called program.
-
-: After compiling ''DesktopSize.EXE'' run the following code in the QB64 IDE. After 1st program is done 3 will appear on screen:
-{{CodeStart}}
-returncode% = {{Cl|SHELL (function)|SHELL}}("DesktopSize") 'replace call with name of any QB64 program EXE
-
-{{Cl|PRINT}} returncode% 'prints code sent by called program after it is closed
-
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}3 {{OutputEnd}}
-
-
-
-''See also:''
-* [[_SHELLHIDE]] {{text|(function)}}
-* [[SHELL]], [[_HIDE]]
-* [[_CONSOLE]], [[$CONSOLE]]
-* [[SYSTEM]], [[END]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SHELL_11111.txt b/internal/help/SHELL_11111.txt
deleted file mode 100644
index a8c3b1aae..000000000
--- a/internal/help/SHELL_11111.txt
+++ /dev/null
@@ -1,156 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:52}}
-The [[SHELL]] statement allows a program to run external programs or command line statements in Windows, macOS and Linux.
-
-
-{{PageSyntax}}
-: [[SHELL]] [{{Parameter|DOSCommand$}}]
-: [[SHELL]] ['''_DONTWAIT'''] ['''_HIDE'''] [{{Parameter|DOSCommand$}}]
-
-
-{{PageDescription}}
-* If the ''DOSCommand$'' [[STRING]] parameter isn't used, the "command console" is opened and execution is halted until the user closes it manually.
-* If [[_DONTWAIT]] is used, the '''QB64''' program doesn't wait for the SHELLed program/command to end.
-* When the [[_HIDE]] action is used, the [[CONSOLE|console]] window is hidden and screen info can be "redirected" (using redirection characters like >) to a file (recommended).
-* Commands are external commands, according to the user's operating system, passed as [[STRING|strings]] enclosed in quotes or string variables.
-* Commands can be a mixture of [[STRING|strings]] and string variables added together using the + [[concatenation]] operator.
-* Command text can be in upper or lower case. Use single spacing between items and options.
-* '''QB64''' automatically uses CMD /C when using [[SHELL]], but it is allowed in a command string. {{text|Note: CMD alone may lock up program.|red}}
-** '''Note: Some commands may not work without adding CMD /C to the start of the command line.'''
-* '''QB64''' program screens will not get distorted, minimized or freeze the program like QBasic fullscreen modes would.
-* '''QB64''' can use long path folder names and file names and [[SHELL]] command lines can be longer than 124 characters.
-* In Windows, use additional [[CHR$]](34) quotation marks around folder or file names that contain spaces.
-* For other operating systems, both the quotation mark character and the apostrophe can be used to enclose a file name that contains spaces.
-*'''NOTE: Use [[CHDIR]] instead of CD as SHELL commands cannot affect the current program path.'''
-
-
-==QBasic/QuickBASIC==
-* '''QBasic BAS files could be run like compiled programs without returning to the IDE when [[SYSTEM]] was used to [[END|end]] them.'''
-* A user would invoke it with {{InlineCode}}SHELL "QB.EXE /L /RUN program.BAS"{{InlineCodeEnd}}
-
-
-{{PageExamples}}
-''Example 1:'' When working with file or folder names with spaces, add quotation marks around the path and/or file name with [[CHR$]](34).
-{{CodeStart}}
-{{Cl|SHELL}} {{Cl|_HIDE}} "dir " + {{Cl|CHR$}}(34) + "free cell.ico" + {{Cl|CHR$}}(34) + " /b > temp.dir"
-{{Cl|SHELL}} "start Notepad temp.dir" ' display temp file contents in Notepad window
-{{CodeEnd}}
-:{{small|Contents of ''temp.dir'' text file:}}
-{{TextStart}}Free Cell.ico
-{{TextEnd}}
-
-
-''Example 2:'' Opening a Windows program (Notepad) to read or print a Basic created text file.
-{{CodeStart}}
-{{Cl|INPUT}} "Enter a file name to read in Notepad: ", filename$
-{{Cl|SHELL}} "CMD /C start /max notepad " + filename$ ' display in Notepad full screen in XP or NT
-
-'{{Cl|SHELL}} "start /min notepad /p " + filename$ ' taskbar print using QB64 CMD /C not necessary
-{{CodeEnd}}
-
-:''Explanation:'' Notepad is an easy program to open in Windows as no path is needed. Windows NT computers, including XP, use CMD /C where older versions of DOS don't require any command reference. The top command opens Notepad in a normal window for a user to view the file. They can use Notepad to print it. The second command places Notepad file in the taskbar and prints it automatically. The filename variable is added by the program using proper spacing.
-
-::*'''Start''' is used to allow a Basic program to run without waiting for Notepad to be closed.
-::* '''/min''' places the window into the taskbar. '''/max''' is fullscreen and no option is a normal window.
-::* Notepad's '''/p''' option prints the file contents, even with USB printers.
-
-
-
-''Example 3:'' Function that returns the program's current working path.
-{{CodeStart}}
- currentpath$ = Path$ ' function call saves a path for later program use
- PRINT currentpath$
-
- {{Cl|FUNCTION}} Path$
- {{Cl|SHELL}} {{Cl|_HIDE}} "CD > D0S-DATA.INF" 'code to hide window in '''QB64'''
- {{Cl|OPEN}} "D0S-DATA.INF" FOR {{Cl|APPEND}} AS #1 'this may create the file
- L% = {{Cl|LOF}}(1) 'verify that file and data exist
- {{Cl|CLOSE}} #1
- {{Cl|IF}} L% {{Cl|THEN}} 'read file if it has data
- {{Cl|OPEN}} "D0S-DATA.INF" FOR {{Cl|INPUT (file mode)|INPUT}} AS #1
- {{Cl|LINE INPUT (file statement)|LINE INPUT}} #1, line$ 'read only line in file
- Path$ = line$ + "\" 'add slash to path so only a filename needs added later
- {{Cl|CLOSE}} #1
- {{Cl|ELSE}} : Path = "" 'returns zero length string if path not found
- END IF
- {{Cl|KILL}} "D0S-DATA.INF" 'deleting the file is optional
- {{Cl|END FUNCTION}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-:''Explanation:'' The '''SHELL "CD"''' statement requests the current working path. This info is normally printed to the screen, but the '''>''' pipe character sends the information to the DOS-DATA.INF file instead('''QB64''' can use [[_HIDE]] to not display the DOS window). The function uses the [[OPEN]] FOR [[APPEND]] mode to check for the file and the data([[INPUT (file mode)|INPUT]] would create an error if file does not exist). The current path is listed on one line of the file. The file is opened and [[LINE INPUT (file statement)|LINE INPUT]] returns one line of the file text. The function adds a "\" so that the Path$ returned can be used in another file statement by just adding a file name. Save the Path$ to another variable for later use when the program has moved to another directory.
-: In '''QB64''' you can simply use the [[_CWD$]] statement for the same purpose of the example above.
-
-
-''Example 4:'' Determining if a drive or path exists. Cannot use with a file name specification.
-{{CodeStart}}
-{{Cl|LINE INPUT}} "Enter a drive or path (no file name): ", DirPath$
-{{Cl|IF}} PathExist%(DirPath$) {{Cl|THEN}} PRINT "Drive Path exists!" {{Cl|ELSE}} PRINT "Drive Path does not exist!"
-{{Cl|END}}
-
-{{Cl|FUNCTION}} PathExist% (Path$)
-PathExist% = 0
-{{Cl|IF}} {{Cl|LEN}}(Path$) = 0 {{Cl|THEN}} {{Cl|EXIT FUNCTION}} 'no entry
-{{Cl|IF}} {{Cl|LEN}}({{Cl|ENVIRON$}}("OS")) {{Cl|THEN}} CMD$ = "CMD /C " {{Cl|ELSE}} CMD$ = "COMMAND /C "
-{{Cl|SHELL}} {{Cl|_HIDE}} CMD$ + "If Exist " + Path$ + "\nul echo yes > D0S-DATA.INF"
-{{Cl|OPEN}} "D0S-DATA.INF" {{Cl|FOR (file statement)|FOR}} {{Cl|APPEND}} {{Cl|AS}} #1
-{{Cl|IF}} {{Cl|LOF}}(1) {{Cl|THEN}} PathExist% = -1 'yes will be in file if path exists
-{{Cl|CLOSE}} #1
-{{Cl|KILL}} "D0S-DATA.INF" 'delete data file optional
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-:''Explanation: IF Exist'' checks for the drive path. ''\Nul'' allows an emply folder at end of path. ''Echo'' prints '''yes''' in the file if it exists.
-: In '''QB64''' you can simply use the [[_FILEEXISTS]] statement for the same purpose of the example above.
-
-
-''Snippet 1:'' When looking for '''printers''' this command gives you a file list with the default printer marked as '''TRUE''':
-{{TextStart}}{{Cb|SHELL}} {{Cb|_HIDE}} "CMD /C" + "wmic printer get name,default > default.txt"
-{{TextEnd}}
-'''Created file's text:'''
-{{TextStart}}Default Name
- FALSE Microsoft XPS Document Writer
- TRUE HP Photosmart C7200 series
- FALSE HP Officejet Pro 8600
- FALSE Fax
-{{TextEnd}}
-: ''Explanation:'' [[LINE INPUT]] could be used to find the printer names as [[STRING]] variables.
-
-
-''Snippet 2:'' Here is the code to set the default printer to the "HP Officejet Pro 8600":
-{{TextStart}}SHELL _HIDE "CMD /C" + "wmic printer where name='HP Officejet Pro 8600' call setdefaultprinter"
-{{TextEnd}}
-: After executing this program, and then running the first snippet again, we see the following '''contents of the text file:'''
-{{TextStart}}Default Name
- FALSE Microsoft XPS Document Writer
- FALSE HP Photosmart C7200 series
- TRUE HP Officejet Pro 8600
- FALSE Fax
-{{TextEnd}}
-
-
-===More examples===
-''See examples in:''
-* [[FILELIST$ (function)]] (member-contributed file search routine)
-* ''File Exist'' C++ Function that does not create a temp file: [[Windows_Libraries#File_Exist|FileExist Library Function]]
-
-
-{{PageSeeAlso}}
-* [[SHELL (function)]], [[_SHELLHIDE]]
-* [[FILES]], [[CHDIR]], [[MKDIR]]
-* [[_CWD$]], [[_STARTDIR$]]
-* [[_FILEEXISTS]], [[_DIREXISTS]]
-* [[RMDIR]], [[NAME]], [[KILL]], [[RUN]]
-* [[_HIDE]], [[_DONTWAIT]]
-* [[_CONSOLE]], [[$CONSOLE]]
-* [[$SCREENHIDE]], [[$SCREENSHOW]] {{text|(QB64 [[Metacommand]]s)}}
-* [[_SCREENHIDE]], [[_SCREENSHOW]]
-* [[FILELIST$]], [[PDS_(7.1)_Procedures#DIR.24|DIR$]] {{text|(member-contributed file list array function)}}
-
-
-===Extra reference===
-* [[Windows_Libraries#File_Dialog_Boxes|Windows Open and Save Dialog Boxes]]
-* [[C_Libraries#Console_Window|C Console Library]]
-* [[Windows Printer Settings]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SINGLE_111111.txt b/internal/help/SINGLE_111111.txt
deleted file mode 100644
index 15157327e..000000000
--- a/internal/help/SINGLE_111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:56}}
-'''SINGLE''' variables are 4 byte floating decimal point numerical values up to seven digits in length.
-
-
-{{PageSyntax}}
-:: [[DIM]] ''variable'' AS SINGLE
-
-
-{{PageDescription}}
-* Values can range up to 7 digits. Decimal point accuracy depends on whole value places taken.
-* Single is the '''default variable type''' assigned to undefined variables without a type suffix.
-* Variable suffix type designation is '''!'''. Suffix can also be placed after a literal numerical value by user or automatically by the IDE.
-* Values returned may be expressed using exponential or [[scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision.
-* Floating decimal point numerical values cannot be [[_UNSIGNED]]!
-* Values can be converted to 4 byte [[ASCII]] string values using [[_MKS$]] and back with [[_CVS]].
-* '''Warning: QBasic keyword names cannot be used as numerical variable names with or without the type suffix!'''
-
-
-{{PageSeeAlso}}
-* [[DIM]], [[DEFSNG]]
-* [[MKS$]], [[CVS]]
-* [[DOUBLE]], [[_FLOAT]]
-* [[LEN]]
-* [[Variable Types]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SIN_111.txt b/internal/help/SIN_111.txt
deleted file mode 100644
index 6534084f2..000000000
--- a/internal/help/SIN_111.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:55}}
-The {{KW|SIN}} function returns the vertical component or sine of an angle measured in radians.
-
-
-{{PageSyntax}}
-::: value! = '''SIN('''''radian_angle!''''')'''
-
-
-{{Parameters}}
-* The ''radian_angle'' must be measured in radians from 0 to 2 * Pi.
-
-
-{{PageDescription}}
-* To convert from degrees to radians, multiply degrees * π/180.
-* [[SIN]]E is the vertical component of a unit vector in the direction theta (é).
-* Accuracy can be determined as [[SINGLE]] by default or [[DOUBLE]] by following the parameter value with a # suffix.
-
-
-''Example 1:'' Converting degree angles to radians for QBasic's trig functions and drawing the line at the angle.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-PI = 4 * {{Cl|ATN}}(1)
-{{Cl|PRINT}} "PI = 4 * {{Cl|ATN}}(1) ="; PI
-{{Cl|PRINT}} "COS(PI) = "; {{Cl|COS}}(PI)
-{{Cl|PRINT}} "SIN(PI) = "; {{Cl|SIN}}(PI)
-DO
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter the degree angle (0 quits): ", DEGREES%
- RADIANS = DEGREES% * PI / 180
- {{Cl|PRINT}} "RADIANS = DEGREES% * PI / 180 = "; RADIANS
- {{Cl|PRINT}} "X = COS(RADIANS) = "; {{Cl|COS}}(RADIANS)
- {{Cl|PRINT}} "Y = SIN(RADIANS) = "; {{Cl|SIN}}(RADIANS)
- {{Cl|CIRCLE}} (400, 240), 2, 12
- {{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
-{{CodeEnd}}
-{{OutputStart}}
-PI = 4 * ATN(1) = 3.141593
-COS(PI) = -1
-SIN(PI) = -8.742278E-08
-
-Enter the degree angle (0 quits): 45
-RADIANS = DEGREES% * PI / 180 = .7853982
-X = COS(RADIANS) = .7071068
-Y = SIN(RADIANS) = .7071068
-DEGREES% = RADIANS * 180 / PI = 45
-{{OutputEnd}}
-: ''Explanation:'' When 8.742278E-08(.00000008742278) is returned by SIN or [[COS]] the value is essentially zero.
-
-
-''Example 2:'' Displays rotating gears made using SIN and [[COS]] to place the teeth lines.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 9
-{{Cl|DIM}} {{Cl|SHARED}} Pi {{Cl|AS}} {{Cl|SINGLE}}
-Pi = 4 * {{Cl|ATN}}(1)
-{{Cl|DO}}
- {{Cl|FOR...NEXT|FOR}} G = 0 {{Cl|TO}} Pi * 2 {{Cl|STEP}} Pi / 100
- {{Cl|CLS}} 'erase previous
- {{Cl|CALL}} GEARZ(160, 60, 40, 20, 4, G, 10)
- {{Cl|CALL}} GEARZ(240, 60, 40, 20, 4, -G, 11)
- {{Cl|CALL}} GEARZ(240, 140, 40, 20, 4, G, 12)
- {{Cl|CALL}} GEARZ(320, 140, 40, 20, 4, -G, 13)
- {{Cl|CALL}} GEARZ(320 + 57, 140 + 57, 40, 20, 4, G, 14)
- {{Cl|CALL}} GEARZ(320 + 100, 140 + 100, 20, 10, 4, -G * 2 - 15, 15)
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 20 'regulates gear speed and CPU usage
- {{Cl|NEXT}} G
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|END}}
-
-{{Cl|SUB}} GEARZ (XP, YP, RAD, Teeth, TH, G, CLR)
-t = 0
-x = XP + (RAD + TH * {{Cl|SIN}}(0)) * {{Cl|COS}}(0)
-y = YP + (RAD + TH * {{Cl|SIN}}(0)) * {{Cl|SIN}}(0)
-{{Cl|PRESET}} (x, y)
-m = Teeth * G
-{{Cl|FOR...NEXT|FOR}} t = -Pi / 70 {{Cl|TO}} 2 * Pi {{Cl|STEP}} Pi / 70
- x = XP + (RAD + TH * {{Cl|SIN}}((Teeth * t + m)) ^ 3) * {{Cl|COS}}(t)
- y = YP + (RAD + TH * {{Cl|SIN}}((Teeth * t + m)) ^ 3) * {{Cl|SIN}}(t)
- {{Cl|LINE}} -(x, y), CLR
- IF {{Cl|INKEY$}} <> "" THEN {{Cl|END}}
-{{Cl|NEXT}} t
-{{Cl|PAINT}} (XP, YP), CLR 'gear colors optional
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Adapted from code by: DarthWho}}
-
-
-''Example 3:'' Displaying the current seconds for an analog clock. See [[COS]] for the clock face hour markers.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-Pi2! = 8 * {{Cl|ATN}}(1): sec! = Pi2! / 60 ' (2 * pi) / 60 movements per rotation
-{{Cl|CIRCLE}} (320, 240), 80, 1
-{{Cl|DO}}
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} {{Cl|TIME$}}
- Seconds% = {{Cl|VAL}}({{Cl|RIGHT$}}({{Cl|TIME$}}, 2)) - 15 ' update seconds
- S! = Seconds% * sec! ' radian from the TIME$ value
- Sx% = {{Cl|CINT}}({{Cl|COS}}(S!) * 60) ' pixel columns (60 = circular radius)
- Sy% = {{Cl|CINT}}({{Cl|SIN}}(S!) * 60) ' pixel rows
- {{Cl|LINE}} (320, 240)-(Sx% + 320, Sy% + 240), 12
- {{Cl|DO}}: Check% = {{Cl|VAL}}({{Cl|RIGHT$}}({{Cl|TIME$}}, 2)) - 15: {{Cl|LOOP}} UNTIL Check% <> Seconds% ' wait loop
- {{Cl|LINE}} (320, 240)-(Sx% + 320, Sy% + 240), 0 ' erase previous line
-{{Cl|LOOP}} UNTIL {{Cl|INKEY$}} = {{Cl|CHR$}}(27) ' escape keypress exits
-{{CodeEnd}}
-{{small|Code by: Ted Weissgerber}}
-The value of 2 ã is used to determine the sec! multiplier that determines the radian value as S! The value is divided by 60 second movements. To calculate the seconds the [[TIME$]] function is used and that value is subtracted 15 seconds because the 0 value of pi is actually the 3 hour of the clock (15 seconds fast). SIN and COS will work with negative values the same as positive ones! Then the column and row coordinates for one end of the line are determined using SIN and [[COS]] multiplied by the radius of the circular line movements. The minute and hour hands could use similar procedures to read different parts of TIME$.
-
-
-{{PageSeeAlso}}
-* [[_PI]] {{text|(QB64 function)}}
-*[[COS]] {{text|(cosine)}}
-*[[ATN]] {{text|(arctangent)}}
-*[[TAN]] {{text|(tangent)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SLEEP_11111.txt b/internal/help/SLEEP_11111.txt
deleted file mode 100644
index f7b2264cb..000000000
--- a/internal/help/SLEEP_11111.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:57}}
-SLEEP pauses the program indefinitely or for a specified number of seconds, program is unpaused when the user presses a key or when the specified number of seconds has passed.
-
-
-{{PageSyntax}}
-:: SLEEP [seconds]
-
-
-* Seconds are an optional [[INTEGER]] value. If there is no parameter, then it waits for a keypress.
-* Any user keypress will abort the SLEEP time.
-* SLEEP does NOT clear the keyboard buffer so it can affect [[INKEY$]], [[INPUT]], [[INPUT$]] and [[LINE INPUT]] reads.
-* Use an [[INKEY$]] keyboard buffer clearing loop when an empty keyboard buffer is necessary.
-* SLEEP allows other programs to share the processor time during the interval.
-
-
-''Example:''
-{{CodeStart}}
-{{Cl|CLS}}
-{{Cl|PRINT}} "Press a key..."
-{{Cl|SLEEP}}
-{{Cl|PRINT}} "You pressed a key, now wait for 2 seconds."
-{{Cl|SLEEP}} 2
-{{Cl|PRINT}} "You've waited for 2 seconds."
-{{Cl|PRINT}} "(or you pressed a key)"
-{{CodeEnd}}
-{{OutputStart}}
-Press a key...
-You pressed a key, now wait for 2 seconds.
-You've waited for 2 seconds.
-(or you pressed a key)
-{{OutputEnd}}
-:''Explanation:'' SLEEP without any arguments waits until a key is pressed, next SLEEP statement uses the argument 2 which means that it will wait for 2 seconds, any number of seconds can be specified.
-
-
-''See also:''
-* [[TIMER]], [[INKEY$]]
-* [[_DELAY]], [[_LIMIT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SOUND_11111.txt b/internal/help/SOUND_11111.txt
deleted file mode 100644
index d5221dd11..000000000
--- a/internal/help/SOUND_11111.txt
+++ /dev/null
@@ -1,139 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:44:58}}
-'''SOUND''' sets frequency and duration of sounds from the internal PC speaker if the computer has one or the sound card in QB64.
-
-
-{{PageSyntax}}
-:: SOUND ''frequency'', ''duration''
-
-
-{{PageDescription}}
-* ''Frequency'' is any literal or variable value from 37 to 32767, but 0 is allowed for delays.
-* ''Duration'' is any literal or variable number of [[TIMER]] ticks with a duration of 1/18th second. 18 = one second.
-* In '''QB64''' the sound comes from the soundcard and the volume can be adjusted through the OS.
-
-
-{{PageErrors}}
-* Low ''frequency'' values between 0 and 37 will create an [[ERROR Codes|Illegal Function call error]].
-* '''Warning:''' SOUND may not work when the program is not in focus. Use SOUND 0, 0 at sound procedure start to set focus.
-* '''Note:''' SOUND 0, 0 will not stop previous '''QB64''' sounds like it did in QBasic!
-* SOUND may have clicks or pauses between the sounds generated. [[PLAY]] can be used for musical sounds.
-{{WhiteStart}}
- ''' The Seven Music Octaves '''
-
- ''' Note Frequency Note Frequency Note Frequency'''
- '''1'''* D#1 ...... 39 G3 ....... 196 A#5 ...... 932
- E1 ....... 41 G#3 ...... 208 B5 ....... 988
- F1 ....... 44 A3 ....... 220 '''6'''* C6 ....... 1047
- F#1 ...... 46 A#3 ...... 233 C#6 ...... 1109
- G1 ....... 49 B3 ....... 247 D6 ....... 1175
- G#1 ...... 51 '''4'''* C4 ....... 262 D#6 ...... 1245
- A1 ....... 55 C#4 ...... 277 E6 ....... 1318
- A#1 ...... 58 D4 ....... 294 F6 ....... 1397
- B1 ....... 62 D#4 ...... 311 F#6 ...... 1480
- '''2'''* C2 ....... 65 E4 ....... 330 G6 ....... 1568
- C#2 ...... 69 F4 ....... 349 G# ....... 1661
- D2 ....... 73 F#4 ...... 370 A6 ....... 1760
- D#2 ...... 78 G4 ....... 392 A#6 ...... 1865
- E2 ....... 82 G#4 ...... 415 B6 ....... 1976
- F2 ....... 87 A4 ....... 440 '''7'''* C7 ....... 2093
- F#2 ...... 92 A# ....... 466 C#7 ...... 2217
- G2 ....... 98 B4 ....... 494 D7 ....... 2349
- G#2 ...... 104 '''5'''* C5 ....... 523 D#7 ...... 2489
- A2 ....... 110 C#5 ...... 554 E7 ....... 2637
- A#2 ...... 117 D5 ....... 587 F7 ....... 2794
- B2 ....... 123 D#5 ...... 622 F#7 ...... 2960
- '''3'''* C3 ....... 131 E5 ....... 659 G7 ....... 3136
- C#3 ...... 139 F5 ....... 698 G#7 ...... 3322
- D3 ....... 147 F#5 ...... 740 A7 ....... 3520
- D#3 ...... 156 G5 ....... 784 A#7 ...... 3729
- E3 ....... 165 G#5 ...... 831 B7 ....... 3951
- F3 ....... 175 A5 ....... 880 '''8'''* C8 ....... 4186
- F#3 ...... 185
- '''# denotes sharp'''
-{{WhiteEnd}}
-
-
-''Example 1:'' Playing the seven octaves based on the base note DATA * 2 ^ (octave - 1).
-{{CodeStart}}
-notes$ = "C C#D D#E F F#G G#A A#B "
-{{Cl|COLOR}} 9:{{Cl|LOCATE}} 5, 20: PRINT "Select an octave (1 - 7) to play (8 quits):"
-{{Cl|DO}}
- {{Cl|DO}}: octa$ = {{Cl|INKEY$}}
- {{Cl|IF...THEN|IF}} octa$ <> "" {{Cl|THEN}}
- {{Cl|IF...THEN|IF}} {{Cl|ASC}}(octa$) > 48 {{Cl|AND (boolean)|AND}} {{Cl|ASC}}(octa$) < 58 {{Cl|THEN}} octave% = {{Cl|VAL}}(octa$): {{Cl|EXIT DO}}
- {{Cl|END IF}}
- {{Cl|LOOP}} {{Cl|UNTIL}} octave% > 7
- {{Cl|IF...THEN|IF}} octave% > 0 {{Cl|AND (boolean)|AND}} octave% < 8 {{Cl|THEN}}
- {{Cl|LOCATE}} 15, 6: {{Cl|PRINT}} {{Cl|SPACE$}}(70)
- {{Cl|LOCATE}} 16, 6: {{Cl|PRINT}} {{Cl|SPACE$}}(70)
- {{Cl|COLOR}} 14: {{Cl|LOCATE}} 15, 6: {{Cl|PRINT}} "Octave"; octave%; ":";
- {{Cl|RESTORE}} Octaves
- {{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 12
- {{Cl|READ}} note!
- snd% = {{Cl|CINT}}(note! * (2 ^ (octave% - 1))) 'calculate note frequency
- {{Cl|COLOR}} 14: {{Cl|PRINT}} {{Cl|STR$}}(snd%);
- c0l = {{Cl|POS}}(0)
- {{Cl|COLOR}} 11: {{Cl|LOCATE}} 16, c0l - 2: {{Cl|PRINT}} {{Cl|MID$}}(notes$, 1 + (2 * (i - 1)), 2)
- {{Cl|LOCATE}} 15, c0l
- {{Cl|IF...THEN|IF}} snd% > 36 {{Cl|THEN}} {{Cl|SOUND}} snd%, 12 'error if sound value is < 36
- {{Cl|_DELAY}} .8
- {{Cl|NEXT}}
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} octave% > 7
-{{Cl|END}}
-
-Octaves:
-{{Cl|DATA}} 32.7,34.65,36.71,38.9,41.2,43.65,46.25,49,51.91,55,58.27,61.74
-{{CodeEnd}}
-{{small|Code adapted by Ted Weissgerber from code in [http://www.amazon.com/Running-MS-DOS-QBASIC-Michael-Halvorson/dp/1556153406 "Running MS-DOS QBasic"] by Microsoft Press}}
-
-
-''Example 2:'' Playing a song called "Bonnie" with [[SOUND]] frequencies.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 13
-{{Cl|_FULLSCREEN}}
-{{Cl|OUT}} {{Cl|&H}}3C8, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 20
-{{Cl|COLOR}} 1
-{{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} 21
- {{Cl|LOCATE}} 2 + i%, 2: {{Cl|PRINT}} {{Cl|CHR$}}(178)
- {{Cl|LOCATE}} 2 + i%, 39: {{Cl|PRINT}} {{Cl|CHR$}}(178)
-{{Cl|NEXT}} i%
-{{Cl|FOR...NEXT|FOR}} i% = 2 {{Cl|TO}} 39
- {{Cl|LOCATE}} 2, i%: {{Cl|PRINT}} {{Cl|CHR$}}(223)
- {{Cl|LOCATE}} 23, i%: {{Cl|PRINT}} {{Cl|CHR$}}(220)
-{{Cl|NEXT}} i%
-{{Cl|COLOR}} 9
-{{Cl|LOCATE}} 3, 16: {{Cl|PRINT}} {{Cl|CHR$}}(34); "MY BONNIE"; {{Cl|CHR$}}(34)
-{{Cl|SLEEP}} 3
-{{Cl|FOR...NEXT|FOR}} i% = 1 {{Cl|TO}} 34
- {{Cl|SELECT CASE}} i%
- {{Cl|CASE}} 1: {{Cl|LOCATE}} 5, 5
- {{Cl|CASE}} 10: {{Cl|LOCATE}} 10, 5
- {{Cl|CASE}} 18: {{Cl|LOCATE}} 15, 5
- {{Cl|CASE}} 27: {{Cl|LOCATE}} 20, 5
- {{Cl|END SELECT}}
- {{Cl|READ}} note%, duration%, word$
- {{Cl|SOUND}} note%, duration%: {{Cl|PRINT}} word$;
-{{Cl|NEXT}} i%
-{{Cl|SLEEP}} 2
-{{Cl|LOCATE}} 23, 16: {{Cl|PRINT}} "Thank You!"
-{{Cl|SLEEP}} 4
-{{Cl|SYSTEM}}
-
-{{Cl|DATA}} 392,8,"My ",659,8,"Bon-",587,8,"nie ",523,8,"lies ",587,8,"O-",523,8,"Ver ",440,8,"the "
-{{Cl|DATA}} 392,8,"O-",330,32,"cean ",392,8,"My ",659,8,"Bon-",587,8,"nie ",523,8,"lies "
-{{Cl|DATA}} 523,8,"O-",494,8,"ver ",523,8,"the ",587,40,"sea ",392,8,"My ",659,8,"Bon-",587,8,"nie"
-{{Cl|DATA}} 523,8," lies ",587,8,"O-",523,8,"ver ",440,8,"the ",392,8,"O-",330,32,"cean ",392,8,"Oh "
-{{Cl|DATA}} 440,8,"bring ",587,8,"back ",523,8,"my ",494,8,"Bon-",440,8,"nie ",494,8,"to ",523,32,"me..!"
-{{CodeEnd}}
-{{small|Code adapted by Ted Weissgerber from code [http://www.amazon.com/Running-MS-DOS-QBASIC-Michael-Halvorson/dp/1556153406 "Running MS-DOS QBasic"] by Microsoft Press}}
-
-
-''See also:''
-* [[PLAY]], [[BEEP]]
-* [[_SNDOPEN]] (play sound files)
-* [[_SNDRAW]] (play frequency waves)
-
-
-{{PageNavigation}}
diff --git a/internal/help/SPACE$_11111$.txt b/internal/help/SPACE$_11111$.txt
deleted file mode 100644
index f789ed2a4..000000000
--- a/internal/help/SPACE$_11111$.txt
+++ /dev/null
@@ -1,105 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:00}}
-The {{KW|SPACE$}} function returns a {{KW|STRING}} consisting of a number of space characters.
-
-
-{{PageSyntax}}
-:''result$'' = '''SPACE$({{Parameter|count&}})'''
-
-
-{{Parameters}}
-* {{Parameter|count&}} is the number of space characters to repeat. Cannot use negative values!
-
-
-''Usage:''
-* Semicolons can be used to combine spaces with text [[STRING]] or numerical values.
-* [[Concatenation]] using + can be used to combine [[STRING]] text values only.
-* Spaces are often used to erase previous text PRINTs from the screen.
-* The function result can also be used to [[GET]] and [[PUT]] a number of bytes as zero characters: bytes$ = SPACE$(numbytes)
-* Spaces can also be made using [[SPC]], [[CHR$]](32) or [[STRING$]](n%, 32).
-
-
-''Differences between QB64 and QB 4.5:''
-* '''QB64''' can use [[LONG]] values for count up to 2,147,483,647 while '''QB 4.5''' could only use [[INTEGER]] values up to 32,767.
-
-
-''Example 1:'' How to space text in a [[PRINT]] statement using SPACE$ with string [[concatenation]].
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} count% = 0 {{Cl|FOR...NEXT|TO}} 3
- {{Cl|PRINT}} "abc" + {{Cl|SPACE$}}( count% ) + "def"
-{{Cl|FOR...NEXT|NEXT}} count%
-{{CodeEnd}}
-{{OutputStart}}abcdef
-abc def
-abc def
-abc def
-{{OutputEnd}}
-
-
-''Example 2:'' In [[SCREEN]] 0 SPACE$ can be used to change the background color to make an American flag.
-{{CodeStart}}
- USA flag centered on screen with thin horizontal red & white stripes
-' blue corner field with randomly twinkling stars
-{{Cl|CLS}}
-{{Cl|LOCATE}} 25, 1
-{{Cl|PRINT}} "Press any key to stop twinkling";
-{{Cl|COLOR}} , 4
-z = 15
-{{Cl|FOR...NEXT|FOR}} x = 5 {{Cl|TO}} 19 '13 red & white stripes (x =5 to 21 for 15 stripes)
- {{Cl|IF...THEN|IF}} z = 15 {{Cl|THEN}} z = 4 {{Cl|ELSE}} z = 15
- {{Cl|COLOR}} , z
- {{Cl|LOCATE}} x, 15
- {{Cl|PRINT}} {{Cl|SPACE$}}(55)
-{{Cl|NEXT}} x
-{{Cl|FOR...NEXT|FOR}} x = 5 {{Cl|TO}} 11 'blue field in upper left quadrant (x = 5 to 13 to hold all 50 stars)
- {{Cl|COLOR}} 15, 1 'sits above 4th white stripe
- {{Cl|LOCATE}} x, 15
- {{Cl|PRINT}} {{Cl|SPACE$}}(23)
-{{Cl|NEXT}} x
-DO
- stop$ = {{Cl|INKEY$}}
- {{Cl|FOR...NEXT|FOR}} x = 5 {{Cl|TO}} 10 {{Cl|STEP}} 2 '39 stars staggered across blue field (50 stars if x = 5 to 12)
- w = 16
- {{Cl|FOR...NEXT|FOR}} y = 1 {{Cl|TO}} 6 '5 rows of 6 stars
- r = {{Cl|INT}}({{Cl|RND}} * 6)
- {{Cl|IF...THEN|IF}} r = 0 {{Cl|THEN}} z = 31 {{Cl|ELSE}} z = 15
- {{Cl|IF...THEN|IF}} stop$ = "" {{Cl|THEN}} {{Cl|COLOR}} z {{Cl|ELSE}} {{Cl|COLOR}} 15
- {{Cl|LOCATE}} x, w
- w = w + 4
- {{Cl|PRINT}} "*";
- {{Cl|NEXT}} y
- w = 18
- {{Cl|FOR...NEXT|FOR}} y = 1 {{Cl|TO}} 5 '5 rows of 5 stars
- r = {{Cl|INT}}({{Cl|RND}} * 6)
- {{Cl|IF...THEN|IF}} r = 0 {{Cl|THEN}} z = 31 {{Cl|ELSE}} z = 15
- {{Cl|IF...THEN|IF}} stop$ = "" {{Cl|THEN}} {{Cl|COLOR}} z {{Cl|ELSE}} {{Cl|COLOR}} 15
- {{Cl|LOCATE}} x + 1, w
- w = w + 4
- {{Cl|PRINT}} "*";
- {{Cl|NEXT}} y
- {{Cl|NEXT}} x
- w = 16
- {{Cl|FOR...NEXT|FOR}} y = 1 {{Cl|TO}} 6 '1 row of 6 stars
- r = {{Cl|INT}}({{Cl|RND}} * 6)
- {{Cl|IF...THEN|IF}} r = 0 {{Cl|THEN}} z = 31 {{Cl|ELSE}} z = 15
- {{Cl|IF...THEN|IF}} stop$ = "" {{Cl|THEN}} {{Cl|COLOR}} z {{Cl|ELSE}} {{Cl|COLOR}} 15
- {{Cl|LOCATE}} x, w
- w = w + 4
- {{Cl|PRINT}} "*";
- {{Cl|NEXT}} y
- t = {{Cl|TIMER}}
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} t + .2 >= {{Cl|TIMER}}: {{Cl|LOOP}}
-{{Cl|LOOP}} {{Cl|WHILE}} stop$ = ""
-{{Cl|COLOR}} 7, 0
-{{Cl|END}}
-{{CodeEnd}}{{small|Code by Solitaire}}
-:''Explanation:'' In [[SCREEN]] 0, the background color is only placed with the the printed text and spaces. [[CLS]] can color the entire screen.
-
-
-{{PageSeeAlso}}
-* [[PRINT]], [[PRINT USING]]
-* [[STRING$]], [[CLS]]
-* [[SPC]], [[TAB]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SPC_111.txt b/internal/help/SPC_111.txt
deleted file mode 100644
index 9bf6c5342..000000000
--- a/internal/help/SPC_111.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:01}}
-The {{KW|SPC}} function is used in [[PRINT]] and [[LPRINT]] statements to print or output a number of space characters.
-
-
-{{PageSyntax}}
-::: '''SPC({{Parameter|count%}})'''
-
-
-{{Parameters}}
-* ''count'' designates the number of column spaces to move the cursor in a [[PRINT]] statement.
-
-
-''Usage:''
-* When used in a [[PRINT]] statement,
-** {{Parameter|count%}} is the number of space characters to print, overwriting existing characters.
-** If {{Parameter|count%}} is greater than the number of columns left in the current row, remaining space characters are printed on the next row.
-* When used in a [[PRINT (file statement)|PRINT #]] statement,
-** {{Parameter|count%}} is the number of space characters to output.
-** If {{Parameter|count%}} is less than or equal to zero, the function has no effect.
-
-
-''Example:'' Using SPC to space a text print.
-{{CodeStart}}{{Cl|PRINT}} "123456789"
-{{Cl|PRINT}} "abc" ; {{Cl|SPC}}(3) ; "123"{{CodeEnd}}
-{{OutputStart}}123456789
-abc 123
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[PRINT]], [[PRINT (file statement)|PRINT #]]
-* [[LPRINT]], [[STRING$]]
-* [[TAB]], [[SPACE$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SQR_111.txt b/internal/help/SQR_111.txt
deleted file mode 100644
index 6741c1ff7..000000000
--- a/internal/help/SQR_111.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:02}}
-The '''SQR''' function returns the square root of a numerical value.
-
-
-{{PageSyntax}}
-:: square_root = '''SQR('''value''')'''
-
-
-* The ''square root'' returned is normally a [[SINGLE]] or [[DOUBLE]] numerical value.
-* The ''value'' parameter can be any '''positive''' numerical type. '''Negative parameter values will not work!'''
-* Other exponential root functions can use fractional exponents([[^]]) enclosed in '''parenthesis only'''. EX: {{text|root = c ^ (a / b)|green}}
-
-
-''Example 1:'' Finding the hypotenuse of a right triangle:
-{{CodeStart}}
- A% = 3: B% = 4
- PRINT "hypotenuse! ="; SQR((A% ^ 2) + (B% ^ 2))
-{{CodeEnd}}
-{{OutputStart}}
- hypotenuse = 5
-{{OutputEnd}}
-
-
-''Example 2:'' Finding the Cube root of a number.
-{{CodeStart}}
- number = 8
- cuberoot = number {{Cl|^}} (1/3)
- PRINT cuberoot
-{{CodeEnd}}
-{{OutputStart}}
- 2
-{{OutputEnd}}
-
-
-''Example 3:'' Negative roots return fractional values of one.
-{{CodeStart}}
- number = 8
- negroot = number {{Cl|^}} -2
- PRINT negroot
-{{CodeEnd}}
-{{OutputStart}}
- .015625
-{{OutputEnd}}
-:''Explanation:'' A negative root means that the exponent value is actually inverted to a fraction of 1. So x ^ -2 actually means the result will be: 1 / (x ^ 2).
-
-
-''Example 4:'' Fast Prime number checker limits the numbers checked to the square root (half way).
-{{CodeStart}}
-DEFLNG P
-DO
-PRIME = -1 'set PRIME as True
-INPUT "Enter any number to check up to 2 million (Enter quits): ", guess$
-PR = {{Cl|VAL}}(guess$)
-IF PR {{Cl|MOD}} 2 THEN 'check for even number
- FOR P = 3 TO {{Cl|SQR}}(PR) STEP 2 'largest number that could be a multiple is the SQR
- IF PR {{Cl|MOD}} P = 0 THEN PRIME = 0: EXIT FOR 'MOD = 0 when evenly divisible by another
- NEXT
-ELSE : PRIME = 0 'number to be checked is even so it cannot be a prime
-END IF
-IF PR = 2 THEN PRIME = -1 '2 is the ONLY even prime
-IF PR = 1 THEN PRIME = 0 'MOD returns true but 1 is not a prime by definition
-IF PRIME THEN PRINT "PRIME! How'd you find me? " ELSE PRINT "Not a prime, you lose!"
-LOOP UNTIL PR = 0
-{{CodeEnd}}
-{{OutputStart}}
-Enter any number to check up to 2 million (Enter quits): 12379
-PRIME! How'd you find me?
-{{OutputEnd}}
-''Note:'' Prime numbers cannot be evenly divided by any other number except one.
-
-
-''See also:''
-*[[MOD]] {{text|(integer remainder division)}}
-*[[^]] {{text|(exponential operator)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Trigonometric Functions]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STATIC_111111.txt b/internal/help/STATIC_111111.txt
deleted file mode 100644
index 0c9cd4e4f..000000000
--- a/internal/help/STATIC_111111.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:03}}
-The {{KW|STATIC}} keyword is used in declaration statements to control where variables are stored.
-
-
-{{PageSyntax}}
-:{{KW|STATIC}} {{Parameter|variableName}}[()] [{{KW|AS}} {{Parameter|dataType}}][, ...]
-
-{{PageSyntax}}
-:{[[SUB]]|[[FUNCTION]]} {{Parameter|procedureName}} [({{Parameter|parameterList}})] STATIC
-
-
-{{PageDescription}}
-* A STATIC list can be used in [[SUB]] and [[FUNCTION]] procedures to designate one or more variables to retain their values.
-* Variables and arrays with static storage will retain their values in between procedure calls. The values may also be used recursively.
-:* {{Parameter|variableName}} may include a type suffix or use [[AS]] to specify a type other than the default [[SINGLE]] type.
-:* Arrays with static storage are declared by specifying empty parenthesis following the array name. See [[Arrays]]
-* STATIC can be used after the name of a [[SUB]] or [[FUNCTION]] in the procedure to force all variables to retain their values.
-* '''Recursive procedures may be required to be STATIC to avoid a Stack Overflow! QB64 programs may just close!'''
-* [[$STATIC]] defined program [[arrays]] cannot be [[REDIM|re-sized]] or use [[_PRESERVE]].
-
-
-''Example 1: Finding the binary bit settings from a 32 bit [[LONG]] register return using recursion.
-{{CodeStart}}
-{{Cl|INPUT}} "Enter a numerical value to see binary value: ", num&
-{{Cl|PRINT}} Bin$(num&)
-
-{{Cl|END}}
-
-{{Cl|FUNCTION}} Bin$ (n&) {{Cl|STATIC}} 'comment out STATIC to see what happens!
-{{Cl|DIM}} p%, s$
-{{Cl|IF...THEN|IF}} 2 ^ p% > n& {{Cl|THEN}}
- p% = 0
-{{Cl|ELSE}}
- {{Cl|IF...THEN|IF}} n& {{Cl|AND (boolean)|AND}} 2 ^ p% {{Cl|THEN}} s$ = "1" + s$ {{Cl|ELSE}} s$ = "0" + s$
- {{Cl|IF...THEN|IF}} n& > 2 ^ p% {{Cl|THEN}}
- p% = p% + 1
- s$ = Bin$(n&) 'recursive call to itself
- {{Cl|ELSE}}: p% = 0
- {{Cl|END IF}}
-{{Cl|END IF}}
-{{Cl|IF...THEN|IF}} s$ = "" {{Cl|THEN}} Bin$ = "0" {{Cl|ELSE}} Bin$ = s$
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-: ''Explanation:'' The [[FUNCTION]] above returns a [[STRING]] value representing the bits ON in an [[INTEGER]] value. The string can be printed to the screen to see what is happening in a port register. '''STATIC''' keeps the function from overloading the memory "Stack" and is normally REQUIRED when recursive calls are used in QBasic! '''QB64 procedures will close without warning or error!'''
-
-
-''Example 2:'' Using a static array to cache factorials, speeding up repeated calculations:
-{{CodeStart}}
-
-{{Cl|PRINT}} Factorial(0)
-{{Cl|PRINT}} Factorial(5)
-{{Cl|PRINT}} Factorial(50
-
-{{Cl|FUNCTION}} Factorial# ( n {{Cl|AS}} {{Cl|DOUBLE}} )
- {{Cl|CONST}} maxNToCache = 50
- {{Cl|STATIC}} resultCache() {{Cl|AS}} {{Cl|DOUBLE}}
- {{Cl|STATIC}} firstCall {{Cl|AS}} {{Cl|INTEGER}}
-
- ' The lookup table is initially empty, so re-size it..
- {{Cl|IF...THEN|IF}} firstCall = 0 {{Cl|IF...THEN|THEN}}
- firstCall = -1
- {{Cl|REDIM}} resultCache(maxNToCache) {{Cl|AS}} {{Cl|DOUBLE}}
-
- ' ..and pre-calculate some factorials.
- resultCache(0) = 1
- resultCache(1) = 1
- resultCache(2) = 2
- {{Cl|IF...THEN|END IF}}
-
- ' See if we have the result cached. If so, we're done.
- {{Cl|IF...THEN|IF}} n <= maxNToCache {{Cl|IF...THEN|THEN}}
- {{Cl|IF...THEN|IF}} resultCache(n) <> 0 {{Cl|IF...THEN|THEN}}
- Factorial = resultCache(n)
- {{Cl|EXIT FUNCTION}}
- {{Cl|IF...THEN|END IF}}
- {{Cl|IF...THEN|END IF}}
-
- ' If not, we use recursion to calculate the result, then cache it for later use:
- resultCache(n) = {{Cl|INT}}(n) * Factorial({{Cl|INT}}(n) - 1)
- Factorial = resultCache(n)
-{{Cl|END FUNCTION}}
-
-{{CodeEnd}}
-{{OutputStart}}
- 1
- 120
- 3.041409320171338D+64
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[DIM]], [[REDIM]], [[COMMON]]
-* [[SUB]], [[FUNCTION]]
-* [[TYPE]], [[Arrays]]
-* [[$STATIC]], [[$DYNAMIC]] {{text|([[Metacommand]]s)}}
-* [[Data types]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STEP_1111.txt b/internal/help/STEP_1111.txt
deleted file mode 100644
index adef70187..000000000
--- a/internal/help/STEP_1111.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:06}}
-The '''STEP''' keyword is used in [[FOR...NEXT]] loops to skip through the count or to count down instead of up. Used in graphics to designate a relative coordinate position of a graphics object function.
-
-
-{{PageSyntax}}
-:: FOR counter_variable = start_point TO stop_point ['''STEP ''interval''''']
-
-:: CIRCLE '''STEP(0, 0)''', 10, 12
-
-
-* The FOR counter variable is used to designate and pass the current FOR incremented value.
-* FOR loops without the optional STEP value increment by + 1 every loop.
-* The STEP increment value can be any literal or variable numerical type. It cannot be changed inside of the loop!
-* Start and stop point values can be any literal or variable type and they cannot be changed inside of the loop.
-* STEP interval designates the portion to add or subtract from the FOR variable value.
-:* When the STEP interval is positive, the start value should be less than the stop value ot the loop will be ignored.
-:* When the STEP interval is negative, the start value should be greater than the stop value or the loop will be ignored.
-* In graphics statements, STEP can be used before a pair of coordinate brackets to indicate that the coordinates are relative to the last graphics statement position. IE the position will be that number of pixels away from the last graphical object.
-
-
-''Example:'' Stepping down 2 in a FOR counter loop.
-{{CodeStart}}
-{{Cl|FOR...NEXT}} i = 10 {{Cl|TO}} 0 {{Cl|STEP}} -2
- {{Cl|PRINT}} i;
-{{Cl|NEXT}}
-{{CodeEnd}}
-{{OutputStart}}
-10 8 6 4 2 0
-{{OutputEnd}}
-:''Note:'' The value of i = -2 after the loop is done.
-
-
-
-::''Graphics Syntax:'' LINE STEP(column1%, row1%)-(column2%, row2%), color_attribute%
-
-
-* STEP coordinate positions are relative positive or negative pixel moves from the previous graphics object's last coordinate. After a CIRCLE statement, the relative coordinates would be from its center.
-* STEP can be used before the [[LINE]], [[CIRCLE]], [[PSET]], [[PRESET]], [[PAINT]] or [[DRAW]] graphics object coordinates.
-
-
-
-''Graphics Example:'' Using STEP coordinates to PAINT a circle's interior.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|CIRCLE}} (100, 100), 50, 12
-{{Cl|PAINT}} {{Cl|STEP}}(0, 0), 13, 12
-{{CodeEnd}}
-:''Explanation:'' PAINT uses the CIRCLE's center coordinate position to paint the interior.
-
-
-''See also:''
-* [[FOR...NEXT]]
-* [[DRAW]] (see the M relative move function)
-* [[LINE]], [[CIRCLE]], [[PSET]], [[PAINT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STICK_11111.txt b/internal/help/STICK_11111.txt
deleted file mode 100644
index c5359cd64..000000000
--- a/internal/help/STICK_11111.txt
+++ /dev/null
@@ -1,101 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:07}}
-The '''STICK''' function returns the directional axis coordinate move of game port (&H201) joystick or USB controller devices.
-
-
-{{PageSyntax}}
-: coordinate_move% = [[STICK]]{{Parameter|(direction%)}}
-
-
-QB64 {{PageSyntax}}
-: coordinate_move% = [[STICK]]{{Parameter|(direction%[, axis_number%])}}
-
-
-''Description:''
-* '''QB64''' allows any number of coordinate pairs for more than two game device controllers. STICK will not read a mouse axis.
-* ''axis_number'' can be used as the next axis parameter for controllers with multiple axis using the SAME ''directional'' parameters.
-* The ''axis_number'' 1 can be omitted for the main stick column and row parameter reads.
-* Point of view "hats" also have 2 axis. Slide, turn or twist controls have one. The device determines the order of the axis.
-* Returns coordinate values from 1 to 254. QBasic only returned values from 1 to 200.
-* STICK(0) is required to get values from the other STICK functions. Always read it first!
-{{WhiteStart}}'''STICK(0) returns the column coordinate of device 1. Enables reads of the other STICK values.'''
-'''STICK(1) returns row coordinate of device 1.'''
-STICK(2) returns column coordinate of device 2. (second joystick if used)
-STICK(3) returns row coordinate of device 2 if used. (QBasic maximum was 2 controllers)
-'''STICK(4) returns column coordinate of device 3. (other joysticks if used in QB64 only!)'''
-'''STICK(5) returns row coordinate of device 3 if used.'''
-{{WhiteEnd}}
-* '''QB64''' allows more joysticks by extending the numbers in pairs like device 3 above. EX: STICK(6): STICK(7) 'device 4
-* '''QB64''' allows a dual stick to be read using the same first parameters and 2 as the second parameter. EX: STICK(0, 2)
-* '''There will not be an error if you try to read too many device axis or buttons!'''
-
-
-''Example 1:'' Displays the input from 3 joysticks, all with dual sticks and 3 buttons.
-{{CodeStart}}
-{{Cl|DO}}: {{Cl|_LIMIT}} 10
-
- {{Cl|LOCATE}} 1, 1
- {{Cl|PRINT}} "JOY1: {{Cl|STICK}}"; {{Cl|STICK}}(0); {{Cl|STICK}}(1); {{Cl|STICK}}(0, 2); {{Cl|STICK}}(1, 2);_
- "STRIG"; {{Cl|STRIG}}(0); {{Cl|STRIG}}(1); {{Cl|STRIG}}(4); {{Cl|STRIG}}(5); {{Cl|STRIG}}(8); {{Cl|STRIG}}(9)
-
- {{Cl|PRINT}} "JOY2: {{Cl|STICK}}"; {{Cl|STICK}}(2); {{Cl|STICK}}(3); {{Cl|STICK}}(2, 2); {{Cl|STICK}}(3, 2);_
- "STRIG"; {{Cl|STRIG}}(2); {{Cl|STRIG}}(3); {{Cl|STRIG}}(6); {{Cl|STRIG}}(7); {{Cl|STRIG}}(10); {{Cl|STRIG}}(11)
-
- {{Cl|PRINT}} "JOY3: {{Cl|STICK}}"; {{Cl|STICK}}(4); {{Cl|STICK}}(5); {{Cl|STICK}}(4, 2); {{Cl|STICK}}(5, 2);_
- "STRIG"; {{Cl|STRIG}}(0, 3); {{Cl|STRIG}}(1, 3); {{Cl|STRIG}}(4, 3); {{Cl|STRIG}}(5, 3); {{Cl|STRIG}}(8, 3); {{Cl|STRIG}}(9, 3)
-
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} > ""
-{{CodeEnd}}
-:''Explanation:'' Notice the extra '''QB64 only''' parameters used to cater for the 2nd stick and the buttons of the 3rd joystick.
-
-
-''Example 2:'' Displays the Sidewinder Precision Pro Stick, Slider, Z Axis, and Hat Point of View.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-d = {{Cl|_DEVICES}}
-{{Cl|PRINT}} "Number of input devices found ="; d
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} d
- {{Cl|PRINT}} {{Cl|_DEVICE$}}(i)
- buttons = {{Cl|_LASTBUTTON}}(i)
- {{Cl|PRINT}} "Buttons:"; buttons
-{{Cl|NEXT}}
-
-DO: {{Cl|_LIMIT}} 50
- {{Cl|LOCATE}} 10, 1
- {{Cl|PRINT}} " X Main Y Slider Z-axis POV"
- {{Cl|PRINT}} {{Cl|STICK}}(0, 1), {{Cl|STICK}}(1, 1), {{Cl|STICK}}(0, 2), {{Cl|STICK}}(1, 2), {{Cl|STICK}}(0, 3); {{Cl|STICK}}(1, 3); " "
- {{Cl|PRINT}} " Buttons"
- {{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} 4 * buttons - 1 {{Cl|STEP}} 4
- {{Cl|PRINT}} {{Cl|STRIG}}(i); {{Cl|STRIG}}(i + 1); {{Cl|CHR$}}(219);
- {{Cl|NEXT}}
- {{Cl|PRINT}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{CodeEnd}}
-: ''Explanation:'' Each axis on the first controller found is either STICK(0, n) or STICK(1, n) with n increasing when necessary.
-{{OutputStart}}
-Number of input devices found = 3
-[KEYBOARD][BUTTON]]
-Buttons: 512
-[MOUSE][BUTTON][AXIS][WHEEL]
-Buttons: 3
-[CONTROLLER][[NAME][Microsoft Sidewinder Precision Pro (USB)]][BUTTON][AXIS]
-Buttons: 9
-
-
- X Main Y Slider Z-axis POV
- 127 127 254 127 127 127
- Buttons
--0 -1 â–ˆ 0 0 â–ˆ 0 0 â–ˆ 0 0 â–ˆ 0 0 â–ˆ 0 0 â–ˆ 0 0 â–ˆ 0 0 â–ˆ 0 0 â–ˆ
-{{OutputEnd}}
-: ''Note:'' A Sidewinder Precision Pro requires that pins 2 and 7(blue and purple) be connected together for digital USB recognition.
-[http://www.amazon.com/Belkin-F3U200-08INCH-Joystick-Adapter-SideWinder/dp/B000067RIV Sidewinder Precision Pro game port to USB adapter]
-
-
-''See also:''
-* [[STRIG]] {{text|(function)}}
-* [[ON STRIG(n)]]
-* [[_DEVICES]], [[_DEVICE$]], [[_LASTBUTTON]]
-* [http://en.wikipedia.org/wiki/Analog_stick Single and Dual Stick Controllers]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STOP_1111.txt b/internal/help/STOP_1111.txt
deleted file mode 100644
index 53e4efd84..000000000
--- a/internal/help/STOP_1111.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:08}}
-The '''STOP''' statement is used to stop program execution when troubleshooting a program or to suspend event trapping.
-
-
-{{PageSyntax}}
-:: STOP
-
-
-* STOP used in the QBasic IDE does not close any files or go to the operating system. It returns to the IDE.
-* In the QB64 compiler, STOP closes the program window and returns to the IDE when the code is compiled from there.
-* STOP is ONLY used for debugging purposes and should not be used to exit programs!
-* STOP can also be used to suspend an event trap in the following statements: [[KEY(n)]], [[ON COM (n)|COM(n)]], [[PEN]], [[PLAY]], [[STRIG(n)]], [[TIMER]], [[UEVENT]]. The trap can be turned back on with [[ON]] and returns any trap events since '''STOP''' was used.
-
-
-''Example:'' When run in the QBasic IDE, the program will return to the IDE at STOP. Press F5 to finish the program.
-{{CodeStart}}
-{{Cl|PRINT}} "start"
-
-{{Cl|SLEEP}} 3
-
-{{Cl|STOP}}
-
-{{Cl|PRINT}} "resumed"
-{{CodeEnd}}
-: ''Explanation:'' QB64 will STOP the program and close the window as it does not have an interpreter to run the rest of the code.
-
-
-''See also:''
-* [[END]], [[SYSTEM]]
-* [[ON]], [[OFF]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STR$_111$.txt b/internal/help/STR$_111$.txt
deleted file mode 100644
index 65c8dc500..000000000
--- a/internal/help/STR$_111$.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:09}}
-The '''STR$''' function returns the [[STRING]] representation of a numerical value.
-
-
-{{PageSyntax}}
-:: result$ = '''STR$('''{{Parameter|number}}''')'''
-
-
-{{Parameters}}
-* {{Parameter|number}} is any numerical type value to convert.
-
-
-{{PageDescription}}
-* Returns any type number value with leading sign(space/minus) or decimal point when one exists in the numerical value.
-* If {{Parameter|number}} is positive, the [[STRING]] value returned will have a leading space character which can be removed using [[LTRIM$]].
-* If {{Parameter|number}} is negative, the minus sign will precede the number instead of a space which [[LTRIM$]] will not remove.
-* Trimming a STR$ string number using [[RTRIM$]] is not required as [[PRINT]] creates the undocumented trailing number space.
-
-
-{{PageExamples}}
-{{CodeStart}}{{Cl|PRINT}} {{Cl|STR$}}( 1.0 )
-{{Cl|PRINT}} {{Cl|STR$}}( 2.3 )
-{{Cl|PRINT}} {{Cl|STR$}}( -4.5 )
-{{CodeEnd}}
-{{OutputStart}}
- 1
- 2.3
--4.5
-{{OutputEnd}}
-
-
-{{CodeStart}}
-a = 33
-{{Cl|PRINT}} {{Cl|STR$}}(a) + "10" + "1" + "who" + {{Cl|STR$}}(a) + {{Cl|STR$}}(a) + {{Cl|LTRIM$}}({{Cl|STR$}}(a))
-{{CodeEnd}}
-{{OutputStart}} 33101who 33 3333
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[VAL]], [[STRING]]
-* [[LTRIM$]], [[MID$]]
-* [[RIGHT$]], [[LEFT$]]
-* [[HEX$]], [[OCT$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STRIG(n)_11111(0).txt b/internal/help/STRIG(n)_11111(0).txt
deleted file mode 100644
index 8f76e088e..000000000
--- a/internal/help/STRIG(n)_11111(0).txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:12}}
-The {{KW|STRIG(n)}} statement controls event trapping for a particular joystick or game pad device button.
-
-
-{{PageSyntax}}
-::STRIG({{Parameter|button%}}) {ON|OFF|STOP}
-
-
-QB64 {{PageSyntax}}
-::STRIG[(''button_function%''[, ''device_number%''])] {ON|OFF|STOP}
-
-
-{{PageDescription}}
-* {{Parameter|button function}} specifies the device's button function. Even functions record events while odd ones read the actual presses.
-* '''QB64''' can designate a button function and controller device number from 0 to 256.
-* When no parameters are used '''QB64''' enables, disables or suspends the reading of ALL button events.
-* [[STRIG(n)|ON]] specifies that event trapping is turned on for the specified button.
-* [[STRIG(n)|OFF]] specifies that event trapping is turned off for the specified button.
-* If {{KW|STRIG(n)|STOP}} is specified, event trapping is suspended for the specified button. Further joystick button events are remembered and trapped, in order, after the next {{KW|STRIG(n)|STRIG(n) ON}} statement is used.
-
-
-''Example:''
-{{CodeStart}}
-{{Cl|ON STRIG(n)|ON STRIG}}(0) {{Cl|GOSUB}} 10
-{{Cl|STRIG(n)|STRIG}}(0)ON
-
-DO
- {{Cl|PRINT}} ".";
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|END}}
-
-10
-a$ = "[STRIG 0 EVENT]"
-{{Cl|FOR...NEXT|FOR}} x = 1 {{Cl|TO}} {{Cl|LEN}}(a$)
- {{Cl|PRINT}} {{Cl|MID$}}(a$, x, 1);
- {{Cl|_DELAY}} 0.02
-{{Cl|NEXT}}
-{{Cl|RETURN}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[ON STRIG(n)]] {{text|(event statement)}}
-* [[STRIG]], [[STICK]] {{text|(functions)}}
-* [http://en.wikipedia.org/wiki/Analog_stick Single and Dual Stick Controllers]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STRIG_11111.txt b/internal/help/STRIG_11111.txt
deleted file mode 100644
index 863394f49..000000000
--- a/internal/help/STRIG_11111.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:10}}
-The '''STRIG''' function returns button press True or False status of game port (&H201) or USB joystick control device(s).
-
-
-{{PageSyntax}}
-:: IF STRIG(button_function%) THEN ...
-
-
-QB64 {{PageSyntax}}
-:: IF STRIG(''button_function%''[, ''device_number%'']) THEN ...
-
-
-''Description:''
-* Function returns -1 when a button event(even functions) has occurred or a button is pressed(odd functions).
-* STRIG will not read keyboard or mouse buttons detected by [[_DEVICES]].
-* The ''device number'' must be used with more than 2 devices. Use device 1 function numbers for just one joystick.
-* '''QB64''' can read many buttons from many devices and allows the use of devices with more than 2 buttons.
-* Returns True(-1) or False(0) button press values for 2 devices. Each leading STRIG checks for missed button press events:
-{{WhiteStart}} '''STRIG(0) = -1 'lower button 1 on device 1 pressed since last STRIG(0) read'''
- '''STRIG(1) = -1 'lower button 1 on device 1 currently pressed'''
- STRIG(2) = -1 'lower button 1 on device 2 pressed since last STRIG(2) read
- STRIG(3) = -1 'lower button 1 on device 2 currently pressed
- '''STRIG(4) = -1 'upper button 2 on device 1 pressed since last STRIG(4) read'''
- '''STRIG(5) = -1 'upper button 2 on device 1 currently pressed'''
- STRIG(6) = -1 'upper button 2 on device 2 pressed since last STRIG(6) read
- STRIG(7) = -1 'upper button 2 on device 2 currently pressed (maximum in QBasic)
- '''STRIG(8) = -1 'button 3 on device 1 pressed since last STRIG(8) read''' 'QB64 only
- '''STRIG(9) = -1 'button 3 on device 1 currently pressed'''
- STRIG(10) = -1 'button 3 on device 2 pressed since last STRIG(10) read 'QB64 only
- STRIG(11) = -1 'button 3 on device 2 currently pressed
-{{WhiteEnd}}
-* STRIG(0), STRIG(2), STRIG(4), STRIG(6), STRIG(8), STRIG(10) are used to monitor any presses that might have been missed.
-* '''QB64''' allows more than two controllers by using the second parameter as the stick number and the odd or even STRIG values:
-{{WhiteStart}}'''STRIG(0, 3): STRIG(1, 3): STRIG(4, 3): STRIG(5, 3): STRIG(8, 3): STRIG(9, 3) 'device 3 {odd)'''
-STRIG(2, 4): STRIG(3, 4): STRIG(6, 4): STRIG(7, 4): STRIG(10, 4): STRIG(11, 4) 'device 4 (even)
-{{WhiteEnd}}
-:Odd devices use 0, 1, 4, 5, 8 and 9 and Even devices use 2, 3, 6, 7, 10 and 11 as first parameters with device number following.
-* '''There will not be an error if you try to read too many device axis or buttons!'''
-
-
-''Example:'' Displays the input from 3 joysticks, all with dual sticks and 3 buttons.
-{{CodeStart}}
-{{Cl|DO}}: {{Cl|_LIMIT}} 10
-
- {{Cl|LOCATE}} 1, 1
- {{Cl|PRINT}} "JOY1: {{Cl|STICK}}"; {{Cl|STICK}}(0); {{Cl|STICK}}(1); {{Cl|STICK}}(0, 2); {{Cl|STICK}}(1, 2);_
- "STRIG"; {{Cl|STRIG}}(0); {{Cl|STRIG}}(1); {{Cl|STRIG}}(4); {{Cl|STRIG}}(5); {{Cl|STRIG}}(8); {{Cl|STRIG}}(9)
-
- {{Cl|PRINT}} "JOY2: {{Cl|STICK}}"; {{Cl|STICK}}(2); {{Cl|STICK}}(3); {{Cl|STICK}}(2, 2); {{Cl|STICK}}(3, 2);_
- "STRIG"; {{Cl|STRIG}}(2); {{Cl|STRIG}}(3); {{Cl|STRIG}}(6); {{Cl|STRIG}}(7); {{Cl|STRIG}}(10); {{Cl|STRIG}}(11)
-
- {{Cl|PRINT}} "JOY3: {{Cl|STICK}}"; {{Cl|STICK}}(4); {{Cl|STICK}}(5); {{Cl|STICK}}(4, 2); {{Cl|STICK}}(5, 2);_
- "STRIG"; {{Cl|STRIG}}(0, 3); {{Cl|STRIG}}(1, 3); {{Cl|STRIG}}(4, 3); {{Cl|STRIG}}(5, 3); {{Cl|STRIG}}(8, 3); {{Cl|STRIG}}(9, 3)
-
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} > ""
-{{CodeEnd}}
-:''Explanation:'' Notice the extra '''QB64 only''' parameters used to cater for the 2nd stick and the buttons of the 3rd joystick.
-
-
-''See also:''
-* [[STRIG(n)]] {{text|(statement)}}
-* [[ON STRIG(n)]], [[STICK]]
-* [[_DEVICES]], [[_DEVICE$]], [[_LASTBUTTON]]
-* [http://en.wikipedia.org/wiki/Analog_stick Single and Dual Stick Controllers]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STRING$_111111$.txt b/internal/help/STRING$_111111$.txt
deleted file mode 100644
index 89f1b2aab..000000000
--- a/internal/help/STRING$_111111$.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:14}}
-The {{KW|STRING$}} function returns a {{KW|STRING}} consisting of a single character repeated a number of times.
-
-
-{{PageSyntax}}
-: result$ = STRING$(''count&'', {''character$'' | ''ASCIIcode%''} )
-
-
-{{PageDescription}}
-
-* {{Parameter|count&}} is the number of times the character specified by {{Parameter|character}} is repeated.
-* Character is a literal string character, a string variable or an [[ASCII]] code number.
-* If {{Parameter|count&}} is negative, an [[ERROR Codes|illegal function call]] error will occur. The count can be zero.
-* If {{Parameter|character}} is a [[STRING]] value and its length is zero, an [[ERROR Codes|illegal function call]] error will occur.
-* If more than one string character value is used, the first character will be repeated.
-* A [[STRING]] statement can be added to a string value with the + [[concatenation]] operator.
-* The function result can also be used to [[GET]] and [[PUT]] a number of bytes as zero characters: bytes$ = STRING(numbytes, 0)
-
-
-''Differences between QB64 and QB 4.5:''
-* '''QB64''' can use [[LONG]] values for a count up to 2,147,483,647 while '''QB 4.5''' could only use [[INTEGER]] values up to 32,767.
-
-
-{{PageExamples}}
-:Printing 40 asterisks across the screen using an ASCII character code instead of [[CHR$]](42).
-{{CodeStart}}{{Cl|PRINT}} {{Cl|STRING$}}(40, 42)
-{{CodeEnd}}
-{{OutputStart}}****************************************
-{{OutputEnd}}
-
-
-:Using a [[STRING]] to specify the repeated character.
-{{CodeStart}}text$ = "B" + {{Cl|STRING$}}(40, "A") + "D"
-{{Cl|PRINT}} text$
-{{CodeEnd}}
-{{OutputStart}}BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD
-{{OutputEnd}}
-
-
-''See examples:''
-* [[SAVEIMAGE]]
-* [[SaveIcon32]]
-
-
-{{PageSeeAlso}}
-* [[SPACE$]]
-* [[ASC]], [[CHR$]]
-* [[ASCII]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/STRING_111111.txt b/internal/help/STRING_111111.txt
deleted file mode 100644
index ac905e618..000000000
--- a/internal/help/STRING_111111.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:13}}
-'''STRING''' variables or literal values are one byte per character length text or [[ASCII]] characters.
-
-
-{{PageSyntax}}
-:: DIM variable AS STRING [* byte_length]
-
-
-* ''Byte length'' is optional in [[DIM]] statements, but is required in [[TYPE]] definitions as a literal or [[CONST|constant]] [[INTEGER]] value.
-* Literal strings are defined by quotation marks on each end. The quotes will not [[PRINT]] to the screen.
-* Quotation marks cannot be placed inside of literal string values! Use [[CHR$]](34) to display " quotes.
-* Semicolons and commas outside of the string can be used to combine strings in a [[PRINT]] statement only.
-* [[LEN]] determines the number of bytes and number of string characters that are in a particular string.
-* Literal string ends are designated by quotation marks such as: "text". Use [[CHR$]](34) to add quotes to string values.
-* Variable suffix type definition is $ such as: text$.
-* STRING values are compared according to the [[ASCII]] code values from left to right until one string code value exceeds the other.
-* '''NOTE: Many QBasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!'''
-
-
-:::::'''Creating a fixed length STRING variable in QBasic:'''
-
-:* Variable$ = " " ' 1 space creates a one [[_BYTE|byte]] string length in a procedure(not fixed)
-:* Variable$ = SPACE$(n%) ' defined as a n% length string in a procedure(not fixed)
-:* [[DIM]] variable AS STRING * n% ' fixed string length cannot be changed later
-:* Variable AS STRING * n% ' fixed string length in a [[SUB]] parameter or [[TYPE]] definition.
-:* [[CONST]] variables can also be used after the constant value is defined.
-
-
-:::::'''QB64 fixed length string type suffixes'''
-
-* A number after the string variable name $ suffix denotes the fixed string length: '''X$2''' denotes a 2 byte string.
-
-
-::::::'''String [[Concatenation]] (addition)'''
-::::''Must be used when defining a string variable's literal value!''
-
-* Concatenation uses the + addition symbol to add literal or variable parts to a string variable value.
-* Quotation marks cannot be added. Use [[CHR$]](34) as quotes are used to define the ends of strings.
-* Numerical values added must be converted to strings in string variable definitions. See the [[STR$]] function.
-* Concatenation can be used in PRINT statements along with semicolons and commas used by {{KW|PRINT}} ONLY.
-* Semicolons or commas outside of quotes cannot be used to make a string variable's literal string value!
-
-
-''Example 1:'' Using a string type suffix with a fixed length byte size in QB64 only. The number designates the fixed string length.
-{{CodeStart}}
-var$5 = "1234567"
-
-PRINT var$5
-{{CodeEnd}}
-{{OutputStart}}12345{{OutputEnd}}
-:''Note:'' The suffix must keep the same byte length or it is considered a different string variable with a different value!
-
-
-''Example 2:'' Creating a string variable value by adding variable and literal string values. This procedure is called string [[concatenation]].
-{{CodeStart}}
-age% = 10
-a$ = "I am " + {{Cl|CHR$}}(34) + {{Cl|LTRIM$}}({{Cl|STR$}}(age%)) + {{Cl|CHR$}}(34) + " years old."
-b$ = "How old are you?"
-question$ = a$ + {{Cl|SPACE$}}(1) + b$
-{{Cl|PRINT}} question$
-{{CodeEnd}}
-{{OutputStart}}
-I am "10" years old. How old are you?
-{{OutputEnd}}
-:''Note:'' Since quotation marks are used to denote the ends of literal strings, [[CHR$]](34) must be used to place quotes inside them.
-
-
-''Example 3:'' How QB64 string type suffixes can fix the length by adding a number of bytes after it.
-{{CodeStart}}
-strings$5 = "Hello world"
-
-PRINT strings$5
-{{CodeEnd}}{{OutputStart}}Hello{{OutputEnd}}
-
-
-''Example 4:'' STRING values can be compared by the [[ASC]] code value according to [[ASCII]].
-{{CodeStart}}
-{{Cl|PRINT}} "Enter a letter, number or punctuation mark from the keyboard: ";
-valu$ = {{Cl|INPUT$}}(1)
-{{Cl|PRINT}} value$
-value1$ = "A"
-value2$ = "m"
-value3$ = "z"
-
-{{Cl|SELECT CASE}} value$
- {{Cl|CASE}} value1$: {{Cl|PRINT}} "A only"
- {{Cl|CASE}} value1$ {{Cl|TO}} value2$: {{Cl|PRINT}} "B to m" 'A is already evaluated
- {{Cl|CASE}} value1$, value2$, value3$: {{Cl|PRINT}} "z only" 'A and m are already evaluated
- {{Cl|CASE IS}} > value2$: {{Cl|PRINT}} "greater than m but not z" 'z is already evaluated
- {{Cl|CASE ELSE}}: {{Cl|PRINT}} "other value" 'key entry below A including all numbers
-{{Cl|END SELECT}}
-{{CodeEnd}}
-: ''Notes:'' [[STRING]] values using multiple characters will be compared by the [[ASCII]] code values sequentially from left to right. Once the equivalent code value of one string is larger than the other the evaluation stops. This allows string values to be compared and sorted alphabetically using [[Greater Than|>]] or [[Less Than|<]] and to [[SWAP]] values in [[arrays]] irregardless of the string lengths.
-
-
-''See also:''
-* [[DIM]], [[DEFSTR]]
-* [[CHR$]], [[ASC]]
-* [[LEFT$]], [[RIGHT$]], [[MID$]]
-* [[LTRIM$]], [[RTRIM$]]
-* [[LCASE$]], [[UCASE$]]
-* [[STR$]] {{text|(decimal to string value)}}
-* [[HEX$]] {{text|(decimal to [[&H|hexadecimal]] string value)}}
-* [[MKI$]], [[MKL$]], [[MKS$]], [[MKD$]], [[_MK$]] {{text|(numerical to [[ASCII]] string)}}
-* [[CVI]], [[CVL]], [[CVS]], [[CVD]], [[_CV]] {{text|([[ASCII]] string to numerical value)}}
-* [[LEN]], [[VAL]] {{text|(function converts string to numerical value)}}
-* [[ASCII]], [[DRAW]]
-* [[PRINT]], [[PRINT USING]], [[WRITE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SUB_111.txt b/internal/help/SUB_111.txt
deleted file mode 100644
index dd37d9a63..000000000
--- a/internal/help/SUB_111.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:15}}
-A '''SUB''' procedure is a procedure within a program that can calculate and return multiple parameter values just like a full program.
-
-
-{{PageSyntax}}
-:: '''SUB Procedure_name''' [(''parameter''[, ''list''...])]
-:: ...
-:: ... 'procedure variable definitions and statements
-:: ...
-:: '''END SUB'''
-
-
-{{Parameters}}
-* Parameters passed after the procedure call must match the variable types in the SUB parameters in order.
-* If there are no ''parameter''s passed or they are [[SHARED]] the parameters and parenthesis are not required in the procedure.
-* Parameter [[Variable]] names in the procedure do not have to match the names used in the [[CALL]], just the value types.
-* To pass parameter variables [[BYVAL|by value]] to protect the value in a call, parenthesis can be placed around each variable name also.
-* To pass [[arrays]] to a sub-procedure use empty brackets after the name or indicate the index in the call.
-
-
-{{PageDescription}}
-* All [[$DYNAMIC|dynamic]] [[variable]] values return to 0 or null strings when the procedure is exited except for [[STATIC]] variable values.
-* SUB procedures can return multiple values through the parameters unlike functions.
-* SUB procedures return to the next code statement after the call in the main or other procedures.
-* [[EXIT]] SUB can be used to exit early or to exit before [[GOSUB]] procedures using [[RETURN]].
-* [[TYPE]] and [[DECLARE LIBRARY]] declarations can be made inside of SUB procedures in QB64 only.
-* SUB procedures can save program memory as all memory used in a SUB is released on procedure exit except for [[STATIC]] values.
-* [[_DEFINE]] can be used to define all new or old QB64 variable [[TYPE]] definitions instead of DEF***.
-* [[$INCLUDE]] text library files with needed SUB and [[FUNCTION]] procedures can be included in programs after all sub-procedures.
-* '''QB64 ignores all procedural DECLARE statements!''' Define all ''parameter'' [[TYPE]]s in the SUB procedure.
-* '''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].'''
-
-
-''Example 1:'' Text [[PRINT]] screen centering using [[PEEK]] to find the SCREEN mode width. Call and SUB procedure code:
-{{CodeStart}}
-{{Cl|DEFINT}} A-Z
-{{Cl|SCREEN}} 13
-Center 10, 15, "This text is centered." ' example module sub call
-{{Cl|END}}
-
-{{Cl|DEFINT}} A-Z ' only code allowed before SUB line is a DEF statement or a comment
-{{Cl|SUB}} Center (Tclr, Trow, Text$)
-Columns = {{Cl|_WIDTH}} / {{Cl|_FONTWIDTH}} 'Convert _WIDTH (in pixels) to width in characters
-Middle = (Columns \ 2) + 1 ' reads any screen mode width
-Tcol = Middle - ({{Cl|LEN}}(Text$) \ 2)
-{{Cl|COLOR}} Tclr: {{Cl|LOCATE}} Trow, Tcol: {{Cl|PRINT}} Text$; ' end semicolon prevents screen roll
-{{Cl|END SUB}}
-{{CodeEnd}}
-
-:''Explanation:'' The procedure centers text printed to the screen. The parameters are the text color, row and the text itself as a string or string variable. The maximum width of the screen mode in characters is found and divided in half to find the center point. The text string's length is also divided in half and subtracted from the screen's center position. The procedure will also work when the [[WIDTH]] statement has been used. When adding variables to Text$ use the + concatenation operator. Not semicolons!
-
-
-''Example 2:'' SUB and [[FUNCTION]] procedures always return to the place they were called in the main or other sub-procedures:
-{{CodeStart}}
-a = 10
-Add1 a
-{{Cl|PRINT}} a 'Add1 returns final 'a' value here
-
-{{Cl|END}}
-
-{{Cl|SUB}} Add1 (n)
-n = n + 1
-Add2 n
-{{Cl|PRINT}} "exit 1"
-{{Cl|END SUB}}
-
-{{Cl|SUB}} Add2 (m)
-m = m + 2
-{{Cl|PRINT}} "exit 2"
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{OutputStart}}exit 2
-exit 1
- 13
-{{OutputEnd}}
-: ''Note:'' Parameter '''a''' is used to call the sub-procedures even though parameters '''n''' and '''m''' are used internally.
-
-
-''See also:''
-* [[FUNCTION]], [[CALL]]
-* [[BYVAL]], [[SCREEN (statement)]]
-* [[EXIT]], [[END]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SWAP_1111.txt b/internal/help/SWAP_1111.txt
deleted file mode 100644
index 7c15329f2..000000000
--- a/internal/help/SWAP_1111.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:16}}
-The {{KW|SWAP}} statement is used to exchange two variable or array element values.
-
-
-{{PageSyntax}}
-:{{KW|SWAP}} {{Parameter|variable1}}, {{Parameter|variable2}}
-
-
-{{PageDescription}}
-
-* {{Parameter|variable1}} and {{Parameter|variable2}} are any type variables whose values will be exchanged.
-* If either {{Parameter|variable1}} or {{Parameter|variable2}} is an array, then an element in the array must be designated.
-* {{KW|SWAP}} can be used with string or number variable values. Both must be of the same type.
-* SWAP is often used to sort array elements into greater or lesser numerical or cumulative [[ASCII]] [[STRING]] values.
-* SWAP can be used in page flipping to change between source and destination pages.
-
-
-''Example 1:'' A simple SWAP of [[STRING|string]] values.
-{{CodeStart}}
-a$ = "one"
-b$ = "two"
-
-{{Cl|SWAP}} a$, b$
-
-{{Cl|PRINT}} a$
-{{Cl|PRINT}} b$
-{{CodeEnd}}
-{{OutputStart}}two
-one
-{{OutputEnd}}
-
-
-''Example 2:'' Creating Cryptograms by scrambling EVERY capital letter in the alphabet.
-{{CodeStart}}
-{{Cl|DIM}} Letter$(65 {{Cl|TO}} 90)
-{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-{{Cl|CLS}}
-{{Cl|FOR...NEXT|FOR}} a = 65 {{Cl|TO}} 90 'set ASCII codes and letters in order
- Letter$(a) = {{Cl|CHR$}}(a) 'create capitalized characters
-{{Cl|NEXT}} a
-
-{{Cl|COLOR}} 11: {{Cl|LOCATE}} 10, 10
-{{Cl|FOR...NEXT|FOR}} i = 65 {{Cl|TO}} 90
- {{Cl|IF...THEN|IF}} Letter$(i) = {{Cl|CHR$}}(i) {{Cl|THEN}} 'find characters the same as the {{Cl|ASCII}} code index
- {{Cl|DO...LOOP|DO}}: j = {{Cl|INT}}({{Cl|RND}} * 26) + 65: {{Cl|LOOP}} {{Cl|WHILE}} j = i 'loop until j <> i
- {{Cl|SWAP}} Letter$(i), Letter$(j) 'swap corresponding letter characters
- {{Cl|END IF}}
- {{Cl|PRINT}} {{Cl|CHR$}}(i); " "; 'print normal alphabetical order
-{{Cl|NEXT}}
-
-{{Cl|COLOR}} 14: {{Cl|LOCATE}} 12, 10
-{{Cl|FOR...NEXT|FOR}} a = 65 {{Cl|TO}} 90 'display new alphabetical order
- {{Cl|PRINT}} Letter$(a); " ";
-{{Cl|NEXT}}
-
-text$ = "This is how a normal sentence would look before being encrypted."
-{{Cl|COLOR}} 11: {{Cl|LOCATE}} 20, 5: {{Cl|PRINT}} text$
-L = {{Cl|LEN}}(text$)
-{{Cl|DIM}} Code(L) 'place ASCII code solution into an array
-{{Cl|COLOR}} 14: {{Cl|LOCATE}} 22, 5
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} L
- Code(i) = {{Cl|ASC}}({{Cl|UCASE$}}(text$), i) 'in QB64, ASC can read by character position
- {{Cl|IF...THEN|IF}} Code(i) >= 65 {{Cl|AND (boolean)|AND}} Code(i) <= 90 {{Cl|THEN}} {{Cl|PRINT}} Letter$(Code(i)); {{Cl|ELSE}} {{Cl|PRINT}} {{Cl|CHR$}}(Code(i));
-{{Cl|NEXT}}
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-:'' Explanation:'' The Letter$ [[STRING]] [[Arrays|array]] is first created with the letters matching the [[ASCII]] code index value. Every index is '''swap'''ped when the letter matches it's index code until every letter is different. The Code array holds the text code solution.
-
-
-''Example 3:'' A very quick array sorting SUB procedure using recursion sorts 10 thousand numbers in milliseconds.
-{{CodeStart}}
-{{Cl|DEFINT}} A-Z
-{{Cl|DIM}} {{Cl|SHARED}} swap2 {{Cl|AS}} {{Cl|LONG}} 'Demo only
-{{Cl|DIM}} array(10000) {{Cl|AS}} {{Cl|SINGLE}} 'array can hold any type of value
-{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-{{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} 10000
- array(i) = {{Cl|RND}} * 1000 'populate array with random values to sort
-{{Cl|NEXT}}
-start = {{Cl|LBOUND}}(array) 'lowest element
-finish = {{Cl|UBOUND}}(array) 'highest element
-swap2 = 0 'count swaps for demo only
-start! = {{Cl|TIMER}}(.001)
-{{Cl|CALL}} QuickSort(start, finish, array())
-ending! = {{Cl|TIMER}}(.001)
-tmp$ = " array(0)= ##.##### array(5000)= ###.#### array(10000)= ###.####"
-{{Cl|PRINT USING}} tmp$; array(0); array(5000); array(10000)
-{{Cl|PRINT USING}} " Elapsed time: #.###### seconds with #######, swaps"; ending! - start!; swap2&
-{{Cl|FOR...NEXT|FOR}} n = 0 {{Cl|TO}} 10000 'check array sort order
- {{Cl|IF}} array(n) >= max! {{Cl|THEN}} 'max should match the array type
- max! = array(n)
- {{Cl|ELSE}} {{Cl|BEEP}}
- {{Cl|PRINT}} "Bad sort order!"
- {{Cl|EXIT}} {{Cl|FOR...NEXT|FOR}}
- {{Cl|END IF}}
-{{Cl|NEXT}}
-{{Cl|END}}
-
-{{Cl|SUB}} QuickSort (start {{Cl|AS}} {{Cl|INTEGER}}, finish {{Cl|AS}} {{Cl|INTEGER}}, array() {{Cl|AS}} {{Cl|SINGLE}})
-{{Cl|DIM}} Hi {{Cl|AS}} {{Cl|INTEGER}}, Lo {{Cl|AS}} {{Cl|INTEGER}}, Middle {{Cl|AS}} {{Cl|SINGLE}}
-Hi = finish: Lo = start
-Middle = array((Lo + Hi) / 2) 'find middle of array
-{{Cl|DO}}
- {{Cl|DO}} {{Cl|WHILE}} array(Lo) < Middle: Lo = Lo + 1: {{Cl|LOOP}}
- {{Cl|DO}} {{Cl|WHILE}} array(Hi) > Middle: Hi = Hi - 1: {{Cl|LOOP}}
- {{Cl|IF}} Lo <= Hi {{Cl|THEN}}
- {{Cl|SWAP}} array(Lo), array(Hi)
- swap2 = swap2 + 1 'count swaps for demo only
- Lo = Lo + 1: Hi = Hi - 1
- {{Cl|END IF}} 'If homework, you will fail
-{{Cl|LOOP}} {{Cl|UNTIL}} Lo > Hi
-{{Cl|IF}} Hi > start {{Cl|THEN}} {{Cl|CALL}} QuickSort(start, Hi, array())
-{{Cl|IF}} Lo < finish {{Cl|THEN}} {{Cl|CALL}} QuickSort(Lo, finish, array())
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{OutputStart}} array(0)= 0.20200 array(5000)= 525.8505 array(10000)= 999.6196
- Elapsed time: 0.023438 seconds with 33,759 swaps
-{{OutputEnd}}
-:'''NOTE:''' The ''swap2'' shared value is used to count the swaps for the demo and can be removed from the SUB procedure for speed.
-
-
-''See also:''
-* [[RND]], [[RANDOMIZE]]
-* [[CHR$]], [[ASC]]
-* [[ASCII]], [[Arrays]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/SYSTEM_111111.txt b/internal/help/SYSTEM_111111.txt
deleted file mode 100644
index 5e6c82923..000000000
--- a/internal/help/SYSTEM_111111.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:17}}
-The {{KW|SYSTEM}} statement immediately closes a program and returns control to the operating system.
-
-
-{{PageSyntax}}
-:'''SYSTEM''' [return_code%]
-
-
-{{Parameters}}
-* QB64 allows a ''code'' number to be used after SYSTEM to be read in another program module by the [[SHELL]] or [[_SHELLHIDE]] functions.
-
-
-''Usage:''
-* This command should be used to close a program quickly instead of pausing with [[END]] or nothing at all.
-* A code can be added after the statement to send a value to the [[SHELL (function)]] or [[_SHELLHIDE]] function in another module.
-* SYSTEM ends the program and closes the window immediately. The last screen image may not be displayed.
-
-
-
-''QBasic or QuickBASIC:''
-* '''QBasic BAS files can be run like compiled programs without returning to the IDE when [[SYSTEM]] is used to [[END|end]] them!'''
-* If a program BAS module is run from the IDE, stopped by Ctrl-Break or an error occurs the QB program will exit to the IDE.
-* To run a QuickBASIC program without the IDE use the following DOS command line: {{text|QB.EXE /L /RUN filename.BAS|green}}
-
-
-{{PageSeeAlso}}
-* [[SHELL (function)]]
-* [[_SHELLHIDE]] {{text|(function)}}
-* [[_EXIT (function)]], [[END]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/Semicolon_100000000.txt b/internal/help/Semicolon_100000000.txt
deleted file mode 100644
index 5be258503..000000000
--- a/internal/help/Semicolon_100000000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:52}}
-The '''semicolon''' is used in a [[PRINT]] statement to stop the screen print cursor immediately after the printed value.
-
-
-''Usage:'' COLOR 13: PRINT "Value ="; value1; value2; value3
-
-{{OutputStart}}{{text|1234 5678 9012|magenta}}{{OutputEnd}}
-
-
-* Positive numerical values [[PRINT|printed]] will include a space before and after each value printed. Strings will not have spacing.
-* Use the [[WRITE]] statement to print values with only commas between the values and no spacing.
-* A semicolon can append the next print when used at the end of a [[PRINT]] statement.
-* Use a semicolon after text that will be [[PRINT|printed]] on the last two text rows of a [[SCREEN (statement)|screen mode]] to prevent screen rolling.
-* [[INPUT]] statements can use the semicolon '''before''' the text to prevent screen rolling. '''INPUT ; "text or question"; variable'''.
-* A semicolon '''after''' the text will create a question mark and space after the [[INPUT]] text question. Use a comma for statements.
-* '''NOTE: Semicolons can NOT be used to combine string variables in a string variable definition!'''
-* Use the '''+''' [[concatenation]] operator to combine [[STRING|string]] variable definition values only!
-* [[Semicolon]]s cannot be used in or following a [[WRITE]] statement!
-
-
-''See also:''
-
-* [[Comma]]
-* [[PRINT]], [[PRINT USING]]
-* [[WRITE]]
-* [[INPUT]], [[LINE INPUT]]
-* [[STR$]] {{text|(convert number to string)}}
-* [[VAL]] {{text|(convert string to number)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/TAB_111.txt b/internal/help/TAB_111.txt
deleted file mode 100644
index 154eca74c..000000000
--- a/internal/help/TAB_111.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:19}}
-The {{KW|TAB}} function is used in [[PRINT]] and [[LPRINT]] statements to move to a specified column position.
-
-
-{{PageSyntax}}
-:{{KW|TAB}}({{Parameter|column%}})
-
-
-{{PageDescription}}
-* Space characters are printed until the print cursor reaches the designated {{Parameter|column%}}, overwriting existing characters.
-* If a subsequent TAB ''column%'' is less than the current position, TAB moves the next print to that column on the next row.
-* [[ASCII]] [[CHR$]](9) can be substituted for sequencial 9 space column moves.
-* [[Comma]] PRINT spacing is up to 15 column places (IE: TAB(15)) to a maximum column of 57.
-* When printing to a file, a carriage return([[CHR$]](13)) and linefeed([[CHR$]](10)) character are output when it moves to the next row.
-* '''Note:''' QBasic did not allow a TAB to be [[concatenation|added]] to a string value. In [[PRINT]] statements the [[+|plus]] would be changed to a [[semicolon]].
-: In QB64, TAB [[concatenation]] is allowed instead of [[semicolon]]s. Example: {{text|PRINT "text" + TAB(9) + "here"|green}}
-
-
-''Example:'' Comparing TAB to [[comma]] print spacing which moves the next text print 15 columns.
-{{CodeStart}}
-{{Cl|PRINT}} {{Cl|TAB}}(15); "T" 'TAB spacing
-
-{{Cl|PRINT}} , "T" 'comma spacing
-
-{{Cl|PRINT}} {{Cl|TAB}}(15); "T"{{text|;|red}} {{Cl|TAB}}(20); "A"; {{Cl|TAB}}(15); "B" 'semicolons add nothing to position
-
-{{Cl|PRINT}} {{Cl|TAB}}(15); "T"{{text|,|red}} {{Cl|TAB}}(20); "A"; {{Cl|TAB}}(15); "B" 'comma moves column position beyond 20
-{{CodeEnd}}
-{{OutputStart}} T
- T
- T A
- B
- T
- A
- B{{OutputEnd}}
-: ''Explanation:'' TAB moves the PRINT down to the next row when the current column position is more than the TAB position.
-
-
-{{PageSeeAlso}}
-* [[PRINT]], [[LPRINT]]
-* [[SPC]], [[SPACE$]]
-* [[STRING$]]
-* [[CHR$]], [[ASCII]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/TAN_111.txt b/internal/help/TAN_111.txt
deleted file mode 100644
index c9624837c..000000000
--- a/internal/help/TAN_111.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:20}}
-The [[TAN]] function returns the ratio of [[SIN]]e to [[COS]]ine or tangent value of an angle measured in radians.
-
-
-{{PageSyntax}}
-::: tangent! = '''TAN('''''radian_angle!''''')'''
-
-
-{{Parameters}}
-* The ''radian_angle'' must be measured in radians.
-
-
-{{PageDescription}}
-* To convert from degrees to radians, multiply degrees * π/180.
-* TANGENT is the gradient or slope of the circle or arc at [[SIN]](é) / [[COS]](é). Do not use division when the [[COS]] = 0 to avoid [[ERROR Codes|errors]].
-
-
-''Example:'' Spiraling text using the [[SIN]] and [[TAN]] functions.
-{{CodeStart}}
-{{Cl|DIM}} {{Cl|SHARED}} text {{Cl|AS}} {{Cl|STRING}}
-text$ = "S P I R A L"
-{{Cl|DIM}} {{Cl|SHARED}} word(1 {{Cl|TO}} {{Cl|LEN}}(text$) * 8, 1 {{Cl|TO}} 16)
-
-{{Cl|CALL}} analyse
-{{Cl|CLS}}
-{{Cl|CALL}} redraw
-
-{{Cl|SUB}} analyse
-{{Cl|CLS}}
-{{Cl|SCREEN}} 12
-{{Cl|COLOR}} 2: {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} text$
-{{Cl|DIM}} px {{Cl|AS}} {{Cl|INTEGER}}, py {{Cl|AS}} {{Cl|INTEGER}}, cnt {{Cl|AS}} {{Cl|INTEGER}}, ltrcnt {{Cl|AS}} {{Cl|INTEGER}}
-px = 1: py = 1
-DO
- word(px, py) = {{Cl|POINT}}(px, py)
- {{Cl|PSET}} (px, py), 1
- px = px + 1
- {{Cl|IF...THEN|IF}} px = {{Cl|LEN}}(text$) * 8 {{Cl|THEN}}
- px = 1
- py = py + 1
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} py = 16
-{{Cl|END SUB}}
-
-{{Cl|SUB}} redraw
-{{Cl|CLS}}
-{{Cl|DIM}} row {{Cl|AS}} {{Cl|INTEGER}}, cnt {{Cl|AS}} {{Cl|INTEGER}}, cstart {{Cl|AS}} {{Cl|SINGLE}}, cend {{Cl|AS}} {{Cl|SINGLE}}
-{{Cl|DIM}} xrot {{Cl|AS}} {{Cl|INTEGER}}, yrot {{Cl|AS}} {{Cl|INTEGER}}, SCALE {{Cl|AS}} {{Cl|INTEGER}}, pan {{Cl|AS}} {{Cl|INTEGER}}
-cstart = 0: cend = 6.2
-xrot = 6: yrot = 6: SCALE = 3: pan = 30
-{{Cl|OUT}} {{Cl|&H}}3C8, 1: {{Cl|OUT}} {{Cl|&H}}3C9, 10: {{Cl|OUT}} {{Cl|&H}}3C9, 10: {{Cl|OUT}} {{Cl|&H}}3C9, 60
-DO
- row = 2
- DO
- DO
- {{Cl|FOR...NEXT|FOR}} i = cend {{Cl|TO}} cstart {{Cl|STEP}} -.03
- x = (SCALE * 60 - (row * xrot / 4)) * {{Cl|TAN}}({{Cl|COS}}(i))
- y = {{Cl|SIN}}(SCALE * 60 - (row * yrot)) * {{Cl|TAN}}({{Cl|SIN}}(i)) * pan
- cnt = cnt + 1
- {{Cl|IF...THEN|IF}} word(cnt, row) > 0 {{Cl|THEN}}
- {{Cl|CIRCLE}} (x + 320, y + 220), SCALE + 1, 1 'circled letters
- '{{Cl|LINE}} (x + 320, y + 220)-{{Cl|STEP}}(12, 12), 1, BF 'boxed letters
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} cnt = {{Cl|LEN}}(text$) * 8 {{Cl|THEN}} cnt = 0: {{Cl|EXIT DO}}
- {{Cl|NEXT}}
- {{Cl|LOOP}}
- row = row + 1
- {{Cl|LOOP}} {{Cl|UNTIL}} row = 16
- cend = cend + .1
- cstart = cstart + .1
- now! = {{Cl|TIMER}}
- DO
- newnow! = {{Cl|TIMER}}
- {{Cl|LOOP}} {{Cl|UNTIL}} newnow! - now! >= .15
- {{Cl|LINE}} (1, 100)-(639, 280), 0, BF
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Code by Unseen Machine}}
-
-
-{{PageSeeAlso}}
-* [[_PI]] {{text|(QB64 function)}}
-* [[SIN]], [[COS]]
-* [[ATN]] {{text|(arctangent)}}
-* [[Mathematical Operations]]
-* [[Text Using Graphics]]
-* [[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/THEN_1111.txt b/internal/help/THEN_1111.txt
deleted file mode 100644
index ec6c83707..000000000
--- a/internal/help/THEN_1111.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:21}}
-'''THEN''' is required in [[IF...THEN]] conditional evaluation statements.
-
-
-
-{{PageSyntax}}
-:: IF condition THEN execute_code
-
-
-* THEN is required on the same code line as the IF statement.
-* The condition value must be true(-1) or <> 0 for the statement code to be executed.
-
-
-''See also:''
-* [[IF...THEN]]
-* [[ELSE]], [[ELSEIF]]
-* [[END IF]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/TIME$_1111$.txt b/internal/help/TIME$_1111$.txt
deleted file mode 100644
index 978b94c53..000000000
--- a/internal/help/TIME$_1111$.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:22}}
-The '''TIME$''' Function returns a [[STRING]] representation of the current computer time in a 24 hour format.
-
-
-{{PageSyntax}}
-:: PRINT "Present time = "; '''TIME$'''
-
-
-* Returns the present computer time in hh:mm:ss 24 hour format: "19:20:33"
-* Uses 2 colon (:) separators between hours, minutes and seconds
-* Hour values range from "00" to "23" starting from midnite.
-* Minutes and seconds range from "00" to "59"
-* Continuous TIME$ calls may lag if a QBasic program is minimized to the taskbar!
-
-
-''Example 1:'' A simple clock using [[DRAW]] with Turn Angle.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|DO}}
- {{Cl|CLS}}
- t$ = {{Cl|TIME$}}: h = {{Cl|VAL}}(t$): m = {{Cl|VAL}}({{Cl|MID$}}(t$, 4, 2)): s = {{Cl|VAL}}({{Cl|MID$}}(t$, 7, 2))
- {{Cl|PRINT}} t$
- {{Cl|CIRCLE}} {{Cl|STEP}}(0, 0), 200, 8
- {{Cl|DRAW}} "c12ta" + {{Cl|STR$}}((h {{Cl|MOD}} 12) * -30) + "nu133"
- {{Cl|DRAW}} "c14ta" + {{Cl|STR$}}(m * -6) + "nu200"
- {{Cl|DRAW}} "c9ta" + {{Cl|STR$}}(s * -6) + "nu200"
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 1
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{CodeEnd}}
-{{small|Code by Galleon}}
-: Explanation: Note that [[VAL]](TIME$) can just return the hour number 0 to 23 as the read stops at the first colon.
-
-
-''Example 2:'' The following Function converts TIME$ to normal 12 hour AM-PM digital clock format.
-{{CodeStart}}
-PRINT TIME$
-PRINT Clock$
-
-{{Cl|FUNCTION}} Clock$
-hour$ = {{Cl|LEFT$}}(TIME$, 2): H% = {{Cl|VAL}}(hour$)
-min$ = {{Cl|MID$}}(TIME$, 3, 3)
-IF H% >= 12 THEN ampm$ = " PM" ELSE ampm$ = " AM"
-IF H% > 12 THEN
- IF H% - 12 < 10 THEN hour$ = {{Cl|STR$}}(H% - 12) ELSE hour$ = {{Cl|LTRIM$}}({{Cl|STR$}}(H% - 12))
-ELSEIF H% = 0 THEN hour$ = "12" ' midnight hour
-ELSE : IF H% < 10 THEN hour$ = {{Cl|STR$}}(H%) ' eliminate leading zeros
-END IF
-Clock$ = hour$ + min$ + ampm$
-END FUNCTION
-{{CodeEnd}}
-{{OutputStart}}
-14:13:36
- 2:13 PM
-{{OutputEnd}}
-:''Explanation:'' When hours are less than 10 (but not 0), {{KW|STR$}}(H%) alone keeps a space ahead of the hour. For 2 digit hours, {{KW|LTRIM$}} is used to remove that leading space. For the hours of 10 AM to 12 PM, the hour {{KW|STRING}} value is passed from {{KW|LEFT$}}(TIME$, 2) at the beginning of the function.
-
-
-''See also:''
-* [[TIME$ (statement)]], [[TIMER]]
-* [[DATE$]], [[DATE$ (statement)]]
-* [[VAL]], [[STR$]], [[HEX$]]
-* [[LTRIM$]], [[MID$]], [[LEFT$]]
-* [[IF...THEN]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/TIMER_(statement)_11111_(000000000).txt b/internal/help/TIMER_(statement)_11111_(000000000).txt
deleted file mode 100644
index cb78aa153..000000000
--- a/internal/help/TIMER_(statement)_11111_(000000000).txt
+++ /dev/null
@@ -1,61 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:42:25}}
-A '''TIMER''' statement enables, turns off or stops timer event trapping. QBasic only uses the base timer, but '''QB64''' can run many.
-
-
-QB {{PageSyntax}}
-
-:::TIMER {ON|STOP|OFF}
-
-QB64 {{PageSyntax}}
-
-:::TIMER(''number%'') {ON|STOP|OFF|FREE}
-
-
-{{Parameters}}
-* ''number'' denotes a specific numbered timer event in '''QB64 only'''. QB64 can run many timer events at once including the base timer.
-* TIMER ON enables event trapping of an [[ON TIMER (n)]] statement. While enabled, a check is made after every code statement to see if the specified time has elapsed and the ON TIMER [[GOSUB]] (or [[SUB]] in QB64) procedure is executed.
-* TIMER STOP disables timer event trapping. When an event occurs while stopped, it is remembered. If timer events are turned back on later, any remembered events are immediately executed.
-* TIMER OFF turns timer event trapping completely off and no subsequent events are remembered.
-
-'''QB64 only'''
-* Get a TIMER number from [[_FREETIMER]] ONLY except when the base timer(no number or 0) is used. Use specific variables or an array to hold each event number value for later reference.
-* If the TIMER number is omitted or 0, the TIMER used is the base timer.
-* Specific TIMER events can be enabled, suspended, turned off or freed using [[TIMER (statement)|TIMER(n)]] ON, STOP, OFF or FREE.
-* TIMER(n) '''FREE''' clears a specific timer event when it is no longer needed. '''The base TIMER or TIMER(0) cannot be freed!'''
-
-
-'''QB64 Timing Alternatives'''
-* The [[TIMER]] function can be used to find timed intervals down to 1 millisecond(.001) accuracy.
-* The [[_DELAY]] statement can be used to delay program execution for intervals down to milliseconds.
-* [[_LIMIT]] can slow down loops to a specified number of frames per second. This can also alleviate a program's CPU usage.
-
-
-''Example:'' How to update the time while [[PRINT|printing]] at the same time in a program.
-{{CodeStart}}
- TIMER ON ' enable timer event trapping
- LOCATE 4, 2 ' set the starting PRINT position
- {{Cl|ON TIMER(n)|ON TIMER}}(10) GOSUB Clock ' set procedure execution repeat time
- DO WHILE INKEY$ = "": PRINT "A"; : SLEEP 6: LOOP
- TIMER OFF
- {{Cl|SYSTEM}}
-
- Clock:
- row = {{Cl|CSRLIN}} ' Save current print cursor row.
- col = {{Cl|POS|POS(0)}} ' Save current print cursor column.
- LOCATE 2, 37: PRINT {{Cl|TIME$}}; ' print current time at top of screen.
- LOCATE row, col ' return to last print cursor position
- {{Cl|RETURN}}
-{{CodeEnd}}
-: NOTE: SLEEP will be interrupted in QBasic.
-
-
-''See also:''
-
-* [[ON TIMER(n)]], [[TIMER]](function)
-
-* [[_DELAY]], [[_LIMIT]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/TIMER_11111.txt b/internal/help/TIMER_11111.txt
deleted file mode 100644
index 2c44e0471..000000000
--- a/internal/help/TIMER_11111.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:23}}
-The '''TIMER''' function returns the number of seconds past the previous midnite down to an accuracy of 1/18th of a second.
-
-
-== QB Syntax ==
-::: seconds! = TIMER
-
-== QB64 Syntax ==
-::: seconds# = TIMER[(''accuracy!'')]
-
-
-* TIMER return values range from 0 at midnight to 86399! A comparison value must stay within that range!
-* [[INTEGER]] or [[LONG]] second values range from 0 at midnight to 86399 seconds each day.
-* QBasic can return [[SINGLE]] values down to about .04 or 1/18th (one tick) of a second accurately.
-* '''QB64''' can read [[DOUBLE]] ''accuracy'' down to 1 millisecond. Example: {{text|start# = TIMER(.001)|green}}
-* Use [[DOUBLE]] variables for millisecond accuracy as [[SINGLE]] values are only accurate to 100ths of a second later in the day!
-* TIMER loops should use a midnight adjustment to avoid non-ending loops in QBasic.
-* TIMER can also be used for timing program Events. See [[ON TIMER(n)]] or the [[TIMER (statement)]]
-* '''QB64''' can use a [[_DELAY]] down to .001(one millisecond) or [[_LIMIT]] loops per second. Both help limit program CPU usage.
-
-
-''Example 1:'' Delay SUB with a midnight correction for when TIMER returns to 0. '''QB64''' can use [[_DELAY]] for delays down to .001.
-{{CodeStart}}
-{{Cl|DO...LOOP|DO}}
- {{Cl|PRINT}} "Hello";
- Delay .5 'accuracy down to .05 seconds or 1/18th of a second in Qbasic
- {{Cl|PRINT}} "World!";
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-
-{{Cl|END}}
-
-{{Cl|SUB}} Delay (dlay!)
-start! = {{Cl|TIMER}}
-{{Cl|DO...LOOP|DO}} {{Cl|WHILE}} start! + dlay! >= {{Cl|TIMER}}
- {{Cl|IF...THEN|IF}} start! > {{Cl|TIMER}} {{Cl|THEN}} start! = start! - 86400
-{{Cl|LOOP}}
-{{Cl|END SUB}}
-{{CodeEnd}}
-:''Explanation:'' When the delay time is added to the present TIMER value, it could be over the maximum number of 86399 seconds. So when TIMER becomes less than start it has reached midnight. The delay value then must be corrected by subtracting 86400.
-
-
-''Example 2:'' Looping one TIMER tick of 1/18th of a second (ticks per second can be changed)
-{{CodeStart}}
-{{Cl|DEF SEG}} = 0 ' set to {{Cl|PEEK}} and {{Cl|POKE}} {{Cl|TIMER}} Ticks
-{{Cl|DO...LOOP|DO}} ' main program loop
- ' program code
- {{Cl|POKE}} 1132, 0 ' zero Timer ticks
- {{Cl|DO...LOOP|DO}} ' delay loop
- x% = {{Cl|PEEK}}(1132)
- {{Cl|IF...THEN|IF}} x% <> px% {{Cl|THEN}} {{Cl|PRINT}} x%;
- px% = x%
- {{Cl|LOOP}} {{Cl|UNTIL}} x% >= 18 '18 ticks in one second
- {{Cl|PRINT}} "code " ' program code
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{Cl|DEF SEG}} ' reset segment to default
-
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}} 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 code
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 code
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 code
-{{OutputEnd}}
-:''Explanation:'' The [[POKE]] before the delay loop sets the tick count to 0. The [[PEEK]] count increases until the tick count returns 18 ticks and ends the loop. The same thing could be approximated by using a delay loop with: {{text|second! = '''TIMER''' + 1|green}}
-
-
-''Example 3:'' Using a [[DOUBLE]] variable for [[TIMER]](.001) millisecond accuracy in '''QB64''' throughout the day.
-{{CodeStart}}
- ts! = TIMER(.001) 'single variable
- td# = TIMER(.001) 'double variable
-
- PRINT "Single ="; ts!
- PRINT "Double ="; td#
-{{CodeEnd}}
-{{OutputStart}}
- Single = 77073.09
- Double = 77073.094
-{{OutputEnd}}
-:''Explanation:'' [[SINGLE]] variables will cut off the millisecond accuracy returned so [[DOUBLE]] variables should be used. TIMER values will also exceed [[INTEGER]] limits. When displaying TIMER values, use [[LONG]] for seconds and [[DOUBLE]] for milliseconds.
-
-
-''See also:''
-* [[_DELAY]], [[_LIMIT]], [[SLEEP]]
-* [[RANDOMIZE]], [[Scancodes]](example)
-* [[ON TIMER(n)]], [[TIMER (statement)]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/TO_11.txt b/internal/help/TO_11.txt
deleted file mode 100644
index ee14cd960..000000000
--- a/internal/help/TO_11.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:24}}
-[[TO]] {{text|indicates a range of numerical values or an assignment of one value to another.}}
-
-
-{{PageSyntax}}
-
-::: DIM array(1 TO 100)
-::: FOR i = 1 TO 10
-::: _MAPUNICODE unicode TO asciicode
-::: _SETALPHA alpha%, c1& TO c2&
-
-
-* To specify a range in the [[CASE]] clause of a [[SELECT CASE]] statement.
-* To specify the range for the loop counter in a [[FOR...NEXT]] loop.
-* Array dimensions can be set to have a range of element numbers with TO.
-* Specifies an [[ASCII]] character code to set with [[_MAPUNICODE]].
-* Specifies a range of color values to set the transparencies with [[_SETALPHA]].
-* To specify a range of records to lock or unlock in a networked environment, in the [[LOCK|LOCK...UNLOCK]] statement.
-* To separate the lower and upper bounds of an array specification in a [[DIM]] or [[REDIM]] statement.
-
-
-''See also:''
-* [[DIM]], [[FOR...NEXT]]
-* [[_MAPUNICODE]]
-* [[_SETALPHA]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/TYPE_1111.txt b/internal/help/TYPE_1111.txt
deleted file mode 100644
index d8fb54573..000000000
--- a/internal/help/TYPE_1111.txt
+++ /dev/null
@@ -1,167 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:26}}
-'''TYPE''' definitions are used to create variables that can hold more than one variable type of a fixed byte length.
-
-
-{{PageSyntax}}
-::'''TYPE''' typename
-
-::.
-
-::. variable(s) AS type
-
-::.
-
-::'''END TYPE'''
-
-
-* Typename is an undefined type name holder as it can hold any variable types.
-* TYPE definitions should be placed in the main module before the start of the program code execution.
-* TYPE definitions CAN be placed in [[SUB]] or [[FUNCTION]] procedures using QB64 only!
-* TYPE definitions cannot contain Array variables! Arrays can be [[DIM]]ensioned as a TYPE definition.
-* TYPE definitions cannot be inside of another TYPE definition, but variables can be defined AS another type.(See Example 3)
-* TYPE definitions must be ended with [[END TYPE]].
-* A TYPE variable MUST be assigned to the type after it is defined. Array variables are allowed.
-* Type variables must be defined in every SUB or FUNCTION unless the type variable is [[DIM]]ensioned as [[SHARED]].
-* Type variables use DOT variable names to read or write specific values. They do not use type suffixes as they can hold ANY variable type values! The name before the dot is the one you defined after the type definition and the name after is the variable name used inside of the TYPE. The name of the dimensioned type variable alone can be used to [[PUT]] # or [[GET]] # all of the data at once!
-* Once the TYPE variable is created you can find the record or byte size by using [[LEN]](typevariable).
-* TYPE definitions can also be placed in [[$INCLUDE]] .BI text files such as [[QB.BI]] is used by [[INTERRUPT]] and [[INTERRUPTX]].
-* '''[[_BIT]] is not currently supported in User Defined [[TYPE]]s'''.
-* '''NOTE: Many QBasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!'''
-
-
-{{DataTypeTable}}
-
-
-''Example 1:'' Creating a mouse [[INTERRUPT]] TYPE definition. Each [[INTEGER]] value is 2 bytes.
-{{CodeStart}}
- {{Cl|TYPE}} RegType
- AX {{Cl|AS}} {{Cl|INTEGER}} ' mouse function to use
- BX {{Cl|AS}} {{Cl|INTEGER}} ' mouse button
- CX {{Cl|AS}} {{Cl|INTEGER}} ' mouse graphic column position
- DX {{Cl|AS}} {{Cl|INTEGER}} ' mouse graphic row position
- BP {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse, but required *
- SI {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse, but required *
- DI {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse, but required *
- Flags {{Cl|AS}} {{Cl|INTEGER}} ' not used by mouse but required *
- DS {{Cl|AS}} {{Cl|INTEGER}} ' used by {{Cl|INTERRUPTX}} only
- ES {{Cl|AS}} {{Cl|INTEGER}} ' used by {{Cl|INTERRUPTX}} only
- {{Cl|TYPE|END TYPE}}
-
- {{Cl|DIM}} {{Cl|SHARED}} InRegs {{Cl|AS}} RegType, OutRegs {{Cl|AS}} RegType ' create dot variables
-
- InRegs.AX = 3 ' sets the mouse function to read the mouse buttons and position.
-
- {{Cl|CALL}} {{Cl|INTERRUPT}}(&H33, InRegs, OutRegs)
-
- column% = OutRegs.CX ' returns the current mouse column position
-{{CodeEnd}}
-:''Explanation:'' InRegs and OutRegs become the DOT variable prefix name for the TYPE definition's variables.
-
-::::Each TYPE variable is designated as the DOT variable's suffix.
-
-'''* Note: Omitting variables in the RegType definition can change other program variable values!'''
-
-
-
-''Example 2:'' Creating an addressbook database for a [[RANDOM]] file.
-{{CodeStart}}
- TYPE ContactInfo
- First AS STRING * 10
- Last AS STRING * 15
- Address1 AS STRING * 30
- Address2 AS STRING * 30
- City AS STRING * 15
- State AS STRING * 2
- Zip AS LONG ' (4 bytes)
- Phone AS STRING * 12
- END TYPE
-
- DIM Contact AS ContactInfo 'create contact record variable for {{Cl|RANDOM}} file
- RecordLEN% = {{Cl|LEN}}(Contact) ' 118 bytes
- 'define values
- Contact.First = "Ted" ' the fixed string length value will contain 7 extra spaces
- Contact.Zip = 15236 ' {{Cl|LONG}} value that can be used to search certain zip code numbers.
-
- {{Cl|PUT|PUT #}}1, 5,Contact 'place contact info into fifth record position
-{{CodeEnd}}
-
-:''Explanation:'' Use the assigned type variable to find the RANDOM record length which is 118 bytes.
-::::The DOT variable names consist of Contact as the prefix:
-
-
-''Example 3:'' Defining a TYPE variable as another variable type from a previous TYPE definition in QB64.
-{{CodeStart}}
-{{Cl|TYPE}} bar
- b {{Cl|AS}} {{Cl|STRING}} * 10
-END TYPE
-
-TYPE foo
- a {{Cl|AS}} {{Cl|SINGLE}}
- c {{Cl|AS}} bar 'define variable as a bar type
-END TYPE
-
-{{Cl|DIM}} foobar {{Cl|AS}} foo 'create a variable to use the foo type
-foobar.a = 15.5
-foobar.c.b = "this is me"
-
-PRINT foobar.a, foobar.c.b
-{{Cl|END}}
-{{CodeEnd}}
-
-
-''Example 4:'' A bitmap header information TYPE [[$INCLUDE]] File.
-{{TextStart}}
-' ********
-'Bitmap.BI can be included at start of program
-
- TYPE BMPHeaderType ' Description Bytes '''QB64'''
- ID AS STRING * 2 ' File ID is "BM" 2
- Size AS LONG ' Size of the data file 4
- Res1 AS INTEGER ' Reserved 1 should be 0 2
- Res2 AS INTEGER ' Reserved 2 should be 0 2
- Offset AS LONG ' Start position of pixel data 4
- Hsize AS LONG ' Information header size 4
- PWidth AS LONG ' Image width 4 {{Cb|_WIDTH (function)}}
- PDepth AS LONG ' Image height 4 {{Cb|_HEIGHT}}
- Planes AS INTEGER ' Number of planes 2
- BPP AS INTEGER ' Bits per pixel(palette) 2 {{Cb|_PIXELSIZE}}
- Compress AS LONG ' Compression 4
- ImageBytes AS LONG ' Width * Height = ImageSIZE 4
- Xres AS LONG ' Width in PELS per metre 4
- Yres AS LONG ' Depth in PELS per metre 4
- NumColors AS LONG ' Number of Colors 4
- SigColors AS LONG ' Significant Colors 4
- END TYPE ' Total Header bytes = 54
-{{TextEnd}}
-{{CodeStart}}
-'{{Cl|$INCLUDE}}: 'Bitmap.BI' 'use only when including a BI file
-
-{{Cl|DIM}} {{Cl|SHARED}} BMPHead AS BMPHeaderType
-
-{{Cl|GET|GET #}}1, , BMPHead 'get the entire bitmap header information
-{{CodeEnd}}
-:''Explanation:'' Use one [[GET]] to read all of the header information from the start of the bitmap file opened AS [[BINARY]]. It reads all 54 bytes as [[STRING]], [[INTEGER]] and [[LONG]] type DOT variable values.
-
-:NOTE: BPP returns 4(16 colors), 8(256 colors) or 24(16 million colors) bits per pixel in QBasic. 24 bit can only be in greyscale.
-
-:Then use the DOT variable name values like this [[GET (graphics statement)]] after you load the bitmap image to the screen:
-
-{{CodeStart}}
-{{Cl|GET (graphics statement)|GET}} (0, 0)-(BMPHead.PWidth - 1, BMPHead.PDepth - 1), Image(48) 'indexed for 4 BPP colors
-{{CodeEnd}}
-
-:The bitmap image is now stored in an {{KW|Arrays|array}} to {{KW|BSAVE}} to a file. The RGB color information follows the file header as [[ASCII]] character values read using {{KW|ASC}}. The color values could be indexed at the start of the Array with the image being offset to: index = NumberOfColors * 3. As determined by the {{KW|SCREEN (statement)|SCREEN}} mode used. In SCREEN 13(256 colors) the index would be 768.
-
-
-''See also:''
-* [[INTEGER]], [[SINGLE]], [[DOUBLE]]
-* [[LONG]], [[_INTEGER64]], [[_FLOAT]]
-* [[STRING]], [[_BYTE]], [[_BIT]], [[_OFFSET]]
-* [[GET|GET #]], [[PUT|PUT #]], [[BINARY]]
-* [[GET (graphics statement)]], [[PUT (graphics statement)]]
-* [[LEN]], [[LOF]], [[EOF]]
-* [[Bitmaps]], [[Creating_Icon_Bitmaps#Icon_to_Bitmap_Conversion_Function|Icon to Bitmap Conversion Function]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/Template%3ALogicalTruthPlugin_10000000%31100000010000100000.txt b/internal/help/Template%3ALogicalTruthPlugin_10000000%31100000010000100000.txt
deleted file mode 100644
index 3458803a4..000000000
--- a/internal/help/Template%3ALogicalTruthPlugin_10000000%31100000010000100000.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:08-02-2022}}
-{{QBDLTIME:22:58:34}}
-{{FixedStart}}
- The results of the bitwise logical operations, where '''A''' and '''B''' are operands,
- and '''1''' or '''0''' indicate whether a bit is set or not set:
- ┌───────────┬────────────────────────────────────────────────────────â”
- │ '''Operands''' │ '''Logical operations''' │
- ├─────┬─────┼───────┬─────────┬────────┬─────────┬─────────┬─────────┤
- │ '''A''' │ '''B''' │ [[NOT]] '''B''' │ '''A''' [[AND]] '''B''' │ '''A''' [[OR]] '''B''' │ '''A''' [[XOR]] '''B''' │ '''A''' [[EQV]] '''B''' │ '''A''' [[IMP]] '''B''' │
- ├─────┼─────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
- │ '''1''' │ '''1''' │ 0 │ 1 │ 1 │ 0 │ 1 │ 1 │
- ├─────┼─────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
- │ '''1''' │ '''0''' │ 1 │ 0 │ 1 │ 1 │ 0 │ 0 │
- ├─────┼─────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
- │ '''0''' │ '''1''' │ 0 │ 0 │ 1 │ 1 │ 0 │ 1 │
- ├─────┼─────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
- │ '''0''' │ '''0''' │ 1 │ 0 │ 0 │ 0 │ 1 │ 1 │
- └─────┴─────┴───────┴─────────┴────────┴─────────┴─────────┴─────────┘
- [[Relational Operations]] return '''negative one''' (-1, all bits set) and '''zero'''
- (0, no bits set) for '''true''' and '''false''', respectively. This allows relational
- tests to be inverted and combined using the bitwise logical operations.
-{{FixedEnd}}
diff --git a/internal/help/Template%3AOpenGLTypesPlugin_10000000%3110001110000100000.txt b/internal/help/Template%3AOpenGLTypesPlugin_10000000%3110001110000100000.txt
deleted file mode 100644
index c1cfeba5c..000000000
--- a/internal/help/Template%3AOpenGLTypesPlugin_10000000%3110001110000100000.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-{{QBDLDATE:08-02-2022}}
-{{QBDLTIME:22:55:59}}
-{{FixedStart}}
- ┌──────────────┬────────────────┬──────────────────────────────────────────â”
- │ '''OpenGL''' │ '''C/C++''' │ '''QB64''' │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLenum │ unsigned int │ [[_UNSIGNED]] [[LONG]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLboolean │ unsigned char │ [[_UNSIGNED]] [[_BYTE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLbitfield │ unsigned int │ [[_UNSIGNED]] [[LONG]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLbyte │ signed char │ [[_BYTE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLshort │ short │ [[INTEGER]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLint │ int │ [[LONG]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLsizei │ int │ [[LONG]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLubyte │ unsigned char │ [[_UNSIGNED]] [[_BYTE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLushort │ unsigned short │ [[_UNSIGNED]] [[INTEGER]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLuint │ unsigned int │ [[_UNSIGNED]] [[LONG]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLfloat │ float │ [[SINGLE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLclampf │ float │ [[SINGLE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLdouble │ double │ [[DOUBLE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLclampd │ double │ [[DOUBLE]] │
- ├──────────────┼────────────────┼──────────────────────────────────────────┤
- │ GLvoid '''(1)''' │ void │ [[_OFFSET]](any fixed lenght string or [[_BYTE]] │
- │ │ │ array element) │
- └──────────────┴────────────────┴──────────────────────────────────────────┘
-
- '''Note:''' If a parameter has an asterisk (*) in front, then it's a pointer to
- the designated OpenGL variable type, rather than a value of that type.
- Those must be passed using the [[_OFFSET]](...) notation.
-
- '''E.g.''' GLuint *anyParam is actually the offset of a [[_UNSIGNED]] [[LONG]] (~&)
- variable or array, which must be passed as [[_OFFSET]](anyVar~&) or
- [[_OFFSET]](anyArr~&()) respectively.
-
- '''(1)''' This type is regularly only used for pointers (with asterisk (*)) to
- any byte sized memory data, hence [[_BYTE]] or fixed length strings.
-{{FixedEnd}}
diff --git a/internal/help/UBOUND_111111.txt b/internal/help/UBOUND_111111.txt
deleted file mode 100644
index 002da65a7..000000000
--- a/internal/help/UBOUND_111111.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:27}}
-The {{KW|UBOUND}} function returns the largest valid index (upper bound) of an array dimension.
-
-
-{{PageSyntax}}
-:''result%'' = {{KW|UBOUND}}(arrayName[, dimension%])
-
-
-{{PageDescription}}
-* {{Parameter|arrayName}} specifies the name of the array.
-
-* {{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.
-
-* {{KW|UBOUND}}, along with {{KW|LBOUND}}, is used to determine the range of valid indexes of an array.
-
-
-{{PageExamples}}
-{{CodeStart}}{{Cl|DIM}} myArray(5) {{Cl|AS}} {{Cl|INTEGER}}
-{{Cl|DIM}} myOtherArray(1 to 2, 3 to 4) {{Cl|AS}} {{Cl|INTEGER}}
-
-{{Cl|PRINT}} {{Cl|UBOUND}}(myArray)
-{{Cl|PRINT}} {{Cl|UBOUND}}(myOtherArray, 2)
-{{CodeEnd}}
-{{OutputStart}} 5
- 4
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* {{KW|Arrays}}, {{KW|LBOUND}}
-* {{KW|DIM}}, {{KW|COMMON}}, {{KW|STATIC}}, {{KW|SHARED}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/UCASE$_11111$.txt b/internal/help/UCASE$_11111$.txt
deleted file mode 100644
index b3d548be0..000000000
--- a/internal/help/UCASE$_11111$.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:28}}
-The [[UCASE$]] function outputs an all-uppercase version of a [[STRING]].
-
-
-{{PageSyntax}}
-:{{Parameter|result$}} = [[UCASE$]]({{Parameter|text$}})
-
-
-{{PageDescription}}
-* Used to guarantee that all alphabetical characters in a [[STRING]] are capitalized.
-* Does not affect non-alphabetical characters.
-
-
-{{PageExamples}}
-''Example:'' The following code guarantees that all letter key entries are capitalized:
-{{CodeStart}}{{Cl|PRINT}} "Do you want to continue? (y/n)"
-
-{{Cl|DO...LOOP|DO}}
- K$ = {{Cl|UCASE$}}({{Cl|INKEY$}})
-{{Cl|DO...LOOP|LOOP}} {{Cl|DO...LOOP|UNTIL}} K$ = "Y" {{Cl|OR}} K$ = "N"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[LCASE$]] {{text|(lower case)}}
-* [[INKEY$]]
-* [[INPUT$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/UEVENT_111111.txt b/internal/help/UEVENT_111111.txt
deleted file mode 100644
index da6ac70ca..000000000
--- a/internal/help/UEVENT_111111.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:29}}
-The '''UEVENT''' Statement uses ON, OFF or STOP to enable, turn off or suspend user event trapping.
-
-
-{{PageSyntax}}
-:::UEVENT {ON|STOP|OFF}
-
-
-*'''[[Keywords currently not supported by QB64|Currently NOT supported in QB64!]]'''
-* UEVENT ON enables user defined event-trapping as defined by the [[ON UEVENT]] statement.
-
-* UEVENT OFF disables the event-trapping routine. All events are ignored and are not remembered.
-
-* UEVENT STOP suspends the event-trapping routine. An event is remembered, and the event-trapping routine will be performed as soon as a UEVENT ON statement re-enables the trapping.
-
-
-''See also:''
-* [[ON UEVENT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/UNLOCK_111111.txt b/internal/help/UNLOCK_111111.txt
deleted file mode 100644
index c79f29631..000000000
--- a/internal/help/UNLOCK_111111.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:30}}
-This statement opens access to parts or all of a file to other programs and network users.
-
-
-{{PageSyntax}}
-: [[UNLOCK]] [#]{{Parameter|fileNumber%}}
-: [[UNLOCK]] [#]{{Parameter|fileNumber%}}, {{Parameter|record&}}
-: [[UNLOCK]] [#]{{Parameter|fileNumber%}}, [{{Parameter|firstRecord&}}] TO {{Parameter|lastRecord&}}
-
-
-{{PageDescription}}
-* {{Parameter|fileNumber%}} is the file number of the file to unlock.
-* In the first syntax, the entire file is unlocked.
-* In the second syntax, {{Parameter|record&}} is the record number of the file to unlock.
-* In the third syntax, the records or bytes in the range [{{Parameter|firstRecord&}},{{Parameter|lastRecord&}}] are unlocked. If {{Parameter|firstRecord&}} is omitted, it is assumed to be the first record or byte.
-* For files opened in [[BINARY]] mode, each record corresponds to a single byte.
-* [[LOCK]] and [[UNLOCK]] statements are always used in pairs and each statement must match the other one.
-* Files must be unlocked before other programs can access them, and before the file is closed.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]
-
-
-{{PageSeeAlso}}
-* [[LOCK]]
-* [[OPEN]]
-* [[ACCESS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/UNTIL_11111.txt b/internal/help/UNTIL_11111.txt
deleted file mode 100644
index fa55fafa8..000000000
--- a/internal/help/UNTIL_11111.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:31}}
-The '''UNTIL''' condition is used in [[DO...LOOP]] exit verifications.
-
-
-
-{{PageSyntax}}
-:: DO [UNTIL] evaluation
-:: .
-:: .
-:: .
-:: LOOP UNTIL evaluation
-
-
-* Only one conditional evaluation can be made at the start or the end of a [[DO...LOOP]].
-* DO UNTIL evaluates a condition before and inside of the loop. The loop may not run at all.
-* LOOP UNTIL evaluates a condition inside of the loop. It has to loop once.
-* Skips the loop or loops until an evaluation becomes True.
-
-
-{{RelationalTable}}
-
-
-''See also:''
-*[[WHILE]]
-*[[DO...LOOP]]
-*[[WHILE...WEND]]
-
-{{PageNavigation}}
diff --git a/internal/help/Underscore_1000000000.txt b/internal/help/Underscore_1000000000.txt
deleted file mode 100644
index 810823abb..000000000
--- a/internal/help/Underscore_1000000000.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:54:01}}
-An '''underscore''' can be used at the end of a line of code to continue a code line to the next line.
-
-
-
-''Usage:'' IF x + y > 500 AND x + y < 600 THEN_
-:::PRINT x + y
-
-
-* '''Only QB64 keywords can use a leading underscore! Leading underscores are reserved for QB64 procedure names only!'''
-* The underscore can be anywhere after the code on that line to continue the code to the next line in QB64.
-* Multiple underscores can be used for the same line of code in QB64 only.
-* Underscores can be used in the middle of variable, sub procedure or [[CONST|constant]] names.
-* '''The underscore is NOT compatible with QBasic! The QBasic IDE will remove or move code with leading underscores!'''
-* In [[PRINT USING]] an underscore can precede a formatting character to display that character as text in a template [[STRING]].
-
-
-''See also:''
-
-* [[Colon]], [[Comma]], [[Semicolon]]
-* [[IF...THEN]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/VAL_111.txt b/internal/help/VAL_111.txt
deleted file mode 100644
index 793dffcc5..000000000
--- a/internal/help/VAL_111.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:32}}
-The '''VAL''' Function returns the decimal numerical equivalent value of a [[STRING]] numerical value.
-
-
-{{PageSyntax}}
-:: value = VAL(string_value$)
-
-
-* VAL converts string numbers to numerical values including decimal point values and prefixed "[[&H]]" hexadecimal, "[[&O]]" octal.
-* VAL conversion stops at non-numeric characters except for letter "D" or "E" exponential notation values.
-:String values with "D" and "E" letters between numbers may be converted also! EX: '''{{text|VAL("9D4") = 90000|green}}'''
-* If the first string character is not a number VAL returns 0. VAL may return erratic values with "%" or "&" starting characters.
-* Hexadecimal [[HEX$]] string values with the "[[&H]]" prefix can be converted to a decimal value with digits 0 to 9 and letters A to F, like; dec = VAL("&H"+hexvar$).
-* Octal [[OCT$]] string values with the "[[&O]]" prefix can be converted to a decimal value with digits from 0 to 7 only.
-* Presently VAL '''cannot''' convert QB64 binary [[&B]] prefixed strings from binary to decimal in '''QB64'''.
-* For character values of [[ASCII]] data use [[ASC]] to get the value.
-* In QB64 use an [[INTEGER]] return variable to hold integer values returned by VAL [[HEX$|Hex]] strings: '''{{text|value% = VAL("&HFFFF") = -1|green}}'''
-
-
-''Example 1:'' Differences in values returned with QBasic and QB64:
-{{CodeStart}}
-{{Cl|PRINT}} {{Cl|VAL}}("{{Cl|&H}}") '203 in QB, 0 in QB64
-{{Cl|PRINT}} {{Cl|VAL}}("{{Cl|&H}}FFFF") ' -1 QB, 65535 in QB64
-{{Cl|PRINT}} {{Cl|VAL}}("{{Cl|&H}}FFFF&") '65535 in both
-{{CodeEnd}}
-:''Explanation:'' A quirk in QBasic returned VAL values of 203 for "&" and "&H" that was never fixed until PDS(7.1).
-
-
-''Example 2:'' Converting a string with some number characters
-{{CodeStart}}
- text$ = "1.23Hello"
- number! = VAL(text$)
- PRINT number!
-{{CodeEnd}}
-{{OutputStart}}
-1.23
-{{OutputEnd}}
-
-
-''Example 3:'' Converting literal and variable [[STRING|string]] values to numerical values.
-{{CodeStart}}
- a$ = "33"
- PRINT VAL("10") + VAL(a$) + 1
-{{CodeEnd}}
-{{OutputStart}}
-44
-{{OutputEnd}}
-:''Explanation:'' 10 + 33 + 1 = 44, the strings were converted to values.
-
-:You have to convert the string to values in order to use them in a mathematical expression also since mixing strings with numbers isn't allowed. VAL will stop at a text letter so VAL("123G56) would return 123.
-
-:If VAL wasn't used the program would break with an error, as you can't add the value 1 to a string, if the 1 was a string ("1") then the program would return "10331", but now since we used VAL, the numbers were added as they should.
-
-
-''Example 4:'' Converting a hexadecimal value to decimal value using HEX$ with VAL.
-{{CodeStart}}
- decnumber% = 96
- hexnumber$ = "&H" + {{Cl|HEX$}}(decnumber%) 'convert decimal value to hex and add hex prefix
- PRINT hexnumber$
- decimal% = {{Cl|VAL}}(hexnumber$)
- PRINT decimal%
-{{CodeEnd}}
-{{OutputStart}}
-&H60
- 96
-{{OutputEnd}}
-: ''Explanation:'' [[HEX$]] converts a decimal number to hexadecimal, but [[VAL]] will only recognize it as a valid value with the "&H" prefix. Especially since hexadecimal numbers can use "A" through "F" in them. Create a converter function from this code!
-
-
-''See also:''
-* [[STR$]], [[HEX$]]
-* [[OCT$]], [[ASC]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/VARPTR$_111111$.txt b/internal/help/VARPTR$_111111$.txt
deleted file mode 100644
index 2edbe7617..000000000
--- a/internal/help/VARPTR$_111111$.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:34}}
-'''VARPTR$''' is a memory function that returns a [[STRING]] representation of a variable's memory address value for use in a [[DRAW]] or [[PLAY]] statement.
-
-
-{{PageSyntax}}
-:: string_value$ = VARPTR$(''variable'')
-
-
-* Can use any [[STRING|string]] or numerical variable reference '''existing''' in memory.
-* If the parameter value is from an array it must be dimensioned already. Cannot use fixed length string arrays.
-* When using '''numerical''' ''variable'' values in [[DRAW]] strings, use an = sign after the function letter. "TA=" + VARPTR$(''variable%'')
-* Always use variable X as in "X" + VARPTR$(''string_variable$'') to [[DRAW]] or [[PLAY]] another [[STRING]] value.
-* DRAW relative Moves use a + or - before the equal sign. EX: DRAW "M+=" + VARPTR$(x%) + ",-=" + VARPTR$(y%)
-
-
-''Example 1:'' How VARPTR$ reads consecutive values from memory.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 2
-{{Cl|CLS}}
-WIND$ = "r10 d7 l10 u7 br20" 'create draw string to be read by function
-ROW$ = "x"+{{Cl|VARPTR$}}(WIND$)+"x"+{{Cl|VARPTR$}}(WIND$)+"x"+{{Cl|VARPTR$}}(WIND$)+" x"+{{Cl|VARPTR$}}(WIND$)+"bl80 bd11"
-{{Cl|LINE}} (100, 50)-(200, 160), , B
-{{Cl|DRAW}} "bm 115,52"
-{{Cl|FOR...NEXT|FOR}} I = 1 {{Cl|TO}} 10
- {{Cl|DRAW}} "x" + {{Cl|VARPTR$}}(ROW$)
-{{Cl|NEXT}}
-{{CodeEnd}}
-:''NOTE:'' '''GWBasic''' allows '''semicolons''' to be used in the ROW$ definition, but QBasic and '''QB64''' MUST use '''+''' concatenation.
-
-
-''Example 2:'' Using the function to change a Turn Angle value using DRAW.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
- 'Demonstrates how string DRAW angles are used with TA
-{{Cl|FOR...NEXT|FOR}} i = 0 {{Cl|TO}} 360 {{Cl|STEP}} 30 'mark clock hours every 30 degrees
- angle$ = {{Cl|STR$}}(i) 'change degree value i to a string
- {{Cl|PSET}} (175, 250), 6 'clock center
- {{Cl|DRAW}} "TA" + angle$ + "BU100" 'add string angle to Turn Angle and draw blind up
- {{Cl|CIRCLE}} {{Cl|STEP}}(0, 0), 5, 12 'place a circle at end of Up line
- {{Cl|DRAW}} "P9, 12"
- {{Cl|_DELAY}} .5
-{{Cl|NEXT}}
- 'Demonstrates how VARPTR$ is used with TA=
-{{Cl|DO}}: sec$ = {{Cl|RIGHT$}}({{Cl|TIME$}}, 2) 'get current second value from time
- degree = {{Cl|VAL}}(sec$) * -6 'use a negative value to Turn Angle clockwise
- {{Cl|PSET}} (175, 250), 9 'clock center
- {{Cl|DRAW}} "TA=" + {{Cl|VARPTR$}}(degree) + "U90" 'VARPTR$ value requires = in DRAW
- {{Cl|DO}}: {{Cl|_LIMIT}} 30: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|RIGHT$}}({{Cl|TIME$}}, 2) <> sec$ 'loop until seconds value changes
- {{Cl|IF}} {{Cl|INKEY$}} <> "" {{Cl|THEN}} {{Cl|EXIT DO}}
- {{Cl|PSET}} (175, 250), 0
- {{Cl|DRAW}} "TA=" + {{Cl|VARPTR$}}(degree) + "U90" 'erase previous second hand draw
-{{Cl|LOOP}}
-{{CodeEnd}}
-:''Explanation:'' When the VARPTR$ value is used in DRAW, '''=''' MUST be used to pass the value to the draw! Negative Turn Angle values move clockwise and each second moves the hand 6 degrees. '''TA''' uses actual degree angles starting at 0 or noon.
-
-
-''Example 3:'' Comparing DRAW moves using VARPTR$ and [[STR$]] values.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|PSET}} (200, 200), 12
-{{Cl|CIRCLE}} {{Cl|STEP}}(0, 0), 5, 10
-A = 100: B = 100
-{{Cl|DRAW}} "M+=" + {{Cl|VARPTR$}}(A) + ",-=" + {{Cl|VARPTR$}}(B)
-
-{{Cl|PSET}} (400, 400), 10
-{{Cl|CIRCLE}} {{Cl|STEP}}(0, 0), 5, 12
-C = 100: D = -100
-{{Cl|DRAW}} "M+" + {{Cl|STR$}}(C) + "," + {{Cl|STR$}}(D) 'must add + for positive relative moves
-{{Cl|END}}
-{{CodeEnd}}
-: ''Explanation:'' A negative STR$ value will move the DRAW relatively where VARPTR$ won't without the sign before the equal.
-
-
-''See also:''
-* [[VARPTR]], [[STR$]]
-* [[DRAW]], [[PLAY]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/VARPTR_111111.txt b/internal/help/VARPTR_111111.txt
deleted file mode 100644
index 34d4ed633..000000000
--- a/internal/help/VARPTR_111111.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:33}}
-The '''VARPTR''' function returns an [[INTEGER]] value that is the offset part of the variable or array memory address within it's segment.
-
-
-{{PageSyntax}}
-:: offset% = VARPTR(variable_name[(reference_index%)])
-
-
-* If variablename is not defined before VARPTR or [[VARSEG]] is called, the variable is created and it's address is returned.
-* Reference index is used to set the offset address of an array index, not necessarily the lowest index.
-* When a string variable, VARPTR returns the offset address location of the first byte of the string.
-* Because many QBasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used!
-* Integer array sizes are limited to 32767 elements when using [[VARPTR]] in QB and '''QB64'''!. Create a larger array using [[_BYTE]]. Example: [[DIM]] [[SHARED]] Memory (65535) AS [[_UNSIGNED]] [[_BYTE]]
-* '''Warning: DEF SEG, VARSEG , VARPTR, PEEK or POKE access QB64's emulated 16 bit conventional memory block!'''
-: '''It is highly recommended that QB64's [[_MEM]] memory system be used to avoid running out of memory.'''
-
-
-''See also:''
-* [[BSAVE]], [[BLOAD]]
-* [[SADD]], [[DEF SEG]]
-* [[VARPTR$]], [[VARSEG]],
-* [[POKE]], [[PEEK]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/VARSEG_111111.txt b/internal/help/VARSEG_111111.txt
deleted file mode 100644
index ee2afcd3b..000000000
--- a/internal/help/VARSEG_111111.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:36}}
-The '''VARSEG''' function returns an [[INTEGER]] value that is the segment part of a variable or array memory address.
-
-
-
-{{PageSyntax}}
-:: [[DEF SEG]] = VARSEG(variable_name[(start_index)])
-
-
-* If variablename is not defined before [[VARPTR]] or VARSEG is called, the variable is created and its address is returned.
-* The start index is the lowest index of an array variable when used.
-* When a string variable, VARSEG returns the segment location address of the first byte of the string.
-* Because many QBasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used!
-* Integer array sizes are limited to 32767 elements when using [[VARSEG]] in QB and '''QB64'''!. Create a larger array using [[_BYTE]]. Example: [[DIM]] [[SHARED]] Memory (65535) AS [[_UNSIGNED]] [[_BYTE]]
-* '''Warning: DEF SEG, VARSEG , VARPTR, PEEK or POKE access QB64's emulated 16 bit conventional memory block!'''
-: '''It is highly recommended that QB64's [[_MEM]] memory system be used to avoid running out of memory.'''
-
-
-''See also:''
-* [[BSAVE]], [[BLOAD]]
-* [[SADD]], [[DEF SEG]]
-* [[VARPTR]], [[VARPTR$]]
-* [[POKE]], [[PEEK]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/VIEW_1111.txt b/internal/help/VIEW_1111.txt
deleted file mode 100644
index 94e61d74a..000000000
--- a/internal/help/VIEW_1111.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:37}}
-The '''VIEW''' statement creates a graphics view port area by defining the coordinate limits to be viewed.
-
-
-{{PageSyntax}}
-:: '''VIEW''' [[SCREEN] (column1, row1)-(column2, row2)[, color][, border]]]
-
-
-* When the SCREEN option is used, all coordinates are absolute and only graphics within the viewport area are plotted.
-* When the SCREEN option is not used, all coordinates are relative to the view port with the values of column1 and row1 being automatically added before plotting the point.
-* Coordinate values are for the top left and bottom right values of a box area of the screen mode used.
-* The color parameter specifies a background fill color for the area. None when omitted.
-* Border requires any valid color attribute to draw a line around the VIEW area if there is room for it.
-* VIEW without any parameters disables the previous viewport. [[RUN]] and [[SCREEN]] can also disable any VIEW port.
-* [[CLS]] or [[CLS|CLS 1]] clears the active graphics VIEW port area only. Disable a viewport before attempting to clear the entire screen!
-* '''Note: QB64 [[RUN]] statements will not close [[VIEW PRINT]], [[VIEW]] or [[WINDOW]] view ports presently!'''
-
-
-''Example 1:'' Using SCREEN option with absolute screen coordinates.
-{{CodeStart}}
- SCREEN 12
- VIEW SCREEN (200, 200)-(400, 400), 1, 9 ' blue BG with light blue border
- CIRCLE (220, 220), 20, 11 ' using the actual screen coordinates
-{{CodeEnd}}
-
-
-''Example 2:'' Using coordinates relative to the viewport box area.
-{{CodeStart}}
- SCREEN 12
- VIEW (200, 200)-(400, 400), 1, 9
- CIRCLE (20, 20), 20, 11 ' using coordinates inside of the viewport
-{{CodeEnd}}
-
-:''Explanation:'' The relative coordinates are automatically adjusted to place the object correctly. Any values outside of the box's area will not be displayed. Both examples should display the same screen image.
-
-
-''See also:''
-* [[VIEW PRINT]] {{text|(text view port)}}
-* [[WINDOW]] {{text|(window view port)}}
-* [[SCREEN]], [[CLS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/VIEW_PRINT_1111_11111.txt b/internal/help/VIEW_PRINT_1111_11111.txt
deleted file mode 100644
index b4cf4e719..000000000
--- a/internal/help/VIEW_PRINT_1111_11111.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:38}}
-The [[VIEW PRINT]] statement defines the boundaries of a text viewport {{KW|PRINT}} area.
-
-
-{{PageSyntax}}
-: '''VIEW PRINT''' [{{Parameter|topRow%}} '''TO''' {{Parameter|bottomRow%}}]
-
-
-{{Parameters}}
-* {{Parameter|topRow%}} and {{Parameter|bottomRow%}} specify the upper and lower rows of the text viewport.
-* If {{Parameter|topRow%}} and {{Parameter|bottomRow%}} are not specified when first used, the text viewport is defined to be the entire screen.
-
-
-{{PageDescription}}
-* A second [[VIEW PRINT]] statement without parameters can also disable a viewport when no longer needed.
-* [[CLS]] or [[CLS|CLS 2]] statement will clear the active text viewport area only, and reset the cursor location to {{Parameter|topRow%}}.
-* A {{KW|SCREEN}} mode change or {{KW|RUN}} statement can also clear and disable viewports.
-* After active viewport is disabled, normal screen printing and clearing can begin.
-* Row coordinates may vary when a [[WIDTH]] statement has been used.
-* '''Note: QB64 [[RUN]] statements will not close [[VIEW PRINT]], [[VIEW]] or [[WINDOW]] view ports presently!'''
-
-
-''Example:'' Demonstrates how text scrolls within the text viewport.
-{{CodeStart}}' clear the entire screen and show the boundaries of the new text viewport
-{{Cl|CLS}}
-{{Cl|PRINT}} "Start at top..."
-{{Cl|LOCATE}} 9, 1: {{Cl|PRINT}} "<- row 9 ->"
-{{Cl|LOCATE}} 21, 1: {{Cl|PRINT}} "<- row 21 ->"
-
-' define new text viewport boundaries
-{{Cl|VIEW PRINT}} 10 {{Cl|TO}} 20
-
-' print some text that will scroll the text viewport
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 15
- {{Cl|PRINT}} "This is viewport line:"; i
- {{Cl|SLEEP}} 1
-{{Cl|NEXT}} i
-
-' clear only the active text viewport with CLS or CLS 2
-{{Cl|CLS}}
-{{Cl|PRINT}} "After clearing, the cursor location is reset to the top of the text viewport."
-
-' disable the viewport
-{{Cl|VIEW PRINT}}
-{{Cl|_DELAY}} 4
-{{Cl|LOCATE}} 20, 20: {{Cl|PRINT}} "Print anywhere after view port is disabled"
-{{Cl|_DELAY}} 4
-{{Cl|CLS}}
-{{Cl|PRINT}} "Back to top left after CLS!"
-{{CodeEnd}}
-: ''Note:'' The bottom row of the VIEW PRINT port can be used only when located or prints end with semicolons.
-
-
-{{PageSeeAlso}}
-* [[CLS]]
-* [[WINDOW]]
-* [[VIEW]] {{text|(graphics view port)}}
-* [[LOCATE]], [[PRINT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/WAIT_1111.txt b/internal/help/WAIT_1111.txt
deleted file mode 100644
index a189cbee8..000000000
--- a/internal/help/WAIT_1111.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:39}}
-The {{KW|WAIT}} statement waits until the value read from an I/O port has certain bits set.
-
-
-{{PageSyntax}}
-:{{KW|WAIT}} {{Parameter|port%}}, {{Parameter|andMask%}}[, {{Parameter|xorMask%}}]
-
-
-{{PageDescription}}
-* The {{KW|WAIT}} statement reads a value from {{Parameter|port%}} using {{KW|INP}}.
-* If {{Parameter|xorMask%}} is specified, the value is {{KW|XOR}}'d with {{Parameter|xorMask%}}. It has the effect of "toggle these bits".
-* The value is then {{KW|AND}}'d with {{Parameter|andMask%}}. It has the effect of "check if these bits are set".
-* If the final value is non-zero, {{KW|WAIT}} returns. Otherwise, another value is read from {{Parameter|port%}} and checked again.
-* The {{KW|WAIT}} statement returns immediately if {{Parameter|port%}} is not supported.
-
-
-{{PageExamples}}
-:Waiting for vertical retrace
-{{CodeStart}}' Either statement can be used to try to reduce screen flickering.
-' If both statements are used, try changing the order.
-
-WAIT &H3DA, 8 ' finishes whenever the screen isn't being written to
-WAIT &H3DA, 8, 8 ' finishes whenever the screen is being written to
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* {{KW|INP}}, {{KW|OUT}}
-* [[Scancodes]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/WEND_1111.txt b/internal/help/WEND_1111.txt
deleted file mode 100644
index 66178b42f..000000000
--- a/internal/help/WEND_1111.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:40}}
-See page [[WHILE...WEND]]
diff --git a/internal/help/WHILE...WEND_11111...1111.txt b/internal/help/WHILE...WEND_11111...1111.txt
deleted file mode 100644
index ccf98a0d7..000000000
--- a/internal/help/WHILE...WEND_11111...1111.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:42}}
-The {{KW|WHILE...WEND}} statement is used to repeat a block of statements while the condition is met.
-
-
-{{PageSyntax}}
-:{{KW|WHILE}} {{Parameter|condition}}
-:.
-:.
-:.
-:{{KW|WEND}}
-
-
-{{PageDescription}}
-* {{Parameter|condition}} is a numeric expression used to determine if the loop will execute.
-* {{Parameter|statements}} will execute repeatedly while {{Parameter|condition}} is a non-zero value.
-* [[EXIT]] WHILE can be used for emergency exits from the loop in QB64 only.
-* A [[DO...LOOP]] can use the same DO WHILE condition to get the same results.
-* WHILE loops only run if the WHILE condition is True.
-
-
-{{RelationalTable}}
-
-
-{{PageExamples}}
-''Example 1:'' Reading an entire file. Example assumes the program has a [[OPEN|file opened]] as #1
-
-{{CodeStart}}
-{{Cl|OPEN}} "Readme.txt" FOR {{Cl|INPUT (file mode)|INPUT}} AS #1
-{{Cl|WHILE...WEND|WHILE}} {{Cl|NOT}} {{Cl|EOF}}(1)
- {{Cl|_LIMIT}} 1 'limit line prints to one per second
- {{Cl|LINE INPUT (file statement)|LINE INPUT #}}1, text$
- IF {{Cl|INKEY$}} = {{Cl|CHR$}}(27) THEN {{Cl|EXIT}} {{Cl|WHILE}} 'ESC key exits
- {{Cl|PRINT}} text$
-{{Cl|WEND}}
-{{CodeEnd}}
-
-''Example 2:'' Clearing the keyboard buffer.
-{{CodeStart}}
-{{Cl|WHILE}} {{Cl|INKEY$}} <> "" : {{Cl|WEND}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[DO...LOOP]]
-* [[FOR...NEXT]]
-* [[UNTIL]] (condition)
-* [[_CONTINUE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/WHILE_11111.txt b/internal/help/WHILE_11111.txt
deleted file mode 100644
index c5488845c..000000000
--- a/internal/help/WHILE_11111.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:41}}
-See page [[WHILE...WEND]]
diff --git a/internal/help/WIDTH_11111.txt b/internal/help/WIDTH_11111.txt
deleted file mode 100644
index 7bcda7a4f..000000000
--- a/internal/help/WIDTH_11111.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:43}}
-The {{KW|WIDTH}} statement changes the text dimensions of certain {{KW|SCREEN (statement)|SCREEN}} modes.
-
-
-== ''SCREEN'' Syntax ==
-::: '''WIDTH''' ['''{{Parameter|columns%}}'''][''', {{Parameter|rows%}}''']
-
-== ''File'' Syntax ==
-::: '''WIDTH''' {'''''file_number''''' | '''''device'''''}, '''''columnwidth%'''''
-
-
-{{Parameters}}
-* When parameters are not specified, columns defaults to 80 with 25 (30 in [[SCREEN]] 11 or 12) rows.
-
-
-''Usage:''
-* WIDTH should be used AFTER a program SCREEN statement! It does not affect screen graphics or graphic coordinates.
-* Affects SCREEN 0 Window size and alters the text block size of each screen mode listed in QBasic:
-:* SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is WIDTH 80, 25.
-:* SCREEN 9 can use 80 columns and 25 or 43(not supported on many monitors) rows. Default WIDTH 80, 25 fullscreen.
-:* SCREEN 10 can use 80 columns and 25 or 43 rows. Default is WIDTH 80, 25 fullscreen.
-:* SCREEN 11 and 12 can use 80 columns and 30 or 60 rows. Default is WIDTH 80, 30 fullscreen.
-* '''QB64''' can alter all [[SCREEN]] mode widths and heights which may also affect text or [[_FONT]] block sizes.
-* If a [[$CONSOLE]] window is active and you set [[_DEST]] [[_CONSOLE]], WIDTH will affect the console output window size (Windows only).
-* '''Note:''' WIDTH changes may change screen color settings in QBasic. Use [[PALETTE]] to reset to default colors.
-*'''[[Keywords currently not supported by QB64|WIDTH LPRINT is not supported in QB64.]]'''
-
-
-{{PageSeeAlso}}
-* [[SCREEN]], [[COLOR]], [[OUT]]
-* [[_PRINTWIDTH]] {{text|(function)}}
-* [[_WIDTH (function)]], [[_HEIGHT]] {{text|(function)}}
-* [[_FONT]], [[_FONTWIDTH]], [[_FONTHEIGHT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/WINDOW_111111.txt b/internal/help/WINDOW_111111.txt
deleted file mode 100644
index ef61ae601..000000000
--- a/internal/help/WINDOW_111111.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:45}}
-The '''WINDOW''' command scales the graphics coordinate system of the current [[_DEST]] image, optionally inverting the direction of the vertical axis. Any coordinates used in drawing commands made to the image are scaled such that the image seems have have the dimensions requested.
-
-{{PageSyntax}}
-: '''WINDOW''' [ [ '''SCREEN'''] (''x1!'', ''y1!'') - (''x2!'', ''y2!'')]
-
-{{PageParameters}}
-Where (''x1!'', ''y1!'')-(''x2!'', ''y2!'') specifies the new dimensions of the image to scale to. Non-integer values may be used.
-Using '''WINDOW''' with no parameters reverts the effect of any previous calls to it.
-
-{{PageDescription}}
-When a command such as [[LINE]], [[CIRCLE]] or [[_PUTIMAGE]] needs a position in an image specified, it is given as a combination of x (horizontal) and y (vertical) coordinates. Usually these values are measured as pixels from the top-left origin. The '''WINDOW''' command changes the way these values are measured. This is best illustrated with an example:
-{{TextStart}}
-{{Cb|SCREEN}} {{Cb|_NEWIMAGE}}(600, 600, 32) '600 pixels in x and y directions and displayed on screen
-{{Cb|WINDOW}} {{Cb|SCREEN}} (0, 0)-(6, 6)
-{{TextEnd}}
-The coordinates of the image now run from 0 to 6 in both the x and y directions. The centre of the screen is now referred to as (3, 3) and the bottom-right corner of the screen is (6, 6). The image has not actually just changed size or the number of pixels, just the way the program refers to positions on the image. Despite this example, there is no requirement for the image or scaling coordinates to be square; each direction is scaled independently, and can result in commands such as LINE (0, 0)-(10, 10), , BF drawing a rectangle instead of a square.
-
-If the '''SCREEN''' part is omitted, the y axis is inverted. Thus the origin is now at the bottom-left, and y coordinates increase as you move up the screen. Such a system may be more familiar to mathematically-oriented programmers.
-
-'''WINDOW''' does not change any of the content already on the image; it only modifies coordinates used while it is in effect. The scaling is relative to the original image, so successive invocations do not compound upon each other.
-
-Although '''WINDOW''' affects all coordinates, it does not affect all graphics operations entirely. [[_PUTIMAGE]], if only given one destination coordinate, will not scale or stretch the image being drawn. [[CIRCLE]] will scale its radius such that it matches the horizontal axis. This means it always draws perfect circles even if the scaling of the two axes are not the same, but the radius measured against the vertical scale may not be correct.
-
-The location of the graphics cursor (used to calculate relative positions for STEP) is not affected. It will remain in the same position on the image, but the relative coordinates that are specified with STEP will be scaled as described above.
-
-{{PageExamples}}
-Demonstrate a circle's radius only matching the scaling in the horizontal direction by comparing against a box:
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) 'Not a square image
-{{Cl|WINDOW}} {{Cl|SCREEN}} (0, 0)-(10, 10) 'SCREEN keeps the axis direction the same
-{{Cl|LINE}} (4, 4)-(6, 6), {{Cl|_RGB32}}(255, 0, 0), BF 'Red square centred on (5, 5); will be stretched into a rectangle
-{{Cl|CIRCLE}} (5, 5), 1, {{Cl|_RGB32}}(0, 255, 0) 'Green circle at (5, 5) with radius 1
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[PMAP]]
-* [[VIEW]]
-* [[VIEW PRINT]]
-
-{{PageNavigation}}
diff --git a/internal/help/WRITE_(file_statement)_11111_(0000_000000000).txt b/internal/help/WRITE_(file_statement)_11111_(0000_000000000).txt
deleted file mode 100644
index 871a4fb31..000000000
--- a/internal/help/WRITE_(file_statement)_11111_(0000_000000000).txt
+++ /dev/null
@@ -1,65 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:47}}
-The [[WRITE (file statement)|WRITE #]] file statement writes a list of comma separated variable values to a sequential file or port.
-
-
-{{PageSyntax}}
-:{{KW|WRITE (file statement)|WRITE #}}{{Parameter|filenumber&}}[, {{Parameter|expressionList}}]
-
-
-{{PageDescription}}
-* {{Parameter|filenumber&}} is the number of the file or device {{KW|OPEN}}ed in the {{KW|OUTPUT}} or {{KW|APPEND}} modes. See: {{KW|FREEFILE}}.
-* {{Parameter|expressionList}} is a comma-separated list of values to be written to the file or device.
-* WRITE can place any number and types of variable values needed in a file record separated by commas.
-* String values will have quotation marks although quotes are not required to read strings in CSV files with [[INPUT (file statement)|INPUT]] #.
-* Data files using WRITE normally will have the same number of values listed on each file line.
-* Data containing commas must be in quotation marks. Number commas are illegal!
-* WRITE created files are normally read with INPUT #.
-* CSV files created can be read by Excel using a .CSV file name extension. Strings may or may not include quotation marks.
-* [[Semicolon]]s cannot be used in or following the WRITE statement!
-
-
-''Example:'' Writes new data to a text file sequentially and reads it back to the program screen.
-{{CodeStart}}
-filename$ = "testfile.dat"
-x = 1: y = 2: z$ = "Three"
-
-{{Cl|OPEN}} filename$ {{Cl|FOR...NEXT|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #1 'opens and clears an existing file or creates new empty file
-
-{{Cl|WRITE (file statement)|WRITE}} #1, x, y, z$
-
-{{Cl|CLOSE}} #1
-
-{{Cl|PRINT}} "File created with data. Press a key!"
-
-K$ = {{Cl|INPUT$}}(1) 'press a key
-
-{{Cl|OPEN}} filename$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #2 'opens a file to read it
-
-{{Cl|INPUT (file statement)|INPUT}} #2, a, b, c$
-
-{{Cl|CLOSE}} #2
-
-{{Cl|PRINT}} a, b, c$
-{{Cl|WRITE}} a, b, c$
-
-{{Cl|END}}
-{{CodeEnd}}
-: ''File content:'' [[WRITE]] string values will include quotation marks, but they are not required to read the file.
-{{TextStart}}
-1,2,"Three"
-{{TextEnd}}
-: ''Screen output:'' [[PRINT]] string values will not display enclosing quotes. [[WRITE]] screen displays will.
-{{OutputStart}} 1 2 Three
-1,2,"Three"
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[PRINT (file statement)|PRINT #]]
-* [[INPUT (file statement)|INPUT #]]
-* [[LINE INPUT (file statement)|LINE INPUT #]]
-* [[SQL Client]] {{text|(library)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/WRITE_11111.txt b/internal/help/WRITE_11111.txt
deleted file mode 100644
index b2fae9481..000000000
--- a/internal/help/WRITE_11111.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:46}}
-The {{KW|WRITE}} statement writes a [[comma]]-separated list of values to the screen without spacing.
-
-
-{{PageSyntax}}
-:{{KW|WRITE}} [{{Parameter|expression, List}}]
-
-
-{{PageDescription}}
-* {{Parameter|expressionList}} is a comma-separated list of variable or literal values to be written to the screen.
-* Write statement separates displayed values using [[comma]] separators(required) that will display on the screen.
-* Leading and trailing number spaces are omitted when displaying numerical values.
-* [[STRING|String]] [[quotation mark]]s will also be displayed.
-* [[Semicolon]]s cannot be used in or following the WRITE statement!
-
-
-''Example:'' Comparing WRITE to the same PRINT statement.
-{{CodeStart}}a% = 123
-b$ = "Hello"
-c! = 3.1415
-
-{{Cl|PRINT}} a%, b$, c! 'commas display tab spaced data
-{{Cl|WRITE}} a%, b$, c! 'displays commas between values, strings retain end quotes
-{{CodeEnd}}
-{{OutputStart}}
-123 Hello 3.1415
-123,"Hello",3.1415
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[WRITE (file statement)|WRITE #]]
-* [[INPUT (file statement)|INPUT #]]
-* [[PRINT]], [[PRINT (file statement)|PRINT #]]
-* [[PRINT USING]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/XOR_111.txt b/internal/help/XOR_111.txt
deleted file mode 100644
index f095b7c38..000000000
--- a/internal/help/XOR_111.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:48}}
-Bitwise operators are much like the regular mathematics operators (+, * etc.) but are defined in terms of the individual bits of their operands. The full list of bitwise operators, with a brief summary of its operation:
-* '''AND''': True if both inputs are true
-* '''OR''': True if one or both inputs are true
-* '''NOT''': Invert all bits
-* '''XOR''': True if exactly one input is true
-* '''IMP''': True if both inputs are the same
-* '''EQV''': True unless first input is true and second is false
-
-{{PageSyntax}}
-With the exception of NOT, all the bitwise operators take two operands:
-: ''result'' = ''value1'' '''AND''' ''value2''
-NOT goes before the value it operates on:
-: ''result'' = '''NOT''' ''value1''
-If ''value1'' or ''value2'' are non-integer numeric types, they are rounded to the nearest integer.
-
-{{PageDescription}}
-Bitwise operators work by comparing the corresponding bits in each of the input values to generate a single bit in the output value. The operators differ in how they do the comparison. The table below shows the output bit for each pair of input bits:
-{{LogicalTruthTable}}
-Again, note that the NOT operator only has one operand. It is shown in the same table for convenience.
-
-If one input has more bits than the other (say, an INTEGER vs a LONG) the shorter will be considered to have 0's in the missing bit positions if it is positive, or 1's if it is negative. This scheme comes about because of the [[wikipedia:Two's_complement|Two's Complement]] system for representing negative numbers. As a general rule, there should not be any surprises.
-
-=== Use as logical operators ===
-QB64 does not have AND/OR/NOT operators dedicated to operating on the overall truth of values. A numeric value is defined to be ''false'' if it is equal to 0, and ''true'' for any other value, though -1 is the standard ''true'' value, returned by the <, <= etc. operators. One can use the bitwise operators mostly like regular logical operators, but with caution. For instance, 3 is a true value, so as a logical operator NOT 3 would be 0 (false). Because it is in fact a bitwise operator, it evaluates to -4.
-
-{{PageExamples}}
-;Example 1:Use '''AND''' to mask certain bits in a value. In this example, the 1's in the mask (y&) specify which bits in (x&) we are interested in, forcing all others to 0.
-{{CodeStart}}
-x& = VAL("&B101010") 'Arbitrary collection of bits
-y& = VAL("&B001100") 'A bit mask
-PRINT "Input 1: "; BIN$(x&, 6) '6 indicates we want 6 bits of output
-PRINT "Input 2: "; BIN$(y&, 6)
-PRINT "Output: "; BIN$(x& AND y&, 6)
-
-'Converts the number n& to a string of binary digits, digits& long (padding or truncating as necessary).
-FUNCTION BIN$ (n&, digits&)
- FOR i& = digits& - 1 TO 0 STEP -1
- IF (n& AND 2 ^ i&) THEN B$ = B$ + "1" ELSE B$ = B$ + "0"
- NEXT
- BIN$ = B$
-END FUNCTION
-{{CodeEnd}}
-{{OutputStart}}
-Input 1: 101010
-Input 2: 001100
-Output: 001000
-{{OutputEnd}}
-
-;Example 2:Use '''OR''' to combine bit flags into a single value. The presence of a flag can then be tested by using the flag as a mask with '''AND'''.
-{{CodeStart}}
-'The trick here is to give each flag a value corresponding to a different bit being 1
-FLAG_A& = VAL("&B0001")
-FLAG_B& = VAL("&B0010")
-FLAG_C& = VAL("&B0100")
-FLAG_D& = VAL("&B1000")
-
-flags& = FLAG_A& OR FLAG_C& 'Set flags A, C
-
-'Use each flag as a bitmask to test for its presence:
-IF flags& AND FLAG_A& THEN PRINT "Flag A is set"
-IF flags& AND FLAG_B& THEN PRINT "Flag B is set"
-IF flags& AND FLAG_C& THEN PRINT "Flag C is set"
-IF flags& AND FLAG_D& THEN PRINT "Flag D is set"
-{{CodeEnd}}
-{{OutputStart}}
-Flag A is set
-Flag C is set
-{{OutputEnd}}
-
-;Example 3:Use '''XOR''' to toggle a bit flag (that is, change its state to the opposite of what it was). This example is the same as the '''OR''' example above, but with one extra line added. This time we enable flags A & C, then toggle flags A & B. This will disable flag A and enable B.
-{{CodeStart}}
-'The trick here is to give each flag a value corresponding to a different bit being 1
-FLAG_A& = VAL("&B0001")
-FLAG_B& = VAL("&B0010")
-FLAG_C& = VAL("&B0100")
-FLAG_D& = VAL("&B1000")
-
-flags& = FLAG_A& OR FLAG_C& 'Set flags A, C
-flags& = flags& XOR FLAG_A& XOR FLAG_B& 'Toggle flags A, B
-
-'Use each flag as a bitmask to test for its presence:
-IF flags& AND FLAG_A& THEN PRINT "Flag A is set"
-IF flags& AND FLAG_B& THEN PRINT "Flag B is set"
-IF flags& AND FLAG_C& THEN PRINT "Flag C is set"
-IF flags& AND FLAG_D& THEN PRINT "Flag D is set"
-{{CodeEnd}}
-{{OutputStart}}
-Flag B is set
-Flag C is set
-{{OutputEnd}}
-
-{{PageNavigation}}
diff --git a/internal/help/^_^.txt b/internal/help/^_^.txt
deleted file mode 100644
index a774fddf5..000000000
--- a/internal/help/^_^.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:54:10}}
-The '''^''' operation raises a numerical value to an exponential value expressing how many times the value is multiplied by itself.
-
-
-{{PageSyntax}}
-::'' return_value = number '''^''' {whole_exponent|(fractional_exponent)}
-
-
-{{PageDescription}}
-
-* The number value can be any type literal or variable numerical value.
-* Exponents can be any positive or negative integer or fractional numerical value inside of parenthesis brackets.
-* If the exponent is zero, the value returned is 1.
-* Fractional(or decimal point) exponents MUST be enclosed in '''() brackets''' and will return the fractional exponential root of a value.
-* Exponential operations are done first in the QBasic order of operations.
-* The square root of a number can be returned by the [[SQR]] function or by using an exponent of (1 [[/]] 2). Brackets required.
-* Values returned may be expressed using exponential or [[Scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision.
-* WARNING: Exponential returns may exceed numerical type limitations and create an [[ERROR Codes|overflow error]]!
-
-
-''Example:'' Getting the cube root of a number.
-
-{{CodeStart}}
-
- {{Cl|INPUT}} "Enter a number to calculate it's cube root: ", num$
- number! = {{Cl|VAL}}(num$) 'gets single number value
- cuberoot# = number! {{Cl|^}} (1 {{Cl|/}} 3)
- PRINT cuberoot# 'double type variable for accuracy
-
-{{CodeEnd}}
-
-''Details:'' The value returned will most likely be a [[SINGLE]] or [[DOUBLE]] value. Make sure that the return variable type matches the likely program operations!
-
-{{OutputStart}}
-
-Enter a number to calculate it's cube root: 144
-5.241482788417793
-
-{{OutputEnd}}
-
-
-
-
-''See also:''
-
-[[SQR]], [[Mathematical Operations]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ACCEPTFILEDROP__11111111111111.txt b/internal/help/_ACCEPTFILEDROP__11111111111111.txt
deleted file mode 100644
index 4ad416ca1..000000000
--- a/internal/help/_ACCEPTFILEDROP__11111111111111.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:35:58}}
-{{DISPLAYTITLE:_ACCEPTFILEDROP}}
-The [[_ACCEPTFILEDROP]] statement prepares a program window to receive files dropped from Windows Explorer in a drag/drop operation.
-
-
-{{PageSyntax}}
-: [[_ACCEPTFILEDROP]] [{ON|OFF}]
-
-
-{{PageDescription}}
-* Calling the statement with no parameters turns drag/dropping ON.
-* To know when files have been dropped into your program's window, check that [[_TOTALDROPPEDFILES]] is greater than 0.
-* Use [[_DROPPEDFILE]] to read the list, either sequentially or by index.
-* If using [[_DROPPEDFILE]] with an index, you must call [[_FINISHDROP]] after you finish working with the list.
-* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''.
-
-
-==Availability==
-* '''Version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example:'' Accepting files dragged from a folder and processing the list received sequentially.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(128, 25, 0)
-
-{{Cl|_ACCEPTFILEDROP}} 'enables drag/drop functionality
-{{Cl|PRINT}} "Drag files from a folder and drop them in this window..."
-
-{{Cl|DO}}
- {{Cl|IF}} {{Cl|_TOTALDROPPEDFILES}} {{Cl|THEN}}
- {{Cl|FOR}} i = 1 {{Cl|TO}} {{Cl|_TOTALDROPPEDFILES}}
- a$ = {{Cl|_DROPPEDFILE}} 'reads the list sequentially; when the result is empty ("") it means the list is over
- {{Cl|COLOR}} 15
- {{Cl|PRINT}} i,
- {{Cl|IF}} {{Cl|_FILEEXISTS}}(a$) {{Cl|THEN}}
- {{Cl|COLOR}} 2: {{Cl|PRINT}} "file",
- {{Cl|ELSE}}
- {{Cl|IF}} {{Cl|_DIREXISTS}}(a$) {{Cl|THEN}}
- {{Cl|COLOR}} 3: {{Cl|PRINT}} "folder",
- {{Cl|ELSE}}
- {{Cl|COLOR}} 4: {{Cl|PRINT}} "not found", 'highly unlikely, but who knows?
- {{Cl|END IF}}
- {{Cl|END IF}}
- {{Cl|COLOR}} 15
- {{Cl|PRINT}} a$
- {{Cl|NEXT}}
- {{Cl|END IF}}
-
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_TOTALDROPPEDFILES]], [[_DROPPEDFILE]], [[_FINISHDROP]]
-* [[_FILEEXISTS]], [[_DIREXISTS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ACOSH__11111.txt b/internal/help/_ACOSH__11111.txt
deleted file mode 100644
index 9d4defd23..000000000
--- a/internal/help/_ACOSH__11111.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:00}}
-{{DISPLAYTITLE:_ACOSH}}
-The [[_ACOSH]] returns the nonnegative arc hyperbolic cosine of {{Parameter|x!}}, expressed in radians.
-
-
-{{PageSyntax}}
-: {{Parameter|return_value!}} = [[_ACOSH]]({{Parameter|x!}})
-
-{{PageSeeAlso}}
-* [[_D2G]] {{text|(degree to gradient}}, [[_D2R]] {{text|(degree to radian)}}
-* [[_G2D]] {{text|(gradient to degree)}}, [[_G2R]] {{text|(gradient to degree)}}
-* [[_R2D]] {{text|(radian to degree)}}, [[_R2G]] {{text|(radian to gradient)}}
-* [[COS]] {{text|(cosine)}}, [[SIN]] {{text|(sine)}}, [[TAN]] {{text|(tangent)}}
-* [[_ACOS]] {{text|(arc cosine)}}, [[_ASIN]] {{text|(arc sine)}}, [[ATN]] {{text|(arc tangent)}}
-* [[_ASINH]] {{text|(arc hyperbolic sine)}}, [[_ATANH]] {{text|(arc hyperbolic tangent)}}
-* [[_ATAN2]] {{text|(Compute arc tangent with two parameters)}}
-* [[_HYPOT]] {{text|(hypotenuse)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_ACOS__1111.txt b/internal/help/_ACOS__1111.txt
deleted file mode 100644
index d51067ed1..000000000
--- a/internal/help/_ACOS__1111.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:35:59}}
-{{DISPLAYTITLE:_ACOS}}
-The [[_ACOS]] function returns the angle measured in radians based on an input [[COS]]ine value ranging from -1 to 1.
-
-
-{{PageSyntax}}
-: {{Parameter|radian_angle!}} = [[_ACOS]]({{Parameter|cosine_value!}})
-
-{{PageDescription}}
-* The ''cosine_value!'' must be measured >= -1 and <= 1, or an error will be generated. (PRINT _ACOS(1.2) would give the result of -1.#IND, which is basically QB64's way of telling us that the number doesn't exist, much like 1/0 would.)
-* ARCCOSINE is the inverse function of [[COS]]ine, which lets us turn a [[COS]]ine value back into an angle.
-* Note: Due to rounding with floating point math, the _ACOS may not always give a perfect match for the COS angle which generated this. You can reduce the number of rounding errors by increasing the precision of your calculations by using [[DOUBLE]] or [[_FLOAT]] precision variables instead of [[SINGLE]].
-
-
-==Availability==
-* '''Version 1.000 and up.'''
-
-
-{{PageExamples}}
-''Example:'' Converting a radian angle to its COSine and using that value to find the angle in degrees again using _ACOS:
-{{CodeStart}}
-{{Cl|DEFDBL}} A-Z
-
-{{Cl|INPUT}} "Give me an Angle (in Degrees) => "; Angle
-{{Cl|PRINT}}
-C = {{Cl|COS}}({{Cl|_D2R}}(Angle)) '_D2R is the command to convert Degrees to Radians, which is what COS expects
-{{Cl|PRINT}} "The COSINE of the Angle is: "; C
-A = {{Cl|_ACOS}}(C)
-{{Cl|PRINT}} "The ACOS of "; C; " is: "; A
-{{Cl|PRINT}} "Notice, A is the Angle in Radians. If we convert it to degrees, the value is "; {{Cl|_R2D}}(A)
-{{CodeEnd}}
-{{small|Example by SMcNeill}}
-{{OutputStart}}
-Give me an Angle (in Degrees) => ? 60
-
-The COSINE of the Angle is: .5000000000000001
-The ACOS of .5000000000000001 is: 1.047197551196598
-Notice, A is the Angle in Radians. If we convert it to degrees, we discover the value is 60
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]] {{text|(degree to gradient}}, [[_D2R]] {{text|(degree to radian)}}
-* [[_G2D]] {{text|(gradient to degree)}}, [[_G2R]] {{text|(gradient to degree}}
-* [[_R2D]] {{text|(radian to degree)}}, [[_R2G]] {{text|(radian to gradient}}
-* [[COS]] {{text|(cosine)}}, [[SIN]] {{text|(sine)}}, [[TAN]] {{text|(tangent)}}
-* [[_ASIN]] {{text|(arc sine)}}, [[ATN]] {{text|(arc tangent)}}
-* [[_ACOSH]] {{text|(arc hyperbolic cosine)}}, [[_ASINH]] {{text|(arc hyperbolic sine)}}, [[_ATANH]] {{text|(arc hyperbolic tangent)}}
-* [[_ATAN2]] {{text|(Compute arc tangent with two parameters)}}
-* [[_HYPOT]] {{text|(hypotenuse)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
-
-Templates used on this page:
-
-Template:Cl (view source)
-Template:CodeEnd (view source)
-Template:CodeStart (view source)
-Template:OutputEnd (view source)
-Template:OutputStart (view source)
-Template:PageDescription (view source)
-Template:PageExamples (view source)
-Template:PageNavigation (view source)
-Template:PageSeeAlso (view source)
-Template:PageSyntax (view source)
-Template:Parameter (view source)
-Template:Small (view source)
-Template:Text (view source)
-Return to ACOS.
-
-Navigation menu
-Log inPageDiscussionReadView sourceView historySearch
-Search QB64 Wiki
-Main page
-Recent changes
-Random page
-Help about MediaWiki
-Tools
-What links here
-Related changes
-Special pages
-Page information
-Privacy policyAbout QB64 WikiDisclaimersPowered by MediaWiki
diff --git a/internal/help/_ALLOWFULLSCREEN__111111111111111.txt b/internal/help/_ALLOWFULLSCREEN__111111111111111.txt
deleted file mode 100644
index 3a5ccab93..000000000
--- a/internal/help/_ALLOWFULLSCREEN__111111111111111.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:01}}
-{{DISPLAYTITLE:_ALLOWFULLSCREEN}}
-The [[_ALLOWFULLSCREEN]] statement allows setting the behavior of the ALT+ENTER combo.
-
-
-{{PageSyntax}}
-: [[_ALLOWFULLSCREEN]] [{_STRETCH|_SQUAREPIXELS|OFF|_ALL}][, {_SMOOTH|OFF|_ALL}]
-
-
-{{PageDescription}}
-* Calling the statement with no parameters enables all four possible full screen modes (and is the default state when a program is started): both [[_STRETCH]] ([[_SMOOTH]] and [[_OFF]]) and [[_SQUAREPIXELS]] ([[_SMOOTH]] and [[_OFF]]).
-** Using [[_ALLOWFULLSCREEN]] [[_ALL]], [[_ALL]] has the same effect.
-* [[_ALLOWFULLSCREEN]] only affects the behavior of ALT+ENTER. The [[_FULLSCREEN]] statement is not bound by [[_ALLOWFULLSCREEN]]'s settings so all modes can be accessed programmatically.
-* To limit just the mode but allow both _SMOOTH + _OFF antialiasing modes, pass just the first parameter: ''Example:'' [[_ALLOWFULLSCREEN]] _SQUAREPIXELS
-* To allow multiple modes with _SMOOTH or _OFF as default, pass just the second parameter. ''Example:'' [[_ALLOWFULLSCREEN]] , _SMOOTH
-* Any possible permutation of the parameters is allowed.
-* With [[_ALLOWFULLSCREEN]] _OFF you can trap Alt+Enter manually in your program and reassign it. See example 2 below.
-
-
-==Availability==
-* '''Version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example 1:'' Allowing only one fullscreen mode with square pixels and no antialiasing:
-{{CodeStart}}
-{{Cl|_ALLOWFULLSCREEN}} {{Cl|_SQUAREPIXELS}}, {{Cl|OFF}}
-{{CodeEnd}}
-
-
-''Example 2:'' Disabling _FULLSCREEN with Alt+ENTER so the combo can be manually trapped:
-{{CodeStart}}
-{{Cl|DO}}
- {{Cl|CLS}}
-
- {{Cl|LOCATE}} 7
- {{Cl|PRINT}} " - Press ALT+ENTER to test trapping the combo..."
- {{Cl|PRINT}} " _ Press SPACEBAR to allow fullscreen again..."
-
- k& = {{Cl|_KEYHIT}}
-
- {{Cl|IF}} k& = 13 {{Cl|THEN}}
- {{Cl|IF}} {{Cl|_KEYDOWN}}(100307) {{Cl|OR}} {{Cl|_KEYDOWN}}(100308) {{Cl|THEN}}
- altEnter = altEnter + 1
- {{Cl|END IF}}
- {{Cl|ELSEIF}} k& = 32 {{Cl|THEN}}
- fullscreenEnabled = {{Cl|NOT}} fullscreenEnabled
- {{Cl|END IF}}
-
- {{Cl|LOCATE}} 14
- {{Cl|IF}} fullscreenEnabled {{Cl|THEN}}
- {{Cl|_ALLOWFULLSCREEN}} {{Cl|_ALL}}, {{Cl|_ALL}}
- altEnter = 0
- {{Cl|PRINT}} "_ALLOWFULLSCREEN _ALL, _ALL"
-
- {{Cl|LOCATE}} 18
- {{Cl|PRINT}} "ALT+ENTER will trigger all four fullscreen modes now."
- {{Cl|ELSE}}
- {{Cl|_ALLOWFULLSCREEN}} {{Cl|OFF}}
- {{Cl|PRINT}} "_ALLOWFULLSCREEN OFF"
- {{Cl|END IF}}
-
- {{Cl|IF}} altEnter {{Cl|THEN}}
- {{Cl|LOCATE}} 18
- {{Cl|PRINT}} "ALT+ENTER manually trapped"; altEnter; "times."
- {{Cl|END IF}}
-
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-{{PageSeeAlso}}
-* [[_FULLSCREEN]], [[_SMOOTH (function)]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ALPHA32__1111132.txt b/internal/help/_ALPHA32__1111132.txt
deleted file mode 100644
index bb213ec3c..000000000
--- a/internal/help/_ALPHA32__1111132.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:04}}
-{{DISPLAYTITLE:_ALPHA32}}
-The [[_ALPHA32]] function returns the alpha transparency level of a 32 bit color value.
-
-
-{{PageSyntax}}
-:{{Parameter|alpha&}} = [[_ALPHA32]]({{Parameter|color32~&}})'''
-
-{{Parameters}}
-* {{Parameter|color32&}} is the [[_UNSIGNED]] [[LONG]] 32 bit color value used to retrieve the alpha level.
-** Color values that are set as a [[_CLEARCOLOR]] always have an alpha level of 0 (transparent).
-** [[_SETALPHA]] can set any alpha level from 0 (or fully transparent) to 255 (or opaque).
-** Normal color values that are set by [[_RGB]] or [[_RGB32]] always have an alpha level of 255 (opaque).
-
-
-{{PageDescription}}
-* In 4-bit (16 colors) or 8-bit (256 colors) palette screens the function will return 0.
-* [[_RED32]], [[_GREEN32]], [[_BLUE32]] and [[_ALPHA32]] are all equivalent to [[_RED]], [[_GREEN]], [[_BLUE]] and [[_ALPHA]] but they are highly optimized and only accept a 32-bit color (RGBA) value. Using these in your code (opposed to dividing then ANDing 32-bit color values) makes code easy to read.
-* '''NOTE: 32 bit [[_NEWIMAGE]] screen page backgrounds are transparent black or [[_ALPHA]] 0. Use [[_DONTBLEND]] or [[CLS]] for opaque!'''
-
-
-{{PageExamples}}
-''Example:'' Finding the alpha transparency level in a 32 bit screen using an [[_RGBA]] [[_UNSIGNED]] [[LONG]] color value.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-
-clr~& = {{Cl|_RGBA}}(255, 0, 255, 192)
-{{Cl|PRINT}} "Color:"; clr~&
-
-{{Cl|COLOR}} clr~&
-{{Cl|PRINT}} "Alpha32:"; {{Cl|_ALPHA32}}(clr~&)
-
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}{{text|Color: 3237937407|#FFFFFF}}
-{{text|Alpha32: 192|#FF00FF}}
-{{OutputEnd}}
-: ''Notes:'' The color value is equivalent to [[&H|hexadecimal]] &HC0FF00FF where &HC0 equals 192. [[_RGB]] alphas are always &HFF(255).
-
-
-{{PageSeeAlso}}
-* [[_ALPHA]], [[_SETALPHA]]
-* [[_RGBA]], [[_RGBA32]] {{text|(set color with alpha)}}
-* [[_RED]], [[_GREEN]], [[_BLUE]]
-* [[_RED32]], [[_GREEN32]]. [[_BLUE32]]
-* [[_CLEARCOLOR]], [[_CLEARCOLOR (function)]]
-* [[Images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ALPHA__11111.txt b/internal/help/_ALPHA__11111.txt
deleted file mode 100644
index 55e34f0d3..000000000
--- a/internal/help/_ALPHA__11111.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:03}}
-{{DISPLAYTITLE:_ALPHA}}
-The [[_ALPHA]] function returns the alpha channel transparency level of a color value used on a screen page or image.
-
-
-{{PageSyntax}}
-:{{Parameter|result&}} = [[_ALPHA]]({{Parameter|color~&}} [, {{Parameter|imageHandle&}}])
-
-
-{{PageDescription}}
-* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current write page. Invalid handles will create [[ERROR Codes|Illegal function call]] errors.
-* [[_NEWIMAGE]] 32 bit [[SCREEN]] modes will always use an [[_UNSIGNED]] [[LONG]] ''color~&'' value.
-** Color values that are set as a [[_CLEARCOLOR]] always have an alpha level of 0 (transparent).
-** [[_SETALPHA]] can set any alpha level from 0 (or fully transparent) to 255 (or opaque).
-** Normal color values that are set by [[_RGB]] or [[_RGB32]] always have an alpha level of 255(opaque).
-* In 4 (16 color) or 8 (256 color) bit palette screens the function will always return 255.
-*[[_RED32]], [[_GREEN32]], [[_BLUE32]] and [[_ALPHA32]] are all equivalent to [[_RED]], [[_GREEN]], [[_BLUE]] and [[_ALPHA]] but they are highly optimized and only accept a 32-bit color (B8:G8:R8:A8). Using them (opposed to dividing then ANDing 32-bit color values manually) makes code easy to read.
-* '''NOTE: 32 bit [[_NEWIMAGE]] screen page backgrounds are transparent black or [[_ALPHA]] 0. Use [[_DONTBLEND]] or [[CLS]] for opaque.'''
-
-
-{{PageExamples}}
-''Example 1:'' Alpha transparency levels are always 255 in 4 or 8 bit screen modes.
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-
-clr~& = {{Cl|_RGBA}}(255, 0, 255, 192) 'returns closest palette color attribute
-{{Cl|PRINT}} "Color:"; clr~&
-
-{{Cl|COLOR}} clr~&
-{{Cl|PRINT}} "Alpha:"; {{Cl|_ALPHA}}(clr~&)
-
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}{{text|Color 36|#FFFFFF}}
-{{text|Alpha: 255|#FF00FF}}
-{{OutputEnd}}
-: ''Explanation:'' [[_RGBA]] cannot change the [[_ALPHA]] level. [[_ALPHA32]] would return 0 on any non-32 bit image or page.
-
-
-''Example 2:'' Finding the transparency of a 32 bit screen mode's background before and after [[CLS]].
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-BG& = {{Cl|POINT}}(1, 1)
-{{Cl|PRINT}} "Alpha ="; {{Cl|_ALPHA}}(BG&); "Press a key to use CLS!"
-K$ = INPUT$(1)
-{{Cl|CLS}}
-BG& = {{Cl|POINT}}(1, 1)
-{{Cl|PRINT}} "CLS Alpha ="; {{Cl|_ALPHA}}(BG&)
-{{CodeEnd}}
-{{OutputStart}}CLS Alpha = 255 {{OutputEnd}}
-: ''Explanation:'' Set the ALPHA value to 255 using [[CLS]] to make the background opaque when overlaying pages.
-
-
-{{PageSeeAlso}}
-* [[_ALPHA32]], [[_SETALPHA]]
-* [[_RGBA]], [[_RGBA32]] {{text|(set color with alpha)}}
-* [[_CLEARCOLOR]], [[_CLEARCOLOR (function)]]
-* [[_RED]], [[_GREEN]], [[_BLUE]]
-* [[_RED32]], [[_GREEN32]]. [[_BLUE32]]
-* [[CLS]], [[COLOR]], [[Images]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_ASINH__11111.txt b/internal/help/_ASINH__11111.txt
deleted file mode 100644
index 4d6305436..000000000
--- a/internal/help/_ASINH__11111.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:07}}
-{{DISPLAYTITLE:_ASINH}}
-The [[_ASINH]] returns the arc hyperbolic sine of x, expressed in radians.
-
-
-{{PageSyntax}}
-: {{Parameter|return_value!}} = [[_ASINH]]({{Parameter|x!}})
-
-
-{{PageSeeAlso}}
-* [[_D2G]] {{text|(degree to gradient}}, [[_D2R]] {{text|(degree to radian)}}
-* [[_G2D]] {{text|(gradient to degree)}}, [[_G2R]] {{text|(gradient to degree)}}
-* [[_R2D]] {{text|(radian to degree)}}, [[_R2G]] {{text|(radian to gradient)}}
-* [[COS]] {{text|(cosine)}}, [[SIN]] {{text|(sine)}}, [[TAN]] {{text|(tangent)}}
-* [[_ACOS]] {{text|(arc cosine)}}, [[_ASIN]] {{text|(arc sine)}}, [[ATN]] {{text|(arc tangent)}}
-* [[_ACOSH]] {{text|(arc hyperbolic cosine)}}, [[_ATANH]] {{text|(arc hyperbolic tangent)}}
-* [[_ATAN2]] {{text|(Compute arc tangent with two parameters)}}
-* [[_HYPOT]] {{text|(hypotenuse)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ASIN__1111.txt b/internal/help/_ASIN__1111.txt
deleted file mode 100644
index 2f02f8957..000000000
--- a/internal/help/_ASIN__1111.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:06}}
-{{DISPLAYTITLE:_ASIN}}
-The [[_ASIN]] function returns the angle measured in radians based on an input [[SIN]]e value ranging from -1 to 1.
-
-
-{{PageSyntax}}
-: {{Parameter|radian_angle!}} = [[_ASIN]]({{Parameter|sine_value!}})
-
-
-{{PageDescription}}
-* The {{Parameter|sine_value!}} must be measured >= -1 and <= 1, or else it will generate a return value of '''-1.#IND''', which is basically QB64's way of telling us that the number doesn't exist.
-* ARCSINE is the inverse function of [[SIN]]e, and turns a [[SIN]]e value back into an angle.
-* Note: Due to rounding with floating point math, the [[_ASIN]] may not always give a perfect match for the [[SIN]] angle which generated this. You can reduce the number of rounding errors by increasing the precision of your calculations by using [[DOUBLE]] or [[_FLOAT]] precision variables instead of [[SINGLE]].
-
-
-==Availability==
-* '''Version 1.000 and up'''
-
-
-{{PageExamples}}
-''Example:'' Converting a radian angle to its SINe and using that value to find the angle in degrees again using _ASIN:
-{{CodeStart}}
-{{Cl|DEFDBL}} A-Z
-
-{{Cl|INPUT}} "Give me an Angle (in Degrees) => "; Angle
-{{Cl|PRINT}}
-C = {{Cl|SIN}}({{Cl|_D2R}}(Angle)) '_D2R is the command to convert Degrees to Radians, which is what SIN expects
-{{Cl|PRINT}} "The SINE of the Angle is: "; C
-A = {{Cl|_ASIN}}(C)
-{{Cl|PRINT}} "The ASIN of "; C; " is: "; A
-{{Cl|PRINT}} "Notice, A is the Angle in Radians. If we convert it to degrees, the value is "; {{Cl|_R2D}}(A)
-{{CodeEnd}}
-{{small|Example by SMcNeill}}
-{{OutputStart}}
-Give me an Angle (in Degrees) => ? 60
-
-The SINE of the Angle is: .8660254037844386
-The ACOS of .8660254037844386 is: 1.047197551196598
-Notice, A is the Angle in Radians. If we convert it to degrees, we discover the value is 60
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]] {{text|(degree to gradient}}, [[_D2R]] {{text|(degree to radian)}}
-* [[_G2D]] {{text|(gradient to degree)}}, [[_G2R]] {{text|(gradient to degree}}
-* [[_R2D]] {{text|(radian to degree)}}, [[_R2G]] {{text|(radian to gradient}}
-* [[COS]] {{text|(cosine)}}, [[SIN]] {{text|(sine)}}, [[TAN]] {{text|(tangent)}}
-* [[_ACOS]] {{text|(arc cosine)}}, [[ATN]] {{text|(arc tangent)}}
-* [[_ACOSH]] {{text|(arc hyperbolic cosine)}}, [[_ASINH]] {{text|(arc hyperbolic sine)}}, [[_ATANH]] {{text|(arc hyperbolic tangent)}}
-* [[_ATAN2]] {{text|(Compute arc tangent with two parameters)}}
-* [[_HYPOT]] {{text|(hypotenuse)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ASSERT__111111.txt b/internal/help/_ASSERT__111111.txt
deleted file mode 100644
index f489aaac0..000000000
--- a/internal/help/_ASSERT__111111.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:09}}
-{{DISPLAYTITLE:_ASSERT}}
-The [[_ASSERT]] statement can be used to perform tests in code that's in development, for debugging purposes.
-
-
-{{PageSyntax}}
-:[[_ASSERT]] {{Parameter|condition}}[, {{Parameter|errorMessage$}}]
-
-
-{{PageDescription}}
-* {{Parameter|condition}} is the condition that must be met in order to consider the _ASSERT valid.
-* Optional {{Parameter|errorMessage$}} is the message to be displayed in the console window if [[$ASSERTS|$ASSERTS:CONSOLE]] is used.
-* If the condition is not met (that is, if it evaluates to 0), an error occurs ("_ASSERT failed on line #") and program execution stops.
-
-
-==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}}
-* [[$ASSERTS]]
-* [[$CHECKING]]
-* [[Relational Operations]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ATAN2__11112.txt b/internal/help/_ATAN2__11112.txt
deleted file mode 100644
index adf034daa..000000000
--- a/internal/help/_ATAN2__11112.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:11}}
-{{DISPLAYTITLE:_ATAN2}}
-The [[_ATAN2]] function returns the radian angle between the positive x-axis of a plane and the point given by the coordinates (x, y).
-
-
-{{PageSyntax}}
-: {{Parameter|angle!}} = [[_ATAN2]]({{Parameter|y}}, {{Parameter|x}})
-
-
-{{Parameters}}
-* {{Parameter|y}} is the vertical axis position (row) as a positive, zero or negative floating point value.
-* {{Parameter|x}} is the horizontal axis position (column) as a positive, zero or negative floating point value.
-
-
-{{PageDescription}}
-* The [[DOUBLE]] radian angle returned is '''positive''' for upper row values where y > 0.
-::* _ATAN2(y, x) = [[ATN]](y# / x#) when x > 0
-::* _ATAN2(y, x) = [[ATN]](y# / x#) + [[_PI]] when x < 0
-::* _ATAN2(y, x) = [[_PI]] / 2 when x = 0
-* The [[DOUBLE]] radian angle returned is 0 when x > 0 and [[_PI]] when x < 0 where y = 0
-* The [[DOUBLE]] radian angle returned is '''negative''' for lower row values where y < 0.
-::* _ATAN2(y, x) = [[ATN]](y# / x#) when x > 0
-::* _ATAN2(y, x) = [[ATN]](y# / x#) - [[_PI]] when x < 0
-::* _ATAN2(y, x) = -[[_PI]] / 2 when x = 0
-* _ATAN2(0, 0) is undefined and the function returns 0 instead of a division error.
-
-
-{{PageErrors}}
-* With [[ATN]](y / x), x can never be 0 as that would create a Division by Zero [[ERROR Codes|error]] 11 or #IND.
-
-
-{{PageSeeAlso}}
-* [[ATN]] {{text|(arctangent)}}
-* [[_PI]] {{text|(QB64 function)}}
-* [[Mathematical Operations]]
-* [https://en.wikipedia.org/wiki/Atan2 Atan2 reference]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ATANH__11111.txt b/internal/help/_ATANH__11111.txt
deleted file mode 100644
index aed70eccd..000000000
--- a/internal/help/_ATANH__11111.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:12}}
-{{DISPLAYTITLE:_ATANH}}
-The [[_ATANH]] returns the arc hyperbolic tangent of {{Parameter|x!}}, expressed in radians.
-
-
-{{PageSyntax}}
-: {{Parameter|return_value!}} = [[_ATANH]]({{Parameter|x!}})
-
-
-{{PageSeeAlso}}
-* [[_D2G]] {{text|(degree to gradient}}, [[_D2R]] {{text|(degree to radian)}}
-* [[_G2D]] {{text|(gradient to degree)}}, [[_G2R]] {{text|(gradient to degree)}}
-* [[_R2D]] {{text|(radian to degree)}}, [[_R2G]] {{text|(radian to gradient)}}
-* [[COS]] {{text|(cosine)}}, [[SIN]] {{text|(sine)}}, [[TAN]] {{text|(tangent)}}
-* [[_ACOS]] {{text|(arc cosine)}}, [[_ASIN]] {{text|(arc sine)}}, [[ATN]] {{text|(arc tangent)}}
-* [[_ACOSH]] {{text|(arc hyperbolic cosine)}}, [[_ASINH]] {{text|(arc hyperbolic sine)}}
-* [[_ATAN2]] {{text|(Compute arc tangent with two parameters)}}
-* [[_HYPOT]] {{text|(hypotenuse)}}
-*[[Mathematical Operations]]
-*[[Mathematical_Operations#Derived_Mathematical_Functions|Derived Mathematical Functions]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_AUTODISPLAY_(function)__11111111111_(00000000).txt b/internal/help/_AUTODISPLAY_(function)__11111111111_(00000000).txt
deleted file mode 100644
index 08ea0a7de..000000000
--- a/internal/help/_AUTODISPLAY_(function)__11111111111_(00000000).txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:15}}
-{{DISPLAYTITLE:_AUTODISPLAY (function)}}
-The [[_AUTODISPLAY (function)|_AUTODISPLAY]] function returns the current display mode as true (-1) if automatic or false (0) if disabled using [[_DISPLAY]].
-
-
-{{PageSyntax}}
-: {{Parameter|displayStatus%%}} = [[_AUTODISPLAY (function)|_AUTODISPLAY]]
-
-
-{{PageDescription}}
-* The function returns true (-1) if [[_AUTODISPLAY]] is enabled. This is the default state and indicates that every screen change (text or graphics) is displayed immediately to the user.
-* If [[_DISPLAY]] is used, then [[_AUTODISPLAY (function)|_AUTODISPLAY]] returns 0, to indicate that screen changes (text or graphics) are only displayed per request, by calling [[_DISPLAY]] again to refresh the screen.
-
-
-{{PageAvailability}}
-* '''QB64 1.2 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageSeeAlso}}
-* [[_AUTODISPLAY]]
-* [[_DISPLAY]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_AUTODISPLAY__11111111111.txt b/internal/help/_AUTODISPLAY__11111111111.txt
deleted file mode 100644
index 79ecba879..000000000
--- a/internal/help/_AUTODISPLAY__11111111111.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:14}}
-{{DISPLAYTITLE:_AUTODISPLAY}}
-The [[_AUTODISPLAY]] statement enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].
-
-
-{{PageSyntax}}
-:[[_AUTODISPLAY]]
-
-
-{{PageDescription}}
-* [[_AUTODISPLAY]] is on by default and displays the screen at around 30 frames per second (normal vertical retrace speed).
-* [[_DISPLAY]] disables automatic graphic displays, but it also eliminates having to use PCOPY or page flipping when used correctly. Placing _DISPLAY after screen draws or other screen changes assures completion of the changes before they are displayed. The speed of QB64 code execution makes this a viable option.
-* The [[_AUTODISPLAY (function)]] can be used to detect the current display behavior.
-
-
-{{PageSeeAlso}}
-* [[_DISPLAY]]
-* [[_AUTODISPLAY (function)]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_AXIS__1111.txt b/internal/help/_AXIS__1111.txt
deleted file mode 100644
index e43a73ee5..000000000
--- a/internal/help/_AXIS__1111.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:16}}
-{{DISPLAYTITLE:_AXIS}}
-The [[_AXIS]] function returns the relative position of a specified axis number on a controller device.
-
-
-{{PageSyntax}}
-: {{Parameter|move!}} = [[_AXIS]]({{Parameter|axis_number%}})
-
-
-* [[SINGLE]] values returned range between -1 and 1 as maximums and 0 indicating minimum or axis center.
-* When the mouse is moved on the program screen, moves left or above center are negative while below or right are positive.
-* The ''axis_number'' must be a number which does not exceed the number of axis found by the [[_LASTAXIS]] function.
-* '''The number of [[_DEVICES]] must be read before using [[_DEVICE$]], [[_DEVICEINPUT]] or [[_LASTAXIS]].'''
-
-
-{{PageExamples}}
-''Example:'' Reading multiple controller device buttons, axis and wheels.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|_DEVICES}}
- {{Cl|PRINT}} {{Cl|STR$}}(i) + ") " + {{Cl|_DEVICE$}}(i) + " Buttons:"; {{Cl|_LASTBUTTON}}(i); ",Axis:"; {{Cl|_LASTAXIS}}(i); ",Wheel:"; {{Cl|_LASTWHEEL}}(i)
-{{Cl|NEXT}}
-
-{{Cl|DO...LOOP|DO}}
- d& = {{Cl|_DEVICEINPUT}}
- {{Cl|IF...THEN|IF}} d& {{Cl|THEN}} ' the device number cannot be zero!
- {{Cl|PRINT}} "Found"; d&;
- {{Cl|FOR...NEXT|FOR}} b = 1 {{Cl|TO}} {{Cl|_LASTBUTTON}}(d&)
- {{Cl|PRINT}} {{Cl|_BUTTONCHANGE}}(b); {{Cl|_BUTTON}}(b);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} a = 1 {{Cl|TO}} {{Cl|_LASTAXIS}}(d&)
- {{Cl|PRINT}} {{Cl|_AXIS}}(a);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} w = 1 {{Cl|TO}} {{Cl|_LASTWHEEL}}(d&)
- {{Cl|PRINT}} {{Cl|_WHEEL}}(w);
- {{Cl|NEXT}}
- {{Cl|PRINT}}
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-
-{{Cl|END}}
-{{CodeEnd}}
-: ''Note:'' When there is no device control to read, a [[FOR...NEXT|FOR]] n = 1 TO 0 loop will not run thus avoiding a control function read error.
-
-
-{{PageSeeAlso}}
-* [[_LASTWHEEL]], [[_LASTBUTTON]], [[_LASTAXIS]]
-* [[_WHEEL]], [[_BUTTON]], [[_BUTTONCHANGE]]
-* [[_DEVICE$]], [[_DEVICES]]
-* [[_MOUSEMOVEMENTX]], [[_MOUSEMOVEMENTY]] {{text|(relative movement)}}
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_BACKGROUNDCOLOR__111111111111111.txt b/internal/help/_BACKGROUNDCOLOR__111111111111111.txt
deleted file mode 100644
index 9adc1c212..000000000
--- a/internal/help/_BACKGROUNDCOLOR__111111111111111.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:17}}
-{{DISPLAYTITLE:_BACKGROUNDCOLOR}}
-The [[_BACKGROUNDCOLOR]] function returns the current background color.
-
-
-{{PageSyntax}}
-:{{Parameter|BGcolor&}} = [[_BACKGROUNDCOLOR]]
-
-
-
-{{PageDescription}}
-* Use it to get the current background color to restore later in a program.
-* Returns the closest attribute value of the background color.
-
-
-{{PageExamples}}
-''Example 1:'' Storing a background color for later use.
-{{CodeStart}}
-{{Cl|SCREEN}} 0
-{{Cl|COLOR}} 1, 3
-{{Cl|CLS}}
-BG% = {{Cl|_BACKGROUNDCOLOR}}
-{{Cl|PRINT}} BG%
-{{CodeEnd}}
-{{OutputStartBG3}}{{Text|3|#0000aa}}
-{{OutputEnd}}
-
-
-''Example 2:'' Understanding the function output
-{{CodeStart}}
-{{Cl|SCREEN}} 0
-{{Cl|COLOR}} 1, 11
-{{Cl|CLS}}
-BG% = {{Cl|_BACKGROUNDCOLOR}}
-{{Cl|PRINT}} BG% 'prints the attribute as 3 instead of 11
-{{CodeEnd}}
-{{OutputStartBG3}}{{Text|3|#0000aa}}
-{{OutputEnd}}
-:''Explanation: SCREEN 0 background colors over 7 will return the lower intensity color attribute values: EX: attribute - 8
-
-
-{{PageSeeAlso}}
-* [[_DEFAULTCOLOR]]
-* [[COLOR]], [[SCREEN]]
-* [[SCREEN (function)]]
-* [[Windows_Libraries#Color_Dialog_Box|Color Dialog Box]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_BIN$__111$.txt b/internal/help/_BIN$__111$.txt
deleted file mode 100644
index dd0770d18..000000000
--- a/internal/help/_BIN$__111$.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:20}}
-{{DISPLAYTITLE:_BIN$}}
-This function returns the binary (base 2) representation of any numeric value.
-
-
-{{PageSyntax}}
-: {{Parameter|binvalue$}} = [[_BIN$]]({{Parameter|number}})
-
-
-{{PageParameters}}
-* {{Parameter|number}} can be any [[INTEGER]], [[LONG]] or [[_INTEGER64]] value, positive or negative.
-* {{Parameter|number}} can also be any [[SINGLE]], [[DOUBLE]] or [[_FLOAT]] value, but only the integer part of the value is converted in that case. That is, from the value ''-123.45'' the function would convert the ''-123'' only.
-
-
-{{PageDescription}}
-* The function returns the base 2 (binary) representation of the given {{Parameter|number}} as [[STRING]].
-* Different from [[STR$]], this function does not return a leading sign placeholder space, so no [[LTRIM$]] to strip that space from positive numbers is necessary.
-* [[VAL]] can convert the returned bin string value back to a decimal value by prefixing the string with "[[&B]]".
-** Eg. {{InlineCode}}decimal = {{Cl|VAL}}("&B" + binvalue$){{InlineCodeEnd}}.
-
-
-{{PageAvailability}}
-* '''QB64 2.1 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-;Example 1:Comparing decimal, hexadecimal, octal and binary string values from 0 to 15.
-{{CodeStart}}
-tabletop$ = " Decimal | Hexadecimal | Octal | Binary "
-tablesep$ = "---------+-------------+-------+--------"
-tableout$ = " \ \ | \\ | \\ | \ \ " 'the PRINT USING template
-
-{{Cl|LOCATE}} 2, 10: {{Cl|PRINT}} tabletop$
-{{Cl|LOCATE}} 3, 10: {{Cl|PRINT}} tablesep$
-{{Cl|FOR...NEXT|FOR}} n% = 0 {{Cl|TO}} 15
- {{Cl|LOCATE}} 4 + n%, 10: {{Cl|PRINT USING}} tableout$; {{Cl|STR$}}(n%); {{Cl|HEX$}}(n%); {{Cl|OCT$}}(n%); {{Cl|_BIN$}}(n%)
-{{Cl|NEXT}} n%
-{{CodeEnd}}
-;Note:Although the decimal numbers 0-15 have a maximum width of 2 digits only, an extra space in the ''tableout$'' template is needed when using the (fixed width string) slash output format, as [[STR$]] values contain a leading sign placeholder space.
-{{OutputStart}}
- Decimal | Hexadecimal | Octal | Binary
- ---------+-------------+-------+--------
- 0 | 0 | 0 | 0
- 1 | 1 | 1 | 1
- 2 | 2 | 2 | 10
- 3 | 3 | 3 | 11
- 4 | 4 | 4 | 100
- 5 | 5 | 5 | 101
- 6 | 6 | 6 | 110
- 7 | 7 | 7 | 111
- 8 | 8 | 10 | 1000
- 9 | 9 | 11 | 1001
- 10 | A | 12 | 1010
- 11 | B | 13 | 1011
- 12 | C | 14 | 1100
- 13 | D | 15 | 1101
- 14 | E | 16 | 1110
- 15 | F | 17 | 1111
-{{OutputEnd}}
-
-
-;Example 2:Converting a binary value to decimal.
-{{CodeStart}}
-binvalue$ = {{Cl|_BIN$}}(255)
-{{Cl|PRINT}} "Bin: "; binvalue$
-{{Cl|PRINT}} "Converting Bin value to Decimal:"; {{Cl|VAL}}("&B" + binvalue$)
-{{CodeEnd}}
-{{OutputStart}}
-Bin: 11111111
-Converting Bin value to Decimal: 255
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[HEX$]], [[OCT$]], [[STR$]]
-* [[&B]] (binary), [[&H]] (hexadecimal), [[&O]] (octal), [[VAL]]
-* [[Base Comparisons]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_BIT__111.txt b/internal/help/_BIT__111.txt
deleted file mode 100644
index d102d048b..000000000
--- a/internal/help/_BIT__111.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:18}}
-{{DISPLAYTITLE:_BIT}}
-The [[_BIT]] datatype can return only values of 0 (bit off) and -1 (bit on).
-
-
-{{PageSyntax}}
-: [[DIM]] {{Parameter|variable}} [[AS]] [{{KW|_UNSIGNED}}] [[_BIT]] [* {{Parameter|numberofbits}}]
-
-: [[_DEFINE]] {{Parameter|Letter}}[{{Parameter|-Range}}|,...] [[AS]] [{{KW|_UNSIGNED}}] [[_BIT]] [* {{Parameter|numberofbits}}]
-
-
-{{PageDescription}}
-* An [[_UNSIGNED]] _BIT can hold 0 or 1 instead of 0 and -1, if you set the numberofbits you can hold larger values depending on the number of bits you have set (_BIT * 8 can hold the same values as [[_BYTE]] for example) and the information below is compromised if setting any number of bits other than 1.
-* If you set the variable to any other number then the least significant bit of that number will be set as the variables number, if the bit is 1 (on) then the variable will be -1 and if the bit is 0 (off) then the variable will be 0.
-*The least significant bit is the last bit on a string of bits (11111) since that bit will only add 1 to the value if set. The most significant bit is the first bit on a string of bits and changes the value more dramatically (significantly) if set on or off.
-*The _BIT datatype can be succesfully used as a [[Boolean]] (TRUE or FALSE) and it requires minimal amount of memory (the lowest amount possible actually, one byte can hold 8 bits, if you want to use bits in order to decrease memory usage, use them as arrays as a _BIT variable by itself allocates 4 bytes - DIM bitarray(800) AS _BIT uses 100 bytes).
-* '''When a variable has not been assigned or has no type suffix, the value defaults to [[SINGLE]].'''
-* '''[[Keywords_currently_not_supported_by_QB64|_BIT is not supported in User Defined TYPES.]]''' Use a [[_BYTE]] and assign up to 8 bit values as shown below.
-
-
-*'''Suffix Symbols''' The [[_BIT]] type suffix used is below the grave accent (`), usually located under the tilde (~) key (not an apostrophe). Foreign keyboards may not have the ` key. Try Alt+96 in the IDE.
-
-:You can define a bit on-the-fly by adding a ` after the variable, like this: {{InlineCode}}variable` = -1{{InlineCodeEnd}}
-
-:If you want an unsigned bit you can define it on-the-fly by adding ~` instead, like this: {{InlineCode}}variable~` = 1{{InlineCodeEnd}}
-
-:You can set the number of bits on the fly by just adding that number - this defines it as being two bits: {{InlineCode}}variable`2 = -1{{InlineCodeEnd}}
-
-
-'''[[_BIT|BITS]]'''
-* The '''MSB''' is the most significant(largest) bit value and '''LSB''' is the least significant bit of a binary or register memory address value. The order in which the bits are read determines the binary or decimal byte value. There are two common ways to read a byte:
-
-:* '''"Big-endian"''': MSB is the first bit encountered, decreasing to the LSB as the last bit by position, memory address or time.
-:* '''"Little-endian"''': LSB is the first bit encountered, increasing to the MSB as the last bit by position, memory address or time.
-{{WhiteStart}}
- '''Offset or Position: 0 1 2 3 4 5 6 7 Example: 11110000'''
- ---------------------------------- --------
- '''Big-Endian Bit On Value:''' 128 64 32 16 8 4 2 1 240
- '''Little-Endian Bit On Value:''' 1 2 4 8 16 32 64 128 15
-{{WhiteEnd}}
-::The big-endian method compares exponents of 27 down to 20 while the little-endian method does the opposite.
-
-'''[[_BYTE|BYTES]]'''
-* [[INTEGER]] values consist of 2 bytes called the '''HI''' and '''LO''' bytes. Anytime that the number of binary digits is a multiple of 16 (2bytes, 4 bytes, etc.) and the HI byte's MSB is on(1), the value returned will be negative. Even with [[SINGLE]] or [[DOUBLE]] values!
-{{WhiteStart}} '''16 BIT INTEGER OR REGISTER'''
- '''AH (High Byte Bits) AL (Low Byte Bits)'''
- BIT: 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0
- ---------------------------------------|--------------------------------------
- HEX: 8000 4000 2000 1000 800 400 200 100 | 80 40 20 10 8 4 2 1
- |
- DEC: -32768 16384 8192 4096 2048 1024 512 256 | 128 64 32 16 8 4 2 1
-{{WhiteEnd}}
-::The HI byte's '''MSB''' is often called the '''sign''' bit! When all 16 of the integer binary bits are on, the decimal return is -1.
-
-
-{{PageExamples}}
-''Example:'' Shifting bits in a value in QB64 versions prior to 1.3 (you can use [[_SHL]] and [[_SHR]] starting with version 1.3).
-{{CodeStart}}
-n = 24
-Shift = 3
-
-{{Cl|PRINT}} LShift(n, Shift)
-{{Cl|PRINT}} RShift(n, Shift)
-{{Cl|END}}
-
-{{Cl|FUNCTION}} LShift&(n AS {{Cl|LONG}}, LS AS {{Cl|LONG}})
-IF LS < 0 THEN {{Cl|EXIT FUNCTION}}
-LShift = {{Cl|INT}}(n * (2 ^ LS))
-{{Cl|END FUNCTION}}
-
-{{Cl|FUNCTION}} RShift&(n AS {{Cl|LONG}}, RS AS {{Cl|LONG}})
-IF RS < 0 THEN {{Cl|EXIT FUNCTION}}
-RShift = {{Cl|INT}}(n / (2 ^ RS))
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-{{small|Adapted from code by RThorpe}}
-{{OutputStart}} 192
- 3
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[&B]] (binary), [[_BYTE]]
-* [[_SHL]], [[_SHR]]
-* [[_DEFINE]], [[_UNSIGNED]]
-* [[DIM]]
-* [[Binary]], [[Boolean]]
-* [[Variable Types]]
-* [[Converting Bytes to Bits]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_BLEND_(function)__11111_(00000000).txt b/internal/help/_BLEND_(function)__11111_(00000000).txt
deleted file mode 100644
index af1e0760d..000000000
--- a/internal/help/_BLEND_(function)__11111_(00000000).txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:22}}
-{{DISPLAYTITLE:_BLEND (function)}}
-The [[_BLEND (function)|_BLEND]] function returns enabled or disabled for the current window or a specified image handle when 32 bit.
-
-
-{{PageSyntax}}
-:{{Parameter|result%}} = [[_BLEND (function)|_BLEND]] [({{Parameter|imageHandle&}})]
-
-
-{{PageDescription}}
-* _BLEND returns -1 if enabled or 0 if disabled by [[_DONTBLEND]] statement.
-* '''Note: [[_DONTBLEND]] is faster than the default [[_BLEND]] unless you really need to use it in 32 bit.'''
-
-
-{{PageSeeAlso}}
-* [[_DONTBLEND]], [[_BLEND]]
-* [[Images]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_BLEND__11111.txt b/internal/help/_BLEND__11111.txt
deleted file mode 100644
index baca34eb0..000000000
--- a/internal/help/_BLEND__11111.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:21}}
-{{DISPLAYTITLE:_BLEND}}
-The [[_BLEND]] statement turns on 32 bit alpha blending for an image or screen mode and is on by default.
-
-
-{{PageSyntax}}
-: [[_BLEND]] [{{Parameter|imageHandle&}}]
-
-===Parameters===
-* {{Parameter|imageHandle&}} refers to an image in memory. If not specified, the current destination page (See [[_DEST]]) is affected.
-
-
-{{PageDescription}}
-* Alpha blending is on by default when loading a .PNG image to a 32-bit surface.
-* Normally it is used to turn blending on after a previous [[_DONTBLEND]] call.
-* [[_BLEND]] can only be used on 32-bit surfaces, otherwise it will produce the error [[ERROR Codes|Illegal Function Call]].
-* '''Note: [[_DONTBLEND]] is faster than the default [[_BLEND]] unless you really need to use it in 32 bit.'''
-* '''32 bit screen surface backgrounds (black) have zero [[_ALPHA]] so that they are transparent when placed over other surfaces.'''
-
-
-{{PageExamples}}
-''Example:''
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-
-'{{Cl|CLS}} , {{Cl|_RGB}}(128, 128, 128) 'change background color for other results
-
-{{Cl|_DONTBLEND}}
-
-bg& = {{Cl|POINT}}(0, 0)
-{{Cl|PRINT}} {{Cl|_RED}}(bg&), {{Cl|_GREEN}}(bg&), {{Cl|_BLUE}}(bg&), {{Cl|_ALPHA}}(bg&)
-
-{{Cl|LINE}} (100, 100)-(200, 200), {{Cl|_RGBA32}}(255, 128, 0, 128), BF
-
-{{Cl|LINE}} (440, 100)-(540, 200), {{Cl|_RGBA32}}(0, 0, 255, 64), BF
-
-K$ = {{Cl|INPUT$}}(1)
-
-{{Cl|_BLEND}}
-
-{{Cl|LINE}} (270, 300)-(370, 400), {{Cl|_RGBA32}}(255, 128, 0, 128), BF
-m& = {{Cl|POINT}}(303, 302)
-{{Cl|PRINT}} {{Cl|_RED}}(m&), {{Cl|_GREEN}}(m&), {{Cl|_BLUE}}(m&), {{Cl|_ALPHA}}(m&)
-K$ = {{Cl|INPUT$}}(1)
-
-{{Cl|LINE}} (270, 300)-(370, 400), {{Cl|_RGBA32}}(0, 0, 255, 64), BF
-m& = {{Cl|POINT}}(303, 302)
-{{Cl|PRINT}} {{Cl|_RED}}(m&), {{Cl|_GREEN}}(m&), {{Cl|_BLUE}}(m&), {{Cl|_ALPHA}}(m&)
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_DONTBLEND]], [[_BLEND (function)]]
-* [[Images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_BLINK_(function)__11111_(00000000).txt b/internal/help/_BLINK_(function)__11111_(00000000).txt
deleted file mode 100644
index 9e237b7c1..000000000
--- a/internal/help/_BLINK_(function)__11111_(00000000).txt
+++ /dev/null
@@ -1,34 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:25}}
-{{DISPLAYTITLE:_BLINK (function)}}
-The [[_BLINK]] function returns the current blink setting for SCREEN 0 colors. If enabled, returns -1 (default), otherwise returns 0.
-
-
-{{PageSyntax}}
-: {{Parameter|blinkState%%}} = [[_BLINK]]
-
-
-{{PageAvailability}}
-* '''QB64 1.2 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-{{CodeStart}}{{Cl|COLOR}} 16, 7
-
-'Try uncommenting the line below:
-'{{Cl|_BLINK}} OFF
-
-{{Cl|IF}} _BLINK {{Cl|THEN}}
- {{Cl|PRINT}} "I'm blinking"
-{{Cl|ELSE}}
- {{Cl|PRINT}} "I'm not blinking"
-{{Cl|END IF}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_BLINK]] (statement)
-* [[OUT]]
-
-{{PageNavigation}}
diff --git a/internal/help/_BLINK__11111.txt b/internal/help/_BLINK__11111.txt
deleted file mode 100644
index 2b138f359..000000000
--- a/internal/help/_BLINK__11111.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:24}}
-{{DISPLAYTITLE:_BLINK}}
-The [[_BLINK]] statement toggles blinking colors in text mode (SCREEN 0). Default state is ON.
-
-
-{{PageSyntax}}
-: [[_BLINK]] {ON|OFF}
-
-
-{{PageDescription}}
-* SCREEN 0 emulates the VGA palette with regular colors from 0 to 15 and blinking colors from 16-31 (these are the same colors as 0-15, except their blink attribute is set to on). [[_BLINK]] OFF emulates writing to the video memory and disabling blinking for colors 16-31.
-* Using colors 16-31 for the foreground with [[_BLINK]] set to OFF will produce high intensity background colors.
-* [[_BLINK]] is only effective in SCREEN 0. It's ignored in graphic modes.
-* IF [[_DISPLAY]] is used, blinking is disabled, even if _BLINK is ON, but high intensity backgrounds aren't enabled in this case.
-
-
-==Availability:==
-* Build 20170816/61 up (August 16, 2017).
-
-
-{{PageExamples}}
-{{CodeStart}}{{Cl|COLOR}} 16, 7
-{{Cl|PRINT}} "This is printed in black over gray background. Black letters are blinking."
-{{Cl|PRINT}} "Hit a key..."
-{{Cl|SLEEP}}
-{{Cl|_BLINK}} OFF
-{{Cl|PRINT}} "Now the same text is printed in black over bright white, because blinking was disabled."
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_BLINK (function)]]
-* [[OUT]]
-* [[_DISPLAY]]
-
-{{PageNavigation}}
diff --git a/internal/help/_BLUE32__111132.txt b/internal/help/_BLUE32__111132.txt
deleted file mode 100644
index 906b546b1..000000000
--- a/internal/help/_BLUE32__111132.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:27}}
-{{DISPLAYTITLE:_BLUE32}}
-The [[_BLUE32]] function returns the blue component intensity of a 32-bit image or surface color.
-
-
-{{PageSyntax}}
-: {{Parameter|blue32color&}} = [[_BLUE32]]({{Parameter|rgbaColor&}})
-
-
-{{PageDescription}}
-* {{Parameter|rgbaColor&}} is the 32-bit ''RGBA'' color value to retrieve the blue component intensity value from.
-* ''RGBA'' color values are returned by the [[_PALETTECOLOR (function)|_PALETTECOLOR]], [[POINT]], [[_RGB]], [[_RGB32]], [[_RGBA]] or [[_RGBA32]] functions.
-* [[LONG]] intensity values returned range from 0 (no intensity, not present) to 255 (full intensity).
-
-
-{{PageExamples}}
-* See the example for [[POINT]].
-
-
-{{PageSeeAlso}}
-* [[_RED32]], [[_GREEN32]]
-* [[_RGB32]], [[_BLUE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_BLUE__1111.txt b/internal/help/_BLUE__1111.txt
deleted file mode 100644
index ea2bbf487..000000000
--- a/internal/help/_BLUE__1111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:26}}
-{{DISPLAYTITLE:_BLUE}}
-The [[_BLUE]] function returns the palette intensity or the blue component intensity of a 32-bit image color.
-
-
-{{PageSyntax}}
-: {{Parameter|blueintensity&}} = [[_BLUE]]({{Parameter|rgbaColorIndex&}}[, {{Parameter|imageHandle&}}])
-
-
-{{PageDescription}}
-* {{Parameter|rgbaColorIndex&}} is the ''RGBA'' color value or palette index of the color to retrieve the blue component intensity from.
-* The [[LONG]] intensity value returned ranges from 0 (no intensity, not present) to 255 (full intensity).
-* If {{Parameter|imageHandle&}} specifies a 32-bit color image, {{Parameter|rgbaColorIndex&}} is interpreted as a 32-bit ''RGBA'' color value.
-* If {{Parameter|imageHandle&}} specifies an image that uses a palette, {{Parameter|rgbaColorIndex&}} is interpreted as a palette index.
-* If {{Parameter|imageHandle&}} is not specified, it is assumed to be the current write page.
-* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error will occur.
-* If {{Parameter|rgbaColorIndex&}} is outside the range of valid indexes for a given image mode, an [[ERROR Codes|illegal function call]] error occurs.
-* Uses index parameters passed by the [[_RGB]], [[_RGBA]], [[_RGB32]] or [[_RGBA32]] funtions.
-* An image handle is optional.
-
-
-{{PageExamples}}
-* See the example for [[POINT]].
-
-
-{{PageSeeAlso}}
-* [[_RED]], [[_GREEN]]
-* [[_RGB]], [[RGB32]]
-* [[_LOADIMAGE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_BUTTONCHANGE__111111111111.txt b/internal/help/_BUTTONCHANGE__111111111111.txt
deleted file mode 100644
index e2b1f1a93..000000000
--- a/internal/help/_BUTTONCHANGE__111111111111.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:29}}
-{{DISPLAYTITLE:_BUTTONCHANGE}}
-The [[_BUTTONCHANGE]] function returns -1 or 1 when a specified button number on a controller device has been pressed or released.
-
-
-{{PageSyntax}}
-: {{Parameter|press%}} = [[_BUTTONCHANGE]]({{Parameter|button_number%}})
-
-
-{{PageDescription}}
-* Values returned are -1 for a press and 1 when a button is released. No press or release event returns zero.
-* The {{Parameter|button_number%}} must be a number which does not exceed the number of buttons found by the [[_LASTBUTTON]] function.
-* '''The number of [[_DEVICES]] must be read before using [[_DEVICE$]], [[_DEVICEINPUT]] or [[_LASTBUTTON]].'''
-* '''Note:''' The center mouse button is button number 2. Center can also be read using [[_MOUSEBUTTON]](3).
-
-
-{{PageExamples}}
-''Example:'' Reading multiple controller device buttons, axis and wheels.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|_DEVICES}}
- {{Cl|PRINT}} {{Cl|STR$}}(i) + ") " + {{Cl|_DEVICE$}}(i) + " Buttons:"; {{Cl|_LASTBUTTON}}(i); ",Axis:"; {{Cl|_LASTAXIS}}(i); ",Wheel:"; {{Cl|_LASTWHEEL}}(i)
-{{Cl|NEXT}}
-
-{{Cl|DO...LOOP|DO}}
- d& = {{Cl|_DEVICEINPUT}}
- {{Cl|IF...THEN|IF}} d& {{Cl|THEN}} ' the device number cannot be zero!
- {{Cl|PRINT}} "Found"; d&;
- {{Cl|FOR...NEXT|FOR}} b = 1 {{Cl|TO}} {{Cl|_LASTBUTTON}}(d&)
- {{Cl|PRINT}} {{Cl|_BUTTONCHANGE}}(b); {{Cl|_BUTTON}}(b);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} a = 1 {{Cl|TO}} {{Cl|_LASTAXIS}}(d&)
- {{Cl|PRINT}} {{Cl|_AXIS}}(a);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} w = 1 {{Cl|TO}} {{Cl|_LASTWHEEL}}(d&)
- {{Cl|PRINT}} {{Cl|_WHEEL}}(w);
- {{Cl|NEXT}}
- {{Cl|PRINT}}
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-
-{{Cl|END}}
-{{CodeEnd}}
-: ''Note:'' When there is no device control to read, a [[FOR...NEXT|FOR]] n = 1 TO 0 loop will not run thus avoiding a control function read error.
-
-
-{{PageSeeAlso}}
-* [[_LASTWHEEL]], [[_LASTBUTTON]], [[_LASTAXIS]]
-* [[_AXIS]], [[_WHEEL]], [[_BUTTON]]
-* [[_DEVICE$]], [[_DEVICES]]
-* [[_MOUSEBUTTON]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_BUTTON__111111.txt b/internal/help/_BUTTON__111111.txt
deleted file mode 100644
index 388a7fd49..000000000
--- a/internal/help/_BUTTON__111111.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:28}}
-{{DISPLAYTITLE:_BUTTON}}
-The [[_BUTTON]] function returns -1 when specified button number on a controller device is pressed.
-
-
-{{PageSyntax}}
-: {{Parameter|press%%}} = [[_BUTTON]]({{Parameter|button_number%}})
-
-
-{{PageDescription}}
-* Values returned are -1 for a press and 0 when a button is released or not pressed.
-* The {{Parameter|button_number%}} must be a number which does not exceed the number of buttons found by the [[_LASTBUTTON]] function.
-* '''The number of [[_DEVICES]] must be read before using [[_DEVICE$]], [[_DEVICEINPUT]] or [[_LASTBUTTON]].'''
-* '''Note:''' The number 2 button is the center button in this device configuration. Center is also designated as [[_MOUSEBUTTON]](3).
-
-
-{{PageExamples}}
-''Example:'' Reading multiple controller device buttons, axis and wheels.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|_DEVICES}}
- {{Cl|PRINT}} {{Cl|STR$}}(i) + ") " + {{Cl|_DEVICE$}}(i) + " Buttons:"; {{Cl|_LASTBUTTON}}(i); ",Axis:"; {{Cl|_LASTAXIS}}(i); ",Wheel:"; {{Cl|_LASTWHEEL}}(i)
-{{Cl|NEXT}}
-
-{{Cl|DO...LOOP|DO}}
- d& = {{Cl|_DEVICEINPUT}}
- {{Cl|IF...THEN|IF}} d& {{Cl|THEN}} ' the device number cannot be zero!
- {{Cl|PRINT}} "Found"; d&;
- {{Cl|FOR...NEXT|FOR}} b = 1 {{Cl|TO}} {{Cl|_LASTBUTTON}}(d&)
- {{Cl|PRINT}} {{Cl|_BUTTONCHANGE}}(b); {{Cl|_BUTTON}}(b);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} a = 1 {{Cl|TO}} {{Cl|_LASTAXIS}}(d&)
- {{Cl|PRINT}} {{Cl|_AXIS}}(a);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} w = 1 {{Cl|TO}} {{Cl|_LASTWHEEL}}(d&)
- {{Cl|PRINT}} {{Cl|_WHEEL}}(w);
- {{Cl|NEXT}}
- {{Cl|PRINT}}
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-
-{{Cl|END}}
-{{CodeEnd}}
-: ''Note:'' When there is no device control to read, a [[FOR...NEXT|FOR]] n = 1 TO 0 loop will not run thus avoiding a control function read error.
-
-
-{{PageSeeAlso}}
-* [[_LASTWHEEL]], [[_LASTBUTTON]], [[_LASTAXIS]]
-* [[_AXIS]], [[_WHEEL]], [[_BUTTONCHANGE]]
-* [[_DEVICE$]], [[_DEVICES]]
-* [[_MOUSEBUTTON]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_BYTE__1111.txt b/internal/help/_BYTE__1111.txt
deleted file mode 100644
index 01cde9943..000000000
--- a/internal/help/_BYTE__1111.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:30}}
-{{DISPLAYTITLE:_BYTE}}
-A [[_BYTE]] variable can hold signed variable values from -128 to 127 (one byte or 8 [[_BIT]]s). [[_UNSIGNED|Unsigned]] from 0 to 255.
-
-
-{{PageSyntax}}
-: [[DIM]] {{Parameter|byte}} [[AS]] [[[_UNSIGNED]]] [[_BYTE]]
-
-
-{{PageDescription}}
-* Signed _BYTE values can range from -128 to 127.
-* [[_UNSIGNED]] _BYTEs can hold values from 0 to 255. [[_UNSIGNED]] expands the range of positive values.
-* Can be defined in a '''QB64''' [[_DEFINE]] statement using a starting letter range of variable names.
-* Also can be used in a subroutine parameter [[AS]] _BYTE variable definitions.
-* Define a byte using the suffix %% after the variable name: {{Parameter|variable%%}} = -54
-* Define an unsigned byte by adding the suffix ~%% after the variable name: variable~%% = 54
-* '''When a variable has not been assigned or has no type suffix, the value defaults to [[SINGLE]].'''
-
-
-'''[[_BIT|BITS]]'''
-* The '''MSB''' is the most significant(largest) bit value and '''LSB''' is the least significant bit of a binary or register memory address value. The order in which the bits are read determines the binary or decimal byte value. There are two common ways to read a byte:
-
-:* '''"Big-endian"''': MSB is the first bit encountered, decreasing to the LSB as the last bit by position, memory address or time.
-:* '''"Little-endian"''': LSB is the first bit encountered, increasing to the MSB as the last bit by position, memory address or time.
-{{WhiteStart}}
- '''Offset or Position: 0 1 2 3 4 5 6 7 Example: 11110000'''
- ---------------------------------- --------
- '''Big-Endian Bit On Value:''' 128 64 32 16 8 4 2 1 240
- '''Little-Endian Bit On Value:''' 1 2 4 8 16 32 64 128 15
-{{WhiteEnd}}
-::The big-endian method compares exponents of 27 down to 20 while the little-endian method does the opposite.
-
-
-'''[[_BYTE|BYTES]]'''
-* [[INTEGER]] values consist of 2 bytes called the '''HI''' and '''LO''' bytes. Anytime that the number of binary digits is a multiple of 16 (2bytes, 4 bytes, etc.) and the HI byte's MSB is on(1), the value returned will be negative. Even with [[SINGLE]] or [[DOUBLE]] values!
-{{WhiteStart}} '''16 BIT INTEGER OR REGISTER'''
- '''AH (High Byte Bits) AL (Low Byte Bits)'''
- BIT: 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0
- ---------------------------------------|--------------------------------------
- HEX: 8000 4000 2000 1000 800 400 200 100 | 80 40 20 10 8 4 2 1
- |
- DEC: -32768 16384 8192 4096 2048 1024 512 256 | 128 64 32 16 8 4 2 1
-{{WhiteEnd}}
-::The HI byte's '''MSB''' is often called the '''sign''' bit! When all 16 of the integer binary bits are on, the decimal return is -1.
-
-
-
-{{PageExamples}}
-:How negative assignments affect the _UNSIGNED value returned by a byte (8 bits).
-
-{{CodeStart}}
-{{Cl|DIM}} unsig {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|DIM}} sig {{Cl|AS}} {{Cl|_BYTE}}
-
-{{Cl|CLS}}
-unsig = 1
-sig = 1
-{{Cl|PRINT}} "00000001 = unsigned & signed are both" + {{Cl|STR$}}(unsig {{Cl|AND}} sig)
-
-unsig = 127
-sig = 127
-{{Cl|PRINT}} "&B01111111 = unsigned & signed are both" + {{Cl|STR$}}(unsig {{Cl|AND}} sig)
-
-unsig = 255
-sig = 255
-{{Cl|PRINT}} "&B11111111 = unsigned is" + {{Cl|STR$}}(unsig) + " but signed is " + {{Cl|STR$}}(sig)
-
-unsig = 254
-sig = 254
-{{Cl|PRINT}} "&B11111110 = unsigned is" + {{Cl|STR$}}(unsig) + " but signed is " + {{Cl|STR$}}(sig)
-
-unsig = 253
-sig = 253
-{{Cl|PRINT}} "&B11111101 = unsigned is" + {{Cl|STR$}}(unsig) + " but signed is " + {{Cl|STR$}}(sig)
-
-{{Cl|PRINT}}
-{{Cl|PRINT}} "The signed value needs the MSB bit for the sign."
-{{Cl|PRINT}} "The most significant bit is furthest to the left."
-{{CodeEnd}}
-{{OutputStart}}
-&B00000001 = unsigned & signed are both 1
-&B01111111 = unsigned & signed are both 127
-&B11111111 = unsigned is 255 but signed is -1
-&B11111110 = unsigned is 254 but signed is -2
-&B11111101 = unsigned is 253 but signed is -3
-
-The signed value needs the MSB bit for the sign.
-The most significant bit is furthest to the left.
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_BIT]], [[&B]]
-* [[_DEFINE]], [[DIM]]
-* [[_UNSIGNED]]
-* [[_SHL]], [[_SHR]]
-* [[Mathematical Operations]]
-* [[Screen Memory]]
-* [[Variable Types]]
-* [[Converting Bytes to Bits]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CAPSLOCK_(function)__11111111_(00000000).txt b/internal/help/_CAPSLOCK_(function)__11111111_(00000000).txt
deleted file mode 100644
index a36a57a72..000000000
--- a/internal/help/_CAPSLOCK_(function)__11111111_(00000000).txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:31}}
-{{DISPLAYTITLE:_CAPSLOCK (function)}}
-The [[_CAPSLOCK (function)| _CAPSLOCK]] function returns the current state of the Caps Lock key as on (-1) or off (0).
-
-
-{{PageSyntax}}
-: {{Parameter|keyStatus%%}} = [[_CAPSLOCK (function)| _CAPSLOCK]]
-
-
-{{PageAvailability}}
-* '''QB64 1.4 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageSeeAlso}}
-* [[_NUMLOCK (function)]], [[_SCROLLLOCK (function)]]
-* [[_CAPSLOCK]] (statement), [[_NUMLOCK]] (statement), [[_SCROLLLOCK]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CAPSLOCK__11111111.txt b/internal/help/_CAPSLOCK__11111111.txt
deleted file mode 100644
index 67eb28f7d..000000000
--- a/internal/help/_CAPSLOCK__11111111.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:33}}
-{{DISPLAYTITLE:_CAPSLOCK}}
-The [[_CAPSLOCK]] statement sets the state of the Caps Lock key.
-
-
-{{PageSyntax}}
-: [[_CAPSLOCK]] {ON|OFF|_TOGGLE}
-
-
-{{PageAvailability}}
-* '''QB64 1.4 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageSeeAlso}}
-* [[_CAPSLOCK (function)]], [[_NUMLOCK (function)]], [[_SCROLLLOCK (function)]]
-* [[_NUMLOCK]] (statement), [[_SCROLLLOCK]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CEIL__1111.txt b/internal/help/_CEIL__1111.txt
deleted file mode 100644
index 1245c16e3..000000000
--- a/internal/help/_CEIL__1111.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:35}}
-{{DISPLAYTITLE:_CEIL}}
-The [[_CEIL]] function rounds a numeric value up to the next whole number or [[INTEGER]] value.
-
-
-{{PageSyntax}}
-: {{Parameter|result}} = [[_CEIL]]({{Parameter|expression}})
-
-
-* [[_CEIL]] returns he smallest integral value that is greater than the numerical {{Parameter|expression}} (as a floating-point value).
-* This means that [[_CEIL]] rounds up for both positive and negative numbers.
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Displaying the rounding behavior of [[INT]], [[CINT]] and [[FIX]] vs [[_CEIL]].
-{{CodeStart}}
-PRINT INT(2.5), CINT(2.5), FIX(2.5), _CEIL(2.5)
-PRINT INT(-2.5), CINT(-2.5), FIX(-2.5), _CEIL(-2.5)
-{{CodeEnd}}
-{{OutputStart}} 2 2 2 3
--3 -2 -2 -2
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[INT]], [[FIX]]
-* [[CINT]], [[CLNG]],
-* [[CSNG]], [[CDBL]]
-* [[_ROUND]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CINP__1111.txt b/internal/help/_CINP__1111.txt
deleted file mode 100644
index 845321e03..000000000
--- a/internal/help/_CINP__1111.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:36}}
-{{DISPLAYTITLE:_CINP}}
-The [[_CINP]] function returns keyboard key press codes from a [[$CONSOLE]] window. Windows-only.
-
-
-{{PageSyntax}}
-:{{Parameter|keycode&}} = [[_CINP]]
-
-
-{{PageDescription}}
-* Return values are the same as the ones for [[INP]] when used to read keyboard input. See table below.
-:* '''Negative''' [[LONG]] values returned indicate that a key was released or a lock function key has been turned off.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-{{WhiteStart}}' '''Extended Keyboard Press Scancodes'''
-'
-'''' Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 SysReq ScrL Pause'''
-' 1 59 60 61 62 63 64 65 66 67 68 87 88 0 70 29
-' '''`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSpc Insert Home PgUp NumL / * -'''
-' 41 2 3 4 5 6 7 8 9 10 11 12 13 14 82 71 73 69 53 55 74
-' '''Tab Q W E R T Y U I O P [{ ]} \| Delete End PgDn 7/Home 8/â–² 9/PU + '''
-' 15 16 17 18 19 20 21 22 23 24 25 26 27 43 83 79 81 71 72 73 78
-' '''CapL A S D F G H J K L ;: '" Enter 4/â—„- 5 6/-â–º E'''
-' 58 30 31 32 33 34 35 36 37 38 39 40 28 75 76 77 '''n'''
-' '''Shift Z X C V B N M ,< .> /? Shift â–² 1/End 2/â–¼ 3/PD t'''
-' 42 44 45 46 47 48 49 50 51 52 53 54 72 79 80 81 '''e'''
-' '''Ctrl Win Alt Spacebar Alt Win Menu Ctrl â—„- â–¼ -â–º 0/Insert ./Del r'''
-' 29 {{text|91|purple}} 56 57 56 {{text|92 93|purple}} 29 75 80 77 82 83 28
-'
-{{WhiteEnd}}
-
-
-{{PageExamples}}
-''Example 1:'' Reading individual key strokes from a console window (Windows).
-{{CodeStart}}
-{{Cl|$CONSOLE}}:ONLY
-{{Cl|_DEST}} {{Cl|_CONSOLE}}: {{Cl|_SOURCE}} {{Cl|_CONSOLE}}
-
-{{Cl|PRINT}} "Press any key, and I'll give you the scan code for it. quits the demo."
-{{Cl|PRINT}}
-{{Cl|PRINT}}
-{{Cl|DO}}
- x = {{Cl|_CONSOLEINPUT}}
- {{Cl|IF}} x = 1 {{Cl|THEN}} 'read only keyboard input ( = 1)
- c = {{Cl|_CINP}}
- {{Cl|PRINT}} c;
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} c = 1
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[$CONSOLE]], [[_CONSOLE]]
-* [[_CONSOLEINPUT]]
-* [[_MOUSEX]], [[_MOUSEY]], [[_MOUSEBUTTON]], [[_MOUSEWHEEL]]
-
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CLEARCOLOR_(function)__1111111111_(00000000).txt b/internal/help/_CLEARCOLOR_(function)__1111111111_(00000000).txt
deleted file mode 100644
index 5037e1890..000000000
--- a/internal/help/_CLEARCOLOR_(function)__1111111111_(00000000).txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:37}}
-{{DISPLAYTITLE:_CLEARCOLOR (function)}}
-The [[_CLEARCOLOR (function)|_CLEARCOLOR]] function returns the current transparent color of an image or page.
-
-
-{{PageSyntax}}
-:''result&'' = [[_CLEARCOLOR (function)|_CLEARCOLOR]] [{{Parameter|Source_Handle&}}]
-
-
-{{PageDescription}}
-* If {{Parameter|Source_Handle&}} is omitted, it is assumed to be the current [[_DEST|destination]] write page.
-* If {{Parameter|Source_Handle&}} is an invalid handle value(-1), then an [[ERROR Codes|invalid handle value]] is returned.
-* In color modes using a palette, the index of the current transparent color value is returned, or -1 if no transparent color is set.
-* In 32-bit color modes, zero is returned.
-* Returns the color that currently is transparent, or if no color is transparent -1 without error.
-* A [[_CLEARCOLOR]] statement can set the transparent color of an image or screen.
-* '''NOTE: Default 32 bit backgrounds are clear black or [[_RGBA]](0, 0, 0, 0). Use [[CLS]] to make the black opaque.'''
-
-
-{{PageSeeAlso}}
-* [[_CLEARCOLOR]] {{text|(sets a clear color)}}
-* [[_SETALPHA]] {{text|(sets color transparency)}}
-* [[Images]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CLEARCOLOR__1111111111.txt b/internal/help/_CLEARCOLOR__1111111111.txt
deleted file mode 100644
index e228ce525..000000000
--- a/internal/help/_CLEARCOLOR__1111111111.txt
+++ /dev/null
@@ -1,99 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:38}}
-{{DISPLAYTITLE:_CLEARCOLOR}}
-The [[_CLEARCOLOR]] statement sets a specific color to be treated as transparent when an image is later put (via [[_PUTIMAGE]]) onto another image.
-
-{|align="right"
-|__TOC__
-|}
-
-{{PageSyntax}}
-:[[_CLEARCOLOR]] {{{Parameter|color&}}|_NONE}[, {{Parameter|Dest_Handle&}}]
-
-{{Parameters}}
-* In color modes using a palette, {{Parameter|color&}} is the palette index of the new transparent color value or _NONE designates no clear colors.
-* If {{Parameter|color&}} is not a valid palette index, an [[ERROR Codes|illegal function call]] error will occur.
-* In 32-bit color modes, {{Parameter|color&}} is the [[_LONG]] color value of the new transparent color.
-* If {{Parameter|Dest_Handle&}} is omitted, the destination is assumed to be the current write page. Zero can designate the current program screen.
-
-
-{{PageDescription}}
-* If {{Parameter|Dest_Handle&}} is an invalid handle, then an [[ERROR Codes|invalid handle]] error is returned. Check for bad handle values of -1 first.
-* In 32-bit color modes, it simply sets the Alpha to 0 for all pixels matching the specified color.
-* In the second syntax, transparency is disabled for color modes using a palette.
-* '''Note:''' [[_SETALPHA]] can affect any _CLEARCOLOR alpha setting within the color range set.
-* '''NOTE: 32 bit [[_NEWIMAGE]] screen page backgrounds are transparent black or [[_ALPHA]] 0. Use [[_DONTBLEND]] or [[CLS]] for opaque.'''
-
-
-{{PageExamples}}
-''Example 1:'' Using _CLEARCOLOR to "mask" the background color of an image.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 13
-img& = {{Cl|_LOADIMAGE}}("qb64_trans.png")
-{{Cl|_PUTIMAGE}} , img&, 0 'place actual image with background
-K$ = INPUT$(1)
-{{Cl|CLS}} , {{Cl|_RGB}}(255, 0, 0) 'clear screen with red background
-{{Cl|_CLEARCOLOR}} {{Cl|_RGB}}(255, 255, 255), img&
-{{Cl|_PUTIMAGE}} , img&, 0 'place image without white background
-{{Cl|PRINT}} {{Cl|_CLEARCOLOR}}(img&) 'displays closest clear color attribute
-{{Cl|END}}
-{{CodeEnd}}
-
-
-''Example 2:'' Using a _CLEARCOLOR transparency with images created on a [[_NEWIMAGE]] page. Does not require an image file.
-{{CodeStart}}{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(512, 384, 32) ' screen uses handle value
-{{Cl|CIRCLE}}(50, 50), 50, {{Cl|_RGB}}(128, 0, 0) ' create a red ball image
-{{Cl|PAINT}}(50, 50), {{Cl|_RGB}}(255, 0, 0), {{Cl|_RGB}}(128, 0, 0)
-redball = {{Cl|_NEWIMAGE}}(101, 101, 32) ' create a new image page
-{{Cl|_PUTIMAGE}} , 0, redball,(0, 0)-(101, 101) ' put screen page 0 image onto redball page
-{{Cl|_CLEARCOLOR}} {{Cl|_RGB}}(0, 0, 0), redball ' makes black become see-through
-{{Cl|CLS}}, {{Cl|_RGB}}(0, 0, 255) ' erase original ball and create a blue background
-{{Cl|DO...LOOP|DO}}
-{{Cl|_PUTIMAGE| _PUTIMAGE}} ({{Cl|RND}} * 512, {{Cl|RND}} * 384), redball
-{{Cl|SLEEP| SLEEP}} 1 ' one second delay
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{CodeEnd}}
-
-
-''Example 3:'' Fading an image with a _CLEARCOLOR background using a new page image to prevent [[_SETALPHA]] changes.
-{{CodeStart}}
-mainscreen = {{Cl|_NEWIMAGE}}(640, 480, 32) ' Main Screen (viewable)
-{{Cl|SCREEN}} mainscreen
-{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}}
-Image1& = {{Cl|_LOADIMAGE}}("qb64_trans.png") '<<<<<< any image with one background color to clear
-
-{{Cl|IF...THEN|IF}} Image1& < -1 {{Cl|THEN}} 'check loaded image handle value before using!
- {{Cl|_SOURCE}} Image1&
- clr~& = {{Cl|POINT}}(0, 0) 'get background color from image source
- {{Cl|_CLEARCOLOR}} clr~&, Image1& 'clear background color of loaded image
- NewImage1& = {{Cl|_NEWIMAGE}}({{Cl|_WIDTH (function)|_WIDTH}}(Image1&), {{Cl|_HEIGHT}}(Image1&), 32) 'new image page
- {{Cl|_PUTIMAGE}} , Image1&, NewImage1& 'put image without background color on new page
- {{Cl|_FREEIMAGE}} Image1& 'free loaded image from memory
-{{Cl|END IF}}
-{{Cl|_DEST}} mainscreen:
-
-a& = 0: d = 1
-DO
- {{Cl|_LIMIT}} 10 'regulate speed of fades
- {{Cl|CLS}}
- a& = a& + d
- {{Cl|IF...THEN|IF}} a& = 255 {{Cl|THEN}} d = -d 'reverse fade
- {{Cl|_SETALPHA}} a&, , NewImage1& 'sets alpha level of all colors to fade image page in/out
- {{Cl|_PUTIMAGE}} (0, 342), NewImage1&
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} "Alpha: "; a&
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}} {{Cl|UNTIL}} a& = 0
-{{Cl|END}}
-{{CodeEnd}}
-:''Note:'' If the _CLEARCOLOR image background was not put onto a separate page, [[_SETALPHA]] would display it also.
-
-
-
-{{PageSeeAlso}}
-* [[_CLEARCOLOR (function)]]
-* [[_SETALPHA]] {{text|(sets transparency level)}}
-* [[_ALPHA]], [[_ALPHA32]] {{text|(read functions)}}
-* [[Images]], [[Creating Sprite Masks]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CLIPBOARD$_(statement)__111111111$_(000000000).txt b/internal/help/_CLIPBOARD$_(statement)__111111111$_(000000000).txt
deleted file mode 100644
index 53a74ecc1..000000000
--- a/internal/help/_CLIPBOARD$_(statement)__111111111$_(000000000).txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:42}}
-{{DISPLAYTITLE:_CLIPBOARD$ (statement)}}
-The [[_CLIPBOARD$ (statement)|_CLIPBOARD$]] statement copies the [[STRING]] value into the system clipboard.
-
-
-{{PageSyntax}}
-:[[_CLIPBOARD$ (statement)|_CLIPBOARD$]] = {{Parameter|string_expression$}}
-
-
-{{PageDescription}}
-* {{Parameter|string_expression$}} is the string value to be sent to the clipboard.
-* The string value will replace everything previously in the clipboard.
-* Assemble long text into one string variable value before using this statement.
-* Add CHR$(13) + CHR$(10) CRLF characters to move to a new clipboard line.
-* When copying text files, end line CRLF characters 13 and 10 do not have to be added.
-* Numerical values can be converted to strings using [[STR$]], [[_MK$]], [[MKI$]], [[MKL$]], [[MKS$]], [[MKD$]], [[HEX$]] or [[OCT$]].
-* The clipboard can be used to copy, paste and communicate between running programs.
-
-
-{{PageExamples}}
-''Example:'' Set 2 lines of text in the clipboard using a carriage return to end text lines
-{{CodeStart}}
-{{Cl|DIM}} CrLf AS {{Cl|STRING}} * 2 'define as 2 byte STRING
-CrLf = {{Cl|CHR$}}(13) + {{Cl|CHR$}}(10) 'carriage return & line feed
-
-{{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "This is line 1" + CrLf + "This is line 2"
-{{Cl|PRINT}} {{Cl|_CLIPBOARD$}} 'display what is in the clipboard
-
-{{CodeEnd}}
-{{OutputStart}}This is line 1
-
-This is line 2
-{{OutputEnd}}
-:''Note:'' The text in the clipboard could also be sent to a file using [[PRINT (file statement)|PRINT #1]] [[_CLIPBOARD$]].
-
-
-{{PageSeeAlso}}
-* [[_CLIPBOARD$]] (function)
-* [[_CLIPBOARDIMAGE (function)]], [[_CLIPBOARDIMAGE]] (statement)
-* [[CHR$]], [[ASCII]] (code table)
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CLIPBOARD$__111111111$.txt b/internal/help/_CLIPBOARD$__111111111$.txt
deleted file mode 100644
index dc32acbb4..000000000
--- a/internal/help/_CLIPBOARD$__111111111$.txt
+++ /dev/null
@@ -1,145 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:41}}
-{{DISPLAYTITLE:_CLIPBOARD$}}
-The [[_CLIPBOARD$]] function returns the current Operating System's clipboard contents as a [[STRING]].
-
-
-{{PageSyntax}}
-:{{Parameter|result$}} = [[_CLIPBOARD$]]
-
-
-{{PageDescription}}
-* Text returned can contain the entire contents of a copied file or web page or text from a previous [[_CLIPBOARD$ (statement)|_CLIPBOARD$]] statement.
-* The string returned can also contain formatting like CRLF ([[CHR$]](13) + [[CHR$]](10)) end of line characters.
-* The clipboard can be used to copy, paste and communicate between running programs.
-
-
-{{PageExamples}}
-''Example 1:'' Passing a string value between two running programs no matter where they are located.
-: ''Program1:''
-{{CodeStart}}
-{{Cl|PRINT}} "Start Program2 to read your text entries! Empty entry quits!"
-{{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "Entry program started!" 'set clipboard initially
-
-DO
- {{Cl|LINE INPUT}} "Enter some text to send to other program: ", text$
- {{Cl|IF...THEN|IF}} text$ = "" {{Cl|THEN}} {{Cl|EXIT DO}}
- {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = text$
-{{Cl|LOOP}}
-
-{{Cl|SYSTEM}}
-{{CodeEnd}}
-:''Program2:''
-{{CodeStart}}
-{{Cl|PRINT}} "Enter text in Program1 and this program will read it. Esc key quits!"
-
-DO: {{Cl|_LIMIT}} 100
- text$ = {{Cl|_CLIPBOARD$}} 'function returns clipboard contents
- {{Cl|IF...THEN|IF}} {{Cl|LEN}}(text$) {{Cl|THEN}}
- {{Cl|PRINT}} text$
- {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "" 'clear clipboard after a read
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-
-{{Cl|END}}
-{{CodeEnd}}
-:''Explanation:'' Compile and run both programs at once to see the interaction. You could also run them on different paths.
-
-
-''Example 2: A minimized program that pops up when Ctrl + Shift is entered anytime in '''Windows''' and adds clipboard text to be Pasted:
-{{CodeStart}}
-'"ClippyBoard" program uses GetKeyState Win API to monitor a specific key combination.
-'This demo will maximize the window and focus on program when Shift+A is pressed.
-
-{{Cl|DECLARE DYNAMIC LIBRARY}} "user32"
- {{Cl|FUNCTION}} FindWindowA%& ({{Cl|BYVAL}} ClassName {{Cl|AS}} {{Cl|_OFFSET}}, WindowName$) 'find process handle by title
- {{Cl|FUNCTION}} GetKeyState% ({{Cl|BYVAL}} nVirtKey {{Cl|AS}} {{Cl|LONG}}) 'Windows virtual key presses
- {{Cl|FUNCTION}} ShowWindow& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|_OFFSET}}, {{Cl|BYVAL}} nCmdShow {{Cl|AS}} {{Cl|LONG}}) 'maximize process
- {{Cl|FUNCTION}} GetForegroundWindow%& 'find currently focused process handle
- {{Cl|FUNCTION}} SetForegroundWindow& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|_OFFSET}}) 'set foreground window process(focus)
-{{Cl|DECLARE LIBRARY|END DECLARE}}
-
-title$ = "Clippy Clipboard (Ctrl+Shift)" 'title of program window
-{{Cl|_TITLE}} title$ 'set program title
-hwnd%& = FindWindowA(0, title$ + {{Cl|CHR$}}(0)) 'find this program's process handle
-
-{{Cl|SCREEN}} 13
-{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}}
-
-{{Cl|COLOR}} 10: {{Cl|PRINT}}
-{{Cl|PRINT}} " Press Ctrl+Shift to see clipboard menu."
-
-{{Cl|_DELAY}} 4
-x& = ShowWindow&(hwnd%&, 2) 'minimize
-
-{{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 30 'save CPU usage while waiting for key press
-
- {{Cl|IF...THEN|IF}} GetKeyState(16) < 0 {{Cl|AND (boolean)|AND}} GetKeyState(17) < 0 {{Cl|THEN}} '<==== Shift+A
- FGwin%& = GetForegroundWindow%& 'get current process in focus
- y& = ShowWindow&(hwnd%&, 1) 'maximize minimized program
-
- {{Cl|IF...THEN|IF}} FGwin%& <> hwnd%& {{Cl|THEN}} z& = SetForegroundWindow&(hwnd%&) 'set focus when necessary
- {{Cl|_DELAY}} 1
- GetKey
- x& = ShowWindow&(hwnd%&, 2) 'minimize after letter key entry
- {{Cl|COLOR}} 10: {{Cl|PRINT}}
- {{Cl|PRINT}} " Press Ctrl+Shift to see clipboard menu."
- {{Cl|END IF}}
-{{Cl|LOOP}}
-
-
-{{Cl|SUB}} GetKey
-{{Cl|CLS}}
-{{Cl|COLOR}} 12: {{Cl|PRINT}}: {{Cl|PRINT}} {{Cl|_CLIPBOARD$}}
-{{Cl|DO...LOOP|DO}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = ""
-{{Cl|_DELAY}} 1
-{{Cl|CLS}}
-{{Cl|COLOR}} 11: {{Cl|PRINT}} "Select a letter clipboard option:"
-{{Cl|PRINT}}
-{{Cl|PRINT}} "A = Address"
-{{Cl|PRINT}} "C = Cell phone"
-{{Cl|PRINT}} "E = Email"
-{{Cl|PRINT}} "F = First Name"
-{{Cl|PRINT}} "H = Home phone"
-{{Cl|PRINT}} "L = Last Name"
-{{Cl|PRINT}} "N = Name"
-{{Cl|PRINT}} "M = MAC address"
-{{Cl|PRINT}} "P = Password"
-{{Cl|PRINT}} "W = Work name"
-{{Cl|PRINT}} "X = QUIT!"
-{{Cl|PRINT}} "Z = Zip code"
-{{Cl|COLOR}} 14: {{Cl|PRINT}}
-{{Cl|PRINT}} "Another letter will skip or X = {{Cl|EXIT}}!"
-
-K$ = {{Cl|UCASE$}}({{Cl|INPUT$}}(1))
-
-{{Cl|SELECT CASE}} K$ 'The following text should be your personal user info:
- {{Cl|CASE}} "A": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "my address"
- {{Cl|CASE}} "C": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "cell number"
- {{Cl|CASE}} "E": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "myemail"
- {{Cl|CASE}} "F": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "formal name"
- {{Cl|CASE}} "H": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "home number"
- {{Cl|CASE}} "L": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "lastname"
- {{Cl|CASE}} "M": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "modempassword"
- {{Cl|CASE}} "N": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "name"
- {{Cl|CASE}} "P": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "password"
- {{Cl|CASE}} "X": {{Cl|END}}
- {{Cl|CASE}} "Z": {{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "zipcode"
-{{Cl|END SELECT}}
-{{Cl|CLS}}
-{{Cl|PRINT}}
-{{Cl|PRINT}}
-{{Cl|COLOR}} 14: {{Cl|PRINT}} {{Cl|_CLIPBOARD$}}
-{{Cl|BEEP}}
-{{Cl|_DELAY}} 2
-{{Cl|END SUB}}
-{{CodeEnd}}{{small|Code by Ted Weissgerber}}
-: ''Explanation:'' The program will run minimized until Ctrl + Shift is entered and will pop up to ask for a letter choice that contains the text you want in the clipboard. More letter choices can be added. Text can be pasted into a web page or entry box and the program will minimize until it is needed later. The program uses very little resources!
-
-
-{{PageSeeAlso}}
-* [[_CLIPBOARD$ (statement)]]
-* [[_CLIPBOARDIMAGE (function)]], [[_CLIPBOARDIMAGE]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CLIPBOARDIMAGE_(function)__11111111111111_(00000000).txt b/internal/help/_CLIPBOARDIMAGE_(function)__11111111111111_(00000000).txt
deleted file mode 100644
index 09081991f..000000000
--- a/internal/help/_CLIPBOARDIMAGE_(function)__11111111111111_(00000000).txt
+++ /dev/null
@@ -1,53 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:43}}
-{{DISPLAYTITLE:_CLIPBOARDIMAGE (function)}}
-The [[_CLIPBOARDIMAGE (function)|_CLIPBOARDIMAGE]] function pastes an image from the clipboard into a new 32-bit image in memory.
-
-
-{{PageSyntax}}
-: {{Parameter|newImageHandle&}} = [[_CLIPBOARDIMAGE (function)|_CLIPBOARDIMAGE]]
-
-
-{{PageDescription}}
-* When the paste operation is successful, {{Parameter|newImageHandle&}} will be < -1. Handle values of -1 or 0 indicate that there wasn't an image in the clipboard or that the format wasn't accepted.
-* Use [[_FREEIMAGE]] to free the memory used by {{Parameter|newImageHandle&}} when it's no longer needed by your program.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-==Availability==
-* '''Build 20170906/64''' onward.
-
-
-{{PageExamples}}
-''Example:'' Monitoring the clipboard for new images copied from other programs:
-{{CodeStart}}{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-{{Cl|DO}}
- {{Cl|CLS}}
- {{Cl|COLOR}} {{Cl|_RGB32}}(177, 177, 177)
- {{Cl|PRINT}} "Monitoring clipboard..."
- {{Cl|IF}} img& < -1 {{Cl|THEN}} _FREEIMAGE img&
- img& = {{Cl|_CLIPBOARDIMAGE}}
- IF img& < -1 THEN
- {{Cl|PRINT}} "Image found:"
- {{Cl|COLOR}} _RGB32(255, 255, 255)
- {{Cl|PRINT}} "Width :"; {{Cl|_WIDTH (function)|_WIDTH}}(img&)
- {{Cl|PRINT}} "Height:"; {{Cl|_HEIGHT|_HEIGHT}}(img&)
- w = {{Cl|_WIDTH (function)|_WIDTH}} / 2 - {{Cl|_WIDTH (function)|_WIDTH}}(img&) / 2
- IF w < 0 THEN w = 0
- {{Cl|_PUTIMAGE}} (w, {{Cl|CSRLIN}} * {{Cl|_FONTHEIGHT}}), img&
- ELSE
- PRINT "No image found."
- END IF
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 10
-{{Cl|LOOP}}
-{{CodeEnd}}
-{{small|Code by Fellippe Heitor}}
-
-
-{{PageSeeAlso}}
-* [[_CLIPBOARDIMAGE]] {{text|(statement - used to copy an image to the clipboard)}}
-* [[_CLIPBOARD$]], [[_CLIPBOARD$ (statement)]] {{text|(used to copy/paste text)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CLIPBOARDIMAGE__11111111111111.txt b/internal/help/_CLIPBOARDIMAGE__11111111111111.txt
deleted file mode 100644
index 4d0b813b7..000000000
--- a/internal/help/_CLIPBOARDIMAGE__11111111111111.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:44}}
-{{DISPLAYTITLE:_CLIPBOARDIMAGE}}
-The [[_CLIPBOARDIMAGE]] statement copies a valid QB64 image to the clipboard.
-
-
-{{PageSyntax}}
-: [[_CLIPBOARDIMAGE]] = {{Parameter|existingImageHandle&}}
-
-
-{{PageDescription}}
-* {{Parameter|existingImageHandle&}} is a valid handle to a graphic QB64 image in memory, created with [[_NEWIMAGE]], [[_LOADIMAGE]] or [[_COPYIMAGE]].
-* You can pass [[_SOURCE]], [[_DEST]] or [[_DISPLAY]] to copy the current source, destination or active display pages, as long as they are valid graphic images.
-* SCREEN 0 handles (created either with [[_NEWIMAGE]] or passed using _DEST while in a text screen) are not valid and will create an [[ERROR Codes|Illegal Function Call]] or [[ERROR Codes|Invalid Handle]] error.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-==Availability==
-* '''Build 20170906/64''' onward.
-
-
-{{PageExamples}}
-''Example:'' Create a sample image and copy it to the clipboard:
-{{CodeStart}}{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-
-'Create image in memory:
-canvas& = {{Cl|_NEWIMAGE}}(300, 200, 32)
-{{Cl|_DEST}} canvas&
-
-'Draw some random rectangles:
-{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-{{Cl|FOR}} i = 1 {{Cl|TO}} 100
- {{Cl|LINE}} (-100 + RND * _WIDTH, -100 + RND * _HEIGHT)-STEP(RND * 150, RND * 150), _RGB(RND * 255, RND * 255, RND * 255), BF
-{{Cl|NEXT}}
-LINE (0, 0)-(_WIDTH - 1, _HEIGHT - 1), _RGB(255, 255, 255), B
-{{Cl|COLOR}} {{Cl|_RGB}}(0, 0, 0), _RGB(255, 255, 255)
-m$ = " Hello, world! "
-{{Cl|_PRINTSTRING}} (_WIDTH / 2 - _PRINTWIDTH(m$) / 2, _HEIGHT / 2 - _FONTHEIGHT / 2), m$
-
-'Show the image:
-{{Cl|_DEST}} 0
-{{Cl|_PUTIMAGE}} (_WIDTH / 2 - _WIDTH(canvas&) / 2, _HEIGHT / 2 - _HEIGHT(canvas&) / 2), canvas&
-{{Cl|PRINT}} "Image generated."
-
-'Copy to the clipboard:
-{{Cl|_CLIPBOARDIMAGE}} = canvas&
-
-PRINT "Image copied to clipboard."
-{{CodeEnd}}
-{{small|Code by Fellippe Heitor}}
-
-
-{{PageSeeAlso}}
-* [[_CLIPBOARDIMAGE (function)|_CLIPBOARDIMAGE]] {{text|(function - used to paste an image from the clipboard)}}
-* [[_CLIPBOARD$]], [[_CLIPBOARD$ (statement)]] {{text|(used to copy/paste text)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CLIP__1111.txt b/internal/help/_CLIP__1111.txt
deleted file mode 100644
index 686c00668..000000000
--- a/internal/help/_CLIP__1111.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:39}}
-{{DISPLAYTITLE:_CLIP}}
-The [[_CLIP]] option is used in a QB64 graphics [[PUT (graphics statement)|PUT]] to allow placement of an image partially off of the screen.
-
-
-{{PageSyntax}}
-:[[PUT (graphics statement)|PUT]] [[[STEP]]]({{Parameter|column, row}}), {{Parameter|image_array(start)}}[, [[_CLIP]]] [{XOR|PSET|AND|OR|PRESET}][, {{Parameter|omitcolor}}]
-
-
-{{PageDescription}}
-* _CLIP should be placed immediately before the PUT action if used. XOR is default when not used.
-* The offscreen portions of the image will be the omit color.
-* [[GET (graphics statement)|GET]] can get portions of the images off screen in '''QB64'''.
-
-
-{{PageExamples}}
-''Example:'' Placing an image partially or fully offscreen.
-{{CodeStart}}
-{{Cl|DIM}} mypic(500)
-{{Cl|SCREEN}} 13
-
-{{Cl|CLS}}
-{{Cl|CIRCLE}} (10,10),10
-{{Cl|GET (graphics statement)|GET}} (0,0)-(20,20), mypic(0)
-
-{{Cl|PRINT}} "This program puts an image off screen."
-{{Cl|PRINT}} "Select which option you'd like to try."
-{{Cl|PRINT}} "1 will produce an illegal function call."
-{{Cl|PRINT}} "1 is putting without _CLIP."
-{{Cl|PRINT}} "2 is putting with _CLIP PSET."
-{{Cl|PRINT}} "3 is putting with _CLIP XOR."
-{{Cl|PRINT}} "4 is putting with _CLIP PSET, 4."
-
-{{Cl|INPUT}} sel
-{{Cl|IF...THEN|IF}} sel = 1 {{Cl|THEN}} {{Cl|PUT (graphics statement)|PUT}} (-10, 10), mypic(0), PSET ' this causes an illegal function call
-{{Cl|IF...THEN|IF}} sel = 2 {{Cl|THEN}} {{Cl|PUT (graphics statement)|PUT}} (-10, 10), mypic(0), {{Cl|_CLIP}} PSET ' allows graphic to be drawn off-screen
-{{Cl|IF...THEN|IF}} sel = 3 {{Cl|THEN}} {{Cl|PUT (graphics statement)|PUT}} (-10, 10), mypic(0), {{Cl|_CLIP}} ' uses the default PUT XOR operation
-{{Cl|IF...THEN|IF}} sel = 4 {{Cl|THEN}} {{Cl|PUT (graphics statement)|PUT}} (-10, 10), mypic(0), {{Cl|_CLIP}} PSET, 4 ' doesn't draw red pixels
-
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[PUT (graphics statement)]]
-* [[GET (graphics statement)]]
-* [[STEP]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_COMMANDCOUNT__111111111111.txt b/internal/help/_COMMANDCOUNT__111111111111.txt
deleted file mode 100644
index c801a9c1a..000000000
--- a/internal/help/_COMMANDCOUNT__111111111111.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:47}}
-{{DISPLAYTITLE:_COMMANDCOUNT}}
-The [[_COMMANDCOUNT]] function returns the number or arguments passed from the command line to the [[COMMAND$]] function.
-
-
-{{PageSyntax}}
-:{{Parameter|result&}} = [[_COMMANDCOUNT]]
-
-
-{{PageDescription}}
-* The function returns the number of arguments passed from the command line to a program when it's executed.
-* Arguments are spaced as separate numerical or text values. Spaced text inside of quotes is considered as one argument.
-* In C, this function would generally be regarded as 'argc' when the main program is defined as the following: '''int main(int argc, char *argv[])'''
-
-
-{{PageExamples}}
-''Example:'' The code below gets the number of parameters passed to our program from the command line with _COMMANDCOUNT:
-{{CodeStart}}limit = {{Cl|_COMMANDCOUNT}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} limit
- {{Cl|PRINT}} {{Cl|COMMAND$}}(i)
-{{Cl|NEXT}}
-{{CodeEnd}}
-: ''Explanation:'' If we start ''ThisProgram.exe'' from the command window with '''ThisProgram -l "loadfile.txt" -s "savefile.txt"''', the _COMMANDCOUNT would be 4, "-l", "loadfile.txt", "-s", "savefile.txt" command arguments passed to the program, which we could then read separately with COMMAND$(n).
-
-
-{{PageSeeAlso}}
-* [[COMMAND$]]
-* [[SHELL]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CONNECTED__111111111.txt b/internal/help/_CONNECTED__111111111.txt
deleted file mode 100644
index 88b00af9f..000000000
--- a/internal/help/_CONNECTED__111111111.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:48}}
-{{DISPLAYTITLE:_CONNECTED}}
-The [[_CONNECTED]] function returns the status of a TCP/IP connection handle.
-
-
-{{PageSyntax}}
-:{{Parameter|result&}} = [[_CONNECTED]]({{Parameter|connectionHandle&}})
-
-
-{{PageDescription}}
-* The handle can come from the [[_OPENHOST]], [[OPENCLIENT]] or [[_OPENCONNECTION]] QB64 TCP/IP functions.
-* Returns -1 if still connected or 0 if connection has ended/failed.
-* Do not rely solely on this function to check for ending communication.
-* Use "time-out" checking as well and [[CLOSE]] any suspect connections.
-* If this function indicates the handle is not connected, any unread messages can still be read using [[GET (TCP/IP statement)|GET #]].
-* Even if this function indicates the handle is not connected, it is important to [[CLOSE]] the connection anyway or important resources cannot be reallocated.
-
-{{PageSeeAlso}}
-* [[_OPENCONNECTION]]
-* [[_OPENHOST]]
-* [[_OPENCLIENT]]
-* [[_CONNECTIONADDRESS$]]
-* [[Downloading Files]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CONNECTIONADDRESS$__11111111111111111$.txt b/internal/help/_CONNECTIONADDRESS$__11111111111111111$.txt
deleted file mode 100644
index 5b38c726b..000000000
--- a/internal/help/_CONNECTIONADDRESS$__11111111111111111$.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:49}}
-{{DISPLAYTITLE:_CONNECTIONADDRESS$}}
-The [[_CONNECTIONADDRESS$]] function returns a connected user's [[STRING]] IP address value.
-
-
-{{PageSyntax}}
-:{{Parameter|result$}} = [[_CONNECTIONADDRESS$]]({{Parameter|connectionHandle&}})
-
-
-{{PageDescription}}
-* The handle can come from the [[_OPENHOST]], [[OPENCLIENT]] or [[_OPENCONNECTION]] QB64 TCP/IP functions.
-* For '''[[_OPENHOST|HOST]]s''': It may return "TCP/IP:8080:213.23.32.5" where 8080 is the port it is listening on and 213.23.32.5 is the global IP address which any computer connected to the internet could use to locate your computer. If a connection to the internet is unavailable or your firewall blocks it, it returns your 'local IP' address (127.0.0.1). You might like to store this address somewhere where other computers can find it and connect to your host. Dynamic IPs which can change will need to be updated.
-* For '''[[_OPENCLIENT|CLIENT]]s''': It may return "TCP/IP:8080:213.23.32.5" where 8080 is the port it used to connect to the listening host and 213.23.32.5 is the IP address of the host name it resolved.
-* For '''[[_OPENCONNECTION|CONNECTION]]s''' (from clients): It may return "TCP/IP:8080:34.232.321.25" where 8080 was the host listening port it connected to and 34.232.321.25 is the IP address of the client that connected. This is very useful because the host can log the IP address of clients for future reference (or banning, for example).
-
-
-{{PageExamples}}
-''Example:'' A Host logging new chat clients in a Chat program. See the [[_OPENHOST]] example for the rest of the code used.
-{{CodeStart}}
-f = {{Cl|FREEFILE}}
-{{Cl|OPEN}} "ChatLog.dat" {{Cl|FOR}} {{Cl|APPEND}} {{Cl|AS}} #f ' code at start of host section before DO loop.
-
-
-newclient = {{Cl|_OPENCONNECTION}}(host) ' receive any new client connection handles
-{{Cl|IF...THEN|IF}} newclient {{Cl|THEN}}
- numclients = numclients + 1 ' increment index
- Users(numclients) = newclient ' place handle into array
- IP$ = {{Cl|_CONNECTIONADDRESS$}}(newclient)
- {{Cl|PRINT}} IP$ + " has joined." ' displayed to Host only
- {{Cl|PRINT (file statement)|PRINT #f}}, IP$, numclients ' print info to a log file
- {{Cl|PRINT (file statement)|PRINT #}}Users(numclients),"Welcome!" ' from Host to new clients only
-{{Cl|END IF}}
-{{CodeEnd}}
-: ''Explanation:'' The function returns the new client's IP address to the IP$ variable. Prints the IP and the original login position to a log file. The information can later be used by the host for referance if necessary. The host could set up a ban list too.
-
-
-{{PageSeeAlso}}
-* [[_OPENCONNECTION]]
-* [[_OPENHOST]]
-* [[_OPENCLIENT]]
-* [[_CONNECTED]]
-* [[WGET]] (HTTP and FTP file transfer)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CONSOLEINPUT__111111111111.txt b/internal/help/_CONSOLEINPUT__111111111111.txt
deleted file mode 100644
index e879478d7..000000000
--- a/internal/help/_CONSOLEINPUT__111111111111.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:53}}
-{{DISPLAYTITLE:_CONSOLEINPUT}}
-The [[_CONSOLEINPUT]] function is used to monitor any new mouse or keyboard input coming from a $CONSOLE window. It must be called in order for [[_CINP]] to return valid values. Windows-only.
-
-
-{{PageSyntax}}
-:{{Parameter|infoExists%%}} = [[_CONSOLEINPUT]]
-
-
-{{PageDescription}}
-* Returns 1 if new keyboard information is available, 2 if mouse information is available, otherwise it returns 0.
-* Must be called before reading any of the other mouse functions and before reading [[_CINP]].
-* To clear all previous input data, read [[_CONSOLEINPUT]] in a loop until it returns 0.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageExamples}}
-''Example 1:'' Reading individual key strokes from a console window (Windows).
-{{CodeStart}}
-{{Cl|$CONSOLE}}:ONLY
-{{Cl|_DEST}} {{Cl|_CONSOLE}}: {{Cl|_SOURCE}} {{Cl|_CONSOLE}}
-
-{{Cl|PRINT}} "Press any key, and I'll give you the scan code for it. quits the demo."
-{{Cl|PRINT}}
-{{Cl|PRINT}}
-{{Cl|DO}}
- x = {{Cl|_CONSOLEINPUT}}
- {{Cl|IF}} x = 1 {{Cl|THEN}} 'read only keyboard input ( = 1)
- c = {{Cl|_CINP}}
- {{Cl|PRINT}} c;
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} c = 1
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[$CONSOLE]], [[_CONSOLE]]
-* [[_CINP]], [[Keyboard_scancodes#INP_Scan_Codes|Scan Codes]]
-* [[_MOUSEX]], [[_MOUSEY]], [[_MOUSEBUTTON]], [[_MOUSEWHEEL]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CONSOLETITLE__111111111111.txt b/internal/help/_CONSOLETITLE__111111111111.txt
deleted file mode 100644
index 8fcfe8fbd..000000000
--- a/internal/help/_CONSOLETITLE__111111111111.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:54}}
-{{DISPLAYTITLE:_CONSOLETITLE}}
-The [[_CONSOLETITLE]] statement creates the title of the console window using a literal or variable [[STRING|string]].
-
-
-{{PageSyntax}}
-: [[_CONSOLETITLE]] {{Parameter|text$}}
-
-
-{{PageDescription}}
-* The ''text$'' used can be a literal or variable [[STRING]] value.
-
-
-{{PageExamples}}
-''Example:'' Hiding the main program window while displaying the console window with a title.
-{{CodeStart}}
-{{Cl|$SCREENHIDE}}
-{{Cl|_DELAY}} 4
-{{Cl|$CONSOLE}}
-{{Cl|_CONSOLETITLE}} "Error Log"
-
-{{Cl|_DEST}} {{Cl|_CONSOLE}}
-{{Cl|PRINT}} "Errors go here! (fyi, this line is not an error)"
-{{Cl|END}}
-{{CodeEnd}}
-
-:''Note:'' You can also use [[SHELL]] "title consoletitle" to set the title of the console window. However, '''the recommended practice is to use [[_CONSOLETITLE]]'''.
-
-
-''See also:''
-* [[$CONSOLE]], [[_CONSOLE]]
-* [[$SCREENHIDE]], [[$SCREENSHOW]]
-* [[_SCREENHIDE]], [[_SCREENSHOW]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CONSOLE__1111111.txt b/internal/help/_CONSOLE__1111111.txt
deleted file mode 100644
index 5eb451053..000000000
--- a/internal/help/_CONSOLE__1111111.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:51}}
-{{DISPLAYTITLE:_CONSOLE}}
-The [[_CONSOLE]] statement can be used to turn a console window ON/OFF.
-
-
-{{PageSyntax}}
-: [[_CONSOLE]] {OFF|ON}
-: _DEST [[_CONSOLE]]
-
-
-* [[_CONSOLE]] OFF or ON must be used after the [[$CONSOLE]] [[Metacommand]] has established that a console window is desired.
-* [[_CONSOLE]] OFF turns the console window off once a console has been established using [[$CONSOLE]]:ON or ONLY.
-* [[_CONSOLE]] ON should only be used after the console window has been turned OFF previously.
-* [[_DEST]] [[_CONSOLE]] can be used to send screen output to the console window using QB64 commands such as [[PRINT]].
-* [[_SCREENHIDE]] or [[_SCREENSHOW]] can be used to hide or display the main program window.
-* The [[$SCREENHIDE]] [[Metacommand]] can hide the main program window throughout a program when only the console is used.
-* '''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''.
-
-
-{{PageExamples}}
-''Example 1:'' Hiding and displaying a console window. Use [[_DELAY]] to place console in front of main program window.
-{{CodeStart}}
-{{Cl|$CONSOLE}}
-{{Cl|_CONSOLE}} OFF 'close original console
-{{Cl|_DELAY}} 2
-{{Cl|_CONSOLE}} ON 'place console above program window
-
-{{Cl|_DEST}} {{Cl|_CONSOLE}}
-{{Cl|INPUT}} "Enter your name: ", nme$ 'get program input
-{{Cl|_CONSOLE}} OFF 'close console
-
-{{Cl|_DEST}} 0 'destination program window
-{{Cl|PRINT}} nme$
-{{Cl|END}}
-{{CodeEnd}}
-: ''Explanation:'' The [[_DEST|destination]] must be changed with [[_DEST]] [[_CONSOLE]] to get [[INPUT]] from the [[$CONSOLE]] screen.
-
-
-''Example 2:'' [[_CONSOLETITLE]] can be used to create a console title, but it must be redone every time the console window is restored once turned off:
-{{CodeStart}}
-{{Cl|$CONSOLE}}
-
-{{Cl|_CONSOLETITLE}} "firstone"
-{{Cl|_DELAY}} 10
-
-{{Cl|_CONSOLE}} OFF
-{{Cl|_DELAY}} 10
-
-{{Cl|_CONSOLE}} ON
-{{Cl|_CONSOLETITLE}} "secondone"
-{{CodeEnd}}
-: ''Note:'' Some versions of Windows may display the program path or Administrator: prefix in console title bars.
-
-
-{{PageSeeAlso}}
-* [[$CONSOLE]], [[_CONSOLETITLE]]
-* [[$SCREENHIDE]], [[$SCREENSHOW]] {{text|(QB64 [[Metacommand]]s)}}
-* [[_SCREENHIDE]], [[_SCREENSHOW]]
-* [[_DEST]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CONTINUE__11111111.txt b/internal/help/_CONTINUE__11111111.txt
deleted file mode 100644
index 4c522c628..000000000
--- a/internal/help/_CONTINUE__11111111.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:55}}
-{{DISPLAYTITLE:_CONTINUE}}
-
-The [[_CONTINUE]] statement is used in a [[DO...LOOP]], [[WHILE...WEND]] or [[FOR...NEXT]] block to skip the remaining lines of code in a block (without exiting it) and start the next iteration. It works as a shortcut to a [[GOTO]], but without the need for a [[line numbers|line label]].
-
-
-{{PageSyntax}}
-: [[_CONTINUE]]
-
-
-{{PageAvailability}}
-* '''QB64 1.2 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:''
-{{CodeStart}}
-{{Cl|FOR}} i = 1 {{Cl|TO}} 10
- {{Cl|IF}} i = 5 {{Cl|THEN}} {{Cl|_CONTINUE}}
- {{Cl|PRINT}} i;
-{{Cl|NEXT}}
-{{CodeEnd}}
-{{OutputStart}}
- 1 2 3 4 6 7 8 9 10
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[DO...LOOP]]
-* [[WHILE...WEND]]
-* [[FOR...NEXT]]
-* [[GOTO]]
-
-{{PageNavigation}}
diff --git a/internal/help/_CONTROLCHR_(function)__1111111111_(00000000).txt b/internal/help/_CONTROLCHR_(function)__1111111111_(00000000).txt
deleted file mode 100644
index a7d10a6cf..000000000
--- a/internal/help/_CONTROLCHR_(function)__1111111111_(00000000).txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:57}}
-{{DISPLAYTITLE:_CONTROLCHR (function)}}
-
-The [[_CONTROLCHR (function)|_CONTROLCHR]] function returns the current state of the [[_CONTROLCHR]] statement as -1 when OFF and 0 when ON.
-
-
-{{PageSyntax}}
-:{{Parameter|status%}} = [[_CONTROLCHR (function)|_CONTROLCHR]]
-
-
-{{PageDescription}}
-* The function requires no parameters.
-* Default return is 0 when the _CONTROLCHR statement has never been used previous to a function read.
-* When the statement has been use to turn OFF control characters, the characters can be printed as text without screen formatting.
-
-
-{{PageSeeAlso}}
-* [[_CONTROLCHR]]
-* [[CHR$]], [[ASC]]
-* [[INKEY$]], [[_KEYHIT]]
-* [[ASCII]] {{text|(codes)}}
-
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CONTROLCHR__1111111111.txt b/internal/help/_CONTROLCHR__1111111111.txt
deleted file mode 100644
index 74b6442d5..000000000
--- a/internal/help/_CONTROLCHR__1111111111.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:56}}
-{{DISPLAYTITLE:_CONTROLCHR}}
-The [[_CONTROLCHR]] statement can be used to turn OFF control character attributes and allow them to be printed.
-
-
-{{PageSyntax}}
-: [[_CONTROLCHR]] {OFF|ON}
-
-
-{{PageDescription}}
-* The [[OFF]] clause allows control characters 0 to 31 to be printed and not format printing as normal text characters.
-::For example: '''{{text|PRINT CHR$(13)|green}}''' 'will not move the cursor to the next line and '''{{text|PRINT CHR$(9)|green}}''' 'will not tab.
-* The default [[ON]] statement allows [[ASCII#Control_Characters|Control Characters]] to be used as control commands where some will not print or will format prints.
-* '''Note:''' File prints may be affected also when using Carriage Return or Line Feed/Form Feed formatting.
-* The QB64 IDE may allow Alt + number pad character entries, but they must be inside of [[STRING]] values. Otherwise the IDE may not recognize them.
-
-
-{{PageExamples}}
-''Example:'' Printing the 255 [[ASCII]] characters in [[SCREEN]] 0 with 32 colors.
-{{CodeStart}}
-{{Cl|DIM}} i {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|WIDTH}} 40, 25
-{{Cl|CLS}}
-{{Cl|_CONTROLCHR}} OFF
-i = 0
-DO
- {{Cl|PRINT}} {{Cl|CHR$}}(i);
- i = i + 1
- {{Cl|IF...THEN|IF}} (i {{Cl|AND (boolean)|AND}} {{Cl|&H}}F) = 0 {{Cl|THEN}} {{Cl|PRINT}}
-{{Cl|LOOP}} {{Cl|WHILE}} i
-{{Cl|LOCATE}} 1, 20
-DO
- {{Cl|COLOR}} i {{Cl|AND (boolean)|AND}} {{Cl|&H}}F {{Cl|OR (boolean)|OR}} (i {{Cl|AND (boolean)|AND}} {{Cl|&H}}80) \ {{Cl|&H}}8, (i {{Cl|AND (boolean)|AND}} {{Cl|&H}}70) \ {{Cl|&H}}10
- {{Cl|PRINT}} {{Cl|CHR$}}(i);
- i = i + 1
- {{Cl|IF...THEN|IF}} (i {{Cl|AND (boolean)|AND}} {{Cl|&H}}F) = 0 {{Cl|THEN}} {{Cl|LOCATE}} 1 + i \ {{Cl|&H}}10, 20
-{{Cl|LOOP}} {{Cl|WHILE}} i
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_CONTROLCHR (function)]]
-* [[CHR$]], [[ASC]]
-* [[INKEY$]], [[_KEYHIT]]
-* [[ASCII]] {{text|(codes)}}
-* [[ASCII#Control_Characters|Control Characters]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_COPYIMAGE__111111111.txt b/internal/help/_COPYIMAGE__111111111.txt
deleted file mode 100644
index 60ae58bbc..000000000
--- a/internal/help/_COPYIMAGE__111111111.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:58}}
-{{DISPLAYTITLE:_COPYIMAGE}}
-This function creates an identical designated image in memory with a different negative [[LONG]] handle value.
-
-
-{{PageSyntax}}
-: newhandle& = [[_COPYIMAGE]]({{Parameter|imageHandle&}}[, {{Parameter|mode%}}])
-
-
-{{Parameters}}
-* The [[LONG]] ''newhandle&'' value returned will be different than the source handle value supplied.
-* If ''imageHandle&'' is designated being zero, the current software [[_DEST|destination]] screen or image is copied.
-* If 1 is designated instead of an ''imageHandle&'', it designates the last OpenGL hardware surface to copy.
-* ''Mode'' 32 can be used to convert 256 color images to 32 bit colors.
-* ''Mode'' 33 images are hardware accelerated in '''version 1.000 and up''', and are created using [[_LOADIMAGE]] or [[_COPYIMAGE]].
-
-
-{{PageDescription}}
-* The function copies any image or screen handle to a new and unique negative [[LONG]] handle value.
-* Valid copy handles are less than -1. Invalid handles return -1 or 0 if it was never created.
-* Every attribute of the passed image or program screen is copied to a new handle value in memory.
-* '''32 bit screen surface backgrounds (black) have zero [[_ALPHA]] so that they are transparent when placed over other surfaces.'''
-: Use [[CLS]] or [[_DONTBLEND]] to make a new surface background [[_ALPHA]] 255 or opaque.
-* '''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].'''
-* '''It is important to free discarded images with [[_FREEIMAGE]] to prevent PC memory allocation errors!'''
-* '''Do not try to free image handles currently being used as the active [[SCREEN]]. Change screen modes first.'''
-
-
-{{PageExamples}}
-;Example 1:Restoring a Legacy SCREEN using the _COPYIMAGE return value.
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-{{Cl|CIRCLE}} (160, 100), 100, 40
-DO: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-'backup screen before changing {{Cl|SCREEN}} mode
-oldmode& = {{Cl|_COPYIMAGE}}(0) 'the 0 value designates the current destination {{Cl|SCREEN}}
-
-s& = {{Cl|_NEWIMAGE}}(800, 600, 32)
-{{Cl|SCREEN}} s&
-{{Cl|LINE}} (100, 100)-(500, 500), {{Cl|_RGB}}(0, 255, 255), BF
-DO: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|SCREEN}} oldmode& 'restore original screen
-{{Cl|IF...THEN|IF}} s& < -1 THEN {{Cl|_FREEIMAGE}} s&
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code courtesy of Galleon}}
-;Note:Only free valid handle values with [[_FREEIMAGE]] AFTER a new [[SCREEN]] mode is being used by the program.
-----
-;Example 2:Program that copies desktop to a hardware image to form a 3D triangle ('''version 1.000 and up'''):
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-my_hardware_handle = {{Cl|_COPYIMAGE}}({{Cl|_SCREENIMAGE}}, 33) 'take a screenshot and use it as our texture
-{{Cl|_MAPTRIANGLE}} (0, 0)-(500, 0)-(250, 500), my_hardware_handle TO_
-(-1, 0, -1)-(1, 0, -1)-(0, 5, -10), , _SMOOTH
-{{Cl|_DISPLAY}}
-{{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 30: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{CodeEnd}}
-{{small|Code courtesy of Galleon}}
-
-
-{{PageSeeAlso}}
-* [[_LOADIMAGE]], [[_NEWIMAGE]]
-* [[_PUTIMAGE]], [[_MAPTRIANGLE]]
-* [[_SOURCE]], [[_DEST]]
-* [[_FREEIMAGE]]
-* [[_FILELIST$ (function)]] {{text|(Demo of _COPYIMAGE)}}
-* [[_DISPLAYORDER]]
-* [[Hardware images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_COPYPALETTE__11111111111.txt b/internal/help/_COPYPALETTE__11111111111.txt
deleted file mode 100644
index e69ea6736..000000000
--- a/internal/help/_COPYPALETTE__11111111111.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:36:59}}
-{{DISPLAYTITLE:_COPYPALETTE}}
-The [[_COPYPALETTE]] statement copies the color palette intensities from one 4 or 8 BPP image to another image or a [[_NEWIMAGE]] screen page using 256 or less colors.
-
-
-{{PageSyntax}}
-:[[_COPYPALETTE]] [{{Parameter|sourceImageHandle&}}[, {{Parameter|destinationImageHandle&}}]]
-
-
-{{PageDescription}}
-* Palette Intensity settings are '''not''' used by 24/32 bit images. Use only with 4 or 8 BPP images.
-* [[_PIXELSIZE]] function returns 1 to indicate that _COPYPALETTE can be used. 4 indicates 24/32 bit images.
-* If {{Parameter|sourceImageHandle&}} is omitted, it is assumed to be the current read page.
-* If {{Parameter|destinationImageHandle&}} is omitted, it is assumed to be the current write page.
-* If either of the images specified by {{Parameter|sourceImageHandle&}} or {{Parameter|destinationImageHandle&}} do not use a palette, an [[ERROR Codes|illegal function call]] error is returned.
-* If either {{Parameter|sourceImageHandle&}} or {{Parameter|destinationImageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error is returned.
-* When loading 4 or 8 BPP image files, it is necessary to adopt the color palette of the image or it may not have the correct colors!
-
-
-{{PageExamples}}
-* See the example in [[SAVEIMAGE]].
-
-
-{{PageSeeAlso}}
-* [[_LOADIMAGE]]
-* [[_PIXELSIZE]]
-* [[_PALETTECOLOR]], [[_PALETTECOLOR (function)]]
-* [[PALETTE]], [[Images]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_CV__11.txt b/internal/help/_CV__11.txt
deleted file mode 100644
index 7619b33f7..000000000
--- a/internal/help/_CV__11.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:01}}
-{{DISPLAYTITLE:_CV}}
-The [[_CV]] function is used to convert [[_MK$]], [[ASCII]], [[STRING]] values to numerical values.
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_CV]]({{Parameter|numericalType}}, {{Parameter|MKstringValue$}})
-
-
-{{Parameters}}
-* {{Parameter|numericalType}} is any number type: [[INTEGER]], [[LONG]], [[SINGLE]], [[DOUBLE]], [[_INTEGER64]], [[_FLOAT]], [[_BYTE]] or [[_BIT]].
-* Integer, Long, Byte and Bit values can be signed or [[_UNSIGNED]].
-* The {{Parameter|MKstringvalue$}} parameter must be a string value generated by [[_MK$]]
-
-
-{{PageDescription}}
-* The {{Parameter|MKstringvalue$}} value type must match the numerical type parameter used.
-* [[_MK$]] [[STRING|string]] values consist of [[ASCII]] characters in the same byte length as the number value type.
-
-
-{{PageExamples}}
-''Example:'' Using the _MK$ and _CV functions:
-{{CodeStart}}
-{{Cl|DIM}} i64 {{Cl|AS}} {{Cl|_INTEGER64}}
-{{Cl|DIM}} i64str {{Cl|AS}} {{Cl|STRING}}
-
-i64 = 2 ^ 61
-i64str = {{Cl|_MK$}}({{Cl|_INTEGER64}}, i64)
-
-{{Cl|PRINT}} "I64:"; i64
-{{Cl|PRINT}} "_MK$: "; i64str
-
-i64 = {{Cl|_CV}}({{Cl|_INTEGER64}}, i64str)
-{{Cl|PRINT}} "_CV:"; i64
-{{CodeEnd}}
-{{OutputStart}}
-I64: 2305843009213693952
-_MK$:
-_CV: 2305843009213693952
-{{OutputEnd}}
-:The _MK$ string result may not print anything to the screen, as in the example above, unless [[_CONTROLCHR]] is set to OFF.
-
-
-{{PageSeeAlso}}
-* [[_MK$]] {{text|(QB64 string conversion function)}}
-* [[MKI$]], [[CVI]], [[INTEGER]]
-* [[MKL$]], [[CVL]], [[LONG]]
-* [[MKS$]], [[CVS]], [[SINGLE]]
-* [[MKD$]], [[CVD]], [[DOUBLE]]
-* [[MKSMBF$]], [[CVSMBF]] {{text|(Microsoft Binary Format)}}
-* [[MKDMBF$]], [[CVDMBF]] {{text|(Microsoft Binary Format)}}
-* [[PDS (7.1) Procedures#CURRENCY|CURRENCY]]
-* [[_CONTROLCHR]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_CWD$__111$.txt b/internal/help/_CWD$__111$.txt
deleted file mode 100644
index 1770af689..000000000
--- a/internal/help/_CWD$__111$.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:02}}
-{{DISPLAYTITLE:_CWD$}}
-
-The [[_CWD$]] function returns the current working directory path as a string value without a trailing path separator.
-
-
-{{PageSyntax}}
-: {{Parameter|workingDirectory$}} = [[_CWD$]]
-
-
-{{PageDescription}}
-* By default, the initial working directory path is usually the same as the directory of the executable file run.
-* The current working directory can be changed with the [[CHDIR]] or [[SHELL]] command; CHDIR sets it, _CWD$ returns it.
-* Path returns will change only when the working path has changed. When in C:\ and run QB64\cwd.exe, it will still return C:\
-* The current working directory string can be used in [[OPEN]] statements and [[SHELL]] commands that deal with files.
-* Works in Windows, macOS and Linux. [[_OS$]] can be used by a program to predict the proper slash separations in different OS's.
-
-
-{{PageErrors}}
-* If an error occurs while obtaining the working directory from the operating system, [[ERROR Codes|error code]] 51 (Internal Error) will be generated.
-
-
-{{PageExamples}}
-''Example:'' Get the current working directory, and move around the file system:
-{{CodeStart}}
-startdir$ = _CWD$
-{{Cl|PRINT}} "We started at "; startdir$
-{{Cl|MKDIR}} "a_temporary_dir"
-{{Cl|CHDIR}} "a_temporary_dir"
-{{Cl|PRINT}} "We are now in "; _CWD$
-{{Cl|CHDIR}} startdir$
-{{Cl|PRINT}} "And now we're back in "; _CWD$
-{{Cl|RMDIR}} "a_temporary_dir"
-{{CodeEnd}}
-
-{{OutputStart}}We started at C:\QB64
-We are now in C:\QB64\a_temporary_dir
-And now we're back in C:\QB64
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[CHDIR]] {{text|(Change the current working directory)}}
-* [[RMDIR]] {{text|(Remove a directory in the file system)}}
-* [[KILL]] {{text|(Delete a file in the file system)}}
-* [[MKDIR]] {{text|(Create a directory in the file system)}}
-* [[_OS$]] {{text|(returns current OS to program)}}
-* [[_STARTDIR$]] {{text|(returns path the user called program from)}}
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_D2G__121.txt b/internal/help/_D2G__121.txt
deleted file mode 100644
index 5a703a21d..000000000
--- a/internal/help/_D2G__121.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:03}}
-{{DISPLAYTITLE:_D2G}}
-The [[_D2G]] function converts a '''degree''' value into a '''gradient''' value.
-
-
-{{PageSyntax}}
-: {{Parameter|result}} = [[_D2G]]({{Parameter|num}})
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Coverting Degrees into Gradient.
-{{CodeStart}}
-INPUT "Give me an angle in Degrees ", D
-R = _D2G(D)
-PRINT "That angle in Gradient is "; R
-{{CodeEnd}}
-{{OutputStart}}
-Give me an angle in Degrees 60
-That angle in Gradient is 66.66666
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2R]]
-* [[_G2D]], [[_G2R]]
-* [[_R2D]], [[_R2G]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_D2R__121.txt b/internal/help/_D2R__121.txt
deleted file mode 100644
index f16ed38b9..000000000
--- a/internal/help/_D2R__121.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:04}}
-{{DISPLAYTITLE:_D2R}}
-The [[_D2R]] function converts a '''degree''' value into a '''radian''' value.
-
-
-{{PageSyntax}}
-:: {{Parameter|result}} = [[_D2R]]({{Parameter|num}})
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Coverting Degrees into Radians.
-{{CodeStart}}
-INPUT "Give me an angle in Degrees ", D
-R = _D2R(D)
-PRINT "That angle in Radians is "; R
-{{CodeEnd}}
-{{OutputStart}}
-Give me an angle in Degrees 60
-That angle in Radians is 1.047198
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]], [[_D2R]]
-* [[_G2D]], [[_G2R]]
-* [[_R2D]], [[_R2G]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DEFAULTCOLOR__111111111111.txt b/internal/help/_DEFAULTCOLOR__111111111111.txt
deleted file mode 100644
index d4c453724..000000000
--- a/internal/help/_DEFAULTCOLOR__111111111111.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:09}}
-{{DISPLAYTITLE:_DEFAULTCOLOR}}
-The [[_DEFAULTCOLOR]] function returns the current default text color for an image handle or page.
-
-
-{{PageSyntax}}
-:{{Parameter|result&}} = [[_DEFAULTCOLOR]] [({{Parameter|imageHandle&}})]
-
-
-{{PageDescription}}
-* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current write page or image designated by [[_DEST]].
-* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error occurs. Check handle values first.
-* Default foreground colors are: [[SCREEN]] 0 = 7, [[SCREEN]] 1 and 10 = 3, [[SCREEN]] 2 and 11 = 1. All other [[SCREEN]]s = 15.
-
-
-{{PageExamples}}
-''Example:'' The default color is the color assigned to the text foreground. The [[SCREEN]] 12 default is [[COLOR]] 15.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|OUT}} {{Cl|&H}}3C8, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 63: {{Cl|OUT}} {{Cl|&H}}3C9, 63: {{Cl|OUT}} {{Cl|&H}}3C9, 63 'assign background RGB intensities
-{{Cl|OUT}} {{Cl|&H}}3C8, 8: {{Cl|OUT}} {{Cl|&H}}3C9, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 0 'assign RGB intensities to COLOR 8
-{{Cl|_PRINTMODE }} {{Cl|_KEEPBACKGROUND}}
-{{Cl|COLOR}} 8 'assign color 8 to text foreground
-{{Cl|PRINT}} "The default color is attribute"; {{Cl|_DEFAULTCOLOR}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[COLOR]]
-* [[_DEST]]
-* [[Images]]
-* [[Windows_Libraries#Color_Dialog_Box|Color Dialog Box]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DEFINE__111111.txt b/internal/help/_DEFINE__111111.txt
deleted file mode 100644
index 2dcffafae..000000000
--- a/internal/help/_DEFINE__111111.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:10}}
-{{DISPLAYTITLE:_DEFINE}}
-[[_DEFINE]] defines a set of variable names according to their first character as a specified data type.
-
-
-{{PageSyntax}}
-:[[_DEFINE]] {{Parameter|letter}}[{{Parameter|-range}}, ...] [[AS]] [{{KW|_UNSIGNED}}] data[[type]]
-
-
-{{Parameters}}
-* Variable start ''letter range'' is in the form firstletter-endingletter (like A-C) or just a single letter.
-* ''Data types'': [[INTEGER]], [[SINGLE]], [[DOUBLE]], [[LONG]], [[STRING]], [[_BIT]], [[_BYTE]], [[_INTEGER64]], [[_FLOAT]], [[_OFFSET]], [[_MEM]]
-* Can also use the [[_UNSIGNED]] definition for positive whole [[INTEGER]] type numerical values.
-
-
-{{PageDescription}}
-* '''When a variable has not been defined or has no type suffix, the value defaults to a [[SINGLE]] precision floating point value.'''
-* _DEFINE sets the [[type]] of all variable names with the starting letter(s) or letter ranges when encountered in the progression of the program (even in conditional statement blocks not executed and subsequent [[SUB]] procedures).
-* '''NOTE: Many QBasic keyword variable names CAN be used with a [[STRING]] suffix ($)! You cannot use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements.'''
-* '''QBasic's IDE''' added DEF statements before any [[SUB]] or [[FUNCTION]]. '''QB64''' (like QB) will change all variable types in subsequent sub-procedures to that default variable type without giving a [[ERROR Codes|"Parameter Type Mismatch"]] warning or adding the proper DEF statement to subsequent procedures. If you do not want that to occur, either remove that DEF statement or add the proper DEF type statements to subsequent procedures.
-* May also affect [[$INCLUDE]] procedures.
-
-
-{{PageExamples}}
-''Example:'' Defining variables that start with the letters A, B, C or F as unsigned integers, including the ''Add2'' [[FUNCTION]].
-{{CodeStart}}
-{{Cl|_DEFINE}} A-C, F {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|INTEGER}}
-
-{{Cl|PRINT}} Add2(-1.1, -2.2)
-
-{{Cl|END}}
-
-{{Cl|FUNCTION}} Add2 (one, two)
-Add2 = one + two
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-{{OutputStart}}65533
-{{OutputEnd}}
-: ''Explanation:'' Unsigned integers can only return positive values while ordinary [[INTEGER|integers]] can also return negative values.
-
-
-{{PageSeeAlso}}
-* [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]]
-* [[DIM]], [[REDIM]]
-* [[COMMON]], [[SHARED]]
-* [[_UNSIGNED]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DEFLATE$__1111111$.txt b/internal/help/_DEFLATE$__1111111$.txt
deleted file mode 100644
index 2b87e0982..000000000
--- a/internal/help/_DEFLATE$__1111111$.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:11}}
-{{DISPLAYTITLE:_DEFLATE$}}
-The [[_DEFLATE$]] function compresses a [[STRING|string]].
-
-
-{{PageSyntax}}
-:{{Parameter|result$}} = [[_DEFLATE$]]({{Parameter|stringToCompress$}})
-
-
-{{PageDescription}}
-* {{Parameter|result$}} will contain the compressed version of {{Parameter|stringToCompress$}}.
-* To decompress the resulting string, use [[_INFLATE$]].
-
-
-==Availability==
-* '''Version 1.4 and up'''.
-
-
-{{PageExamples}}
-''Example 1:'' Compressing a long string of text.
-{{CodeStart}}
-a$ = "The quick brown fox jumps over the lazy dog. "
-{{Cl|PRINT}} "Original string (a$): "; a$
-{{Cl|FOR}} i = 1 {{Cl|TO}} 15
- a$ = a$ + a$
-{{Cl|NEXT}}
-
-{{Cl|PRINT}} "After concatenating it into itself several times, LEN(a$) ="; {{Cl|LEN}}(a$)
-
-b$ = {{Cl|_DEFLATE$}}(a$)
-{{Cl|PRINT}} "After using _DEFLATE$ to compress it, LEN ="; {{Cl|LEN}}(b$)
-{{Cl|PRINT}} {{Cl|USING}} "(compressed size is #.###% of the original)"; (({{Cl|LEN}}(b$) * 100) / {{Cl|LEN}}(a$))
-c$ = {{Cl|_INFLATE$}}(b$)
-PRINT "After using _INFLATE$ to decompress it, LEN ="; {{Cl|LEN}}(c$)
- {{CodeEnd}}
-{{OutputStart}}
-Original string (a$): The quick brown fox jumps over the lazy dog
-After concatenating it into itself several times, LEN(a$) = 1474560
-After using _DEFLATE$ to compress it, LEN = 4335
-(compressed size is 0.295% of the original)
-After using _INFLATE$ to decompress it, LEN = 1474560
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_INFLATE$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DELAY__11111.txt b/internal/help/_DELAY__11111.txt
deleted file mode 100644
index 54f4beb4d..000000000
--- a/internal/help/_DELAY__11111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:12}}
-{{DISPLAYTITLE:_DELAY}}
-The [[_DELAY]] statement suspends program execution for a [[SINGLE]] value of seconds.
-
-
-{{PageSyntax}}
-:[[_DELAY]] {{Parameter|seconds!}}
-
-
-{{PageDescription}}
-* {{Parameter|seconds!}} is the time to wait, accurate to nearest millisecond (.001).
-* While waiting, cpu cycles are relinquished to other applications.
-* Delays are not affected by midnight timer corrections.
-
-
-{{PageSeeAlso}}
-* [[_LIMIT]]
-* [[TIMER]]
-* [[ON TIMER(n)]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DEPTHBUFFER__11111111111.txt b/internal/help/_DEPTHBUFFER__11111111111.txt
deleted file mode 100644
index f4a77b89f..000000000
--- a/internal/help/_DEPTHBUFFER__11111111111.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:13}}
-{{DISPLAYTITLE:_DEPTHBUFFER}}
-The [[_DEPTHBUFFER]] statement turns depth buffering ON or OFF, LOCKs or _CLEARS the buffer.
-
-
-
-{{PageSyntax}}
-: [[_DEPTHBUFFER]] {ON|OFF|LOCK|_CLEAR}[,handle&]
-
-
-{{PageDescription}}
-* Depth buffers store the distance of each pixel on an image/surface. When 3D drawing occurs new pixels are only drawn if they are closer than the existing pixels. After all content is drawn, it results in a scene which looks correct because content which is closer hides content which is further away.
-* Depth buffers are automatically created for any hardware image or surface which is the target/destination of a 3D command (such as the 3D version of [[_MAPTRIANGLE]]).
-* The buffering can be turned ON, OFF or LOCKed. The default state is ON.
-* [[_DEPTHBUFFER]] _CLEAR can be used to reset/erase the depth buffer, meaning that future drawing will not be blocked by existing/previously buffered depth content.
-* Whenever _DISPLAY is called the primary surface's depth buffer is automatically _CLEARed, so unless you are drawing onto a hardware image you may never need to use this option.
-* LOCKing the depth buffer makes it read only. New content cannot be drawn unless it is closer than existing content, but when that new content is drawn it will not update the depth buffer.
-* Turning OFF or LOCKing the depth buffer is typically performed when semi-transparent content is being drawn.
-
-
-
-{{PageSeeAlso}}
-* [[_MAPTRIANGLE]]
-* [[_PUTIMAGE]]
-* [[_DISPLAY]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DESKTOPHEIGHT__1111111111111.txt b/internal/help/_DESKTOPHEIGHT__1111111111111.txt
deleted file mode 100644
index 5639d42d6..000000000
--- a/internal/help/_DESKTOPHEIGHT__1111111111111.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:14}}
-{{DISPLAYTITLE:_DESKTOPHEIGHT}}
-The [[_DESKTOPHEIGHT]] function returns the height of the users current desktop.
-
-
-{{PageSyntax}}
-: {{Parameter|y&}} = [[_DESKTOPHEIGHT]]
-
-
-{{PageDescription}}
-* No parameters are needed for this function.
-* This returns the height of the user's desktop, not the size of any screen or window which might be open on that desktop.
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-{{CodeStart}}
-
- s& = {{Cl|_NEWIMAGE}}(800, 600, 256)
- SCREEN s&
- PRINT _DESKTOPWIDTH, _DESKTOPHEIGHT
- PRINT _WIDTH, _HEIGHT
-
-{{CodeEnd}}
-
-: ''Explanation:'' This will print the size of the user desktop (for example ''1920, 1080'' for a standard hdmi monitor), and then the size of the current [[SCREEN|screen]] (800, 600).
-
-
-{{PageSeeAlso}}
-* [[_HEIGHT]], [[_DESKTOPWIDTH]]
-* [[_WIDTH]], [[_SCREENIMAGE]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DESKTOPWIDTH__111111111111.txt b/internal/help/_DESKTOPWIDTH__111111111111.txt
deleted file mode 100644
index 3a4a3df3c..000000000
--- a/internal/help/_DESKTOPWIDTH__111111111111.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:15}}
-{{DISPLAYTITLE:_DESKTOPWIDTH}}
-The [[_DESKTOPWIDTH]] function returns the width of the users current desktop.
-
-
-{{PageSyntax}}
-: {{Parameter|x&}} = [[_DESKTOPWIDTH]]
-
-
-{{PageDescription}}
-* No parameters are needed for this function.
-* This returns the width of the user's desktop, not the size of any screen or window which might be open on that desktop.
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-{{CodeStart}}
-
- s& = {{Cl|_NEWIMAGE}}(800, 600, 256)
- SCREEN s&
- PRINT _DESKTOPWIDTH, _DESKTOPHEIGHT
- PRINT _WIDTH, _HEIGHT
-
-{{CodeEnd}}
-
-: ''Explanation:'' This will print the size of the user desktop (for example ''1920, 1080'' for a standard hdmi monitor), and then the size of the current [[SCREEN|screen]] (800, 600).
-
-
-{{PageSeeAlso}}
-* [[_HEIGHT]], [[_DESKTOPHEIGHT]]
-* [[_WIDTH]], [[_SCREENIMAGE]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DEST_(function)__1111_(00000000).txt b/internal/help/_DEST_(function)__1111_(00000000).txt
deleted file mode 100644
index 266667a35..000000000
--- a/internal/help/_DEST_(function)__1111_(00000000).txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:18}}
-{{DISPLAYTITLE:_DEST (function)}}
-The [[_DEST]] function returns the handle value of the current write page (the image used for drawing).
-
-
-{{PageSyntax}}
-:{{Parameter|result&}} = [[_DEST]]
-
-
-{{PageDescription}}
-* The current write page is where all drawing occurs by default.
-* The value returned is the same as the latest [[SCREEN]]'s handle when creating custom screen modes using [[_NEWIMAGE]].
-* Keep the _NEWIMAGE handle values when you move to another SCREEN mode so that you can return to that screen later. You can go to another screen mode and return without having to redo the screen.
-* [[_DEST]] return values do not change in legacy screen modes. The value will not help restore them.
-
-
-{{PageSeeAlso}}
-* [[_DEST]]
-* [[_SOURCE (function)]]
-* [[SCREEN]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DEST__1111.txt b/internal/help/_DEST__1111.txt
deleted file mode 100644
index dc0e5917a..000000000
--- a/internal/help/_DEST__1111.txt
+++ /dev/null
@@ -1,117 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:17}}
-{{DISPLAYTITLE:_DEST}}
-The [[_DEST]] statement sets the current write image or page. All graphic and print changes will be done to this image.
-
-
-{{PageSyntax}}
-:[[_DEST]] {{Parameter|imageHandle&}}
-
-
-{{PageDescription}}
-* {{Parameter|imageHandle&}} is the handle of the image that will act as the current write page.
-* '''_DEST 0''' refers to the present program [[SCREEN]]. You can use 0 to refer to the present program [[SCREEN]].
-* [[_DEST]] [[_CONSOLE]] can set the destination to send information to a console window using [[PRINT]] or [[INPUT]].
-* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error occurs. Always check for valid handle values first ({{Parameter|imageHandle&}} < -1).
-*''Note:'' Use [[_SOURCE]] when you need to read a page or image with [[POINT]], [[GET (graphics statement)|GET]] or the [[SCREEN (function)|SCREEN]] function.
-
-
-{{PageExamples}}
-''Example 1:'' Placing a center point and a circle using [[_CLEARCOLOR]] to eliminate the background color black.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 13 'program screen can use 256 colors
-a& = {{Cl|_NEWIMAGE}}(320,200,13) 'create 2 screen page handles a& and b&
-b& = {{Cl|_NEWIMAGE}}(320,200,13)
-{{Cl|_DEST}} a& 'set destination image to handle a&
-{{Cl|PSET}} (100, 100), 15 'draw a dot on the current destination handle a&
-{{Cl|_DEST}} b& 'set destination image to handle b&
-{{Cl|CIRCLE}} (100, 100), 50, 15 'draw a circle on the current destination handle b&
-{{Cl|_CLEARCOLOR}} 0 'make page b color 0 (black) transparent
-{{Cl|_PUTIMAGE}} , b&, a& 'put circle on image b to image a& (a PSET dot)
-{{Cl|_PUTIMAGE}} , a&, 0 'put what is on image a& to the screen (handle 0)
-{{CodeEnd}}
-
-
-''Example 2:'' Demonstrates how [[PRINT|printed]] text can be stretched using [[_PUTIMAGE]] with [[_DEST]] pages.
-{{CodeStart}}
-{{Cl|DIM}} a(10) {{Cl|AS}} {{Cl|LONG}}
-{{Cl|DIM}} b {{Cl|AS}} {{Cl|LONG}}
-
-{{Cl|REM}} Sets up a newimage for B then sets the screen to that.
-b = {{Cl|_NEWIMAGE}}(640, 480, 32)
-{{Cl|SCREEN (statement)|SCREEN}} b
-
-{{Cl|REM}} Make pages 48 pixels tall. If the image is not at least that it wont work
-a(1) = {{Cl|_NEWIMAGE}}(240, 48, 32)
-a(2) = {{Cl|_NEWIMAGE}}(240, 48, 32)
-a(3) = {{Cl|_NEWIMAGE}}(98, 48, 32)
-
-xa = 100
-ya = 120
-xm = 4
-ym = 4
-
-{{Cl|REM}} Some fun things for the bouncing text.
-st$(0) = "doo"
-st$(1) = "rey"
-st$(2) = "mee"
-st$(3) = "faa"
-st$(4) = "soo"
-st$(5) = "laa"
-st$(6) = "tee"
-
-sta$(0) = "This is a demo"
-sta$(1) = "showing how to use"
-sta$(2) = "the _DEST command"
-sta$(3) = "with PRINT"
-sta$(4) = "and _PUTIMAGE"
-
-{{Cl|REM}} prints to a(3) image then switches back to the default 0
-{{Cl|_DEST}} a(3): f = {{Cl|INT}}({{Cl|RND}} * 6): {{Cl|PRINT}} st$(3): {{Cl|_DEST}} 0
-
-DO
- {{Cl|REM}} prints to a(1) and a(2) then switches bac to 0
- {{Cl|_DEST}} a(1)
- {{Cl|CLS}}
- {{Cl|PRINT}} sta(r)
- {{Cl|_DEST}} a(2)
- {{Cl|CLS}}
- {{Cl|PRINT}} sta(r + 1)
- {{Cl|_DEST}} 0 'destination zero is the main program page
-
- {{Cl|REM}} a loop to putimage the images in a(1) and a(2) in a way to make it look like its rolling
- {{Cl|FOR...NEXT|FOR}} yat = 150 {{Cl|TO}} 380 {{Cl|STEP}} 4
- {{Cl|CLS}}
- {{Cl|_PUTIMAGE}} (0, yat)-(640, 380), a(1)
- {{Cl|_PUTIMAGE}} (0, 150)-(640, yat), a(2)
- {{Cl|GOSUB}} bounce
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 20
- {{Cl|NEXT}} yat
-
- r = r + 1
- {{Cl|IF...THEN|IF}} r = 4 {{Cl|THEN}} r = 0
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|END}}
-
-bounce:
-{{Cl|IF...THEN|IF}} xa > 600 {{Cl|OR (boolean)|OR}} xa < 20 {{Cl|THEN}} xm = xm * -1: {{Cl|_DEST}} a(3): f = {{Cl|INT}}({{Cl|RND}} * 6): {{Cl|CLS}}: {{Cl|_CLEARCOLOR}} 0: {{Cl|PRINT}} st$(f): {{Cl|_DEST}} 0
-{{Cl|IF...THEN|IF}} ya > 400 {{Cl|OR (boolean)|OR}} ya < 20 {{Cl|THEN}} ym = ym * -1: {{Cl|_DEST}} a(3): f = {{Cl|INT}}({{Cl|RND}} * 7): {{Cl|CLS}}: {{Cl|_CLEARCOLOR}} 0: {{Cl|PRINT}} st$(f): {{Cl|_DEST}} 0
-{{Cl|_PUTIMAGE}} (xa, ya)-(xa + 150, ya + 80), a(3)
-xa = xa + xm
-ya = ya + ym
-{{Cl|RETURN}}
-{{CodeEnd}}
-{{small|Adapted from code by CodeViper}}
-
-
-{{PageSeeAlso}}
-* [[_DEST (function)]]
-* [[_SOURCE]]
-* [[_PUTIMAGE]]
-* [[_CONSOLE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DEVICE$__111111$.txt b/internal/help/_DEVICE$__111111$.txt
deleted file mode 100644
index bb2be6466..000000000
--- a/internal/help/_DEVICE$__111111$.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:19}}
-{{DISPLAYTITLE:_DEVICE$}}
-The '''_DEVICE$''' function returns a [[STRING]] value holding the controller type, name and input types of the input devices on a computer.
-
-
-{{PageSyntax}}
-: {{Parameter|device$}} = _DEVICE$({{Parameter|device_number}})
-
-
-* The '''[[_DEVICES]] function must be read first to get the number of devices and to enable [[_DEVICE$]] and [[_DEVICEINPUT]].'''
-* The {{Parameter|device_number}} parameter indicates the number of the controller device to be read.
-* Returns the [[STRING]] control type, name of the device and input types each can use included in brackets:
-::* Control type:
-::: [KEYBOARD] always listed as first device when keyboard(s) available. Only one keyboard will show.
-::: [MOUSE]] always listed as second device when keyboard(s) and mouse(mice) are available. Only one mouse will show.
-::: [CONTROLLER] subsequent devices are listed as controllers which include joysticks and game pads.
-::* When [CONTROLLER] is returned it may also give the [[STRING]] [[NAME] [device description]] of the controller.
-::* Returns the type of input after the device name as one or more of the following types:
-::: [{{KW|BUTTON}}] indicates there are button types of input. [[_LASTBUTTON]] can return the number of buttons available.
-::: [{{KW|AXIS}}] indicates there are stick types of input. [[_LASTAXIS]] can return the number of axis available.
-::: [{{KW|WHEEL}}] indicates that a scrolling input can be read. [[_LASTWHEEL]] can return the number of wheels available.
-
-* '''Device numbers above the number of [[_DEVICES|devices]] found will return an OS error.'''
-* Devices found include keyboard, mouse, joysticks, game pads and multiple stick game controllers.
-
-
-{{PageExamples}}
-''Example 1:'' Checking for the system's input devices and the number of buttons available.
-{{CodeStart}}
-devices = {{Cl|_DEVICES}} 'MUST be read in order for other 2 device functions to work!
-PRINT "Number of input devices found ="; devices
-FOR i = 1 TO devices
- PRINT {{Cl|_DEVICE$}}(i)
- PRINT "Buttons:"; {{Cl|_LASTBUTTON}}(i); "Axis:"; {{Cl|_LASTAXIS}}(i); "Wheels:"; {{Cl|_LASTWHEEL}}(i)
-NEXT
-{{CodeEnd}}
-{{OutputStart}}Number of input devices found = 3
-[KEYBOARD][BUTTON]
-Buttons: 512 Axis: 0 Wheels: 0
-[MOUSE][BUTTON][AXIS][WHEEL]
-Buttons: 3 Axis: 2 Wheels: 3
-[CONTROLLER][[NAME][Microsoft Sidewinder Precision Pro (USB)]][BUTTON][AXIS]
-Buttons: 9 Axis: 6 Wheels: 0
-{{OutputEnd}}
-:Note: The [[STRIG]]/[[STICK]] commands won't read from the keyboard or mouse device the above example lists. They will only work on controllers.
-
-
-''Example 2:'' Finding the number of mouse buttons available in QB64. This could also be used for other devices.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} d = 1 {{Cl|TO}} {{Cl|_DEVICES}} 'number of input devices found
- dev$ = {{Cl|_DEVICE$}}(d)
- {{Cl|IF...THEN|IF}} {{Cl|INSTR}}(dev$, "[MOUSE]") {{Cl|THEN}} buttons = {{Cl|_LASTBUTTON}}(d): {{Cl|EXIT}} {{Cl|FOR...NEXT|FOR}}
-{{Cl|NEXT}}
-{{Cl|PRINT}} buttons; "mouse buttons available"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_DEVICES]], [[_DEVICEINPUT]]
-* [[_LASTBUTTON]], [[_LASTAXIS]], [[_LASTWHEEL]]
-* [[_BUTTON]], [[_BUTTONCHANGE]]
-* [[_AXIS]], [[_WHEEL]]
-* [[_MOUSEBUTTON]]
-* [[STRIG]], [[STICK]]
-* [[ON STRIG(n)]], [[STRIG(n)]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DEVICEINPUT__11111111111.txt b/internal/help/_DEVICEINPUT__11111111111.txt
deleted file mode 100644
index de4012c57..000000000
--- a/internal/help/_DEVICEINPUT__11111111111.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:20}}
-{{DISPLAYTITLE:_DEVICEINPUT}}
-The '''_DEVICEINPUT''' function returns the device number when a controller device button, wheel or axis event occurs.
-
-
-{{PageSyntax}}
-: {{Parameter|device%}} = [[_DEVICEINPUT]]
-: {{Parameter|device_active%}} = [[_DEVICEINPUT]]({{Parameter|device_number%}})
-
-
-{{Parameters}}
-* Use the _DEVICEINPUT {{Parameter|device%}} [[INTEGER]] returned to find the number of the controller device being used.
-* A literal specific {{Parameter|device_number%}} parameter can be used to return -1 if active or 0 if inactive. {{text|EX: '''WHILE _DEVICEINPUT(2)'''|green}}
-
-
-{{PageDescription}}
-* Use [[_DEVICES]] to find the number of controller devices available BEFORE using this function.
-* [[_DEVICE$]] can be used to list the device names and control types using valid [[_DEVICES]] numbers.
-* When a device button is pressed or a scroll wheel or axis is moved, the device number will be returned.
-* Devices are numbered as 1 for keyboard and 2 for mouse. Other controller devices will be numbered 3 or higher if installed.
-* [[_LASTBUTTON]], [[_LASTAXIS]], or [[_LASTWHEEL]] will indicate the number of functions available with the specified ''device'' number.
-* User input events can be monitored reading valid numbered [[_AXIS]], [[_BUTTON]], [[_BUTTONCHANGE]] or [[_WHEEL]] functions.
-* ''Note:'' [[ON...GOSUB|ON _DEVICEINPUT GOSUB]] keyboard, mouse, gamecontrol can be used to control the devices 1,2 and 3, etc.
-
-
-{{PageExamples}}
-''Example 1:'' Checking device controller interfaces and finding out what devices are being used.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|_DEVICES}}
- {{Cl|PRINT}} {{Cl|STR$}}(i) + ") " + {{Cl|_DEVICE$}}(i)
- {{Cl|PRINT}} "Button:"; {{Cl|_LASTBUTTON}}(i); ",Axis:"; {{Cl|_LASTAXIS}}(i); ",Wheel:"; {{Cl|_LASTWHEEL}}(i)
-{{Cl|NEXT}}
-
-{{Cl|PRINT}}
-DO
- x = {{Cl|_DEVICEINPUT}}
- {{Cl|IF...THEN|IF}} x {{Cl|THEN}} {{Cl|PRINT}} "Device ="; x;
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}[KEYBOARD][BUTTON]
-Buttons: 512 Axis: 0 Wheels: 0
-[MOUSE][BUTTON][AXIS][WHEEL]
-Buttons: 3 Axis: 2 Wheels: 3
-[CONTROLLER][[NAME][Microsoft Sidewinder Precision Pro (USB)]][BUTTON][AXIS]
-Buttons: 9 Axis: 6 Wheels: 0
-
-Device = 2 Device = 2
-{{OutputEnd}}
-: ''Note:'' Mouse events must be within the program screen area. Keyboard presses are registered only when program is in focus.
-
-
-''Example 2:'' Why does a mouse have 3 wheels? Relative x and y movements can be read using the first 2 [[_WHEEL]] reads.
-{{CodeStart}}
-ignore = {{Cl|_MOUSEMOVEMENTX}} 'dummy call to put mouse into relative movement mode
-
-{{Cl|PRINT}} "Move your mouse and/or your mouse wheel (ESC to exit)"
-
-d = {{Cl|_DEVICES}} ' always read number of devices to enable device input
-DO: {{Cl|_LIMIT}} 30 'main loop
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_DEVICEINPUT}}(2) 'loop only runs during a device 2 mouse event
- {{Cl|PRINT}} {{Cl|_WHEEL}}(1), {{Cl|_WHEEL}}(2), {{Cl|_WHEEL}}(3)
- {{Cl|LOOP}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{CodeEnd}}
-: ''Explanation:'' Referencing the [[_MOUSEMOVEMENTX]] function hides the mouse and sets the mouse to a relative movement mode which can be read by [[_WHEEL]]. [[_DEVICEINPUT]](2) returns -1 (true) only when the mouse is moved, scrolled or clicked.
-
-
-''Example 3:'' Using [[ON...GOSUB]] with the [[_DEVICEINPUT]] number to add keyboard, mouse and game controller event procedures.
-{{CodeStart}}
-n = {{Cl|_DEVICES}} 'required when reading devices
-{{Cl|PRINT}} "Number of devices found ="; n
-{{Cl|FOR...NEXT|FOR}} i = 1 TO n
- PRINT i; _DEVICE$(i) ' 1 = keyboard, 2 = mouse, 3 = other controller, etc.
-{{Cl|NEXT}}
-{{Cl|PRINT}}
-
-{{Cl|DO...LOOP|DO}}: device = {{Cl|_DEVICEINPUT}}
- {{Cl|ON...GOSUB|ON device GOSUB}} keyboard, mouse, controller 'must be inside program loop
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{Cl|END}}
-
-keyboard:
-{{Cl|PRINT}} device; "Keyboard";
-{{Cl|RETURN}}
-
-mouse:
-{{Cl|PRINT}} device; "Mouse ";
-{{Cl|RETURN}}
-
-controller:
-{{Cl|PRINT}} device; "Game control ";
-{{Cl|RETURN}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-: ''Note:'' [[ON...GOSUB]] and [[ON...GOTO]] events require numerical values to match the order of line labels listed in the event used inside loops.
-
-
-{{PageSeeAlso}}
-* [[_DEVICES]], [[_DEVICE$]]
-* [[_LASTBUTTON]], [[_LASTAXIS]], [[_LASTWHEEL]]
-* [[_BUTTON]], [[_AXIS]], [[_WHEEL]]
-* [[STRIG]], [[STICK]]
-* [[ON...GOSUB]] {{text|(numerical events)}}
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DEVICES__1111111.txt b/internal/help/_DEVICES__1111111.txt
deleted file mode 100644
index 0f965e4f0..000000000
--- a/internal/help/_DEVICES__1111111.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:22}}
-{{DISPLAYTITLE:_DEVICES}}
-The [[_DEVICES]] function returns the number of INPUT devices on your computer including keyboard, mouse and game devices.
-
-
-{{PageSyntax}}
-: {{Parameter|device_count%}} = [[_DEVICES]]
-
-
-{{PageDescription}}
-* Returns the number of devices that can be listed separately with the [[_DEVICE$]] function by the device number.
-* Devices include keyboard, mouse, joysticks, game pads and multiple stick game controllers.
-* '''Note: This function must be read before trying to use the [[_DEVICE$]], [[_DEVICEINPUT]] or _LAST control functions.'''
-
-
-{{PageExamples}}
-''Example:'' Checking for the system's input devices.
-{{CodeStart}}
-devices = {{Cl|_DEVICES}} 'MUST be read in order for other 2 device functions to work!
-PRINT "Number of input devices found ="; devices
-FOR i = 1 TO devices
- PRINT {{Cl|_DEVICE$}}(i)
- PRINT "Buttons:"; {{Cl|_LASTBUTTON}}(i)
-NEXT
-{{CodeEnd}}
-{{OutputStart}}Number of input devices found = 2
-[KEYBOARD][BUTTON]
-Buttons: 512
-[MOUSE][BUTTON][AXIS][WHEEL]
-Buttons: 3
-{{OutputEnd}}
-:Note: The [[STRIG]]/[[STICK]] commands won't read from the keyboard or mouse device the above example lists.
-
-
-{{PageSeeAlso}}
-* [[_DEVICE$]], [[_DEVICEINPUT]]
-* [[_LASTBUTTON]], [[_LASTAXIS]], [[_LASTWHEEL]]
-* [[_BUTTON]], [[_BUTTONCHANGE]]
-* [[_AXIS]], [[_WHEEL]]
-* [[_MOUSEINPUT]], [[_MOUSEX]], [[_MOUSEBUTTON]]
-* [[STRIG]], [[STICK]]
-* [[ON STRIG(n)]], [[STRIG(n)]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DIR$__111$.txt b/internal/help/_DIR$__111$.txt
deleted file mode 100644
index 3230ca666..000000000
--- a/internal/help/_DIR$__111$.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:23}}
-{{DISPLAYTITLE:_DIR$}}
-The [[_DIR$]] function returns common paths in '''Windows''' only such as My Documents, My Pictures, My Music, Desktop.
-
-
-{{PageSyntax}}
-: {{Parameter|d$}} = [[_DIR$]]("{{Parameter|folderspecification}}")
-
-
-{{Parameters}}
-* ''folderspecification'' may be "desktop", "download", "documents", "music", "video", "pictures", "appdata", "program data", "local data".
-* Some variation is accepted for the folder specification:
-:: MY DOCUMENTS, TEXT, DOCUMENT, DOCUMENTS, DOWNLOAD, DOWNLOADS
-:: MY MUSIC, MUSIC, AUDIO, SOUND, SOUNDS
-:: MY PICTURES, PICTURE, PICTURES, IMAGE, IMAGES, PHOTO, PHOTOS, DCIM, CAMERA, CAMERA ROLL
-:: MY VIDEOS, VIDEO, VIDEOS, MOVIE, MOVIES,
-:: DATA, APPDATA, APPLICATION DATA, PROGRAM DATA, LOCAL DATA, LOCALAPPDATA, LOCAL APPLICATION DATA, LOCAL PROGRAM DATA
-
-
-{{PageDescription}}
-* The path returned ends with a backslash (Windows).
-* A nonexistent folder specification usually defaults to the Desktop folder path.
-* In Linux and macOS the function always returns '''"./"'''
-
-
-{{PageExamples}}
-Example: Displaying default paths in Windows only.
-{{CodeStart}}{{Cl|PRINT}} "DESKTOP=" + _DIR$("desktop")
-{{Cl|PRINT}} "DOWNLOADS=" + {{Cl|_DIR$}}("download")
-{{Cl|PRINT}} "DOCUMENTS=" + {{Cl|_DIR$}}("my documents")
-{{Cl|PRINT}} "PICTURES=" + {{Cl|_DIR$}}("pictures")
-{{Cl|PRINT}} "MUSIC=" + {{Cl|_DIR$}}("music")
-{{Cl|PRINT}} "VIDEO=" + {{Cl|_DIR$}}("video")
-{{Cl|PRINT}} "APPLICATION DATA=" + {{Cl|_DIR$}}("data")
-{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data"
-{{CodeEnd}}
-{{OutputStart}}DESKTOP=C:\Documents and Settings\Administrator\Desktop\
-DOWNLOADS=C:\Documents and Settings\Administrator\Downloads\
-DOCUMENTS=C:\Documents and Settings\Administrator\My Documents\
-PICTURES=C:\Documents and Settings\Administrator\My Documents\My Pictures\
-MUSIC=C:\Documents and Settings\Administrator\My Documents\My Music\
-VIDEO=C:\Documents and Settings\Administrator\My Documents\My Videos\
-APPLICATION DATA=C:\Documents and Settings\Administrator\Application Data\
-LOCAL APPLICATION DATA=C:\Documents and Settings\Administrator\Local Settings\Application Data\
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_CWD$]]
-* [[_STARTDIR$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DIREXISTS__111111111.txt b/internal/help/_DIREXISTS__111111111.txt
deleted file mode 100644
index 7220d9e00..000000000
--- a/internal/help/_DIREXISTS__111111111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:24}}
-{{DISPLAYTITLE:_DIREXISTS}}
-The [[_DIREXISTS]] function determines if a designated file path or folder exists and returns true (-1) or false (0).
-
-
-{{PageSyntax}}
-: {{Parameter|dirExists%}} = [[_DIREXISTS]]({{Parameter|filepath$}})
-
-
-{{PageDescription}}
-* The {{Parameter|filepath$}} parameter can be a literal or variable [[STRING|string]] path value.
-* The function returns -1 when a path or folder exists and 0 when it does not.
-* The function reads the system information directly without using a [[SHELL]] procedure.
-* The function will use the appropriate Operating System path separators. [[_OS$]] can determine the operating system.
-* '''This function does not guarantee that a path can be accessed, only that it exists.'''
-* '''NOTE: Checking if a folder exists in a CD drive may cause the tray to open automatically to request a disk when empty.''' To find drives in Windows, use this API Library: [[Windows Libraries#Disk Drives|Disk Drives]]
-
-
-{{PageExamples}}
-{{Parameter|Example:'' Checks if a folder exists before proceeding.
-{{CodeStart}}
-{{Cl|IF}} {{Cl|_DIREXISTS}}("internal\temp") THEN
- {{Cl|PRINT}} "Folder found."
-{{Cl|END IF}}
-{{CodeEnd}}}}
-
-
-{{PageSeeAlso}}
-* [[_FILEEXISTS]]
-* [[SHELL]]
-* [[_OS$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DISPLAYORDER__111111111111.txt b/internal/help/_DISPLAYORDER__111111111111.txt
deleted file mode 100644
index 6b503b36c..000000000
--- a/internal/help/_DISPLAYORDER__111111111111.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:28}}
-{{DISPLAYTITLE:_DISPLAYORDER}}
-The [[_DISPLAYORDER]] statement defines the order to render software, hardware and custom-OpenGL-code.
-
-
-{{PageSyntax}}
-: [[_DISPLAYORDER]] [{_SOFTWARE|_HARDWARE|_HARDWARE1|_GLRENDER}][, ...][, ...][, ...][, ...]
-
-
-{{Parameters}}
-* _SOFTWARE refers to software created surfaces or [[SCREEN]]s.
-* _HARDWARE and _HARDWARE1 refer to surfaces created by OpenGL hardware acceleration.
-* _GLRENDER refers to OpenGL code rendering order
-
-
-{{PageDescription}}
-* The default on program start is: _DISPLAYORDER _SOFTWARE, _HARDWARE, _GLRENDER, _HARDWARE1
-* Any content or combination order is allowed, except listing the same content twice consecutively.
-* Simply using [[_DISPLAYORDER]] _HARDWARE will render hardware surfaces only.
-* Use an [[underscore]] to continue a code line on a new text row in the IDE.
-* After _DISPLAYORDER has been used, it must be used to make any changes, even to default.
-
-
-{{PageErrors}}
-* If a rendering content is not listed it will not be rendered except when using the startup default.
-* Rendering the same content twice consecutively in a combination is not allowed.
-
-
-==Availability==
-* '''Version 1.000 and up.'''
-
-
-{{PageSeeAlso}}
-* [[_DISPLAY]]
-* [[_PUTIMAGE]]
-* [[_LOADIMAGE]]
-* [[_COPYIMAGE]]
-* [[Hardware images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DISPLAY_(function)__1111111_(00000000).txt b/internal/help/_DISPLAY_(function)__1111111_(00000000).txt
deleted file mode 100644
index 9439c3bb1..000000000
--- a/internal/help/_DISPLAY_(function)__1111111_(00000000).txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:27}}
-{{DISPLAYTITLE:_DISPLAY (function)}}
-The [[_DISPLAY]] function returns the handle of the current image that is displayed on the screen.
-
-
-{{PageSyntax}}
-:{{Parameter|currentImage&}} = [[_DISPLAY]]
-
-
-{{PageDescription}}
-* Returns the current image handle value that is being displayed. Returns 0 if in the default [[SCREEN|screen]] image.
-* Not to be confused with the [[_DISPLAY]] statement that displays the screen when not using [[_AUTODISPLAY]].
-
-
-{{PageExamples}}
-''Example:'' Creating a mouse cursor using a page number that '''you create''' in memory without setting up page flipping.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) 'any graphics mode should work without setting up pages
-{{Cl|_MOUSEHIDE}}
-SetupCursor
-{{Cl|PRINT}} "Hello World!"
-{{Cl|DO}}: {{Cl|_LIMIT}} 30
- {{Cl|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}: {{Cl|LOOP}} 'main loop must contain _MOUSEINPUT
-' other program code
-{{Cl|LOOP}}
-
-{{Cl|SUB}} SetupCursor
-{{Cl|ON TIMER(n)|ON TIMER}}(0.02) UpdateCursor
-{{Cl|TIMER}} ON
-{{Cl|END SUB}}
-
-{{Cl|SUB}} UpdateCursor
-{{Cl|PCOPY}} {{Cl|_DISPLAY (function)|_DISPLAY}}, 100 'any page number as desination with the _DISPLAY function as source
-{{Cl|PSET}} ({{Cl|_MOUSEX}}, {{Cl|_MOUSEY}}), {{Cl|_RGB}}(0, 255, 0)
-{{Cl|DRAW}} "ND10F10L3F5L4H5L3"
-{{Cl|_DISPLAY}} 'statement shows image
-{{Cl|PCOPY}} 100, {{Cl|_DISPLAY (function)|_DISPLAY}} 'with the function return as destination page
-{{Cl|END SUB}}
-{{CodeEnd}}
-''Note:'' Works with the '''_DISPLAY function''' return as the other page. If mouse reads are not crucial, put the [[_MOUSEINPUT]] loop inside of the UpdateCursor SUB.
-
-
-{{PageSeeAlso}}
-* [[SCREEN]]
-* [[PCOPY]]
-* [[_DISPLAY]] {{text|(statement)}}
-* [[_AUTODISPLAY]] {{text|(default mode)}}
-* [[_DISPLAYORDER]] {{text|(statement)}}
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DISPLAY__1111111.txt b/internal/help/_DISPLAY__1111111.txt
deleted file mode 100644
index 2f1f58c03..000000000
--- a/internal/help/_DISPLAY__1111111.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:25}}
-{{DISPLAYTITLE:_DISPLAY}}
-The [[_DISPLAY]] statement turns off the automatic display while only displaying the screen changes when called.
-
-
-{{PageSyntax}}
-: [[_DISPLAY]]
-
-
-{{PageDescription}}
-* '''_DISPLAY''' turns off the auto refresh screen default [[_AUTODISPLAY]] behavior. Prevents screen flickering.
-* Call _DISPLAY each time the screen graphics are to be displayed. Place call after the image has been changed.
-* Re-enable automatic display refreshing by calling [[_AUTODISPLAY]]. If it isn't re-enabled, things may not be displayed later.
-* _DISPLAY tells '''QB64''' to render all of the hardware [[_PUTIMAGE]] commands loaded into the buffer previously.
-* The [[_AUTODISPLAY (function)]] can be used to detect the current display behavior.
-* '''QB64''' can set the graphic rendering order of _SOFTWARE, _HARDWARE, and _GLRENDER with [[_DISPLAYORDER]].
-
-
-{{PageExamples}}
-''Example 1:'' Displaying a circle bouncing around the screen.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-x = 21: y =31 'start position
-dx = 3: dy = 3 'number of pixel moves per loop
-{{Cl|DO}}
- {{Cl|_LIMIT}} 100 ' set to 100 frames per second
- x = x + dx: y = y + dy
- {{Cl|IF...THEN|IF}} x < 0 {{Cl|OR}} x > 640 {{Cl|THEN}} dx = -dx 'limit columns and reverse column direction each side
- {{Cl|IF...THEN|IF}} y < 0 {{Cl|OR}} y > 480 {{Cl|THEN}} dy = -dy 'limit rows and reverse row direction top or bottom
- IF px <> x OR py <> y THEN FOR d = 1 to 20: CIRCLE (px, py), d, 0: NEXT 'erase
- FOR c = 1 TO 20: {{Cl|CIRCLE}} (x, y), c, 6: NEXT 'draw new circle at new position
- px = x: py = y 'save older coordinates to erase older circle next loop
- {{Cl|_DISPLAY}} 'after new circle is set, show it
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = CHR$(27)
-{{CodeEnd}}
-
-:''Explanation:'' The loop is set with [[_LIMIT]] to 100 frames per second to limit CPU usage and the speed of the ball. Each loop a circle is drawn while the previous one is erased when the coordinates change. _DISPLAY only shows the new circle position once each loop. The '''_DISPLAY''' routine eliminates the need for setting [[SCREEN (statement)|SCREEN]] swap pages, [[CLS]] and [[PCOPY]]. _DISPLAY keeps the image off of the screen until the changes have all completed. Drawing 40 circles every loop helps slow down the ball.
-
-
-''Example 2:'' [[_DISPLAY]] must be used to render hardware images placed with [[_PUTIMAGE]] ('''version 1.000 and up''').
-{{CodeStart}}
-{{Cl|CONST}} MenuHeight = 200
-
-
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-'{{Cl|SLEEP}} 1
-{{Cl|LOCATE}} 20
-DO
- {{Cl|_LIMIT}} 30
- DisplayMenu
- k = {{Cl|_KEYHIT}}
- {{Cl|IF...THEN|IF}} k <> 0 {{Cl|THEN}} {{Cl|PRINT}} k,
-{{Cl|LOOP}} {{Cl|UNTIL}} k = 32 {{Cl|OR (boolean)|OR}} k = 27
-
-
-{{Cl|SUB}} DisplayMenu
-{{Cl|STATIC}} init, MS_HW {{Cl|AS}} {{Cl|LONG}}
-{{Cl|IF...THEN|IF}} {{Cl|NOT}} init {{Cl|THEN}}
- init = -1
- MS = {{Cl|_NEWIMAGE}}(640, MenuHeight, 32) 'MenuScreen image
- D = {{Cl|_DEST}}: {{Cl|_DEST}} MS
- {{Cl|CLS}} , {{Cl|&H}}FFAAAAAA 'background color gray
- {{Cl|_PRINTSTRING}} (20, 2), "Menu Test" 'image text
- MS_HW = {{Cl|_COPYIMAGE}}(MS, 33) 'create the MenuScreen_HardWare image
- {{Cl|_FREEIMAGE}} MS
- {{Cl|_DEST}} D
-{{Cl|END IF}}
-{{Cl|_PUTIMAGE}} (0, 0)-(640, MenuHeight), MS_HW
-{{Cl|_DISPLAY}}
-{{Cl|END SUB}}
-{{CodeEnd}}{{small|Code adapted by Galleon}}
-: ''Notes:'' When _DISPLAY is commented out, the hardware Menu Test screen portion will blink and key codes may be seen underneath.
-
-
-{{PageSeeAlso}}
-* [[_DISPLAY (function)]]
-* [[_DISPLAYORDER]]
-* [[_AUTODISPLAY]], [[_AUTODISPLAY (function)]]
-* [[_PUTIMAGE]]
-* [[PCOPY]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_DONTBLEND__111111111.txt b/internal/help/_DONTBLEND__111111111.txt
deleted file mode 100644
index 901b80093..000000000
--- a/internal/help/_DONTBLEND__111111111.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:29}}
-{{DISPLAYTITLE:_DONTBLEND}}
-The [[_DONTBLEND]] statement turns off 32 bit alpha blending for the current image or screen mode where [[_BLEND]] is default.
-
-
-{{PageSyntax}}
-: [[_DONTBLEND]] [{{Parameter|imageHandle&}}]
-
-
-{{Parameters}}
-* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current [[_DEST]]ination write page.
-
-
-{{PageDescription}}
-* If {{Parameter|imageHandle&}} is not valid, an [[ERROR Codes|Invalid handle]] error will occur.
-* [[_DONTBLEND]] is faster than the default [[_BLEND]]. '''You may want to disable it''', unless you really need to use it in 32 bit.
-* '''32 bit screen surface backgrounds (black) have zero [[_ALPHA]] so that they are transparent when placed over other surfaces.'''
-* Use [[CLS]] to make a new surface background [[_ALPHA]] 255 or opaque.
-* Both [[_SOURCE]] and [[_DEST]] must have [[_BLEND]] enabled, or else colors will NOT blend.
-
-
-{{PageExamples}}
-''Example 1:'' Use _DONTBLEND when you want the 32 bit screen surface to be opaque so that it covers up other backgrounds. [[CLS]] works too.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(1280, 720, 32)
-'{{Cl|CLS}}
-{{Cl|_DONTBLEND}} '<<< comment out to see the difference
-
-{{Cl|LINE}} (100, 100)-(500, 500), {{Cl|_RGB32}}(255, 255, 0), BF
-
-b& = SaveBackground&
-
-{{Cl|PRINT}} "This is just test junk"
-{{Cl|PRINT}}
-{{Cl|PRINT}} "Hit any key and the text should disappear, leaving us our pretty yellow box."
-{{Cl|SLEEP}}
-RestoreBackground b&
-
-{{Cl|END}}
-
-{{Cl|FUNCTION}} SaveBackground&
-SaveBackground& = {{Cl|_COPYIMAGE}}(0)
-{{Cl|END FUNCTION}}
-
-{{Cl|SUB}} RestoreBackground (Image {{Cl|AS}} {{Cl|LONG}})
-{{Cl|_PUTIMAGE}} , Image, 0
-{{Cl|END SUB}}
-{{CodeEnd}}
-
-
-''Example 2:'' Turning off blending to create transparency.
-{{CodeStart}}
-
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-alphaSprite& = {{Cl|_NEWIMAGE}}(64, 64, 32)
-
-{{Cl|_DONTBLEND}} alphaSprite& ' turn off alpha-blending
-
-'Create a simple sprite with transparency
-{{Cl|_DEST}} alphaSprite&
-{{Cl|FOR}} y = 0 {{Cl|TO}} 63
- {{Cl|FOR}} x = 0 {{Cl|TO}} 63
- alpha = {{Cl|SQR}}((x - 32) ^ 2 + (y - 32) ^ 2) / 32
- {{Cl|IF}} alpha < 0 {{Cl|THEN}} alpha = 0
- alpha = (1 - alpha * alpha) 'parabolic curve
- {{Cl|PSET}} (x, y), {{Cl|_RGBA32}}(255, 255, 255, alpha * 255)
- {{Cl|NEXT}}
-{{Cl|NEXT}}
-
-'Make a simple background texture
-{{Cl|_DEST}} 0
-{{Cl|FOR}} y = 1 {{Cl|TO}} 479
- {{Cl|FOR}} x = 0 {{Cl|TO}} 639
- {{Cl|PSET}} (x, y), {{Cl|_RGB32}}(x {{Cl|AND (boolean)|AND}} 255, y {{Cl|AND (boolean)|AND}} 255, (x {{Cl|XOR (boolean)|XOR}} y) {{Cl|AND (boolean)|AND}} 255)
- {{Cl|NEXT}}
-{{Cl|NEXT}}
-
-'Store background so we can show moveable objects on it
-background& = {{Cl|_COPYIMAGE}}
-
-'Treat my alpha values as transparency
-{{Cl|_BLEND}} alphaSprite&
-
-ph = 0
-{{Cl|DO}}: {{Cl|_LIMIT}} 60
- x = 320 - 250 * {{Cl|COS}}(ph) - ({{Cl|_WIDTH (function)|_WIDTH}}(alphaSprite&) \ 2)
- y = 240 - 150 * {{Cl|COS}}(ph * 1.3) - ({{Cl|_HEIGHT}}(alphaSprite&) \ 2)
- ph = ph + 0.03
- {{Cl|_PUTIMAGE}} , background&, 0
- {{Cl|_PUTIMAGE}} (x, y), alphaSprite&, 0
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|LEN}}({{Cl|INKEY$}})
-{{CodeEnd}}{{small|Code by Zom-B}}
-''Explanation:'' To make the alpha image, turn alpha blending off. Otherwise PSET blends the pixel to instead of making the sprite transparent.
-
-
-{{PageSeeAlso}}
-* [[_BLEND]]
-* [[_BLEND (function)]]
-* [[Images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DONTWAIT__11111111.txt b/internal/help/_DONTWAIT__11111111.txt
deleted file mode 100644
index 67be74c93..000000000
--- a/internal/help/_DONTWAIT__11111111.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:30}}
-{{DISPLAYTITLE:_DONTWAIT}}
-[[_DONTWAIT]] is used with the [[SHELL]] statement in '''QB64''' to specify that the program shouldn't wait until the external command/program is finished (which it otherwise does by default).
-
-
-{{PageSyntax}}
-: [[SHELL]] [{{KW|_DONTWAIT}}] [{{Parameter|commandLine$}}]
-
-
-{{PageDescription}}
-*Runs the command/program specified in {{Parameter|commandline$}} and lets the calling program continue at the same time in its current screen format.
-*Especially useful when CMD /C or START is used in a SHELL command line to run another program.
-* '''QB64''' automatically uses CMD /C or COMMAND /C when using SHELL.
-* '''QB64''' program screens will not get distorted or minimized like QBasic fullscreen modes would.
-
-
-{{PageExamples}}
-{{CodeStart}}
-
-{{Cl|SHELL}} {{Cl|_DONTWAIT}} "notepad " + filename$
-
-{{Cl|FOR...NEXT|FOR}} x = 1 {{Cl|TO}} 5
- {{Cl|_LIMIT}} 1
- {{Cl|PRINT}} x
-{{Cl|NEXT}}
-
-{{CodeEnd}}
-(opens up notepad at the same time as counting to 5)
-{{OutputStart}}
- 1
- 2
- 3
- 4
- 5
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[SHELL]], [[_HIDE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_DROPPEDFILE__11111111111.txt b/internal/help/_DROPPEDFILE__11111111111.txt
deleted file mode 100644
index 291179d4d..000000000
--- a/internal/help/_DROPPEDFILE__11111111111.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:31}}
-{{DISPLAYTITLE:_DROPPEDFILE}}
-The [[_DROPPEDFILE]] function returns the list of items (files or folders) dropped in a program's window after [[_ACCEPTFILEDROP]] is enabled.
-
-
-{{PageSyntax}}
-''Syntax 1''
-: {{Parameter|nextItem$}} = [[_DROPPEDFILE]]
-
-''Syntax 2''
-: {{Parameter|nextItem$}} = [[_DROPPEDFILE]]({{Parameter|index&}})
-
-{{PageDescription}}
-* After [[_ACCEPTFILEDROP]] is enabled, once [[_TOTALDROPPEDFILES]] is greater than 0 the list of dropped items will be available for retrieval with [[_DROPPEDFILE]]
-* When using [[_DROPPEDFILE]] to read the list sequentially (without specifying an ''index&''), an empty string ("") indicates the list is over and then [[_TOTALDROPPEDFILES]] gets reset to 0.
-* When using [[_DROPPEDFILE]] with an index (which goes from 1 to [[_TOTALDROPPEDFILES]]), you must call [[_FINISHDROP]] after you finish working with the list.
-* Because it returns a string, [[_DROPPEDFILE]] also accepts being followed by a string suffix ([[_DROPPEDFILE]]'''$''')
-* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''.
-
-
-==Availability==
-* '''Version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example:'' Accepting files dragged from a folder and processing the list received by specifying an index.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(128, 25, 0)
-
-{{Cl|_ACCEPTFILEDROP}} 'enables drag/drop functionality
-{{Cl|PRINT}} "Drag files from a folder and drop them in this window..."
-
-{{Cl|DO}}
- {{Cl|IF}} {{Cl|_TOTALDROPPEDFILES}} {{Cl|THEN}}
- {{Cl|FOR}} i = 1 {{Cl|TO}} {{Cl|_TOTALDROPPEDFILES}}
- a$ = {{Cl|_DROPPEDFILE}}(i)
- {{Cl|COLOR}} 15
- {{Cl|PRINT}} i,
- {{Cl|IF}} {{Cl|_FILEEXISTS}}(a$) {{Cl|THEN}}
- {{Cl|COLOR}} 2: {{Cl|PRINT}} "file",
- {{Cl|ELSE}}
- {{Cl|IF}} {{Cl|_DIREXISTS}}(a$) {{Cl|THEN}}
- {{Cl|COLOR}} 3: {{Cl|PRINT}} "folder",
- {{Cl|ELSE}}
- {{Cl|COLOR}} 4: {{Cl|PRINT}} "not found", 'highly unlikely, but who knows?
- {{Cl|END IF}}
- {{Cl|END IF}}
- {{Cl|COLOR}} 15
- {{Cl|PRINT}} a$
- {{Cl|NEXT}}
- {{Cl|_FINISHDROP}}
- {{Cl|END IF}}
-
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_ACCEPTFILEDROP]], [[_TOTALDROPPEDFILES]], [[_FINISHDROP]]
-* [[_FILEEXISTS]], [[_DIREXISTS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ECHO__1111.txt b/internal/help/_ECHO__1111.txt
deleted file mode 100644
index 88cb022a5..000000000
--- a/internal/help/_ECHO__1111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:32}}
-{{DISPLAYTITLE:_ECHO}}
-The [[_ECHO]] statement allows outputting text to a [[$CONSOLE]] window without having to alternate between [[_DEST]] pages.
-
-
-{{PageSyntax}}
-: [[_ECHO]] {''"text to output"'' | {{Parameter|textVariable$}}}
-
-
-{{PageDescription}}
-* [[_ECHO]] is a shorthand to saving current [[_DEST]], switching to [[_DEST]] [[_CONSOLE]], [[PRINT]]ing, then switching back to the previous [[_DEST]].
-* To output numbers, use the [[STR$]] function.
-
-
-{{PageAvailability}}
-* '''QB64 1.3 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-{{CodeStart}}
-{{Cl|$CONSOLE}}
-{{Cl|PRINT}} "this will show in the main window"
-{{Cl|_ECHO}} "this will show in the console"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_DEST]]
-* [[$CONSOLE]], [[_CONSOLE]]
-* [[STR$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ENVIRONCOUNT__111111111111.txt b/internal/help/_ENVIRONCOUNT__111111111111.txt
deleted file mode 100644
index 6f3084b80..000000000
--- a/internal/help/_ENVIRONCOUNT__111111111111.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:37}}
-{{DISPLAYTITLE:_ENVIRONCOUNT}}
-The [[_ENVIRONCOUNT]] function returns the number of items (key/value pairs) currently stored in the system environment variables table.
-
-
-{{PageSyntax}}
-: {{Parameter|totalKeys&}} = [[_ENVIRONCOUNT]]
-
-
-{{PageDescription}}
-* Any changes made at runtime to the environment table are discarded when your program ends
-
-
-{{PageAvailability}}
-* '''QB64 2.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageSeeAlso}}
-* [[ENVIRON$]], [[ENVIRON]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_ERRORLINE__111111111.txt b/internal/help/_ERRORLINE__111111111.txt
deleted file mode 100644
index a0ee98ca5..000000000
--- a/internal/help/_ERRORLINE__111111111.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:39}}
-{{DISPLAYTITLE:_ERRORLINE}}
-The [[_ERRORLINE]] function returns the source code line number that caused the most recent runtime error.
-
-
-{{PageSyntax}}
-:{{Parameter|e%}} = [[_ERRORLINE]]
-
-
-{{PageDescription}}
-* Used in program error troubleshooting.
-* Does not require that the program use line numbers as it counts the actual lines of code.
-* The code line can be found using the QB64 IDE (Use the shortcut '''Ctrl+G''' to go to a specific line) or any other text editor such as Notepad.
-
-
-{{PageExamples}}
-''Example:'' Displaying the current program line using a simulated [[ERROR]] code.
-{{CodeStart}}
-{{Cl|ON ERROR}} {{Cl|GOTO}} DebugLine 'can't use {{Cl|GOSUB}}
-
-{{Cl|ERROR}} 250 'simulated error code
-
-{{Cl|END}}
-DebugLine:
-{{Cl|PRINT}} {{Cl|_ERRORLINE}}
-{{Cl|RESUME}} {{Cl|NEXT}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[ON ERROR]]
-* [[_INCLERRORLINE]], [[_INCLERRORFILE$]]
-* [[ERR]], [[ERL]]
-* [[ERROR]]
-* [[ERROR Codes]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ERRORMESSAGE$__111111111111$.txt b/internal/help/_ERRORMESSAGE$__111111111111$.txt
deleted file mode 100644
index c4f908823..000000000
--- a/internal/help/_ERRORMESSAGE$__111111111111$.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:40}}
-{{DISPLAYTITLE:_ERRORMESSAGE$}}
-The [[_ERRORMESSAGE$]] function returns a human-readable description of the most recent runtime error, or the description of an arbitrary error code passed to it.
-
-
-{{PageSyntax}}
-:{{Parameter|e$}} = [[_ERRORMESSAGE$]]
-:{{Parameter|e$}} = [[_ERRORMESSAGE$]]({{Parameter|errorCode%}})
-
-
-{{PageDescription}}
-* Used in program error troubleshooting.
-* The message returned is identical to the message shown in the dialog box that appears if your program has no error handler. See [[ERROR Codes]] for the full list of error codes and their messages.
-
-{{PageExamples}}
-''Example 1:'' Using an error handler that ignores any error.
-
-{{CodeStart}}
- {{Cl|ON ERROR}} {{Cl|GOTO}} Errhandler
- ' Main module program error simulation code
- {{Cl|ERROR}} 7 ' simulate an Out of Memory Error
- PRINT "Error handled...ending program"
- {{Cl|SLEEP}} 4
- {{Cl|SYSTEM}} ' end of program code
-
- Errhandler: 'error handler sub program line label
- PRINT "Error"; {{Cl|ERR}}; "on program file line"; {{Cl|_ERRORLINE}}
- PRINT "Description: "; {{Cl|_ERRORMESSAGE$}}; "."
- {{Cl|BEEP}} ' warning beep
- {{Cl|RESUME}} NEXT ' moves program to code following the error.
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[ON ERROR]]
-* [[_ERRORLINE]]
-* [[_INCLERRORLINE]], [[_INCLERRORFILE$]]
-* [[ERR]], [[ERL]]
-* [[ERROR]]
-* [[ERROR Codes]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_EXIT_(function)__1111_(00000000).txt b/internal/help/_EXIT_(function)__1111_(00000000).txt
deleted file mode 100644
index 2454cf97a..000000000
--- a/internal/help/_EXIT_(function)__1111_(00000000).txt
+++ /dev/null
@@ -1,68 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:42}}
-{{DISPLAYTITLE:_EXIT (function)}}
-The [[_EXIT]] function prevents the user from closing a program and indicates if a user has clicked the close button in the window title ('''X''' button) or used CTRL + BREAK.
-
-
-{{PageSyntax}}
-:{{Parameter|exitSignal%}} = [[_EXIT]]
-
-
-{{PageDescription}}
-* Once the [[_EXIT]] function is used, the user can no longer manually exit the program until it is ended with [[END]] or [[SYSTEM]].
-* [[_EXIT]] returns any exit requests made after the initial call as:
-:: 0 = no exit request has been made since _EXIT monitoring began in the program.
-:: 1 = exit attempted by clicking the window X (close) button since last function call. (Bit 0 set)
-:: 2 = exit attempted with CTRL + BREAK since last call. (Bit 1 set)
-:: 3 = both CTRL + BREAK and the X box have been used since last call. (Bit 0 and 1 set)
-* If a return value is not 0 the program can handle an exit request at a more convenient time if necessary.
-* After being read, the _EXIT value is reset to 0 so store the value when a program delays an exit request.
-* '''Note: Once _EXIT has been used once, you must monitor your program by checking it for user _EXIT requests.'''
-* Don't just use _EXIT once to prevent a user from exiting a program early, as that constitutes bad practice.
-
-
-{{PageExamples}}
-''Example 1:'' Using an ON TIMER check to read the _EXIT request return values.
-{{CodeStart}}
-q = {{Cl|_EXIT (function)|_EXIT}} 'function read prevents any program exit at start of program
-{{Cl|ON TIMER (n)|ON TIMER}}(5) {{Cl|GOSUB}} quit
-{{Cl|TIMER}} ON
-{{Cl|PRINT}} " The Timer will check for exit request every 5 seconds."
-{{Cl|PRINT}} "Click the X box and/or Ctrl - Break to see the {{Cl|_EXIT (function)|_EXIT}} return!"
-{{Cl|PRINT}} " Any Key Quits"
-{{Cl|PRINT}}
-{{Cl|DO}}: {{Cl|_LIMIT}} 30
- ' ' simulated program loop
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|END}}
-
-quit:
-q = {{Cl|_EXIT (function)|_EXIT}}
-{{Cl|IF}} q {{Cl|THEN}} {{Cl|PRINT}} q;
-{{Cl|SELECT CASE}} q
- {{Cl|CASE}} 1: {{Cl|PRINT}} "= X button was clicked"
- {{Cl|CASE}} 2: {{Cl|PRINT}} "= Ctrl + Break keypress"
- {{Cl|CASE}} 3: {{Cl|PRINT}} "= Both X and Ctrl + Break!"
-{{Cl|END SELECT}}
-{{Cl|RETURN}}
-{{CodeEnd}}
-
-
-''Example 2:'' Removing temporary files before closing a program upon a user's exit request.
-{{CodeStart}}
-x = {{Cl|_EXIT}} 'initial function call blocks a user exit
-OPEN "t3mpdata.tmp" FOR APPEND AS #1
-DO
-IF {{Cl|_EXIT}} THEN {{Cl|CLOSE}}: {{Cl|KILL}} "t3mpdata.tmp": {{Cl|_DELAY}} 1: {{Cl|SYSTEM}}
-LOOP
-{{CodeEnd}}
-{{text|Note: If you have a file named ''t3mpdata.tmp'' change the file name!|red}}
-
-
-{{PageSeeAlso}}
-* [[SYSTEM]]
-* [[END]]
-* [[EXIT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_FILEEXISTS__1111111111.txt b/internal/help/_FILEEXISTS__1111111111.txt
deleted file mode 100644
index 7e2ca76b9..000000000
--- a/internal/help/_FILEEXISTS__1111111111.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:43}}
-{{DISPLAYTITLE:_FILEEXISTS}}
-The '''_FILEEXISTS''' function determines if a designated file name exists and returns true (-1) or false (0).
-
-
-{{PageSyntax}}
-: {{Parameter|theFileExists%}} = [[_FILEEXISTS]]({{Parameter|filename$}})
-
-
-{{PageDescription}}
-* The {{Parameter|filename$}} parameter can be a literal or variable [[STRING|string]] value that can include a path.
-* The function returns -1 when a file exists and 0 when it does not.
-* The function reads the system information directly without using a [[SHELL]] procedure.
-* The function will use the appropriate Operating System path separators. [[_OS$]] can determine the operating system.
-* '''This function does not guarantee that a file can be accessed or opened, just that it exists.'''
-
-
-{{PageExamples}}
-{{Parameter|Example:'' Checks if a file exists before opening it.
-{{CodeStart}}
-{{Cl|IF}} {{Cl|_FILEEXISTS}}("mysettings.ini") THEN
- {{Cl|PRINT}} "Settings file found."
-{{Cl|END IF}}
-{{CodeEnd}}}}
-
-
-{{PageSeeAlso}}
-* [[_DIREXISTS]], [[_OS$]]
-* [[SHELL]], [[FILES]]
-* [[KILL]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FINISHDROP__1111111111.txt b/internal/help/_FINISHDROP__1111111111.txt
deleted file mode 100644
index ef1260059..000000000
--- a/internal/help/_FINISHDROP__1111111111.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:44}}
-{{DISPLAYTITLE:_FINISHDROP}}
-The [[_FINISHDROP]] statement resets [[_TOTALDROPPEDFILES]] and clears the [[_DROPPEDFILE]] list of items (files/folders).
-
-
-{{PageSyntax}}
-: [[_FINISHDROP]]
-
-{{PageDescription}}
-* When using [[_DROPPEDFILE]] with an index (which goes from 1 to [[_TOTALDROPPEDFILES]]), you must call [[_FINISHDROP]] after you finish working with the list in order to prepare for the next drag/drop operation.
-* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''.
-
-
-==Availability==
-* '''Version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example:'' Accepting files dragged from a folder and processing the list received by specifying an index.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(128, 25, 0)
-
-{{Cl|_ACCEPTFILEDROP}} 'enables drag/drop functionality
-{{Cl|PRINT}} "Drag files from a folder and drop them in this window..."
-
-{{Cl|DO}}
- {{Cl|IF}} {{Cl|_TOTALDROPPEDFILES}} {{Cl|THEN}}
- {{Cl|FOR}} i = 1 {{Cl|TO}} {{Cl|_TOTALDROPPEDFILES}}
- a$ = {{Cl|_DROPPEDFILE}}(i)
- {{Cl|COLOR}} 15
- {{Cl|PRINT}} i,
- {{Cl|IF}} {{Cl|_FILEEXISTS}}(a$) {{Cl|THEN}}
- {{Cl|COLOR}} 2: {{Cl|PRINT}} "file",
- {{Cl|ELSE}}
- {{Cl|IF}} {{Cl|_DIREXISTS}}(a$) {{Cl|THEN}}
- {{Cl|COLOR}} 3: {{Cl|PRINT}} "folder",
- {{Cl|ELSE}}
- {{Cl|COLOR}} 4: {{Cl|PRINT}} "not found", 'highly unlikely, but who knows?
- {{Cl|END IF}}
- {{Cl|END IF}}
- {{Cl|COLOR}} 15
- {{Cl|PRINT}} a$
- {{Cl|NEXT}}
- {{Cl|_FINISHDROP}} 'If _FINISHDROP isn't called here then _TOTALDROPPEDFILES never gets reset.
- {{Cl|END IF}}
-
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_ACCEPTFILEDROP]], [[_TOTALDROPPEDFILES]], [[_DROPPEDFILE]]
-* [[_FILEEXISTS]], [[_DIREXISTS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_FLOAT__11111.txt b/internal/help/_FLOAT__11111.txt
deleted file mode 100644
index a5ae80be3..000000000
--- a/internal/help/_FLOAT__11111.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:46}}
-{{DISPLAYTITLE:_FLOAT}}
-'''_FLOAT''' numerical values offer the maximum floating-point decimal precision available using '''QB64'''.
-
-
-{{PageSyntax}}
-::[[DIM]] {{Parameter|variable}} AS [[_FLOAT]]
-
-
-{{PageDescription}}
-* '''QB64''' always allocates 32 bytes to store this value.
-* It is safe to assume this value is at least as precise as [[DOUBLE]].
-* Under the current implementation it is stored in a 10-byte floating point variable.
-* [[_FLOAT]] variables can also use the ## variable name type suffix.
-* Values returned may be expressed using exponential or [[scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision.
-* According to [http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html IEEE-754] this can store a value of up to 1.1897E+4932 compared to a DOUBLE which goes up to 1.7976E+308.
-* Floating decimal point numerical values cannot be [[_UNSIGNED]].
-* Values can be converted to 32 byte [[ASCII]] strings using [[_MK$]] and back with [[_CV]].
-* '''When a variable has not been assigned or has no type suffix, the value defaults to [[SINGLE]].'''
-
-
-{{PageSeeAlso}}
-* [[DOUBLE]], [[SINGLE]]
-* [[_MK$]], [[_CV]]
-* [[_DEFINE]], [[DIM]]
-* [[PDS (7.1) Procedures#CURRENCY|CURRENCY]]
-* [[Variable Types]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FONTHEIGHT__1111111111.txt b/internal/help/_FONTHEIGHT__1111111111.txt
deleted file mode 100644
index 5fe4fe9cf..000000000
--- a/internal/help/_FONTHEIGHT__1111111111.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:49}}
-{{DISPLAYTITLE:_FONTHEIGHT}}
-The [[_FONTHEIGHT]] function returns the font height of a font handle created by [[_LOADFONT]].
-
-
-
-{{PageSyntax}}
-:{{Parameter|pixelHeight%}} = [[_FONTHEIGHT]][({{Parameter|fontHandle&}})]
-
-
-{{PageDescription}}
-* Returns the height of the last font used if a handle is not designated.
-* If no font is set it returns the current screen mode's text block height.
-
-
-{{PageExamples}}
-''Example:'' Finding the [[_FONT|font]] or text block size of printed [[STRING|string]] characters in graphic [[SCREEN]] modes.
-{{CodeStart}}
-DO
- {{Cl|INPUT}} "Enter Screen mode 1, 2 or 7 to 13 or 256, 32 for {{Cl|_NEWIMAGE}}: ", scr$
- mode% = {{Cl|VAL}}(scr$)
-{{Cl|LOOP}} {{Cl|UNTIL}} mode% > 0
-{{Cl|SELECT CASE}} mode%
- {{Cl|CASE}} 1, 2, 7 {{Cl|TO}} 13: {{Cl|SCREEN}} mode%
- {{Cl|CASE}} 256, 32: {{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, mode%)
- {{Cl|CASE ELSE}}: {{Cl|PRINT}} "Invalid mode selected!": {{Cl|END}}
-{{Cl|END SELECT}}
-
-{{Cl|INPUT}} "Enter first name of TTF font to use or hit enter for text block size: ", TTFont$
-{{Cl|IF...THEN|IF}} {{Cl|LEN}}(TTFont$) {{Cl|THEN}} {{Cl|INPUT}} "Enter font height: ", hi$
-height& = {{Cl|VAL}}(hi$)
-{{Cl|IF...THEN|IF}} height& > 0 {{Cl|THEN}}
- fnt& = {{Cl|_LOADFONT}}("C:\Windows\Fonts\" + TTFont$ + ".ttf", height&, style$)
- {{Cl|IF...THEN|IF}} fnt& <= 0 {{Cl|THEN}} {{Cl|PRINT}} "Invalid Font handle!": {{Cl|END}}
- {{Cl|_FONT}} fnt&
-{{Cl|END IF}}
-
-TextSize wide&, high& 'get the font or current screen mode's text block pixel size
-
-{{Cl|_PRINTSTRING}} (20, 100), "Block size = " + {{Cl|CHR$}}(1) + {{Cl|STR$}}(wide&) + " X" + {{Cl|STR$}}(high&) + " " + {{Cl|CHR$}}(2)
-
-{{Cl|END}}
-
-{{Cl|SUB}} TextSize (TextWidth&, TextHeight&)
-TextWidth& = {{Cl|_PRINTWIDTH}}("W") 'measure width of one font or text character
-TextHeight& = {{Cl|_FONTHEIGHT}} 'can measure normal text block heights also
-{{Cl|END SUB}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_FONTWIDTH]], [[_FONT]]
-* [[_PRINTWIDTH]], [[_PRINTSTRING]]
-* [[SCREEN]], [[_LOADFONT]]
-* [[Text Using Graphics]] (Demo)
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FONTWIDTH__111111111.txt b/internal/help/_FONTWIDTH__111111111.txt
deleted file mode 100644
index 8f135726f..000000000
--- a/internal/help/_FONTWIDTH__111111111.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:50}}
-{{DISPLAYTITLE:_FONTWIDTH}}
-The [[_FONTWIDTH]] function returns the font width of a MONOSPACE font handle created by [[_LOADFONT]].
-
-
-{{PageSyntax}}
-:{{Parameter|pixelWidth%}} = [[_FONTWIDTH]][({{Parameter|fontHandle&}})]
-
-
-* Returns the character width of the last font used if a handle is not specified.
-* '''Variable width fonts always return {{Parameter|pixelWidth%}} = 0.''' Even fixed width fonts return 0 unless the [[LOADFONT|"MONOSPACE"]] style option is used.
-* QB64 '''version 1.000 and up''' can load a variable width font as monospaced with the [[LOADFONT|"MONOSPACE"]] style parameter.
-* The font width is generally 3/4 of the [[_FONTHEIGHT]] specified when loading the font.
-* In '''graphics''' [[SCREEN (statement)|screen]] modes, [[_PRINTWIDTH]] can return the total '''pixel width''' of a literal or variable [[STRING|string]] of text.
-
-
-{{PageSeeAlso}}
-*[[_FONTHEIGHT]]
-*[[_FONT]]
-* [[_LOADFONT]]
-* [[_PRINTWIDTH]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FONT_(function)__1111_(00000000).txt b/internal/help/_FONT_(function)__1111_(00000000).txt
deleted file mode 100644
index 47731121d..000000000
--- a/internal/help/_FONT_(function)__1111_(00000000).txt
+++ /dev/null
@@ -1,20 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:48}}
-{{DISPLAYTITLE:_FONT (function)}}
-The [[_FONT]] function retrieves the font handle from the specified image handle or the current [[_DEST]]ination page's font.
-
-
-{{PageSyntax}}
-:{{Parameter|fontHandle&}} = [[_FONT]][({{Parameter|imageHandle&}})]
-
-
-{{PageDescription}}
-*imageHandle& is the handle to the image which you want to retrieve the font from. If not specified, it is assumed to be the current [[_DEST]]ination page.
-
-
-{{PageSeeAlso}}
-*[[_LOADFONT]], [[_FONT]]
-*[[_DEST]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_FONT__1111.txt b/internal/help/_FONT__1111.txt
deleted file mode 100644
index e2f75fc13..000000000
--- a/internal/help/_FONT__1111.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:47}}
-{{DISPLAYTITLE:_FONT}}
-The [[_FONT]] statement sets the current [[_LOADFONT]] function font handle to be used by [[PRINT]].
-
-
-{{PageSyntax}}
-: [[_FONT]] {{Parameter|fontHandle&}}[, {{Parameter|imageHandle&}}]
-
-
-{{Parameters}}
-* {{Parameter|fontHandle&}} is the handle retrieved from [[_LOADFONT]] function, the [[_FONT (function)|_FONT]] function, or a predefined handle.
-* If the image handle is omitted the current image [[_DEST]]ination is used. Zero can designate the current program [[SCREEN]].
-
-
-{{PageDescription}}
-* Predefined '''QB64''' font handle numbers can be used before freeing a font:
-**'''_FONT 8 ''' - default font for [[SCREEN (statement)|SCREEN]] 1, 2, 7, 8 or 13
-**'''_FONT 14''' - default font for [[SCREEN (statement)|SCREEN]] 9 or 10
-**'''_FONT 16''' - default font for [[SCREEN (statement)|SCREEN]] 0 ([[WIDTH]] 80, 25 text only), 11 or 12
-**'''_FONT 9, 15''' and '''17''' are the double width versions of 8, 14 and 16 respectively in text '''SCREEN 0 only'''.
-* [[Unicode]] characters can be assigned to a monospace font that contains those unicode characters using the [[_MAPUNICODE]] TO [[ASCII]] mapping statement. The optional '''IME cyberbit.ttf''' font included with QB64 can also be used.
-* Can alpha blend a font with a background screen created by [[_NEWIMAGE]] in 32 bit color.
-* '''Check for valid handle values greater than 0 before using or freeing font handles.'''
-* Free '''unused''' font handles with [[_FREEFONT]]. Freeing invalid handles will create an [[ERROR Codes|"illegal function call"]] error.
-* '''NOTE: SCREEN 0 can only use one font type and style per viewed SCREEN page. Font size may also affect the window size.'''
-
-
-{{PageExamples}}
-''Example:'' Previewing a font in SCREEN 0. A different true type font can be substituted below.
-{{CodeStart}}
-
-fontpath$ = {{Cl|ENVIRON$}}("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
-{{Cl|DO}}: {{Cl|CLS}}
- {{Cl|DO}}
- style$ = "MONOSPACE"
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter A FONT Size 8 {{Cl|TO}} 25: ", fontsize%
- {{Cl|LOOP}} {{Cl|UNTIL}} fontsize% > 7 and fontsize% < 26
- {{Cl|DO}}
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter (0) for REGULAR {{Cl|OR}} (1) for ITALIC FONT: ", italic%
- {{Cl|LOOP}} {{Cl|UNTIL}} italic% = 0 or italic% = 1
- {{Cl|DO}}
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter (0) for REGULAR {{Cl|OR}} (1) for BOLD FONT: ", bold%
- {{Cl|LOOP}} {{Cl|UNTIL}} italic% = 0 or italic% = 1
- {{Cl|IF}} italic% = 1 {{Cl|THEN}} style$ = style$ + ", ITALIC"
- {{Cl|IF}} bold% = 1 then style$ = style$ + ", BOLD"
-
- {{Cl|GOSUB}} ClearFont
- font& = {{Cl|_LOADFONT}}(fontpath$, fontsize%, style$)
- {{Cl|_FONT|_FONT }}font&
- {{Cl|PRINT}}
- {{Cl|PRINT}} "This is your LUCON font! Want to try another STYLE?(Y/N): ";
- {{Cl|DO}}: {{Cl|SLEEP}}: K$ = {{Cl|UCASE$}}({{Cl|INKEY$}}): {{Cl|LOOP}} {{Cl|UNTIL}} K$ = "Y" {{Cl|OR}} K$ = "N"
-{{Cl|LOOP}} {{Cl|UNTIL}} K$ = "N"
-{{Cl|GOSUB}} ClearFont
-
-{{Cl|PRINT}} "This is the QB64 default {{Cl|_FONT|_FONT }}16!"
-{{Cl|END}}
-
-ClearFont:
-{{Cl|IF}} font& > 0 {{Cl|THEN}}
- {{Cl|_FONT|_FONT }}16 'select inbuilt 8x16 default font
- {{Cl|_FREEFONT}} font&
-{{Cl|END IF}}
-{{Cl|RETURN}}
-
-{{CodeEnd}}
-'''NOTE:''' [[ENVIRON$]]("SYSTEMROOT") returns a string value of: "C:\WINDOWS". Add the "\FONTS\" folder and the '''.TTF''' font file name.
-
-
-
-
-{{PageSeeAlso}}
-* [[_FONT (function)]]
-* [[_LOADFONT]], [[_FREEFONT]]
-* [[Unicode]], [[_MAPUNICODE]]
-* [[Windows_Libraries#Font_Dialog_Box|Windows Font Dialog Box]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_FREEFONT__11111111.txt b/internal/help/_FREEFONT__11111111.txt
deleted file mode 100644
index ed2e021ea..000000000
--- a/internal/help/_FREEFONT__11111111.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:51}}
-{{DISPLAYTITLE:_FREEFONT}}
-The [[_FREEFONT]] statement frees a font handle that was created by [[_LOADFONT]].
-
-
-
-{{PageSyntax}}
-:[[_FREEFONT]] ({{Parameter|fontHandle&}})
-
-
-{{PageDescription}}
-* Unloads fonts that are no longer in use or needed in order to free program memory and resources.
-* You cannot free a font which is in use. Change the font to a QB64 default font size before freeing the handle (see example below).
-* Predefined '''QB64''' font handle numbers can be used before freeing a font:
-**'''_FONT 8 ''' - default font for [[SCREEN (statement)|SCREEN]] 1, 2, 7, 8 or 13
-**'''_FONT 14''' - default font for [[SCREEN (statement)|SCREEN]] 9 or 10
-**'''_FONT 16''' - default font for [[SCREEN (statement)|SCREEN]] 0 ({{KW|WIDTH}} 80, 25 text only), 11 or 12
-**'''_FONT 9, 15''' and '''17''' are the double width versions of 8, 14 and 16 respectively in text '''SCREEN 0'''.
-* If the font handle is invalid (equals -1 or 0), an [[ERROR Codes|error]] will occur. '''Check handle values before using or freeing them.'''
-* You cannot free inbuilt/default QB64 fonts nor do they ever need freed.
-
-
-{{PageExamples}}
-''Example 1:'' Previews and creates a file list of valid MONOSPACE TTF fonts by checking the [[_LOADFONT]] handle values.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-path$ = "C:\WINDOWS\Fonts\" 'path to the font folder
-{{Cl|SHELL}} {{Cl|_HIDE}} "DIR /b " + path$ + "\*.ttf > TTFonts.INF"
-style$ = "monospace" 'set style to MONOSPACE
-{{Cl|OPEN}} "TTFonts.INF" {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1 'list of TTF fonts only
-{{Cl|OPEN}} "TTFMono.INF" {{Cl|FOR (file statement)|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #2 'will hold list of valid MONOSPACE fonts
-
-{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1): found = found + 1
- {{Cl|LINE INPUT (file statement)|LINE INPUT}} #1, font$
- f& ={{Cl|_LOADFONT}}(path$ + font$, 30, style$)
- {{Cl|IF}} f& > 0 {{Cl|THEN}} 'check for valid handle values > 0
- OK = OK + 1
- {{Cl|PRINT (file statement)|PRINT}} #2, font$
- {{Cl|_FONT}} f& 'will create error if handle is invalid!
- {{Cl|PRINT}} "Hello World!"
- {{Cl|PRINT}}: {{Cl|PRINT}}: {{Cl|PRINT}} font$; f&
- {{Cl|PRINT}} "Press any key."
- K$ = {{Cl|INPUT$}}(1)
- {{Cl|_FONT}} 16 'use QB64 default font to free tested font
- {{Cl|_FREEFONT}} f& 'returns an error if handle <= 0!
- {{Cl|CLS}}
- {{Cl|END IF}}
- {{Cl|PRINT}}
-{{Cl|IF}} K$ = {{Cl|CHR$}}(27) {{Cl|THEN}} {{Cl|EXIT DO}}
-{{Cl|LOOP}}
-{{Cl|CLOSE}}
-{{Cl|PRINT}}: {{Cl|PRINT}}: {{Cl|PRINT}} "Found"; found; "TTF files,"; OK; "can use Monospace,"
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-{{OutputStart}}
-Found 106 TTF files, 13 can use Monospace.
-{{OutputEnd}}
-
-
-''Example 2:'' Using a _FREEFONT sub-procedure.
-{{CodeStart}}
-fontpath$ = {{Cl|ENVIRON$}}("SYSTEMROOT") + "\fonts\lucon.ttf"
-style$ = "MONOSPACE, ITALIC, BOLD"
-fontsize% = 20
-
-{{Cl|_FONT|_FONT }}16
-{{Cl|PRINT}}
-{{Cl|PRINT}} "This is the QB64 default {{Cl|_FONT|_FONT }}16! To change, press any key!"
-{{Cl|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|GOSUB}} ClearFont 'call will not free anything if font& = 0
-
-font& = {{Cl|_LOADFONT}}(fontpath$, fontsize%, style$)
-{{Cl|IF}} font > 0 THEN {{Cl|_FONT|_FONT}} font& 'NEVER try to load a font value less than 1!
-{{Cl|PRINT}}
-{{Cl|PRINT}} "A NEW {{Cl|_FONT|_FONT}} style. To change to default, press any key!"
-{{Cl|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|GOSUB}} ClearFont 'call will free a valid font handle from memory
-
-{{Cl|END}}
-
-ClearFont:
-{{Cl|IF}} font& > 0 {{Cl|THEN}}
- {{Cl|_FONT|_FONT }}16 'change used font to the QB64 8x16 default font
- {{Cl|_FREEFONT}} font&
- {{Cl|PRINT}}: {{Cl|PRINT}} "The previous font was freed with _FREEFONT!"
-{{Cl|ELSE}} : {{Cl|PRINT}}: {{Cl|PRINT}} "_FREEFONT was not used!"
-{{Cl|END IF}}
-{{Cl|RETURN}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_FONT]]
-* [[_LOADFONT]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FREEIMAGE__111111111.txt b/internal/help/_FREEIMAGE__111111111.txt
deleted file mode 100644
index 195e4252a..000000000
--- a/internal/help/_FREEIMAGE__111111111.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:52}}
-{{DISPLAYTITLE:_FREEIMAGE}}
-The '''_FREEIMAGE''' statement releases the designated file image created by the [[_LOADIMAGE]], [[_NEWIMAGE]] or [[_COPYIMAGE]] functions from memory when they are no longer needed.
-
-
-{{PageSyntax}}
-: [[_FREEIMAGE]] [{{Parameter|handle&}}]
-
-
-{{PageDescription}}
-*If {{Parameter|handle&}} is omitted, the current destination image is freed from memory.
-*Freeing the destination image or source image will result in the display page being selected instead.
-*'''Invalid image handle values of -1 or 0 cannot be freed or an [[ERROR Codes|"Illegal Function" error]] will occur.''' Check the handle value first.
-* '''[[SCREEN]] modes in use cannot be freed or an [[ERROR Codes|"Illegal Function" error]] will occur.''' Change SCREEN modes before freeing.
-*Once a specific image handle is no longer used or referenced by your program, it can be freed with [[_FREEIMAGE]].
-* '''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].'''
-* '''It is important to free unused or unneeded images with [[_FREEIMAGE]] to prevent memory overflow errors.'''
-* '''Do not try to free image handles currently being used as the active [[SCREEN]]. Change screen modes first.'''
-
-
-{{PageExamples}}
-''Example:'' Loading a program splash screen and freeing image when no longer necessary:
-{{CodeStart}}
-s& = {{Cl|_LOADIMAGE}}("SPLASH.BMP",32) 'load 32 bit(24 BPP) image
-{{Cl|IF}} s& < -1 THEN {{Cl|SCREEN (statement)|SCREEN}} s& 'use image as a 32 bit SCREEN
-{{Cl|_DELAY}} 6 'display splash screen for 6 seconds
-{{Cl|SCREEN (statement)|SCREEN}} 0 'MUST change screen mode before freeing a SCREEN image!
-{{Cl|IF}} s& < -1 THEN {{Cl|_FREEIMAGE}} s& 'handle value MUST be less than -1 or error!
-{{Cl|CLS}}
-{{CodeEnd}}
-: ''Note:'' A valid image file name must be used by [[_LOADIMAGE]] or the invalid handle memory value will not need to be freed.
-
-
-{{PageSeeAlso}}
-* [[_NEWIMAGE]]
-* [[_LOADIMAGE]]
-* [[_SCREENIMAGE]]
-* [[_COPYIMAGE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FREETIMER__111111111.txt b/internal/help/_FREETIMER__111111111.txt
deleted file mode 100644
index 2f0490ac7..000000000
--- a/internal/help/_FREETIMER__111111111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:54}}
-{{DISPLAYTITLE:_FREETIMER}}
-The [[_FREETIMER]] function returns a free [[TIMER]] number for multiple [[ON TIMER(n)]] events.
-
-
-{{PageSyntax}}
-: {{Parameter|timerhandle%}} = [[_FREETIMER]]
-
-
-{{PageDescription}}
-* QB64 can use an unlimited number of ON TIMER (number, seconds!) event [[INTEGER]] values at once.
-* Every time _FREETIMER is called the [[INTEGER]] value returned will increase by one, starting at 1, whether it is used or not.
-* Store multiple returns in different variable names to refer to separate events later.
-
-
-{{PageSeeAlso}}
-* [[ON TIMER(n)]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FULLSCREEN_(function)__1111111111_(00000000).txt b/internal/help/_FULLSCREEN_(function)__1111111111_(00000000).txt
deleted file mode 100644
index 42a30fedc..000000000
--- a/internal/help/_FULLSCREEN_(function)__1111111111_(00000000).txt
+++ /dev/null
@@ -1,110 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:56}}
-{{DISPLAYTITLE:_FULLSCREEN (function)}}
-The [[_FULLSCREEN]] function returns the present full screen mode setting of the screen window.
-
-
-{{PageSyntax}}
-: {{Parameter|full%}} = [[_FULLSCREEN (function)|_FULLSCREEN]]
-
-
-{{PageDescription}}
-* ''Function returns:''
-** 0 = _OFF (any positive non-0 value means fullscreen is on)
-** 1 = _STRETCH
-** 2 = _SQUAREPIXELS
-* It '''cannot''' be assumed that calling [[_FULLSCREEN]] will succeed. It cannot be assumed that the type of full screen will match the requested one. '''Always check the [[_FULLSCREEN (function)]] return in your programs.'''
-* '''Warning:''' Despite your software, the user's hardware, drivers and monitor may not function in some modes. Thus, it is highly recommended that you manually confirm with the user whether the switch to full screen was successful. This can be done "quietly" in some cases by getting the user to click on a button on screen with their mouse or press an unusual key. If the user does not respond after about 8 seconds, switch them back to windowed mode.
-'''Using large fonts with [[_FULLSCREEN]] can cause monitor or Windows Desktop problems or kill a program.'''
-
-
-{{PageExamples}}
-''Example:'' Shows how fonts and the _FULLSCREEN mode can resize a program window.
-{{CodeStart}}
-{{Cl|CLS}}
-fontpath$ = {{Cl|ENVIRON$}}("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
-f& = {{Cl|_FONT (function)|_FONT}}: defaultf& = f&
-{{Cl|DO}}
- {{Cl|INPUT}} "1) DEFAULT 2) SIZE WINDOW 3) FULL SCREEN 4) FULL STRETCHED Q) QUIT: ", winmode$
-
- {{Cl|IF}} {{Cl|UCASE$}}(winmode$) = "Q" {{Cl|THEN}} {{Cl|EXIT DO}}
-
- style$ = "MONOSPACE"
-
- {{Cl|SELECT CASE}} winmode$
- {{Cl|CASE}} "1"
- full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}} 'get current full screen mode
- {{Cl|IF}} full <> 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _OFF
- {{Cl|GOSUB}} ChangeFont
-
- {{Cl|CASE}} "2"
- {{Cl|DO}}
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter a FONT SIZE 5 to 25: ", fontsize%
- {{Cl|LOOP}} {{Cl|UNTIL}} fontsize% > 4 {{Cl|AND (boolean)|AND}} fontsize% < 26
-
- {{Cl|DO}}
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter (0) for REGULAR or (1) for ITALIC FONT: ", italic%
- {{Cl|LOOP}} {{Cl|UNTIL}} italic% = 0 or italic% = 1
-
- {{Cl|DO}}
- {{Cl|PRINT}}
- {{Cl|INPUT}} "Enter (0) for REGULAR or (1) for BOLD FONT: ", bold%
- {{Cl|LOOP}} {{Cl|UNTIL}} italic% = 0 or italic% = 1
-
- {{Cl|IF}} italic% = 1 {{Cl|THEN}} style$ = style$ + ", ITALIC"
- {{Cl|IF}} bold% = 1 {{Cl|THEN}} style$ = style$ + ", BOLD"
- full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}} 'get current full screen mode
- {{Cl|IF}} full <> 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _OFF
- {{Cl|GOSUB}} ChangeFont
-
- {{Cl|CASE}} "3"
- {{Cl|GOSUB}} ChangeFont
- {{Cl|_FULLSCREEN}} _SQUAREPIXELS
- {{Cl|GOSUB}} CheckFull
-
- {{Cl|CASE}} "4"
- {{Cl|GOSUB}} ChangeFont
- {{Cl|_FULLSCREEN}} _STRETCH
- {{Cl|GOSUB}} CheckFull
-
- {{Cl|END SELECT}}
-
- {{Cl|PRINT}}: {{Cl|PRINT}} "_FullScreen mode ="; {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
- {{Cl|PRINT}}
-{{Cl|LOOP}}
-{{Cl|GOSUB}} ChangeFont
-{{Cl|END}}
-
-CheckFull: '<<<<<<<<<<<<<< turn off full screen if function returns 0!
-full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}} 'get current full screen mode
-{{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _{{Cl|OFF}}: {{Cl|SOUND}} 100, .75
-{{Cl|RETURN}}
-
-ChangeFont:
-{{Cl|IF}} winmode$ <> "2" {{Cl|THEN}}
- {{Cl|_FONT}} 16 'select inbuilt 8x16 default font
- currentf& = {{Cl|_FONT (function)|_FONT}}
-{{Cl|ELSE}}
- currentf& = {{Cl|_LOADFONT}}(fontpath$, fontsize%, style$)
- {{Cl|_FONT}} currentf&
-{{Cl|END IF}}
-
-{{Cl|IF}} currentf& <> f& {{Cl|AND (boolean)|AND}} f& <> defaultf& {{Cl|THEN}} {{Cl|_FREEFONT}} f&
-f& = currentf&
-{{Cl|RETURN}}
-{{CodeEnd}}
-
-''Explanation:'' The '''_FULLSCREEN''' function can avoid screen display and monitor problems when used to monitor the success of the full screen operation. If a full screen mode is '''not''' achieved (the function will return 0), '''call [[_FULLSCREEN]] OFF'''
-
-
-{{PageSeeAlso}}
-* [[_FULLSCREEN]] (statement)
-* [[_ALLOWFULLSCREEN]]
-* [[_SCREENMOVE]], [[_SCREENX]], [[_SCREENY]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_FULLSCREEN__1111111111.txt b/internal/help/_FULLSCREEN__1111111111.txt
deleted file mode 100644
index 44b9e94c5..000000000
--- a/internal/help/_FULLSCREEN__1111111111.txt
+++ /dev/null
@@ -1,137 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:55}}
-{{DISPLAYTITLE:_FULLSCREEN}}
-The [[_FULLSCREEN]] statement attempts to make the program window fullscreen.
-
-
-{{PageSyntax}}
-:[[_FULLSCREEN]] [''_STRETCH | _SQUAREPIXELS| _OFF''][, ''_SMOOTH'']
-
-
-{{Parameters}}
-* {{Parameter|_STRETCH}} default first choice attempts to mimic QBasic's full screens if possible. [[_FULLSCREEN (function)]] returns 1.
-* {{Parameter|_SQUAREPIXELS}} alternate choice enlarges the pixels into squares on some monitors. [[_FULLSCREEN (function)|_FULLSCREEN]] returns 2
-* {{Parameter|_OFF}} turns _FULLSCREEN off after full screen has been enabled. [[_FULLSCREEN (function)]] returns 0.
-* Second optional parameter ''_SMOOTH'' applies antialiasing to the stretched screen.
-
-
-{{PageDescription}}
-* '''Set the [[SCREEN]] mode and text [[WIDTH]] when necessary first.''' Otherwise there may be desktop view issues.
-* _FULLSCREEN with no parameters chooses {{Parameter|_STRETCH}} or {{Parameter|_SQUAREPIXELS}} (prioritizes _STRETCH to mimic QBasic if possible)
-* '''Check the fullscreen mode with the [[_FULLSCREEN (function)|_FULLSCREEN]] function in your programs when a method is required.
-* It is advisable to get [[INPUT|input]] from the user to confirm that fullscreen was completed or there were possible monitor incompatibilities.
-* If fullscreen is '''not confirmed''' with a [[_FULLSCREEN (function)]] return '''greater than 0''', then disable with '''_FULLSCREEN _OFF'''.
-* '''NOTE:''' _FULLSCREEN can also be affected by custom [[_FONT]] size settings and make program screens too large.
-
-
-{{PageExamples}}
-''Example 1:'' Setting the screen mode first prevents enlargement of the desktop before the program window is set:
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|_FULLSCREEN}}
-{{Cl|IF...THEN|IF}} {{Cl|_FULLSCREEN (function)|_FULLSCREEN}} = 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _OFF 'check that a full screen mode initialized
-
-{{Cl|LINE}} (100, 100)-(500, 400), 13, BF
-{{CodeEnd}}
-
-
-''Example 2:'' How fonts and _FULLSCREEN affect the program's window size.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 0
-{{Cl|DO}}
- {{Cl|PRINT}}
- {{Cl|LINE INPUT}} "Enter MODE 1) ENLARGE WINDOW 2) FULL _SQUAREPIXELS 3) FULL _STRETCH: ", WMODE$
- {{Cl|PRINT}}
- {{Cl|IF}} WMODE$ = "1" {{Cl|THEN}} {{Cl|INPUT (file mode)|INPUT}} "SIZE 1 {{Cl|TO}} 9: ", ENLARGE%
-
- {{Cl|SELECT CASE}} ENLARGE%
- {{Cl|CASE}} 1, 2, 3, 4, 5: STYLE$ = "MONOSPACE, BOLD"
- {{Cl|CASE}} 6, 7, 8, 9: STYLE$ = "MONOSPACE"
- {{Cl|CASE ELSE}}: STYLE$ = "MONOSPACE"
- {{Cl|END SELECT}}
-
- {{Cl|SELECT CASE}} WMODE$
- {{Cl|CASE}} "1"
- full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
- {{Cl|IF}} full > 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _OFF
- f& = {{Cl|_LOADFONT}}("c:\windows\fonts\lucon.ttf", 13 + ENLARGE%, STYLE$)
- {{Cl|_FONT}} f&
- {{Cl|CASE}} "2"
- {{Cl|_FULLSCREEN}} _SQUAREPIXELS
- full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
- {{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|GOSUB}} FCHECK
- {{Cl|CASE}} "3"
- {{Cl|_FULLSCREEN}} _STRETCH
- full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
- {{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|GOSUB}} FCHECK
- {{Cl|END SELECT}}
-
- mode = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
- {{Cl|PRINT}}
- {{Cl|PRINT}} "_FULLSCREEN mode ="; mode,
- {{Cl|PRINT}} "PRESS ESC {{Cl|TO}} {{Cl|END}} {{Cl|OR}} ENTER {{Cl|TO}} CONTINUE..."
-
- {{Cl|DO}}: {{Cl|SLEEP}}: B$ = {{Cl|INKEY$}}: {{Cl|LOOP}} {{Cl|UNTIL}} B$ = {{Cl|CHR$}}(13) {{Cl|OR}} B$ = {{Cl|CHR$}}(27)
-
- {{Cl|GOSUB}} ClearFont
-
-{{Cl|LOOP}} {{Cl|UNTIL}} B$ = {{Cl|CHR$}}(27)
-ClearFont
-{{Cl|END}}
-
-FCHECK:
-Z3 = timer
-{{Cl|DO}}
-{{Cl|IF}} {{Cl|TIMER (statement)|TIMER }}< Z3 {{Cl|THEN}} Z3 = Z3 - {{Cl|TIMER}}
-{{Cl|IF}} {{Cl|TIMER (statement)|TIMER }}- Z3 > 4 {{Cl|THEN}} {{Cl|EXIT DO}}
-{{Cl|LOOP}}
-full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
-{{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _{{Cl|OFF}}: {{Cl|SOUND}} 100, .75
-{{Cl|RETURN}}
-
-ClearFont:
-{{Cl|IF}} f& > 0 {{Cl|THEN}}
- {{Cl|_FONT}} 16 'select inbuilt 8x16 default font
- {{Cl|_FREEFONT}} f&
-{{Cl|END IF}}
-{{Cl|RETURN}}
-
-{{CodeEnd}}
-
-
-''Example 3:'' Testing all fullscreen methods.
-{{CodeStart}}
-{{Cl|PRINT}} "Hello, world!"
-{{Cl|PRINT}} "Hit 1 for windowed mode;
-{{Cl|PRINT}} " 2 for _STRETCH"
-{{Cl|PRINT}} " 3 for _SQUAREPIXELS"
-{{Cl|PRINT}} " 4 for _STRETCH, _SMOOTH"
-{{Cl|PRINT}} " 5 for _SQUAREPIXELS, _SMOOTH"
-{{Cl|DO}}
- k$ = {{Cl|INKEY$}}
- {{Cl|SELECT CASE}} {{Cl|VAL}}(k$)
- {{Cl|CASE}} 1
- {{Cl|_FULLSCREEN}} _OFF
- {{Cl|CASE}} 2
- {{Cl|_FULLSCREEN}} _STRETCH
- {{Cl|CASE}} 3
- {{Cl|_FULLSCREEN}} _SQUAREPIXELS
- {{Cl|CASE}} 4
- {{Cl|_FULLSCREEN}} _STRETCH, _SMOOTH
- {{Cl|CASE}} 5
- {{Cl|_FULLSCREEN}} _SQUAREPIXELS, _SMOOTH
- {{Cl|END}} {{Cl|SELECT}}
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|_EXIT (function)|_EXIT}}
-{{Cl|SYSTEM}}{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_FULLSCREEN (function)]]
-* [[_ALLOWFULLSCREEN]]
-* [[_FONT]], [[SCREEN]]
-* [[_SCREENIMAGE]]
-* [[_SCREENMOVE]], [[_SCREENX]], [[_SCREENY]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_G2D__121.txt b/internal/help/_G2D__121.txt
deleted file mode 100644
index 3e4a483ce..000000000
--- a/internal/help/_G2D__121.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:57}}
-{{DISPLAYTITLE:_G2D}}
-The [[_G2D]] function converts a '''gradient''' value into a '''degree''' value.
-
-
-{{PageSyntax}}
-: {{Parameter|result}} = [[_G2D]]({{Parameter|num}})
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Coverting Gradients into Degree.
-{{CodeStart}}
-INPUT "Give me an angle in Gradients ", D
-R = _G2D(D)
-PRINT "That angle in Degrees is "; R
-{{CodeEnd}}
-{{OutputStart}}
-Give me an angle in Gradients 60
-That angle in Degrees is 54
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]], [[_D2R]]
-* [[_G2R]]
-* [[_R2D]], [[_R2G]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_G2R__121.txt b/internal/help/_G2R__121.txt
deleted file mode 100644
index ed67a0ac2..000000000
--- a/internal/help/_G2R__121.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:58}}
-{{DISPLAYTITLE:_G2R}}
-The [[_G2R]] function converts a '''gradient''' value into a '''radian''' value.
-
-
-{{PageSyntax}}
-: {{Parameter|result}} = [[_G2R]]({{Parameter|num}})
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Coverting Gradient into Radians.
-{{CodeStart}}
-INPUT "Give me an angle in Gradient ", D
-R = _G2R(D)
-PRINT "That angle in Radians is "; R
-{{CodeEnd}}
-{{OutputStart}}
-Give me an angle in Gradient 60
-That angle in Radians is .9424778
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]], [[_D2R]]
-* [[_G2D]], [[_G2R]]
-* [[_R2D]], [[_R2G]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_GLRENDER__11111111.txt b/internal/help/_GLRENDER__11111111.txt
deleted file mode 100644
index 8fe3181da..000000000
--- a/internal/help/_GLRENDER__11111111.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:37:59}}
-{{DISPLAYTITLE:_GLRENDER}}
-
-{{PageSyntax}}
-:'''_GLRENDER '''''mode''
-
-
-{{PageParameters}}
-
-Mode can be:
-* _BEHIND - renders OpenGL context behind the software rendering
-* _ONTOP - renders OpenGL context on the top of the software rendering [default]
-* _ONLY - renders OpenGL context only
-
-
-''See also:''
-* [[Hardware images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_GREEN32__1111132.txt b/internal/help/_GREEN32__1111132.txt
deleted file mode 100644
index 0e6e9b132..000000000
--- a/internal/help/_GREEN32__1111132.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:01}}
-{{DISPLAYTITLE:_GREEN32}}
-The [[_GREEN32]] function returns the green component intensity of a 32-bit image or surface color.
-
-
-{{PageSyntax}}
-: green32color& = [[_GREEN32]]({{Parameter|rgbaColor&}})
-
-
-{{PageDescription}}
-* {{Parameter|rgbaColor&}} is the 32-bit ''RGBA'' color value to retrieve the green component intensity value from.
-* ''RGBA'' color values are returned by the [[_PALETTECOLOR (function)|_PALETTECOLOR]], [[POINT]], [[_RGB]], [[_RGB32]], [[_RGBA]] or [[_RGBA32]] functions.
-* [[LONG]] intensity values returned range from 0 (no intensity, not present) to 255 (full intensity).
-
-
-{{PageExamples}}
-* See example in [[POINT]].
-
-
-{{PageSeeAlso}}
-* [[_RED32]], [[_BLUE32]]
-* [[_RGB32]], [[_GREEN]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_GREEN__11111.txt b/internal/help/_GREEN__11111.txt
deleted file mode 100644
index 9c25ff04c..000000000
--- a/internal/help/_GREEN__11111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:00}}
-{{DISPLAYTITLE:_GREEN}}
-The [[_GREEN]] function returns the palette index or the green component intensity of a 32-bit image color.
-
-
-{{PageSyntax}}
-: {{Parameter|greenIntensity&}} = [[_GREEN]]({{Parameter|rgbaColorIndex&}}[, {{Parameter|imageHandle&}}])
-
-
-{{PageDescription}}
-* {{Parameter|rgbaColorIndex&}} is the ''RGBA'' color value or palette index of the color to retrieve the green component intensity from.
-* The [[LONG]] intensity value returned ranges from 0 (no intensity, not present) to 255 (full intensity).
-* If {{Parameter|imageHandle&}} specifies a 32-bit color image, {{Parameter|rgbaColorIndex&}} is interpreted as a 32-bit ''RGBA'' color value.
-* If {{Parameter|imageHandle&}} specifies an image that uses a palette, {{Parameter|rgbaColorIndex&}} is interpreted as a palette index.
-* If {{Parameter|imageHandle&}} is not specified, it is assumed to be the current write page (See [[_DEST]]).
-* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error will occur.
-* If {{Parameter|rgbaColorIndex&}} is outside the range of valid indexes for a given image mode, an [[ERROR Codes|illegal function call]] error occurs.
-* Uses index parameters passed by the [[_RGB]], [[_RGBA]], [[_RGB32]] or [[_RGBA32]] functions.
-* An image handle is optional.
-
-
-{{PageExamples}}
-* See example in [[POINT]].
-
-
-{{PageSeeAlso}}
-* [[_RED]], [[_BLUE]]
-* [[_RGB]], [[RGB32]]
-* [[_LOADIMAGE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_HEIGHT__111111.txt b/internal/help/_HEIGHT__111111.txt
deleted file mode 100644
index 840893ea6..000000000
--- a/internal/help/_HEIGHT__111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:03}}
-{{DISPLAYTITLE:_HEIGHT}}
-The [[_HEIGHT]] function returns the height of an image handle or of the current write page.
-
-
-{{PageSyntax}}
-: {{Parameter|columns&}} = [[_HEIGHT]][({{Parameter|imageHandle&}})]
-
-
-{{PageDescription}}
-* If {{Parameter|imageHandle&}} is omitted, it's assumed to be the handle of the current [[SCREEN]] or write page.
-* To get the height of the current program [[SCREEN|screen]] window use zero for the handle value or nothing: {{Parameter|lines&}} = [[_HEIGHT]](0) ''or'' {{Parameter|lines&}} = [[_HEIGHT]]
-* If the image specified by {{Parameter|imageHandle&}} is in text only([[SCREEN]] 0) mode, the number of characters per row is returned.
-* If the image specified by {{Parameter|imageHandle&}} is in graphics mode, the number of pixels per row is returned.
-* If {{Parameter|imageHandle&}} is an invalid handle, then an [[ERROR Codes|invalid handle error]] is returned.
-* The last visible pixel coordinate of a program [[SCREEN|screen]] is '''[[_HEIGHT]] - 1'''.
-
-
-
-{{PageSeeAlso}}
-* [[_WIDTH (function)]], [[_LOADIMAGE]], [[_NEWIMAGE]]
-* [[Bitmaps]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_HIDE__1111.txt b/internal/help/_HIDE__1111.txt
deleted file mode 100644
index 267e7c996..000000000
--- a/internal/help/_HIDE__1111.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:04}}
-{{DISPLAYTITLE:_HIDE}}
-The [[_HIDE]] action is used to hide the console window opened by a [[SHELL]] statement.
-
-
-{{PageSyntax}}
-: [[SHELL]] ['''_HIDE'''] {{Parameter|StringCommandLine$}}
-
-
-{{PageDescription}}
-* Allows any command line window to be hidden from view without affecting the program.
-* [[_HIDE]] must be used when sending ("piping") screen information to a file.
-* '''Note:''' Some commands may not work without adding CMD /C to the start of the command line.
-
-
-{{PageExamples}}
-''Example:'' Subprogram that displays long and short filenames using the DIR /X option (WindowsNT or above) in SCREEN 12:
-{{CodeStart}}
-SUB LFN
- IF LEN({{Cl|ENVIRON$}}("OS")) = 0 THEN EXIT SUB ' /X not available Win 9X and ME
- SHELL {{Cl|_HIDE}} "cmd /c dir /x > DOS-DATA.INF" ' load display data to a file
- OPEN "DOS-DATA.INF" FOR INPUT AS #1
- IF {{Cl|LOF}}(1) THEN
- Header$ = SPACE$(10) + "Short" + SPACE$(16) + "Long" + SPACE$(20) + "Last Modified"
- tmp$ = "\ \ \ \ &" ' print using template format
- COLOR 14: LOCATE 2, 4: PRINT Header$
- DO UNTIL EOF(1)
- {{Cl|LINE INPUT}} #1, line$
- IF LEN(line$) AND MID$(line$, 1, 1) <> SPACE$(1) THEN ' ignore other file data
- cnt% = cnt% + 1
- last$ = MID$(line$, 1, 20): DIR$ = MID$(line$, 26, 3)
- IF MID$(line$, 40, 1) <> SPACE$(1) THEN ' found line with short and long name
- SHFN$ = MID$(line$, 40, INSTR(40, line$, SPACE$(1)) - 1)
- LGFN$ = MID$(line$, 53)
- ELSE : SHFN$ = MID$(line$, 53): LGFN$ = "" ' found short name only
- END IF
- IF cnt% MOD 25 = 0 THEN ' pause every 25 files
- COLOR 14: LOCATE 29, 27 "Press a key for more files!"
- DO: LOOP UNTIL INKEY$ <> ""
- CLS: COLOR 14: LOCATE 2, 4: PRINT Header$
- END IF
- COLOR 11: LOCATE (cnt% MOD 25) + 3, 4
- {{Cl|PRINT USING}} tmp$; DIR$; SHFN$; LGFN$
- LOCATE (cnt% MOD 25) + 3, 58: PRINT last$
- END IF
- LOOP
- END IF
- COLOR 10: LOCATE {{Cl|CSRLIN}} + 1, 27 "Total folders and files ="; cnt%
- CLOSE #1
-END SUB
-{{CodeEnd}}
-
-''Explanation:'' The above routine can also be used to place the file name info into string arrays by using the count variable cnt% to determine the index. Long file names are normally returned by '''QB64'''. To keep older QBasic programs compatible, you may want to only use the short names when displaying the files on the screen.
-
-
-{{PageSeeAlso}}
-* [[SHELL]], [[_DONTWAIT]]
-* [[FILELIST$ (function)]] ([[FILES]] function, member-contributed)
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_HYPOT__11111.txt b/internal/help/_HYPOT__11111.txt
deleted file mode 100644
index 45ff4f058..000000000
--- a/internal/help/_HYPOT__11111.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:05}}
-{{DISPLAYTITLE:_HYPOT}}
-The [[_HYPOT]] function returns the hypotenuse of a right-angled triangle whose legs are x and y.
-
-
-{{PageSyntax}}
-: {{Parameter|result!}} = [[_HYPOT]]({{Parameter|x}}, {{Parameter|y}})
-
-
-{{Parameters}}
-* {{Parameter|x}} and {{Parameter|y}} are the floating point values corresponding to the legs of a right-angled (90 degree) triangle for which the hypotenuse is computed.
-
-
-{{PageDescription}}
-* The function returns what would be the square root of the sum of the squares of x and y (as per the Pythagorean theorem).
-* The hypotenuse is the longest side between the two 90 degree angle sides
-
-
-{{PageExamples}}
-''Example:''
-{{CodeStart}}
-{{Cl|DIM}} leg_x {{Cl|AS}} {{Cl|DOUBLE}}, leg_y {{Cl|AS}} {{Cl|DOUBLE}}, result {{Cl|AS}} {{Cl|DOUBLE}}
-leg_x = 3
-leg_y = 4
-result = {{Cl|_HYPOT}}(leg_x, leg_y)
-{{Cl|PRINT}} {{Cl|USING}} "## , ## and ## form a right-angled triangle."; leg_x; leg_y; result
-{{CodeEnd}}
-
-{{OutputStart}}
- 3 , 4 and 5 form a right-angled triangle.
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[ATN]] {{text|(arctangent)}}
-* [[_PI]] {{text|(function)}}
-* [[Mathematical Operations]]
-* [http://www.cplusplus.com/reference/cmath/hypot/ C++ reference for hypot() - source of the text and sample above]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_ICON__1111.txt b/internal/help/_ICON__1111.txt
deleted file mode 100644
index e407b4450..000000000
--- a/internal/help/_ICON__1111.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:07}}
-{{DISPLAYTITLE:_ICON}}
-The [[_ICON]] statement uses an image handle from [[_LOADIMAGE]] for the program header and icon image in the OS.
-
-
-{{PageSyntax}}
-: [[_ICON]] [{{Parameter|mainImageHandle&}}[, {{Parameter|smallImageHandle&}}]]
-
-
-{{Parameters}}
-* {{Parameter|mainImageHandle&}} is the [[LONG]] handle value of the OS icon and title bar image pre-loaded with [[_LOADIMAGE]] when used alone.
-* {{Parameter|smallImageHandle&}} is the [[LONG]] handle value of a different title bar image pre-loaded with [[_LOADIMAGE]] when used.
-* No image handle designates use of the default QB64 icon or the embedded icon set by [[$EXEICON]].
-
-
-{{PageDescription}}
-* If no image handle is passed, the default QB64 icon will be used (all versions). If the [[$EXEICON]] metacommand is used, [[_ICON]] without an image handle uses the embedded icon from the binary (Windows only).
-* Beginning with '''version 1.000''', the following is considered:
-:::{{Parameter|mainImageHandle&}} creates the image as the icon in the OS and the image in the program header (title bar).
-:::{{Parameter|smallImageHandle&}} can be used for a different image in the program header bar.
-*The header image will automatically be resized to fit the icon size of 16 X 16 if smaller or larger.
-*Once the program's icon is set, the image handle can be discarded with [[_FREEIMAGE]].
-
-
-{{PageErrors}}
-* '''NOTE: Icon files are not supported with [[_LOADIMAGE]] and an error will occur. See Example 2.'''
-* Images used can be smaller or larger than 32 X 32 pixels, but image resolution may be affected.
-* It is important to free unused or uneeded images with [[_FREEIMAGE]] to prevent memory overflow errors.
-*In '''SCREEN 0''' (default text mode) you need to specify 32-bit mode in [[_LOADIMAGE]] to load images.'''
-
-
-{{PageExamples}}
-''Example 1:'' Loading an image to a 32 bit palette in SCREEN 0 (the default screen mode).
-{{CodeStart}}
-i& ={{Cl|_LOADIMAGE}}("RDSWU16.BMP", 32) '<<<<<<< use your image file name here
-
-{{Cl|IF}} i& < -1 THEN
- {{Cl|_ICON}} i&
- {{Cl|_FREEIMAGE}} i& ' release image handle after setting icon
-{{Cl|END IF}}
-{{CodeEnd}}
-:''Note:'' _ICON images can be freed if the [[SCREEN]] mode stays the same. Freed image handles can on longer be referenced.
-
-
-''Example 2:'' Function that converts an icon into a temporary bitmap for use in QB64. Function returns the available image count.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 256)
-{{Cl|_TITLE}} "Icon Converter"
-icon$ = "daphne.ico" '<<<<<<<<< change icon file name
-bitmap$ = "tempfile.bmp"
-indx% = 6 '1 minimum <<<<<<< higher values than count get highest entry image in icon file
-
-{{Cl|IF...THEN|IF}} Icon2BMP(icon$, bitmap$, indx%) {{Cl|THEN}}
- img& = {{Cl|_LOADIMAGE}}(bitmap$) ' use 32 as color mode in SCREEN 0
- {{Cl|IF...THEN|IF}} img& < -1 {{Cl|THEN}} ' check that handle value is good before loading
- {{Cl|_ICON}} img& ' place image in header
- {{Cl|_PUTIMAGE}} (300, 250), img& 'place image on screen
- {{Cl|_FREEIMAGE}} img& ' always free unused handles to save memory
- {{Cl|KILL}} bitmap$ ' comment out and/or rename to save the bitmaps
- {{Cl|END IF}}
-{{Cl|END IF}}
-{{Cl|END}}
-' ----------------------------------------------------
-
-{{Cl|FUNCTION}} Icon2BMP% (filein {{Cl|AS}} {{Cl|STRING}}, fileout {{Cl|AS}} {{Cl|STRING}}, index {{Cl|AS}} {{Cl|INTEGER}})
-'function creates a bitmap of the icon and returns the icon count
-{{Cl|DIM}} byte {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}, word {{Cl|AS}} {{Cl|INTEGER}}, dword {{Cl|AS}} {{Cl|LONG}}
-{{Cl|DIM}} wide {{Cl|AS}} {{Cl|LONG}}, high {{Cl|AS}} {{Cl|LONG}}, BM {{Cl|AS}} {{Cl|INTEGER}}, bpp {{Cl|AS}} {{Cl|INTEGER}}
-
-rf = {{Cl|FREEFILE}}
-{{Cl|IF...THEN|IF}} {{Cl|LCASE$}}({{Cl|RIGHT$}}(filein, 4)) = ".ico" {{Cl|THEN}} 'check file extension is ICO only
- {{Cl|OPEN}} filein {{Cl|OPEN|FOR}} {{Cl|BINARY}} {{Cl|ACCESS}} {{Cl|ACCESS|READ}} {{Cl|AS}} rf
-{{Cl|ELSE}} {{Cl|EXIT FUNCTION}}
-{{Cl|END IF}}
-{{Cl|GET}} rf, , word
-{{Cl|GET}} rf, , word: icon = word
-{{Cl|GET}} rf, , word: count = word
-{{Cl|IF...THEN|IF}} icon <> 1 {{Cl|OR (boolean)|OR}} count = 0 {{Cl|THEN}} {{Cl|CLOSE}} rf: {{Cl|EXIT FUNCTION}}
-'{{Cl|PRINT}} icon, count
-{{Cl|IF...THEN|IF}} index > 0 {{Cl|AND (boolean)|AND}} index <= count {{Cl|THEN}} entry = 16 * (index - 1) {{Cl|ELSE}} entry = 16 * (count - 1)
-{{Cl|SEEK}} rf, 1 + 6 + entry 'start of indexed Entry header
-{{Cl|GET}} rf, , byte: wide = byte ' use this unsigned for images over 127
-{{Cl|GET}} rf, , byte: high = byte ' use this unsigned because it isn't doubled
-{{Cl|GET}} rf, , word 'number of 4 BPP colors(256 & 32 = 0) & reserved bytes
-{{Cl|GET}} rf, , dword '2 hot spots both normally 0 in icons, used for cursors
-{{Cl|GET}} rf, , dword: size = dword 'this could be used, doesn't seem to matter
-{{Cl|GET}} rf, , dword: offset = dword 'find where the specific index BMP header is
-'{{Cl|PRINT}} wide; "X"; high, size, offset
-
-{{Cl|SEEK}} rf, 1 + offset + 14 'only read the BPP in BMP header
-{{Cl|GET}} rf, , word: bpp = word
-{{Cl|IF...THEN|IF}} bpp = 0 {{Cl|THEN}} {{Cl|CLOSE}} rf: {{Cl|EXIT FUNCTION}}
-{{Cl|IF...THEN|IF}} bpp <= 24 {{Cl|THEN}} pixelbytes = bpp / 8 {{Cl|ELSE}} pixelbytes = 3
-{{Cl|IF...THEN|IF}} bpp > 1 {{Cl|AND (boolean)|AND}} bpp <= 8 {{Cl|THEN}} palettebytes = 4 * (2 ^ bpp) {{Cl|ELSE}} palettebytes = 0
-datasize& = (wide * high * pixelbytes) + palettebytes 'no padder should be necessary
-filesize& = datasize& + 14 + 40 ' data and palette + header
-bmpoffset& = palettebytes + 54 ' data offset from start of bitmap
-readbytes& = datasize& + 28 ' (40 - 12) bytes left to read in BMP header and {{Cl|XOR}} mask only
-'{{Cl|PRINT}} bpp, bmpoffset&, filesize&
-
-BM = {{Cl|CVI}}("BM") 'this will create "BM" in file like {{Cl|MKI$}} would
-wf = {{Cl|FREEFILE}}
-{{Cl|OPEN}} fileout {{Cl|OPEN|FOR}} {{Cl|BINARY}} {{Cl|AS}} wf
-{{Cl|PUT}} wf, , BM
-{{Cl|PUT}} wf, , filesize&
-dword = 0
-{{Cl|PUT}} wf, , dword
-{{Cl|PUT}} wf, , bmpoffset& 'byte location of end of palette or BMP header
-dword = 40
-{{Cl|PUT}} wf, , dword ' start of 40 byte BMP header
-{{Cl|PUT}} wf, , wide
-{{Cl|PUT}} wf, , high
-{{Cl|SEEK}} rf, 1 + offset + 12 ' after 12 bytes start copy of BMP header starting at planes
-dat$ = {{Cl|STRING$}}(readbytes&, 0) 'create string to hold remaining bytes needed w/o {{Cl|AND}} mask data
-{{Cl|GET}} rf, , dat$ ' copy lower header, palette(if used) and {{Cl|XOR}} mask
-{{Cl|PUT}} wf, , dat$ ' put all of the string data in the bitmap all at once
-{{Cl|CLOSE}} rf, wf
-Icon2BMP = count ' return the number of icons available in the icon file
-{{Cl|END FUNCTION}}
-{{CodeEnd}}{{small|Code by Ted Weissgerber}}
-: ''Note:'' Once the file has been loaded into memory, the image handle can still be used even after the file has been deleted.
-
-
-{{PageSeeAlso}}
-* [[_TITLE]]
-* [[_LOADIMAGE]]
-* [[$EXEICON]]
-* [[Creating Icon Bitmaps]] {{text|(member-contributed program)}}
-* [[Bitmaps]], [[Icons and Cursors]]
-* [[Resource_Table_extraction#Extract_Icon|Icon Extraction]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_INCLERRORFILE$__1111111111111$.txt b/internal/help/_INCLERRORFILE$__1111111111111$.txt
deleted file mode 100644
index 5bb97d062..000000000
--- a/internal/help/_INCLERRORFILE$__1111111111111$.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:08}}
-{{DISPLAYTITLE:_INCLERRORFILE$}}
-The [[_INCLERRORFILE$]] function returns the name of the original source code [[$INCLUDE]] module that caused the most recent error.
-
-
-
-{{PageSyntax}}
-: {{Parameter|errfile$}} = [[_INCLERRORFILE$]]
-
-
-{{PageDescription}}
-If the last error occurred in the main module, [[_INCLERRORFILE$]] returns an empty string.
-
-
-==Availability==
-* '''Version 1.1 and up'''.
-
-
-{{PageExamples}}
-''Example:''
-{{CodeStart}}
-{{Cl|ON ERROR}} {{Cl|GOTO}} DebugLine
-
-{{Cl|ERROR}} 250 'simulated error code - an error in the main module leaves _INCLERRORLINE empty (= 0)
-
-'{{Cl|$INCLUDE}}:'haserror.bi'
-
-{{Cl|END}}
-
-DebugLine:
-{{Cl|PRINT}} "An error occurred. Please contact support with the following details:
-{{Cl|PRINT}} "ERROR "; {{Cl|ERR}}; " ON LINE: "; {{Cl|_ERRORLINE}}
-{{Cl|IF...THEN|IF}} {{Cl|_INCLERRORLINE}} {{Cl|THEN}}
- {{Cl|PRINT}} " IN MODULE "; {{Cl|_INCLERRORFILE$}}; " (line"; {{Cl|_INCLERRORLINE}}; ")"
-{{Cl|END IF}}
-{{Cl|RESUME}} {{Cl|NEXT}}
-{{CodeEnd}}
-{{OutputStart}}An error occurred. Please contact support with the following details:
-ERROR 250 ON LINE: 6
-
-An error occurred. Please contact support with the following details:
-ERROR 250 ON LINE: 9
- IN MODULE haserror.bi ( line 1 )
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_INCLERRORLINE]]
-* [[ON ERROR]], [[ERR]]
-* [[ERROR]]
-* [[ERROR Codes]]
-* [[$INCLUDE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_INCLERRORLINE__1111111111111.txt b/internal/help/_INCLERRORLINE__1111111111111.txt
deleted file mode 100644
index ab08bc7ca..000000000
--- a/internal/help/_INCLERRORLINE__1111111111111.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:09}}
-{{DISPLAYTITLE:_INCLERRORLINE}}
-The [[_INCLERRORFILE$]] function returns the line number in an [[$INCLUDE]] file that caused the most recent error.
-
-
-
-{{PageSyntax}}
-: {{Parameter|errline&}} = [[_INCLERRORLINE]]
-
-
-{{PageDescription}}
-* If the last error occurred in the main module, _INCLERRORLINE returns 0.
-* By checking _INCLERRORLINE you can report exactly what line inside an included module caused the last error.
-
-
-==Availability==
-* '''Version 1.1 and up'''.
-
-
-{{PageExamples}}
-''Example:''
-{{CodeStart}}
-{{Cl|ON ERROR}} {{Cl|GOTO}} DebugLine
-
-{{Cl|ERROR}} 250 'simulated error code - an error in the main module leaves _INCLERRORLINE empty (= 0)
-
-'{{Cl|$INCLUDE}}:'haserror.bi'
-
-{{Cl|END}}
-
-DebugLine:
-{{Cl|PRINT}} "An error occurred. Please contact support with the following details:
-{{Cl|PRINT}} "ERROR "; {{Cl|ERR}}; " ON LINE: "; {{Cl|_ERRORLINE}}
-{{Cl|IF...THEN|IF}} {{Cl|_INCLERRORLINE}} {{Cl|THEN}}
- {{Cl|PRINT}} " IN MODULE "; {{Cl|_INCLERRORFILE$}}; " (line"; {{Cl|_INCLERRORLINE}}; ")"
-{{Cl|END IF}}
-{{Cl|RESUME}} {{Cl|NEXT}}
-{{CodeEnd}}
-{{OutputStart}}An error occurred. Please contact support with the following details:
-ERROR 250 ON LINE: 6
-
-An error occurred. Please contact support with the following details:
-ERROR 250 ON LINE: 9
- IN MODULE haserror.bi ( line 1 )
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_INCLERRORFILE$]]
-* [[ON ERROR]], [[ERR]]
-* [[ERROR]]
-* [[ERROR Codes]]
-* [[$INCLUDE]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_INFLATE$__1111111$.txt b/internal/help/_INFLATE$__1111111$.txt
deleted file mode 100644
index abd4ece8b..000000000
--- a/internal/help/_INFLATE$__1111111$.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:10}}
-{{DISPLAYTITLE:_INFLATE$}}
-The [[_INFLATE$]] function decompresses a [[STRING|string]] compressed by the [[_DEFLATE$]] function.
-
-
-{{PageSyntax}}
-:{{Parameter|result$}} = [[_INFLATE$]]({{Parameter|stringToDecompress$[, originalSize&]}})
-
-
-{{PageDescription}}
-* {{Parameter|result$}} will contain the original version of {{Parameter|stringToDecompress$}}.
-* Optional parameter {{Parameter|originalSize&}} can be used if the original size of the uncompressed data is known beforehand, which makes the decompression routine run more efficiently.
-** If unspecified, decompression still works as expected, but may use more steps and need to allocate more memory internally.
-
-
-==Availability==
-* '''Version 1.4 and up'''.
-
-
-{{PageExamples}}
-''Example 1:'' Compressing a long string of text.
-{{CodeStart}}
-a$ = "The quick brown fox jumps over the lazy dog. "
-{{Cl|PRINT}} "Original string (a$): "; a$
-{{Cl|FOR}} i = 1 {{Cl|TO}} 15
- a$ = a$ + a$
-{{Cl|NEXT}}
-
-{{Cl|PRINT}} "After concatenating it into itself several times, LEN(a$) ="; {{Cl|LEN}}(a$)
-
-b$ = {{Cl|_DEFLATE$}}(a$)
-{{Cl|PRINT}} "After using _DEFLATE$ to compress it, LEN ="; {{Cl|LEN}}(b$)
-{{Cl|PRINT}} {{Cl|USING}} "(compressed size is #.###% of the original)"; (({{Cl|LEN}}(b$) * 100) / {{Cl|LEN}}(a$))
-c$ = {{Cl|_INFLATE$}}(b$)
-PRINT "After using _INFLATE$ to decompress it, LEN ="; {{Cl|LEN}}(c$)
- {{CodeEnd}}
-{{OutputStart}}
-Original string (a$): The quick brown fox jumps over the lazy dog
-After concatenating it into itself several times, LEN(a$) = 1474560
-After using _DEFLATE$ to compress it, LEN = 4335
-(compressed size is 0.295% of the original)
-After using _INFLATE$ to decompress it, LEN = 1474560
-{{OutputEnd}}
-
-{{PageSeeAlso}}
-* [[_DEFLATE$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_INSTRREV__11111111.txt b/internal/help/_INSTRREV__11111111.txt
deleted file mode 100644
index c0fa30b45..000000000
--- a/internal/help/_INSTRREV__11111111.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:12}}
-{{DISPLAYTITLE:_INSTRREV}}
-The [[_INSTRREV]] function searches for a substring inside another string, but unlike [[INSTR]] it searches from right to left.
-
-
-{{PageSyntax}}
-: {{Parameter|position%}} = [[_INSTRREV]]([{{Parameter|start%}},] {{Parameter|baseString$}}, {{Parameter|subString$}})
-
-
-{{Parameters}}
-* The optional literal or variable [[INTEGER]] {{Parameter|start%}} indicates where in the {{Parameter|baseString$}} the search must start, counted from the left.
-* The {{Parameter|baseString$}} is a literal or variable [[STRING]] value to be searched for an exact match including [[UCASE$|letter cases]].
-* The {{Parameter|subString$}} is a literal or variable [[STRING]] value being searched.
-
-
-{{PageDescription}}
-* The function returns the {{Parameter|position%}} in the {{Parameter|baseString$}} where the {{Parameter|subString$}} was found, from right to left.
-* {{Parameter|position%}} will be 0 if the search found no matches in the base string.
-* [[_INSTRREV]] returns 0 if an empty {{Parameter|baseString$}} is passed, and returns [[LEN]]({{Parameter|baseString$}}) with an empty {{Parameter|subString$}}.
-* The {{Parameter|start%}} position is useful when making multiple searches in the same string. See the example below.
-* The {{Parameter|subString$}} should be smaller or equal in [[LEN|length]] to the {{Parameter|baseString$}}, or 0 is returned.
-* A {{Parameter|start%}} value of 0 or less starts search from the end of the {{Parameter|baseString$}} (same as not passing a {{Parameter|start%}} parameter).
-
-
-{{PageExamples}}
-''Example 1:'' Separating a file name from a full path.
-{{CodeStart}}
-fullPath$ = "C:\Documents and Settings\Administrator\Desktop\qb64\internal\c\libqb\os\win\libqb_1_2_000000000000.o"
-file$ = {{Cl|MID$}}(fullPath$, {{Cl|_INSTRREV}}(fullPath$, "\") + 1)
-{{Cl|PRINT}} file$
-{{CodeEnd}}
-{{OutputStart}}
-libqb_1_2_000000000000.o
-{{OutputEnd}}
-
-
-''Example 2:'' Searching for multiple instances of a substring inside a base string, going from the end to the start.
-{{CodeStart}}
-sentence$ = " This is a string full of spaces, including at start and end... "
-{{Cl|PRINT}} sentence$
-{{Cl|DO}}
- findPrevSpace% = {{Cl|_INSTRREV}}(findPrevSpace% - 1, sentence$, {{Cl|SPACE$}}(1))
- {{Cl|IF}} findPrevSpace% = 0 {{Cl|THEN}}
- {{Cl|LOCATE}} 4, 1
- {{Cl|PRINT}} "No more spaces"
- {{Cl|EXIT}} {{Cl|DO}}
- {{Cl|END IF}}
-
- {{Cl|LOCATE}} 2, findPrevSpace%
- {{Cl|PRINT}} "^"
- totalSpaces = totalSpaces + 1
-
- {{Cl|IF}} findPrevSpace% = 1 {{Cl|THEN}}
- {{Cl|LOCATE}} 4, 1
- {{Cl|PRINT}} "Last space found at position 1"
- {{Cl|EXIT}} {{Cl|DO}}
- {{Cl|END IF}}
-{{Cl|LOOP}}
-{{Cl|PRINT}} "Total spaces found: "; totalSpaces
-{{CodeEnd}}
-{{OutputStart}}
- This is a string full of spaces, including at start and end...
-^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
-
-Last space found at position 1
-Total spaces found: 13
-{{OutputEnd}}
-
-{{PageSeeAlso}}
-* [[MID$]], [[INSTR]]
-* [[SPACE$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_INTEGER64__111111164.txt b/internal/help/_INTEGER64__111111164.txt
deleted file mode 100644
index e5bad405a..000000000
--- a/internal/help/_INTEGER64__111111164.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:13}}
-{{DISPLAYTITLE:_INTEGER64}}
-[[_INTEGER64]] is an 8 byte number type definition that can hold whole numerical values.
-
-
-{{PageSyntax}}
-: [[DIM]] {{Parameter|variable}} [[AS]] [[_INTEGER64]]
-
-
-{{PageDescription}}
-* Can be used in 32 or 64 bit computers.
-* Signed numerical values can range from -9223372036854775808 to 9223372036854775807.
-* [[_UNSIGNED]] [[_INTEGER64]] values range from 0 to 18446744073709551615 on 64 bit computers.
-* Variable type suffix is '''&&''' or '''~&&''' for [[_UNSIGNED]]. Suffix can also be placed after a literal or hexadecimal numerical value.
-* Values can be converted to 8 byte [[ASCII]] character strings using [[_MK$]] and back using [[_CV]].
-* Equivalent to INT8 or unsigned as UINT8 in C programming.
-* '''When a variable has not been assigned or has no type suffix, the value defaults to [[SINGLE]].'''
-
-
-{{PageSeeAlso}}
-* [[INTEGER]], [[LONG]]
-* [[_DEFINE]], [[DIM]]
-* [[_UNSIGNED]]
-* [[_CV]], [[_MK$]]
-* [[PDS (7.1) Procedures#CURRENCY|CURRENCY]]
-* [[Variable Types]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_KEYCLEAR__11111111.txt b/internal/help/_KEYCLEAR__11111111.txt
deleted file mode 100644
index ab5d9015e..000000000
--- a/internal/help/_KEYCLEAR__11111111.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:14}}
-{{DISPLAYTITLE:_KEYCLEAR}}
-[[_KEYCLEAR]] clears all keyboard input buffers.
-
-{{PageSyntax}}
-:[[_KEYCLEAR]] [{{Parameter|buffer&}}]
-
-{{Parameters}}
-*{{Parameter|buffer&}} indicates the buffer to be cleared:
-** 1 - Clear the regular keyboard buffer, as used by all input command except the following: _KEYHIT, _KEYDOWN, INP(&H60. This is the same as the the emulated BIOS keyboard buffer, so legacy code reading from it via PEEK/POKE/CALL ABSOLUTE will also be affected.
-** 2 - Clear the buffer used by _KEYHIT.
-** 3 - Clear INP(&H60) buffer. (see '''Warning''' in the the description below)
-* If no parameter is passed, all three buffers are cleared.
-
-
-{{PageDescription}}
-* The '''_KEYCLEAR''' command clears the specified keyboard input buffer. In effect, it is as if a loop has been used to read from the buffer until it is empty. All keys cleared are lost.
-* '''Warning:''' The buffer read by INP(&H60) does not behave as the other buffers do. Whilst reading from the others will eventually empty after reading all data, this buffer will continue to return the last value. For this reason, [[_KEYCLEAR]] is of little effect, but is included for completeness (an internal flag indicating new data on the port is cleared). However, using [[INP]] for anything is strongly discouraged, and is for backwards compatibility only.
-* This command is best used just before getting input, in order to clear stray key presses from commands such as SLEEP, or just random keyboard bashing by the user. The programmer also ought to be aware of key release events in the _KEYHIT buffer; consider the following code:
-
-{{CodeStart}}
-INPUT "Name: ", name$
-_KEYCLEAR
-_DELAY 2 'Simulate doing some processing that takes some time.
-PRINT _KEYHIT
-{{CodeEnd}}
-
-* The INPUT statement finishes as soon as the Enter key is struck; the program then proceeds to clear all input buffers. Because this is executed so quickly, it is likely that the user will release the Enter key after the _KEYCLEAR command is executed, leaving a -13 (Enter key release) event in the _KEYHIT buffer.
-* As mentioned above, it is best to place the _KEYCLEAR after the processing, immediately before the PRINT _KEYHIT command:
-
-{{CodeStart}}
-INPUT "Name: ", name$
-_DELAY 2 'Simulate doing some processing that takes some time.
-_KEYCLEAR
-PRINT _KEYHIT
-{{CodeEnd}}
-
-
-{{PageExamples}}
-Example:
-{{CodeStart}}
-PRINT "Press a key"
-SLEEP 'Wait for keypress
-'Three alternative _KEYCLEAR calls. Try uncommenting different ones to see the effect.
-'_KEYCLEAR
-'_KEYCLEAR 1
-'_KEYCLEAR 2
-PRINT "In regular buffer, there is "; INKEY$ 'read regular buffer
-PRINT "In _KEYHIT buffer, there is "; _KEYHIT 'read the _KEYHIT buffer
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[SLEEP]]
-* [[INKEY$]], [[_KEYHIT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_KEYDOWN__1111111.txt b/internal/help/_KEYDOWN__1111111.txt
deleted file mode 100644
index 3e4ec73da..000000000
--- a/internal/help/_KEYDOWN__1111111.txt
+++ /dev/null
@@ -1,175 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:17}}
-{{DISPLAYTITLE:_KEYDOWN}}
-The '''_KEYDOWN''' function returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.
-
-
-{{PageSyntax}}
-:: return% = '''_KEYDOWN('''''code&''''')'''
-
-
-* The ''return'' value is -1 if a specified key is pressed or 0 if it was not pressed. It can be used to monitor key combinations.
-* The POSITIVE [[LONG]] ''code'' value can be from any function key that needs to be monitored in a key press combination.
-* Unicode references:
-:* 1) What is the glyph represented by that UNICODE value: [http://www.fileformat.info/info/unicode/char/search.htm Unicode Format Info]
-:* 2) Which fonts support the characters I want to use: [http://en.wikipedia.org/wiki/Unicode_typefaces#Comparison_of_fonts Unicode Fonts]
-:* 3) What was the format again?: [http://www.birds-eye.net/definition/u/unicode.shtml Unicode Formats]
-:* A UTF32 value is usually(but by no means always!) the same as a UTF16 value just with the top 2 bytes set to 0.
-* An important difference between [[INKEY$]] and [[_KEYHIT]] is how they work when '''CTRL, ALT''' or '''SHIFT''' are used. [[INKEY$]] returns a different code if you hold down CTRL, ALT or SHIFT before pressing F1 (for example). [[_KEYHIT]] will return the same code regardless of which modifiers were used but you can check _KEYDOWN to see which modifying keys are being used.
-* '''Keyboards with Alt Gr key:''' [[_KEYHIT]] may return both Alt(100307) and Ctrl(100306) codes when key is pressed or released.
-* '''Linux with foreign keyboards:''' [[SHELL]] [[_HIDE]] "setxkbmap us" will setup a keyboard to read US [[Scancodes]].
-
-
-{{WhiteStart}} '''The QB64 Virtual Key constant values used: '''
-
- '''0-255''': [[ASCII|ASCII and Extended code]] values (Refer to [http://en.wikipedia.org/wiki/Code_page_437 CP437])
-
- '''256-65535''': [[ASCII#Two Byte Codes|ASCII 2-byte]] character codes (unaffected by SHIFT/ALT/CTRL modifiers)
- Use [[CVI]] to convert ASCII 2-byte codes to _KEYDOWN values.
-
-' '''_KEYDOWN Keyboard Values'''
-'
-''''Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Sys ScL Pause'''
-' 27 15104 15360 15616 15872 16128 16384 16640 16896 17152 17408 34048 34304 +316 +302 +019
-''''`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSp Ins Hme PUp NumL / * -'''
-'126 33 64 35 36 37 94 38 42 40 41 95 43 8 20992 18176 18688 +300 47 42 45
-''' 96 49 50 51 52 53 54 55 56 57 48 45 61''
-''''Tab Q W E R T Y U I O P [{ ]} \| Del End PDn 7Hme 8/â–² 9PU + '''
-' 9 81 87 69 82 84 89 85 73 79 80 123 125 124 21248 20224 20736 18176 18432 18688 43
-''' 113 119 101 114 116 121 117 105 111 112 91 93 92 55 56 57 ''
-''''CapL A S D F G H J K L ;: '" Enter 4/â—„- 5 6/-â–º
-'+301 65 83 68 70 71 72 74 75 76 58 34 13 19200 19456 19712 '''E'''
-''' 97 115 100 102 103 104 106 107 108 59 39 52 53 54 '' '''n'''
-''''Shift Z X C V B N M ,< .> /? Shift â–² 1End 2/â–¼ 3PD t'''
-'+304 90 88 67 86 66 78 77 60 62 63 +303 18432 20224 20480 20736 '''e'''
-''' 122 120 99 118 98 110 109 44 46 47 49 50 51 '' '''r'''
-''''Ctrl Win Alt Spacebar Alt Win Menu Ctrl â—„- â–¼ -â–º 0Ins .Del '''
-'+306 +311 +308 32 +307 +312 +319 +305 19200 20480 19712 20992 21248 13
-' '' 48 46''
-'
-' ''' Lower value = LCase/NumLock On __________________ + = add 100000 '''
-{{WhiteEnd}}
-{{small|NOTE: The above commented table can be copied and pasted directly into the QB64 IDE}}
-
-
-{{WhiteStart}} '''65536-&H40000000: QB64-specific Virtual Key codes:'''
-
- CONST KEY_PAUSE& = 100019
- CONST KEY_NUMLOCK& = 100300
- CONST KEY_CAPSLOCK& = 100301
- CONST KEY_SCROLLOCK& = 100302
- CONST KEY_RSHIFT& = 100303
- CONST KEY_LSHIFT& = 100304
- CONST KEY_RCTRL& = 100305
- CONST KEY_LCTRL& = 100306
- CONST KEY_RALT& = 100307
- CONST KEY_LALT& = 100308
- CONST KEY_RMETA& = 100309 'Left 'Apple' key (MacOSX)
- CONST KEY_LMETA& = 100310 'Right 'Apple' key (MacOSX)
- CONST KEY_LSUPER& = 100311 'Left "Windows" key
- CONST KEY_RSUPER& = 100312 'Right "Windows"key
- CONST KEY_MODE& = 100313 '"AltGr" key
- CONST KEY_COMPOSE& = 100314
- CONST KEY_HELP& = 100315
- CONST KEY_PRINT& = 100316
- CONST KEY_SYSREQ& = 100317
- CONST KEY_BREAK& = 100318
- CONST KEY_MENU& = 100319
- CONST KEY_POWER& = 100320
- CONST KEY_EURO& = 100321
- CONST KEY_UNDO& = 100322
- CONST KEY_KP0& = 100256
- CONST KEY_KP1& = 100257
- CONST KEY_KP2& = 100258
- CONST KEY_KP3& = 100259
- CONST KEY_KP4& = 100260
- CONST KEY_KP5& = 100261
- CONST KEY_KP6& = 100262
- CONST KEY_KP7& = 100263
- CONST KEY_KP8& = 100264
- CONST KEY_KP9& = 100265
- CONST KEY_KP_PERIOD& = 100266
- CONST KEY_KP_DIVIDE& = 100267
- CONST KEY_KP_MULTIPLY& = 100268
- CONST KEY_KP_MINUS& = 100269
- CONST KEY_KP_PLUS& = 100270
- CONST KEY_KP_ENTER& = 100271
- CONST KEY_KP_INSERT& = 200000
- CONST KEY_KP_END& = 200001
- CONST KEY_KP_DOWN& = 200002
- CONST KEY_KP_PAGE_DOWN& = 200003
- CONST KEY_KP_LEFT& = 200004
- CONST KEY_KP_MIDDLE& = 200005
- CONST KEY_KP_RIGHT& = 200006
- CONST KEY_KP_HOME& = 200007
- CONST KEY_KP_UP& = 200008
- CONST KEY_KP_PAGE_UP& = 200009
- CONST KEY_KP_DELETE& = 200010
- CONST KEY_SCROLL_LOCK_MODE& = 200011
- CONST KEY_INSERT_MODE& = 200012
-
- '''&H40000000 up''': [[Unicode]] using the '''cyberbit.ttf''' font when available.
-
- '''Use [[_KEYHIT]] to find the key codes to be monitored by _KEYDOWN! '''
-
-{{WhiteEnd}}
-
-''Example 1:'' Comparing the _KEYDOWN returns using [[CONST|constant]] values with 2 byte [[INKEY$]] returns.
-{{CodeStart}}
-{{Cl|CONST}} RSHIFT& = 100303
-{{Cl|CONST}} LSHIFT& = 100304
-{{Cl|DO}}
- x = {{Cl|_KEYHIT}}
- {{Cl|IF}} x = {{Cl|CVI}}({{Cl|CHR$}}(0) + {{Cl|CHR$}}(59)) {{Cl|THEN}}
- {{Cl|IF}} {{Cl|_KEYDOWN}}(LSHIFT&) {{Cl|OR (boolean)|OR}} {{Cl|_KEYDOWN}}(RSHIFT&) {{Cl|THEN}}
- {{Cl|PRINT}} "KEYHIT: SHIFT + F1"
- {{Cl|ELSE}}
- {{Cl|PRINT}} "KEYHIT: F1"
- {{Cl|END IF}}
- {{Cl|END IF}}
- k$ = {{Cl|INKEY$}} 'compare key press return values
- {{Cl|IF}} k$ = {{Cl|CHR$}}(0) + {{Cl|CHR$}}(59) {{Cl|THEN}} {{Cl|PRINT}} "INKEY$: F1"
- {{Cl|IF}} k$ = {{Cl|CHR$}}(0) + {{Cl|CHR$}}(84) {{Cl|THEN}} {{Cl|PRINT}} "INKEY$: SHIFT+F1"
-{{Cl|LOOP}} {{Cl|UNTIL}} k$ = {{Cl|CHR$}}(27) 'escape key exit
-{{CodeEnd}}
-{{small|Code by Galleon}}
-
-
-''Example 2:'' How to calculate the _KEYDOWN codes of the 2 byte INKEY$ arrow key codes using [[CVI]].
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-
-x = 320: y = 240
-col = {{Cl|_RGB}}(255, 0, 0)
-radius = 20
-
-DO
- {{Cl|CLS}}
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} "Use the arrow keys to move the circle."
- {{Cl|CIRCLE}} (x, y), radius, col
- {{Cl|PAINT}} (x, y), col
-
- {{Cl|IF...THEN|IF}} {{Cl|_KEYDOWN}}({{Cl|CVI}}({{Cl|CHR$}}(0) + "P")) {{Cl|THEN}} y = y + 1 '_KEYDOWN(20480)
- {{Cl|IF...THEN|IF}} {{Cl|_KEYDOWN}}({{Cl|CVI}}({{Cl|CHR$}}(0) + "H")) {{Cl|THEN}} y = y - 1 '_KEYDOWN(18432)
- {{Cl|IF...THEN|IF}} {{Cl|_KEYDOWN}}({{Cl|CVI}}({{Cl|CHR$}}(0) + "K")) {{Cl|THEN}} x = x - 1 '_KEYDOWN(19200)
- {{Cl|IF...THEN|IF}} {{Cl|_KEYDOWN}}({{Cl|CVI}}({{Cl|CHR$}}(0) + "M")) {{Cl|THEN}} x = x + 1 '_KEYDOWN(19712)
-
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 100 'limit to 100 frames per second
-{{Cl|LOOP}}
-{{CodeEnd}}
-{{small|Code by Galleon}}
-:''Explanation:'' When [[CVI]] is used with a 2 byte code, the code of the first character(0) is added to the second character code which is multiplied by 256. In the example, code zero is added to the [[ASCII]] code of "P" which is 80. CVI multiplies 80 * 256 = 20480.
-
-
-''See also:
-
-* [[_KEYHIT]], [[Unicode]], [[Code Pages]] (by region)
-* [[_MAPUNICODE]], [[_MAPUNICODE (function)]]
-* [[INKEY$]], [[ASCII]], [[CVI]]
-* [[INP]](&H60), [[Scancodes]]
-* [[ON KEY(n)]], [[KEY(n)]], [[KEY n]]
-* [[Windows_Libraries#Hot_Keys_.28maximize.29|Windows hot keys]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_KEYHIT__111111.txt b/internal/help/_KEYHIT__111111.txt
deleted file mode 100644
index 4970df010..000000000
--- a/internal/help/_KEYHIT__111111.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:15}}
-{{DISPLAYTITLE:_KEYHIT}}
-The [[_KEYHIT]] function returns [[ASCII]] one and two byte, OpenGL Virtual Key and Unicode keyboard key press codes.
-
-
-{{PageSyntax}}
-:{{Parameter|keycode&}} = [[_KEYHIT]]
-
-
-{{PageDescription}}
-* Return values range up to &H40000000 so use a [[LONG]] or [[_INTEGER64]] variable type. See the [[_KEYDOWN]] code list:
-:* 0-255: [[ASCII]] values (Refer to [http://en.wikipedia.org/wiki/Code_page_437 CP437]).
-:* 256-65535: [[ASCII#Two_Byte_Codes|2-byte]] character codes : code = [[CVI]]([[CHR$]](0) + [[CHR$]](scancode)) (unaffected by SHIFT/ALT/CTRL modifiers).
-:* 65536-&H40000000: [[_KEYDOWN|QB64-specific Virtual Key codes]] (designated with + for 100000 on keyboard below)
-:* '''Negative''' [[LONG]] values returned indicate that a key was released or a lock function key has been turned off.
-* '''Note: _KEYHIT can only return one value at a time so use the [[_KEYDOWN]] keyhit value to find key combinations.'''
-* To receive input from a [[$CONSOLE]] window, use [[_CINP]].
-
-{{WhiteStart}}' '''_KEYHIT Keyboard Codes'''
-'
-' '''Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Sys ScL Pause'''
-' 27 15104 15360 15616 15872 16128 16384 16640 16896 17152 17408 34048 34304 +316 +302 +019
-' '''`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSp Ins Hme PUp NumL / * -'''
-' 126 33 64 35 36 37 94 38 42 40 41 95 43 8 20992 18176 18688 +300 47 42 45
-' '' 96 49 50 51 52 53 54 55 56 57 48 45 61''
-' '''Tab Q W E R T Y U I O P [{ ]} \| Del End PDn 7Hme 8/â–² 9PU + '''
-' 9 81 87 69 82 84 89 85 73 79 80 123 125 124 21248 20224 20736 18176 18432 18688 43
-' '' 113 119 101 114 116 121 117 105 111 112 91 93 92 55 56 57 ''
-' '''CapL A S D F G H J K L ;: '" Enter 4/â—„- 5 6/-â–º
-' +301 65 83 68 70 71 72 74 75 76 58 34 13 19200 19456 19712 '''E'''
-' '' 97 115 100 102 103 104 106 107 108 59 39 52 53 54 '' '''n'''
-' '''Shift Z X C V B N M ,< .> /? Shift â–² 1End 2/â–¼ 3PD t'''
-' +304 90 88 67 86 66 78 77 60 62 63 +303 18432 20224 20480 20736 '''e'''
-' '' 122 120 99 118 98 110 109 44 46 47 49 50 51 '' '''r'''
-' '''Ctrl Win Alt Spacebar Alt Win Menu Ctrl â—„- â–¼ -â–º 0Ins .Del '''
-' +306 +311 +308 32 +307 +312 +319 +305 19200 20480 19712 20992 21248 13
-' '' 48 46''
-'
-' ''' Lower value = LCase/NumLock On __________________ + = add 100000 '''
-{{WhiteEnd}}
-{{small|NOTE: The above commented table can be copied and pasted directly into the QB64 IDE}}
-
-
-:* >= &H40000000: [[Unicode]].
-
-* Font '''cyberbit.ttf''', included with QB64 ('''version 0.92 and up'''), is required to facilitate the '''IME'''(in Chinese settings) only. The 12.7 MB font is free for '''non-commercial''' use and is not loaded unless the user switches to the '''Input Mode Editor'''. Set to "UNICODE".
-'''[http://www.fileformat.info/tip/microsoft/enter_unicode.htm Setting up the Unicode Input Method Editor in Windows]'''
-If you need help with IME support in '''Vista''' see the following article: [http://blogs.msdn.com/b/michkap/archive/2006/07/20/671835.aspx Setting up IME in Vista]
-* QB64 can use several Windows fonts when '''cyberbit''' is not present so it is not necessary to include with program packages.
-* An '''important difference''' between [[INKEY$]] and _KEYHIT is how they work when '''CTRL, ALT''' or '''SHIFT''' are used. INKEY$ returns a different code if you hold down CTRL, ALT or SHIFT before pressing F1 (for example). _KEYHIT will return the same code regardless of which modifiers were used but you can check [[_KEYDOWN]] to see which modifying keys are being used.
-* '''Keyboards with an Alt Gr key note:''' _KEYHIT may return both Alt (100307) and Ctrl (100306) codes when AltGr key is pressed or released.
-
-
-{{PageExamples}}
-''Example:'' This routine will return the codes for any keyboard presses.
-{{CodeStart}}
-{{Cl|DEFLNG}} A-Z
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 8)
-{{Cl|CLS}} , 1
-font = {{Cl|_LOADFONT}}("cyberbit.ttf", 24)
-unifont = {{Cl|_LOADFONT}}("cyberbit.ttf", 24, "UNICODE")
-{{Cl|_FONT}} font
-
-{{Cl|DO}}
- x = {{Cl|_KEYHIT}}
- {{Cl|IF}} x {{Cl|THEN}}
- {{Cl|IF}} x < 0 {{Cl|THEN}} 'negative value means key released
- {{Cl|COLOR}} 2
- {{Cl|PRINT}} "Released ";
- x = -x
- {{Cl|ELSE}}
- {{Cl|COLOR}} 10
- {{Cl|PRINT}} "Pressed "; 'positive value means key pressed
- {{Cl|END IF}}
- {{Cl|IF}} x < 256 {{Cl|THEN}} 'ASCII code values
- {{Cl|PRINT}} "{{Cl|ASC}}II "; x;
- {{Cl|IF}} x >= 32 {{Cl|AND (boolean)|AND}} x <= 255 {{Cl|THEN}} {{Cl|PRINT}} "[" + {{Cl|CHR$}}(x) + "]" {{Cl|ELSE}} {{Cl|PRINT}}
- {{Cl|END IF}}
- {{Cl|IF}} x >= 256 {{Cl|AND (boolean)|AND}} x < 65536 {{Cl|THEN}} '2 byte key codes
- {{Cl|PRINT}} "2-BYTE-{{Cl|COM}}BO "; x {{Cl|AND (boolean)|AND}} 255; x \ 256;
- x2 = x \ 256
- {{Cl|IF}} x2 >= 32 {{Cl|AND (boolean)|AND}} x2 <= 255 {{Cl|THEN}} {{Cl|PRINT}} "[" + {{Cl|CHR$}}(x2) + "]" {{Cl|ELSE}} {{Cl|PRINT}}
- {{Cl|END IF}}
- {{Cl|IF}} x >= 100000 {{Cl|AND (boolean)|AND}} x < 200000 {{Cl|THEN}} 'QB84 Virtual Key codes
- {{Cl|PRINT}} "SDL VK"; x - 100000
- {{Cl|END IF}}
- {{Cl|IF}} x >= 200000 {{Cl|AND (boolean)|AND}} x < {{Cl|&H}}40000000 {{Cl|THEN}}
- {{Cl|PRINT}} "QB64 VK"; x - 200000
- {{Cl|END IF}}
- {{Cl|IF}} x >= {{Cl|&H}}40000000 {{Cl|THEN}} 'Unicode values (IME Input mode)
- {{Cl|PRINT}} "UNICODE "; x - {{Cl|&H}}40000000; "0x" + {{Cl|HEX$}}(x - {{Cl|&H}}40000000) + " ...";
- cx = {{Cl|POS}}(1): cy = {{Cl|CSRLIN}}
- {{Cl|_FONT}} unifont
- {{Cl|LOCATE}} cy, cx
- {{Cl|COLOR}} 15
- z$ = {{Cl|MKL$}}(x - {{Cl|&H}}40000000) + {{Cl|MKL$}}(0)
- {{Cl|PRINT}} z$ + z$ + z$;
- {{Cl|_FONT}} font
- {{Cl|LOCATE}} cy, 1: {{Cl|PRINT}}
- {{Cl|END IF}}
- {{Cl|END IF}}
-{{Cl|LOOP}}
-{{CodeEnd}}
-{{small|Code by Galleon}}
-
-
-{{PageSeeAlso}}
-* [[_KEYDOWN]], [[_CINP]]
-* [[_MAPUNICODE]], [[_MAPUNICODE (function)]]
-* [[INKEY$]], [[ASCII]] {{text|(code table)}},
-* [[Unicode]], [[Code Pages]] {{text|(by region)}}
-* [[INP]]([[&H|&H60]]), [[Scancodes]]
-* [[ON KEY(n)]], [[KEY(n)]], [[KEY n]]
-* [[Windows_Libraries#Hot_Keys_.28maximize.29|Windows hot keys]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_LASTAXIS__11111111.txt b/internal/help/_LASTAXIS__11111111.txt
deleted file mode 100644
index d58b3e927..000000000
--- a/internal/help/_LASTAXIS__11111111.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:19}}
-{{DISPLAYTITLE:_LASTAXIS}}
-The [[_LASTAXIS]] function returns the number of axis a specified number INPUT device on your computer has.
-
-
-{{PageSyntax}}
-: {{Parameter|axisCount%}} = [[_LASTAXIS]]({{Parameter|deviceNumber}})
-
-
-{{PageDescription}}
-* Returns the number of axis that can be read on a specified device number within the number of [[_DEVICES]] found.
-* A valid number can be sent to the [[_AXIS]] function to find any relative axis movements.
-* The devices are listed in a numerical order determined by the OS and can be read by the [[DEVICE$]] function.
-* '''The [[_DEVICES]] function must be read before using _LASTAXIS or an [[ERROR Codes|"Illegal Function Call" error]] will occur.'''
-* Devices include keyboard(1), mouse(2), joysticks, game pads and multiple stick game controllers.
-
-
-{{PageExamples}}
-''Example:'' Checking for the system's input devices and number of axis.
-{{CodeStart}}
-devices = {{Cl|_DEVICES}} 'MUST be read in order for other 2 device functions to work!
-PRINT "Number of input devices found ="; devices
-FOR i = 1 TO devices
- PRINT {{Cl|_DEVICE$}}(i)
- IF {{Cl|INSTR}}({{Cl|_DEVICE$}}(i), "[AXIS]") THEN PRINT "Axis:"; {{Cl|_LASTAXIS}}(i)
-NEXT
-{{CodeEnd}}
-{{OutputStart}}Number of input devices found = 2
-[KEYBOARD][BUTTON]
-[MOUSE][BUTTON][AXIS][WHEEL]
-Axis: 2
-{{OutputEnd}}
-:Note: The [[STRIG]]/[[STICK]] commands won't read from the keyboard or mouse device the above example lists.
-
-
-{{PageSeeAlso}}
-* [[_LASTBUTTON]], [[_LASTWHEEL]]
-* [[_AXIS]], [[_BUTTON]], [[_WHEEL]]
-* [[_DEVICE$]], [[_DEVICES]]
-* [[_MOUSEBUTTON]]
-* [[STRIG]], [[STICK]]
-* [[ON STRIG(n)]], [[STRIG(n)]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_LASTBUTTON__1111111111.txt b/internal/help/_LASTBUTTON__1111111111.txt
deleted file mode 100644
index 41ce0a397..000000000
--- a/internal/help/_LASTBUTTON__1111111111.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:20}}
-{{DISPLAYTITLE:_LASTBUTTON}}
-The [[_LASTBUTTON]] function returns the number of buttons a specified INPUT device on your computer has.
-
-
-{{PageSyntax}}
-: {{Parameter|buttonCount%}} = _[[_LASTBUTTON]]({{Parameter|deviceNumber}})
-
-
-* Returns the number of buttons that can be read on a specified device number within the number of [[_DEVICES]] found.
-* A valid number can be sent to the [[_BUTTON]] or [[_BUTTONCHANGE]] function to find any button events.
-* The specific device name and functions can be found by the [[_DEVICE$]] function [[STRING|string]].
-* The devices are listed in a numerical order determined by the OS and can be read by the [[DEVICE$]] function.
-* '''The [[_DEVICES]] function must be read before using _LASTBUTTON or an [[ERROR Codes|"Illegal Function Call" error]] will occur.'''
-* Devices include keyboard (reported as 1), mouse (reported as 2), joysticks, game pads and multiple stick game controllers.
-
-
-{{PageExamples}}
-''Example:'' Checking for the system's input devices.
-{{CodeStart}}
-devices = {{Cl|_DEVICES}} 'MUST be read in order for other 2 device functions to work!
-PRINT "Number of input devices found ="; devices
-FOR i = 1 TO devices
- PRINT {{Cl|_DEVICE$}}(i)
- PRINT "Buttons:"; {{Cl|_LASTBUTTON}}(i)
-NEXT
-{{CodeEnd}}
-{{OutputStart}}Number of input devices found = 2
-[KEYBOARD][BUTTON]
-Buttons: 512
-[MOUSE][BUTTON][AXIS][WHEEL]
-Buttons: 3
-{{OutputEnd}}
-:Note: The [[STRIG]]/[[STICK]] commands won't read from the keyboard or mouse device the above example lists.
-
-
-{{PageSeeAlso}}
-* [[_LASTAXIS]], [[_LASTWHEEL]]
-* [[_AXIS]], [[_BUTTON]], [[_WHEEL]]
-* [[_DEVICES]], [[_DEVICE$]]
-* [[_DEVICEINPUT]]
-* [[_MOUSEBUTTON]]
-* [[STRIG]], [[STICK]]
-* [[ON STRIG(n)]], [[STRIG(n)]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_LASTWHEEL__111111111.txt b/internal/help/_LASTWHEEL__111111111.txt
deleted file mode 100644
index 3aa12a76f..000000000
--- a/internal/help/_LASTWHEEL__111111111.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:21}}
-{{DISPLAYTITLE:_LASTWHEEL}}
-The [[_LASTWHEEL]] function returns the number of wheels a specified number INPUT device on your computer has.
-
-
-{{PageSyntax}}
-: {{Parameter|wheelCount%}} = [[_LASTWHEEL]]({{Parameter|deviceNumber}})
-
-
-* Returns the number of wheels that can be used on a specified device number within the number of [[_DEVICES]] found.
-* A valid number can be sent to the [[_WHEEL]] function to find any relative positive or negative wheel movements.
-* The devices are listed in a numerical order determined by the OS and can be read by the [[_DEVICE$]] function.
-* '''The [[_DEVICES]] function must be read before using _LASTWHEEL or an [[ERROR Codes|"Illegal Function Call" error]] may occur.'''
-* Devices include keyboard (reported as 1), mouse (reported as 2), joysticks, game pads and multiple stick game controllers.
-
-
-{{PageExamples}}
-''Example:'' Checking for the system's input devices and number of wheels available.
-{{CodeStart}}
-devices = {{Cl|_DEVICES}} 'MUST be read in order for other 2 device functions to work!
-PRINT "Number of input devices found ="; devices
-FOR i = 1 TO devices
- PRINT {{Cl|_DEVICE$}}(i)
- IF {{Cl|INSTR}}({{Cl|_DEVICE$}}(i), "[WHEEL]") THEN PRINT "Wheels:"; {{Cl|_LASTWHEEL}}(i)
-NEXT
-{{CodeEnd}}
-{{OutputStart}}Number of input devices found = 2
-[KEYBOARD][BUTTON]
-[MOUSE][BUTTON][AXIS][WHEEL]
-Wheels: 3
-{{OutputEnd}}
-: ''Note:'' A mouse may have 3 wheels listed when there is only one scroll wheel.
-
-
-{{PageSeeAlso}}
-* [[_LASTBUTTON]], [[_LASTAXIS]]
-* [[_AXIS]], [[_BUTTON]], [[_WHEEL]]
-* [[_DEVICE$]], [[_DEVICES]]
-* [[_MOUSEBUTTON]]
-* [[STRIG]], [[STICK]]
-* [[ON STRIG(n)]], [[STRIG(n)]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_LIMIT__11111.txt b/internal/help/_LIMIT__11111.txt
deleted file mode 100644
index 49c406c2f..000000000
--- a/internal/help/_LIMIT__11111.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:22}}
-{{DISPLAYTITLE:_LIMIT}}
-The [[_LIMIT]] statement sets the loop repeat rate of a program to so many per second, relinquishing spare CPU cycles to other applications.
-
-
-{{PageSyntax}}
-: [[_LIMIT]] {{Parameter|framesPerSecond!}}
-
-
-* The {{Parameter|framesPerSecond!}} [[SINGLE]] parameter value adjusts the loops per second of a program loop. '''Do not use negative values.'''
-* The loop code is executed before the loop is delayed. Loop cycles below once per second may delay program [[_EXIT]]s.
-* _LIMIT measures its interval from the previous time that it was called and minor adjustments are automatically made to ensure that the number of times a loop is repeated is correct overall.
-* Loop cycle rates of 1000 or less can '''significantly reduce CPU usage''' in programs.
-* Do not use it to limit a loop to '''less than once every 60 seconds'''(.0167) or an [[ERROR Codes|ILLEGAL FUNCTION CALL error]] will occur.
-* Do not use _LIMIT as a timing delay outside of loops. Use [[_DELAY]] instead.
-* Use _LIMIT to slow down old QBasic program loops that run too fast and use too much CPU.
-
-
-{{PageExamples}}
-''Example:'' Limits loop execution to 30 frames per second and limits the program's CPU usage.
-{{CodeStart}}
-{{Cl|PRINT}} "To Quit press ESC key!"
-{{Cl|DO}}
- {{Cl|_LIMIT}} 30
- {{Cl|PRINT}} {{Cl|CHR$}}(26);
- {{Cl|IF...THEN|IF}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) {{Cl|THEN}} {{Cl|EXIT DO}}
-{{Cl|LOOP}}
-{{CodeEnd}}
-{{OutputStart}}
-To Quit press ESC key!
-→→→→→→→→→→→→→→→→→→→→
-{{OutputEnd}}
-:''Note:'' In the above example, _LIMIT has to be within the loop.
-
-
-{{PageSeeAlso}}
-* [[_DELAY]]
-* [[TIMER]], [[ON TIMER(n)]]
-* [[SLEEP]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_LOADFONT__11111111.txt b/internal/help/_LOADFONT__11111111.txt
deleted file mode 100644
index 5b4f02b64..000000000
--- a/internal/help/_LOADFONT__11111111.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:24}}
-{{DISPLAYTITLE:_LOADFONT}}
-The [[_LOADFONT]] function loads a TrueType font (.TTF) or an OpenType font (.OTF) file in a specific size and style and returns a [[LONG]] font handle.
-
-
-{{PageSyntax}}
-: {{Parameter|handle&}} = [[_LOADFONT]]({{Parameter|fontFileName$}}, {{Parameter|size%}}[, "{MONOSPACE|, BOLD|, ITALIC|, UNDERLINE|, UNICODE|, DONTBLEND}"])
-
-
-{{PageDescription}}
-* The assigned [[LONG]] font {{Parameter|handle&}} variable return value designates a font style to be used somewhere in a program. Valid handle values are greater than 0 ('''{{Parameter|handle&}} > 0''').
-* {{Parameter|fontFileName$}} is the filename of a TrueType or OpenType font. Can include the path to the font file. Best practice is to include font files with a program.
-* If no path is specified for {{Parameter|fontFileName$}} and the font file isn't in the same folder as the resulting binary, QB64 attempts to load from the default ''C:\Windows\Fonts'' path.
-* {{Parameter|size%}} is the [[INTEGER]] height of the font. If the size is too large or small an [[ERROR Codes|error]] will occur.
-* Optional comma separated ''style'' parameter(s) used are literal [[STRING]]s (in quotes) or can be contained in variable(s).
-** '''"MONOSPACE"''' loads a font with all characters occupying the same width. Results may be too spaced out for fonts that aren't designed for monospace use.
-** '''"BOLD", "ITALIC"''' or '''"UNDERLINE"''' create bold, italic or underlined fonts when available in font.
-***(valid for QB64 versions prior to 1.000).
-***For '''QB64 1.000 or later''', you must specify the proper file name according to the desired attributes. For example, Courier New is in font '''cour.ttf''' while Courier New Bold is in font '''courbd.ttf''', as shipped with Windows.
-** '''"UNICODE"''' loads Unicode fonts such as ''cyberbit.ttf'' which is included in the QB64 downloads.
-** '''"DONTBLEND"''' turns off [[_ALPHA]] blending of fonts. This can also be done with the [[_DONTBLEND]] statement.
-:* You can pass different font styles using different predefined [[STRING]] variable lists. You '''can''' include an empty style string.
-* '''Always check that font handle values are greater than 0 ('''{{Parameter|handle&}} > 0''') before using them or [[ERROR Codes|illegal function errors]] may occur.'''
-* '''NOTE: SCREEN 0 can only use ONE font on a screen page. Thus a style like underline would affect the entire page.'''
-* Font sizes can be found using the [[_FONTHEIGHT]] function. Font ''size''s can also affect [[SCREEN (statement)|SCREEN]] sizes.
-* [[_FONTWIDTH]] can only measure monospaced fonts. '''"MONOSPACE" can be used to load a variable width font as a monospace font.'''
-* [[_PRINTWIDTH]] can measure the width of a string of text in '''graphics modes only'''. Use one character to get the font's width.
-
-
-'''Font Handles'''
-* Multiple fonts will require multiple font variable handles unless used and freed consecutively.
-* Font handles with values greater than 0 that are '''no longer used''' should be freed using [[_FREEFONT]].
-* '''Predefined QB64''' font handle numbers can be substituted before freeing a font handle:
-**'''_FONT 8 ''' - default font for [[SCREEN (statement)|SCREEN]] 1, 2, 7, 8 or 13
-**'''_FONT 14''' - default font for [[SCREEN (statement)|SCREEN]] 9 or 10
-**'''_FONT 16''' - default font for [[SCREEN (statement)|SCREEN]] 0 ([[WIDTH]] 80, 25 text only), 11 or 12
-**'''_FONT 9, 15''' and '''17''' are the double width versions of 8, 14 and 16 respectively in text '''SCREEN 0 only'''.
-* Once the font is changed to a predefined value, the font handle value can be freed using [[_FREEFONT]] for another font type.
-* Font handle values of -1 (load failure) '''do not''' need to be freed. '''An [[ERROR Codes|error]] will occur if you try to free invalid handles.'''
-
-
-'''Font File Specs'''
-* Windows users should find '''TTF''' font files in the C:\WINDOWS\FONTS folder, but don't depend on unusual ones being there.
-* '''Check the font file name. The name in the "viewer" is not necessarily the file's name. Use the name in properties (right click a font listed and choose Properties in the contextual menu)'''
-* If a program is on a different drive than Windows, [[ENVIRON$]]("SYSTEMROOT") will return the path to the "WINDOWS" folder. Normally "C:\WINDOWS". Then add the "\FONTS\" folder and the font '''.TTF''' filename to the path [[STRING]].
-
-
-{{PageExamples}}
-''Example 1:'' You need to know that if you are in a text mode (such as SCREEN 0 - the default) then you will only be able to use mono-spaced (fixed width) fonts.
-{{CodeStart}}
-rootpath$ = {{Cl|ENVIRON$}}("SYSTEMROOT") 'normally "C:\WINDOWS"
-fontfile$ = rootpath$ + "\Fonts\cour.ttf" 'TTF file in Windows
-style$ = "monospace" 'font style is not case sensitive
-f& ={{Cl|_LOADFONT}}(fontfile$, 30, style$)
-{{Cl|_FONT}} f&
-{{Cl|PRINT}} "Hello!"
-
-{{CodeEnd}}
-{{OutputStart}}
-
-Hello!
-
-{{OutputEnd}}
-
-''Note:'' 30 means each row of text (including vertical spacing) will be exactly 30 pixels high. This may make some program screens larger. If you don't want a style listed just use style$ = "" if using a [[STRING]] variable for different calls.
-
-
-
-''Example 2:'' In a 32-bit graphics mode you can alpha blend onto the background:
-
-{{CodeStart}}
-i& ={{Cl|_NEWIMAGE}}(800,600,32)
-{{Cl|SCREEN (statement)|SCREEN}} i&
-{{Cl|COLOR}} &HC0FFFF00,&H200000FF
-f& ={{Cl|_LOADFONT}}("C:\Windows\Fonts\times.ttf", 25) 'normal style
-{{Cl|PRINT}} "Hello!"
-{{CodeEnd}}
-
-{{OutputStart}}Hello!
-{{OutputEnd}}
-
-
-:''Note:'' You can load a fixed width font file without using the "monospace" option and it will be treated as variable width. This can be useful because LOCATE treats the horizontal position as an offset in pixels for variable width fonts.
-
-
-''Example 3:'' Loading a [[Unicode]] font, ''cyberbit.ttf'', which was downloaded with QB64:
-{{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|DECLARE LIBRARY|END DECLARE}}
-
-'=== SHOW CURRENT PROGRAM
-FileName$ = {{Cl|SPACE$}}(512)
-
-Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$))
-{{Cl|IF...THEN|IF}} Result {{Cl|THEN}} {{Cl|PRINT}} "CURRENT PROGRAM (ASCII): "; {{Cl|LEFT$}}(FileName$, Result)
-
-'load a unicode font
-f = {{Cl|_LOADFONT}}("cyberbit.ttf", 24, "UNICODE")
-{{Cl|_FONT}} f
-Result = GetModuleFileNameW(0, FileName$, {{Cl|LEN}}(FileName$) \ 2)
-{{Cl|LOCATE}} 2, 1
-{{Cl|PRINT}} QuickCP437toUTF32$("CURRENT PROGRAM (UTF): ") + QuickUTF16toUTF32$({{Cl|LEFT$}}(FileName$, Result * 2))
-{{Cl|_FONT}} 16 'restore CP437 font
-
-{{Cl|FUNCTION}} QuickCP437toUTF32$ (a$)
-b$ = {{Cl|STRING$}}({{Cl|LEN}}(a$) * 4, 0)
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|LEN}}(a$)
- {{Cl|ASC}}(b$, i * 4 - 3) = {{Cl|ASC}}(a$, i)
-{{Cl|NEXT}}
-QuickCP437toUTF32$ = b$
-{{Cl|END FUNCTION}}
-
-{{Cl|FUNCTION}} QuickUTF16toUTF32$ (a$)
-b$ = {{Cl|STRING$}}({{Cl|LEN}}(a$) * 2, 0)
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|LEN}}(a$) \ 2
- {{Cl|ASC}}(b$, i * 4 - 3) = {{Cl|ASC}}(a$, i * 2 - 1)
- {{Cl|ASC}}(b$, i * 4 - 2) = {{Cl|ASC}}(a$, i * 2)
-{{Cl|NEXT}}
-QuickUTF16toUTF32$ = b$
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_FONT]], [[_FONT (function)]]
-* [[_FREEFONT]]
-* [[_PRINTSTRING]], [[_PRINTWIDTH]]
-* [[_PRINTMODE]], [[_PRINTMODE (function)]]
-* [[_FONTHEIGHT]], [[_FONTWIDTH]]
-* [[Text Using Graphics]] {{text|(Demo)}}
-* [[Windows_Libraries#Font_Dialog_Box|Windows Font Dialog Box]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_LOADIMAGE__111111111.txt b/internal/help/_LOADIMAGE__111111111.txt
deleted file mode 100644
index 60319f366..000000000
--- a/internal/help/_LOADIMAGE__111111111.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:25}}
-{{DISPLAYTITLE:_LOADIMAGE}}
-
-The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG]] image handle values that are less than -1.
-
-
-{{PageSyntax}}
-
-:{{Parameter|handle&}} = [[_LOADIMAGE]]({{Parameter|filename$}}[, {{Parameter|mode%}}])
-
-
-{{Parameters}}
-
-*{{Parameter|filename$}} is literal or variable [[STRING]] file name value.
-*Optional {{Parameter|mode%}} [[INTEGER]] values can be:
-**32 = 32-bit
-**33 = hardware image
-
-
-{{PageDescription}}
-
-*Various common image file formats supported, like BMP, JPG, PNG, etc. A path can also be given.
-*The {{Parameter|mode%}} can designate 32-bit color or 33 ('''version 1.000 and up'''). Omit to use the current graphic screen settings.
-*Mode 33 images are '''hardware''' accelerated and are created using [[_LOADIMAGE]] or [[_COPYIMAGE]] ('''version 1.000 and up''').
-*Loaded images can be read invisibly using [[POINT]]. Image coordinates start at 0 up to the [[_WIDTH (function)|_WIDTH]] - 1 and [[_HEIGHT]] - 1.
-*Images can be made into a program [[SCREEN (statement)|SCREEN]] or page adopting the size and palette settings or placed using [[_PUTIMAGE]].
-*Returns -1 as an invalid handle if it can't load the image. Valid [[LONG]] handle returns are less than -1 ({{Parameter|handle&}} < -1).
-*Valid images only need to be loaded once. The handle can be used repeatedly until freed.
-*'''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].'''
-
-
-{{PageErrors}}
-
-*Some picture file images may not load when a {{Parameter|mode%}} value is designated. Try loading it without a {{Parameter|mode%}} designation.
-*'''It is important to free unused or discarded images with [[_FREEIMAGE]] to prevent CPU memory overflow errors.'''
-*'''In text-only [[SCREEN]] 0, {{Parameter|mode%}} 32 must be specified.''' When loading an [[_ICON]] image use 32 for the {{Parameter|mode%}} too.
-
-
-{{PageExamples}}
-''Example 1:'' To display an image in 32-bit color using its resolution as a program screen:
-{{CodeStart}}
-i& = {{Cl|_LOADIMAGE}}("mypic.jpg", 32)
-{{Cl|SCREEN (statement)|SCREEN}} i&
-{{CodeEnd}}
-
-
-''Example 2:'' [[DRAW]]ing and rotating an image 360 degrees using Turn Angle. [[POINT]] is used to read the invisible image source.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-img& = {{Cl|_LOADIMAGE}}("QB64.PNG") 'use any 24/32 bit image
-
-wide% = {{Cl|_WIDTH (function)|_WIDTH}}(img&): deep% = {{Cl|_HEIGHT}}(img&)
-TLC$ = "BL" + {{Cl|STR$}}(wide% \ 2) + "BU" + {{Cl|STR$}}(deep% \ 2) 'start draw at top left corner
-RET$ = "BD BL" + {{Cl|STR$}}(wide%) 'return to left side of image
-{{Cl|_SOURCE}} img&
-{{Cl|_DEST}} 0
-DO
- {{Cl|FOR...NEXT|FOR}} angle% = 0 {{Cl|TO}} 360 {{Cl|STEP}} 15
- {{Cl|CLS}}
- {{Cl|DRAW}} "BM400, 300" + "TA=" + {{Cl|VARPTR$}}(angle%) + TLC$
- {{Cl|FOR...NEXT|FOR}} y = 0 {{Cl|TO}} deep% - 1
- {{Cl|FOR...NEXT|FOR}} x = 0 {{Cl|TO}} wide% - 1
- {{Cl|DRAW}} "C" + {{Cl|STR$}}({{Cl|POINT}}(x, y)) + "R1" 'color and DRAW each pixel
- {{Cl|NEXT}}
- {{Cl|DRAW}} RET$
- {{Cl|NEXT}}
- {{Cl|_DISPLAY}} 'NOTE: CPU usage will be HIGH!
- {{Cl|NEXT}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} > ""
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-
-
-===More examples===
-
-*[[SAVEIMAGE]] (QB64 Image to Bitmap SUB by Galleon)
-*[[Program ScreenShots]] (Member-contributed program for legacy screen modes)
-*[[ThirtyTwoBit SUB]] (QB64 Image area to bitmap)
-
-
-{{PageSeeAlso}}
-
-*[[_FREEIMAGE]], [[_ICON]]
-*[[_PUTIMAGE]], [[_MAPTRIANGLE]]
-*[[_NEWIMAGE]], [[_COPYIMAGE]]
-*[[_PRINTIMAGE]] (printer)
-*[[_PALETTECOLOR (function)]], [[_COPYPALETTE]], [[_ICON]]
-*[[SCREEN (statement)]]
-*[[Hardware images]]
-*[[Bitmaps]], [[Icons and Cursors]], [[GIF Images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MAPTRIANGLE__11111111111.txt b/internal/help/_MAPTRIANGLE__11111111111.txt
deleted file mode 100644
index 2b90b4510..000000000
--- a/internal/help/_MAPTRIANGLE__11111111111.txt
+++ /dev/null
@@ -1,709 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:26}}
-{{DISPLAYTITLE:_MAPTRIANGLE}}
-The [[_MAPTRIANGLE]] statement maps a triangular portion of an image onto a destination image or screen page.
-
-
-{{PageSyntax}}
-===2D drawing===
-:[[_MAPTRIANGLE]] [{_SEAMLESS}] '''('''{{Parameter|sx1}}''',''' {{Parameter|sy1}}''')-('''{{Parameter|sx2}}''',''' {{Parameter|sy2}}''')-('''{{Parameter|sx3}}''',''' {{Parameter|sy3}}'''),''' {{Parameter|source&}} '''TO ('''{{Parameter|dx1}}''',''' {{Parameter|dy1}}''')-('''{{Parameter|dx2}}''',''' {{Parameter|dy2}}''')-('''{{Parameter|dx3}}''',''' {{Parameter|dy3}}''')'''[, {{Parameter|destination&}}][{_SMOOTH|_SMOOTHSHRUNK|_SMOOTHSTRETCHED}]]
-
-
-===3D drawing (hardware images only)===
-
-:[[_MAPTRIANGLE]] [{_CLOCKWISE|_ANTICLOCKWISE}] [{_SEAMLESS}] '''('''{{Parameter|sx1}}''',''' {{Parameter|sy1}}''')-('''{{Parameter|sx2}}''',''' {{Parameter|sy2}}''')-('''{{Parameter|sx3}}''',''' {{Parameter|sy3}}'''),''' {{Parameter|source&}} '''TO ('''{{Parameter|dx1}}''',''' {{Parameter|dy1}}''',''' {{Parameter|dz1}}''')-('''{{Parameter|dx2}}''',''' {{Parameter|dy2}}''',''' {{Parameter|dz2}}''')-('''{{Parameter|dx3}}''',''' {{Parameter|dy3}}''',''' {{Parameter|dz3}}''')'''[, {{Parameter|destination&}}][{_SMOOTH|_SMOOTHSHRUNK|_SMOOTHSTRETCHED}]]
-
-
-{{Parameters}}
-* The '''_SEAMLESS''' option makes the triangle skip the right-most and bottom-most pixels of the triangle. When you make larger objects using several triangles, there can be a "seam" where they overlap when using alpha transparency and the seam would be twice as bright. '''_SEAMLESS''' is ignored when rendering 3D content and is not yet supported when drawing 2D hardware images.'''
-* For 3D drawing use the '''_CLOCKWISE''' and '''_ANTICLOCKWISE''' arguments to only draw triangles in the correct direction. See ''Example 4''.
-* Coordinates are [[SINGLE]] values where whole numbers represent the exact center of a pixel of the source texture.
-* {{Parameter|source&}} and optional {{Parameter|destination&}} are [[LONG]] image or screen page handles.
-* Supports an optional final argument '''_SMOOTH''' which applies linear filtering. See ''Example 3''.
-* Use '''_SMOOTHSTRETCHED''' or '''_SMOOTHSHRUNK''' for when a pixelated/smooth effect is desirable but not both.
-
-
-{{PageDescription}}
-* This statement is used similar to [[_PUTIMAGE]] to place triangular sections of an image, but is more flexible.
-* The [[STEP]] keyword can be used to for coordinates relative to the last graphic coordinates used.
-* For 2D drawing, the destination coordinates are pixel coordinates either on-screen or on the destination image.
-* For 3D drawing, the destination coordinates represent left (-x) to right (+x), bottom (-y) to top (+y) & furthest (-z) to nearest (z=-1). The center of the screen is therefore (0,0,-1). Note that a z value of 0 will result in off-screen content. The furthest visible z value is -10,000.
-* When drawing '''software images''' coordinate positions are '''limited from -16383 to 16383'''
-* The source coordinates can be positioned outside the boundary of the ''source'' image to achieve a tiled effect.
-* If the {{Parameter|destination&}} image handle is the current [[SCREEN]] page, [[_DEST]] or hardware layer, then it can be omitted.
-* '''Hardware images''' (created using mode 33 via [[_LOADIMAGE]] or [[_COPYIMAGE]]) can be used as the source or destination.
-
-
-{{PageExamples}}
-''Example 1:'' Rotating the an image using a rotation and zoom SUB with _MAPTRIANGLE.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-
-Image& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any 24/32 bit image
-
-{{Cl|DO}}
- {{Cl|CLS}}
- RotoZoom 400, 300, Image&, 1.5 + {{Cl|SIN}}(zoom), angle
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} "Angle:"; {{Cl|CINT}}(angle)
- {{Cl|PRINT USING|PRINT}} "Zoom"; {{Cl|PRINT USING|USING}} "##.###"; 1.5 + {{Cl|SIN}}(zoom)
- {{Cl|_DISPLAY}}
- angle = angle + .5: {{Cl|IF...THEN|IF}} angle >= 360 {{Cl|THEN}} angle = angle - 360
- zoom = zoom + .01
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|END}}
-
-{{Cl|SUB}} RotoZoom (X {{Cl|AS}} {{Cl|LONG}}, Y {{Cl|AS}} {{Cl|LONG}}, Image {{Cl|AS}} {{Cl|LONG}}, Scale {{Cl|AS}} {{Cl|SINGLE}}, Rotation {{Cl|AS}} {{Cl|SINGLE}})
-{{Cl|DIM}} px(3) {{Cl|AS}} {{Cl|SINGLE}}: {{Cl|DIM}} py(3) {{Cl|AS}} {{Cl|SINGLE}}
-W& = {{Cl|_WIDTH (function)|_WIDTH}}(Image&): H& = {{Cl|_HEIGHT}}(Image&)
-px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2:py(1) = H& / 2
-px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
-sinr! = {{Cl|SIN}}(-Rotation / 57.2957795131): cosr! = {{Cl|COS}}(-Rotation / 57.2957795131)
-{{Cl|FOR...NEXT|FOR}} i& = 0 {{Cl|TO}} 3
- x2& = (px(i&) * cosr! + sinr! * py(i&)) * Scale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * Scale + Y
- px(i&) = x2&: py(i&) = y2&
-{{Cl|NEXT}}
-{{Cl|_MAPTRIANGLE}} (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& TO(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
-{{Cl|_MAPTRIANGLE}} (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& TO(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Code by Galleon}}
-{{WhiteStart}}
- '''Triangle sections of image in code above __ '''
- '''|\2|'''
- ''' 1→|_\|'''
-{{WhiteEnd}}
-
-
-''Example 2:'' A 3D Spinning Cube demo using a software image and [[_MAPTRIANGLE]]:
-{{CodeStart}}
-' Copyright (C) 2011 by Andrew L. Ayers
-
-{{Cl|DIM}} OBJECT(9, 9, 4, 2) {{Cl|AS}} {{Cl|LONG}}
-
-' OBJECTS DEFINED {{Cl|AS}} FOLLOWS:
-' (#OBJECTS,#PLANES PER OBJECT,#{{Cl|POINT}}S PER PLANE, XYZ TRIPLE)
-
-{{Cl|DIM}} DPLANE2D(4, 1) {{Cl|AS}} {{Cl|LONG}} ' {{Cl|SCREEN}} PLANE COORDINATES
-
-' DPLANE2D DEFINED {{Cl|AS}} FOLLOWS:
-' (#{{Cl|POINT}}S PER PLANE, XY {{Cl|DOUBLE}})
-
-{{Cl|DIM}} DPLANE3D(4, 2) {{Cl|AS}} {{Cl|LONG}} ' 3D PLANE COORDINATES
-
-' DPLANE3D DEFINED {{Cl|AS}} FOLLOWS:
-' (#{{Cl|POINT}}S PER PLANE, XYZ TRIPLE)
-
-{{Cl|DIM}} PLANECOL(9) {{Cl|AS}} {{Cl|INTEGER}}
-{{Cl|DIM}} STAB(359), CTAB(359) ' SINE/COSINE TABLES
-D& = 400: MX& = 0: MY& = 0: MZ& = -100
-'
-' COMPUTE SINE/COSINE TABLES
-{{Cl|FOR...NEXT|FOR}} t& = 0 {{Cl|TO}} 359
- STAB(t&) = {{Cl|SIN}}((6.282 / 360) * t&)
- CTAB(t&) = {{Cl|COS}}((6.282 / 360) * t&)
-{{Cl|NEXT}}
-'
-' BUILD CUBE IN OBJECT ARRAY
-' PLANE 0
-OBJECT(0, 0, 0, 0) = -30: OBJECT(0, 0, 0, 1) = 30: OBJECT(0, 0, 0, 2) = -30
-OBJECT(0, 0, 1, 0) = -30: OBJECT(0, 0, 1, 1) = -30: OBJECT(0, 0, 1, 2) = -30
-OBJECT(0, 0, 2, 0) = 30: OBJECT(0, 0, 2, 1) = -30: OBJECT(0, 0, 2, 2) = -30
-OBJECT(0, 0, 3, 0) = 30: OBJECT(0, 0, 3, 1) = 30: OBJECT(0, 0, 3, 2) = -30
-OBJECT(0, 0, 4, 0) = 0: OBJECT(0, 0, 4, 1) = 0: OBJECT(0, 0, 4, 2) = -30
-' PLANE 1
-OBJECT(0, 1, 0, 0) = 30: OBJECT(0, 1, 0, 1) = 30: OBJECT(0, 1, 0, 2) = -30
-OBJECT(0, 1, 1, 0) = 30: OBJECT(0, 1, 1, 1) = -30: OBJECT(0, 1, 1, 2) = -30
-OBJECT(0, 1, 2, 0) = 30: OBJECT(0, 1, 2, 1) = -30: OBJECT(0, 1, 2, 2) = 30
-OBJECT(0, 1, 3, 0) = 30: OBJECT(0, 1, 3, 1) = 30: OBJECT(0, 1, 3, 2) = 30
-OBJECT(0, 1, 4, 0) = 30: OBJECT(0, 1, 4, 1) = 0: OBJECT(0, 1, 4, 2) = 0
-' PLANE 2
-OBJECT(0, 2, 0, 0) = 30: OBJECT(0, 2, 0, 1) = 30: OBJECT(0, 2, 0, 2) = 30
-OBJECT(0, 2, 1, 0) = 30: OBJECT(0, 2, 1, 1) = -30: OBJECT(0, 2, 1, 2) = 30
-OBJECT(0, 2, 2, 0) = -30: OBJECT(0, 2, 2, 1) = -30: OBJECT(0, 2, 2, 2) = 30
-OBJECT(0, 2, 3, 0) = -30: OBJECT(0, 2, 3, 1) = 30: OBJECT(0, 2, 3, 2) = 30
-OBJECT(0, 2, 4, 0) = 0: OBJECT(0, 2, 4, 1) = 0: OBJECT(0, 2, 4, 2) = 30
-' PLANE 3
-OBJECT(0, 3, 0, 0) = -30: OBJECT(0, 3, 0, 1) = 30: OBJECT(0, 3, 0, 2) = 30
-OBJECT(0, 3, 1, 0) = -30: OBJECT(0, 3, 1, 1) = -30: OBJECT(0, 3, 1, 2) = 30
-OBJECT(0, 3, 2, 0) = -30: OBJECT(0, 3, 2, 1) = -30: OBJECT(0, 3, 2, 2) = -30
-OBJECT(0, 3, 3, 0) = -30: OBJECT(0, 3, 3, 1) = 30: OBJECT(0, 3, 3, 2) = -30
-OBJECT(0, 3, 4, 0) = -30: OBJECT(0, 3, 4, 1) = 0: OBJECT(0, 3, 4, 2) = 0
-' PLANE 4
-OBJECT(0, 4, 0, 0) = -30: OBJECT(0, 4, 0, 1) = -30: OBJECT(0, 4, 0, 2) = -30
-OBJECT(0, 4, 1, 0) = -30: OBJECT(0, 4, 1, 1) = -30: OBJECT(0, 4, 1, 2) = 30
-OBJECT(0, 4, 2, 0) = 30: OBJECT(0, 4, 2, 1) = -30: OBJECT(0, 4, 2, 2) = 30
-OBJECT(0, 4, 3, 0) = 30: OBJECT(0, 4, 3, 1) = -30: OBJECT(0, 4, 3, 2) = -30
-OBJECT(0, 4, 4, 0) = 0: OBJECT(0, 4, 4, 1) = -30: OBJECT(0, 4, 4, 2) = 0
-' PLANE 5
-OBJECT(0, 5, 0, 0) = -30: OBJECT(0, 5, 0, 1) = 30: OBJECT(0, 5, 0, 2) = -30
-OBJECT(0, 5, 1, 0) = 30: OBJECT(0, 5, 1, 1) = 30: OBJECT(0, 5, 1, 2) = -30
-OBJECT(0, 5, 2, 0) = 30: OBJECT(0, 5, 2, 1) = 30: OBJECT(0, 5, 2, 2) = 30
-OBJECT(0, 5, 3, 0) = -30: OBJECT(0, 5, 3, 1) = 30: OBJECT(0, 5, 3, 2) = 30
-OBJECT(0, 5, 4, 0) = 0: OBJECT(0, 5, 4, 1) = 30: OBJECT(0, 5, 4, 2) = 0
-' SET UP PLANE {{Cl|COLOR}}S ON CUBE
-'
-PLANECOL(0) = 3
-PLANECOL(1) = 4
-PLANECOL(2) = 5
-PLANECOL(3) = 6
-PLANECOL(4) = 7
-PLANECOL(5) = 8
-'
-{{Cl|_TITLE}} "QB64 _MAPTRIANGLE CUBE DEMO"
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any 24/32 bit image
-'{{Cl|_PUTIMAGE}} , Image&
-
-DO
- ' LIMIT {{Cl|TO}} 25 FPS
- {{Cl|_LIMIT}} 25
- ' ERASE LAST IMAGE
- {{Cl|CLS}}
-
- ' CALCULATE POSITION OF NEW IMAGE
- {{Cl|FOR...NEXT|FOR}} OB& = 0 {{Cl|TO}} 0 ' UP {{Cl|TO}} 9 OBJECTS
- SP = STAB(PIT(OB&)): CP = CTAB(PIT(OB&))
- SY = STAB(YAW(OB&)): CY = CTAB(YAW(OB&))
- SR = STAB(ROL(OB&)): CR = CTAB(ROL(OB&))
- {{Cl|FOR...NEXT|FOR}} PL& = 0 {{Cl|TO}} 5 ' CONSISTING OF UP {{Cl|TO}} 9 PLANES
- '
- {{Cl|FOR...NEXT|FOR}} PN& = 0 {{Cl|TO}} 3 ' EACH PLANE WITH UP {{Cl|TO}} 4 {{Cl|POINT}}S (#5 {{Cl|TO}} {{Cl|PAINT}})
- '
- ' TRANSLATE, {{Cl|THEN}} ROTATE
- TX& = OBJECT(OB&, PL&, PN&, 0)
- TY& = OBJECT(OB&, PL&, PN&, 1)
- TZ& = OBJECT(OB&, PL&, PN&, 2)
- RX& = (TZ& * CP - TY& * SP) * SY - ((TZ& * SP + TY& * CP) * SR + TX& * CR) * CY
- RY& = (TZ& * SP + TY& * CP) * CR - TX& * SR
- RZ& = (TZ& * CP - TY& * SP) * CY + ((TZ& * SP + TY& * CP) * SR + TX& * CR) * SY
- '
- ' ROTATE, {{Cl|THEN}} TRANSLATE
- RX& = RX& + MX&
- RY& = RY& + MY&
- RZ& = RZ& + MZ&
- '
- DPLANE3D(PN&, 0) = RX&: DPLANE3D(PN&, 1) = RY&: DPLANE3D(PN&, 2) = RZ&
- DPLANE2D(PN&, 0) = 399 + (D& * RX& / RZ&)
- DPLANE2D(PN&, 1) = 299 + (D& * RY& / RZ&)
- {{Cl|NEXT}}
- '
- ' CHECK {{Cl|TO}} SEE {{Cl|IF...THEN|IF}} PLANE IS VISIBLE
- x1& = DPLANE3D(0, 0): y1& = DPLANE3D(0, 1): Z1& = DPLANE3D(0, 2)
- x2& = DPLANE3D(1, 0): y2& = DPLANE3D(1, 1): Z2& = DPLANE3D(1, 2)
- x3& = DPLANE3D(2, 0): y3& = DPLANE3D(2, 1): Z3& = DPLANE3D(2, 2)
- T1& = -x1& * (y2& * Z3& - y3& * Z2&)
- T2& = x2& * (y3& * Z1& - y1& * Z3&)
- T3& = x3& * (y1& * Z2& - y2& * Z1&)
- '
- VISIBLE& = T1& - T2& - T3&
- {{Cl|IF...THEN|IF}} VISIBLE& > 0 {{Cl|THEN}}
- ' DRAW PLANE
- xx1% = DPLANE2D(0, 0): yy1% = DPLANE2D(0, 1)
- xx2% = DPLANE2D(1, 0): yy2% = DPLANE2D(1, 1)
- xx3% = DPLANE2D(2, 0): yy3% = DPLANE2D(2, 1)
- col% = PLANECOL(PL&)
-
- {{Cl|_MAPTRIANGLE}} (0, 0)-(0, 255)-(255, 255), TextureImage& TO(xx3%, yy3%)-(xx2%, yy2%)-(xx1%, yy1%)
- ' CALL DrawTriangle(xx1%, yy1%, xx2%, yy2%, xx3%, yy3%, col%)
- xx1% = DPLANE2D(0, 0): yy1% = DPLANE2D(0, 1)
- xx3% = DPLANE2D(2, 0): yy3% = DPLANE2D(2, 1)
- xx4% = DPLANE2D(3, 0): yy4% = DPLANE2D(3, 1)
- {{Cl|_MAPTRIANGLE}} (0, 0)-(255, 255)-(255, 0), TextureImage& TO(xx3%, yy3%)-(xx1%, yy1%)-(xx4%, yy4%)
- 'CALL DrawTriangle(xx1%, yy1%, xx3%, yy3%, xx4%, yy4%, col%)
- {{Cl|END IF}}
- {{Cl|NEXT}}
- '
- ' ROTATE OBJECT
- PIT(OB&) = PIT(OB&) + 5
- {{Cl|IF...THEN|IF}} PIT(OB&) > 359 {{Cl|THEN}} PIT(OB&) = 0
- YAW(OB&) = YAW(OB&) + 7
- {{Cl|IF...THEN|IF}} YAW(OB&) > 359 {{Cl|THEN}} YAW(OB&) = 0
- ROL(OB&) = ROL(OB&) + 9
- {{Cl|IF...THEN|IF}} ROL(OB&) > 359 {{Cl|THEN}} ROL(OB&) = 0
- {{Cl|NEXT}}
- '
- ' Calculate Frames per Second
- frames% = frames% + 1
- {{Cl|IF...THEN|IF}} oldtime$ <> {{Cl|TIME$}} {{Cl|THEN}}
- fps% = frames%
- frames% = 1
- oldtime$ = {{Cl|TIME$}}
- {{Cl|END IF}}
- {{Cl|COLOR}} {{Cl|_RGB}}(255, 255, 255): {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} "FPS :"; fps%
- '
- ' Show Image on Screen
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|WIDTH}} 80: {{Cl|SCREEN}} 0: {{Cl|CLS}}
-
-
-{{Cl|SUB}} DrawHline (fromx%, tox%, yy%, col%)
- '{{Cl|DEF SEG}} = {{Cl|&H}}A000
- '{{Cl|IF...THEN|IF}} fromx% > tox% {{Cl|THEN}} {{Cl|SWAP}} fromx%, tox%
- 'yyy& = yy%
- 'sloc& = yyy& * 320 + fromx%
- 'eloc& = sloc& + (tox% - fromx%)
- '{{Cl|FOR...NEXT|FOR}} t& = sloc& {{Cl|TO}} eloc&
- ' {{Cl|POKE}} t&, col%
- '{{Cl|NEXT}}
- '{{Cl|DEF SEG}}
- {{Cl|LINE}} (fromx%, yy%)-(tox%, yy%), {{Cl|_RGB}}(255, 255, 255) 'col%
-{{Cl|END SUB}}
-
-{{Cl|SUB}} DrawTriangle (x1%, y1%, x2%, y2%, x3%, y3%, col%)
- DO
- sflag% = 0
- {{Cl|IF...THEN|IF}} y1% > y2% {{Cl|THEN}}
- sflag% = 1
- {{Cl|SWAP}} y1%, y2%
- {{Cl|SWAP}} x1%, x2%
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} y2% > y3% {{Cl|THEN}}
- sflag% = 1
- {{Cl|SWAP}} y2%, y3%
- {{Cl|SWAP}} x2%, x3%
- {{Cl|END IF}}
- {{Cl|LOOP}} {{Cl|UNTIL}} sflag% = 0
- '
- {{Cl|IF...THEN|IF}} y2% = y3% {{Cl|THEN}}
- ' Draw a flat bottomed triangle
- ydiff1% = y2% - y1%
- ydiff2% = y3% - y1%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x2% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x1%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x1%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y2%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- {{Cl|EXIT SUB}}
- {{Cl|ELSE}}
- {{Cl|IF...THEN|IF}} y1% = y2% {{Cl|THEN}}
- '
- ' Draw a flat topped triangle
- ydiff1% = y3% - y1%
- ydiff2% = y3% - y2%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x3% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x2%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x2%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y3%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- x1% = sx!: x2% = ex!
- {{Cl|EXIT SUB}}
- {{Cl|ELSE}}
- ' Draw a general purpose triangle
- ' First draw the flat bottom portion (top half)
- ydiff1% = y2% - y1%
- ydiff2% = y3% - y1%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x2% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x1%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x1%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y2%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- ' Then draw the flat topped portion (bottom half)
- x1% = x2%
- x2% = ex!
- y1% = y2%
- ydiff1% = y3% - y1%
- ydiff2% = y3% - y2%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x3% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x2%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x2%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y3%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- x1% = sx!: x2% = ex!
- {{Cl|END IF}}
- {{Cl|END IF}}
- '
-{{Cl|END SUB}}
-{{CodeEnd}}{{small|Demo by Andrew L. Ayers}}
-
-
-''Example 3:'' A 3D Spinning Cube demo using a hardware image and '''QB64GL''' hardware acceleration with [[_MAPTRIANGLE]]:
-{{CodeStart}}
-' Copyright (C) 2011 by Andrew L. Ayers
-
-{{Cl|DIM}} OBJECT(9, 9, 4, 2) {{Cl|AS}} {{Cl|LONG}}
-
-' OBJECTS DEFINED {{Cl|AS}} FOLLOWS:
-' (#OBJECTS,#PLANES PER OBJECT,#{{Cl|POINT}}S PER PLANE, XYZ TRIPLE)
-
-{{Cl|DIM}} DPLANE2D(4, 1) {{Cl|AS}} {{Cl|LONG}} ' {{Cl|SCREEN}} PLANE COORDINATES
-
-' DPLANE2D DEFINED {{Cl|AS}} FOLLOWS:
-' (#{{Cl|POINT}}S PER PLANE, XY {{Cl|DOUBLE}})
-
-{{Cl|DIM}} DPLANE3D(4, 2) {{Cl|AS}} {{Cl|LONG}} ' 3D PLANE COORDINATES
-
-' DPLANE3D DEFINED {{Cl|AS}} FOLLOWS:
-' (#{{Cl|POINT}}S PER PLANE, XYZ TRIPLE)
-
-{{Cl|DIM}} PLANECOL(9) {{Cl|AS}} {{Cl|INTEGER}}
-{{Cl|DIM}} STAB(359), CTAB(359) ' SINE/COSINE TABLES
-D& = 400: MX& = 0: MY& = 0: MZ& = -100
-'
-' COMPUTE SINE/COSINE TABLES
-{{Cl|FOR...NEXT|FOR}} t& = 0 {{Cl|TO}} 359
- STAB(t&) = {{Cl|SIN}}((6.282 / 360) * t&)
- CTAB(t&) = {{Cl|COS}}((6.282 / 360) * t&)
-{{Cl|NEXT}}
-'
-' BUILD CUBE IN OBJECT ARRAY
-' PLANE 0
-OBJECT(0, 0, 0, 0) = -30: OBJECT(0, 0, 0, 1) = 30: OBJECT(0, 0, 0, 2) = -30
-OBJECT(0, 0, 1, 0) = -30: OBJECT(0, 0, 1, 1) = -30: OBJECT(0, 0, 1, 2) = -30
-OBJECT(0, 0, 2, 0) = 30: OBJECT(0, 0, 2, 1) = -30: OBJECT(0, 0, 2, 2) = -30
-OBJECT(0, 0, 3, 0) = 30: OBJECT(0, 0, 3, 1) = 30: OBJECT(0, 0, 3, 2) = -30
-OBJECT(0, 0, 4, 0) = 0: OBJECT(0, 0, 4, 1) = 0: OBJECT(0, 0, 4, 2) = -30
-' PLANE 1
-OBJECT(0, 1, 0, 0) = 30: OBJECT(0, 1, 0, 1) = 30: OBJECT(0, 1, 0, 2) = -30
-OBJECT(0, 1, 1, 0) = 30: OBJECT(0, 1, 1, 1) = -30: OBJECT(0, 1, 1, 2) = -30
-OBJECT(0, 1, 2, 0) = 30: OBJECT(0, 1, 2, 1) = -30: OBJECT(0, 1, 2, 2) = 30
-OBJECT(0, 1, 3, 0) = 30: OBJECT(0, 1, 3, 1) = 30: OBJECT(0, 1, 3, 2) = 30
-OBJECT(0, 1, 4, 0) = 30: OBJECT(0, 1, 4, 1) = 0: OBJECT(0, 1, 4, 2) = 0
-' PLANE 2
-OBJECT(0, 2, 0, 0) = 30: OBJECT(0, 2, 0, 1) = 30: OBJECT(0, 2, 0, 2) = 30
-OBJECT(0, 2, 1, 0) = 30: OBJECT(0, 2, 1, 1) = -30: OBJECT(0, 2, 1, 2) = 30
-OBJECT(0, 2, 2, 0) = -30: OBJECT(0, 2, 2, 1) = -30: OBJECT(0, 2, 2, 2) = 30
-OBJECT(0, 2, 3, 0) = -30: OBJECT(0, 2, 3, 1) = 30: OBJECT(0, 2, 3, 2) = 30
-OBJECT(0, 2, 4, 0) = 0: OBJECT(0, 2, 4, 1) = 0: OBJECT(0, 2, 4, 2) = 30
-' PLANE 3
-OBJECT(0, 3, 0, 0) = -30: OBJECT(0, 3, 0, 1) = 30: OBJECT(0, 3, 0, 2) = 30
-OBJECT(0, 3, 1, 0) = -30: OBJECT(0, 3, 1, 1) = -30: OBJECT(0, 3, 1, 2) = 30
-OBJECT(0, 3, 2, 0) = -30: OBJECT(0, 3, 2, 1) = -30: OBJECT(0, 3, 2, 2) = -30
-OBJECT(0, 3, 3, 0) = -30: OBJECT(0, 3, 3, 1) = 30: OBJECT(0, 3, 3, 2) = -30
-OBJECT(0, 3, 4, 0) = -30: OBJECT(0, 3, 4, 1) = 0: OBJECT(0, 3, 4, 2) = 0
-' PLANE 4
-OBJECT(0, 4, 0, 0) = -30: OBJECT(0, 4, 0, 1) = -30: OBJECT(0, 4, 0, 2) = -30
-OBJECT(0, 4, 1, 0) = -30: OBJECT(0, 4, 1, 1) = -30: OBJECT(0, 4, 1, 2) = 30
-OBJECT(0, 4, 2, 0) = 30: OBJECT(0, 4, 2, 1) = -30: OBJECT(0, 4, 2, 2) = 30
-OBJECT(0, 4, 3, 0) = 30: OBJECT(0, 4, 3, 1) = -30: OBJECT(0, 4, 3, 2) = -30
-OBJECT(0, 4, 4, 0) = 0: OBJECT(0, 4, 4, 1) = -30: OBJECT(0, 4, 4, 2) = 0
-' PLANE 5
-OBJECT(0, 5, 0, 0) = -30: OBJECT(0, 5, 0, 1) = 30: OBJECT(0, 5, 0, 2) = -30
-OBJECT(0, 5, 1, 0) = 30: OBJECT(0, 5, 1, 1) = 30: OBJECT(0, 5, 1, 2) = -30
-OBJECT(0, 5, 2, 0) = 30: OBJECT(0, 5, 2, 1) = 30: OBJECT(0, 5, 2, 2) = 30
-OBJECT(0, 5, 3, 0) = -30: OBJECT(0, 5, 3, 1) = 30: OBJECT(0, 5, 3, 2) = 30
-OBJECT(0, 5, 4, 0) = 0: OBJECT(0, 5, 4, 1) = 30: OBJECT(0, 5, 4, 2) = 0
-' SET UP PLANE {{Cl|COLOR}}S ON CUBE
-'
-PLANECOL(0) = 3
-PLANECOL(1) = 4
-PLANECOL(2) = 5
-PLANECOL(3) = 6
-PLANECOL(4) = 7
-PLANECOL(5) = 8
-'
-{{Cl|_TITLE}} "QB64 {{Cl|_MAPTRIANGLE}} CUBE DEMO"
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-
-TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png", 32) 'any 24/32 bit image
-{{Cl|_SETALPHA}} 128, , TextureImage&
-TextureImage& = {{Cl|_COPYIMAGE}}(TextureImage&, 33)'copy of hardware image
-
-'{{Cl|_PUTIMAGE}} , Image&
-
-DO
-
- ' LIMIT {{Cl|TO}} 25 FPS
- '{{Cl|_LIMIT}} 25
- ' {{Cl|ERASE}} LAST IMAGE
- '{{Cl|CLS}} , {{Cl|_RGB}}(0, 0, 160)
-
- ' CALCULATE POSITION OF NEW IMAGE
- {{Cl|FOR...NEXT|FOR}} OB& = 0 {{Cl|TO}} 0 ' UP {{Cl|TO}} 9 OBJECTS
- SP = STAB(PIT(OB&)): CP = CTAB(PIT(OB&))
- SY = STAB(YAW(OB&)): CY = CTAB(YAW(OB&))
- SR = STAB(ROL(OB&)): CR = CTAB(ROL(OB&))
- {{Cl|FOR...NEXT|FOR}} PL& = 0 {{Cl|TO}} 5 ' CONSISTING OF UP {{Cl|TO}} 9 PLANES
- '
- {{Cl|FOR...NEXT|FOR}} PN& = 0 {{Cl|TO}} 3 ' EACH PLANE WITH UP {{Cl|TO}} 4 {{Cl|POINT}}S (#5 {{Cl|TO}} {{Cl|PAINT}})
- '
- ' TRANSLATE, {{Cl|THEN}} ROTATE
- TX& = OBJECT(OB&, PL&, PN&, 0)
- TY& = OBJECT(OB&, PL&, PN&, 1)
- TZ& = OBJECT(OB&, PL&, PN&, 2)
- RX& = (TZ& * CP - TY& * SP) * SY - ((TZ& * SP + TY& * CP) * SR + TX& * CR) * CY
- RY& = (TZ& * SP + TY& * CP) * CR - TX& * SR
- RZ& = (TZ& * CP - TY& * SP) * CY + ((TZ& * SP + TY& * CP) * SR + TX& * CR) * SY
- '
- ' ROTATE, {{Cl|THEN}} TRANSLATE
- RX& = RX& + MX&
- RY& = RY& + MY&
- RZ& = RZ& + MZ&
- '
- DPLANE3D(PN&, 0) = RX&: DPLANE3D(PN&, 1) = RY&: DPLANE3D(PN&, 2) = RZ&
- DPLANE2D(PN&, 0) = 399 + (D& * RX& / RZ&)
- DPLANE2D(PN&, 1) = 299 + (D& * RY& / RZ&)
- {{Cl|NEXT}}
- '
- ' CHECK {{Cl|TO}} SEE {{Cl|IF...THEN|IF}} PLANE {{Cl|IS}} VISIBLE
- x1& = DPLANE3D(0, 0): y1& = DPLANE3D(0, 1): Z1& = DPLANE3D(0, 2)
- x2& = DPLANE3D(1, 0): y2& = DPLANE3D(1, 1): Z2& = DPLANE3D(1, 2)
- x3& = DPLANE3D(2, 0): y3& = DPLANE3D(2, 1): Z3& = DPLANE3D(2, 2)
- T1& = -x1& * (y2& * Z3& - y3& * Z2&)
- T2& = x2& * (y3& * Z1& - y1& * Z3&)
- T3& = x3& * (y1& * Z2& - y2& * Z1&)
- '
- VISIBLE& = T1& - T2& - T3&
- {{Cl|IF...THEN|IF}} VISIBLE& > 0 {{Cl|THEN}}
- ' {{Cl|DRAW}} PLANE
- xx1% = DPLANE2D(0, 0): yy1% = DPLANE2D(0, 1)
- xx2% = DPLANE2D(1, 0): yy2% = DPLANE2D(1, 1)
- xx3% = DPLANE2D(2, 0): yy3% = DPLANE2D(2, 1)
- col% = PLANECOL(PL&)
-
- {{Cl|_BLEND}} TextureImage&
- {{Cl|_MAPTRIANGLE}} (0, 0)-(0, 255)-(255, 255), TextureImage& TO(xx1%, yy1%)-(xx2%, yy2%)-(xx3%, yy3%)
-
- ' {{Cl|CALL}} DrawTriangle(xx1%, yy1%, xx2%, yy2%, xx3%, yy3%, col%)
- xx1% = DPLANE2D(0, 0): yy1% = DPLANE2D(0, 1)
- xx3% = DPLANE2D(2, 0): yy3% = DPLANE2D(2, 1)
- xx4% = DPLANE2D(3, 0): yy4% = DPLANE2D(3, 1)
-
- {{Cl|_DONTBLEND}} TextureImage&
- {{Cl|_MAPTRIANGLE}} (0, 0)-(255, 255)-(255, 0), TextureImage& TO(xx3%, yy3%)-(xx1%, yy1%)-(xx4%, yy4%), , _SMOOTH
- '{{Cl|CALL}} DrawTriangle(xx1%, yy1%, xx3%, yy3%, xx4%, yy4%, col%)
- {{Cl|END IF}}
- {{Cl|NEXT}}
- '
- ' ROTATE OBJECT
- PIT(OB&) = PIT(OB&) + 5
- {{Cl|IF...THEN|IF}} PIT(OB&) > 359 {{Cl|THEN}} PIT(OB&) = 0
- YAW(OB&) = YAW(OB&) + 7
- {{Cl|IF...THEN|IF}} YAW(OB&) > 359 {{Cl|THEN}} YAW(OB&) = 0
- ROL(OB&) = ROL(OB&) + 9
- {{Cl|IF...THEN|IF}} ROL(OB&) > 359 {{Cl|THEN}} ROL(OB&) = 0
- {{Cl|NEXT}}
- '
- ' Calculate Frames per Second
- frames% = frames% + 1
- {{Cl|IF...THEN|IF}} oldtime$ <> {{Cl|TIME$}} {{Cl|THEN}}
- fps% = frames%
- frames% = 1
- oldtime$ = {{Cl|TIME$}}
- {{Cl|END IF}}
- {{Cl|COLOR}} {{Cl|_RGB}}(255, 255, 255): {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} "FPS :"; fps%
- '
- ' Show Image on Screen
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{Cl|WIDTH}} 80: {{Cl|SCREEN}} 0: {{Cl|CLS}}
-
-{{Cl|SUB}} DrawHline (fromx%, tox%, yy%, col%)
-'{{Cl|DEF SEG}} = {{Cl|&H}}A000
-'{{Cl|IF...THEN|IF}} fromx% > tox% {{Cl|THEN}} {{Cl|SWAP}} fromx%, tox%
-'yyy& = yy%
-'sloc& = yyy& * 320 + fromx%
-'eloc& = sloc& + (tox% - fromx%)
-'{{Cl|FOR...NEXT|FOR}} t& = sloc& {{Cl|TO}} eloc&
-' {{Cl|POKE}} t&, col%
-'{{Cl|NEXT}}
-'{{Cl|DEF SEG}}
-{{Cl|LINE}} (fromx%, yy%)-(tox%, yy%), {{Cl|_RGB}}(255, 255, 255) 'col%
-{{Cl|END SUB}}
-
-{{Cl|SUB}} DrawTriangle (x1%, y1%, x2%, y2%, x3%, y3%, col%)
-DO
- sflag% = 0
- {{Cl|IF...THEN|IF}} y1% > y2% {{Cl|THEN}}
- sflag% = 1
- {{Cl|SWAP}} y1%, y2%
- {{Cl|SWAP}} x1%, x2%
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} y2% > y3% {{Cl|THEN}}
- sflag% = 1
- {{Cl|SWAP}} y2%, y3%
- {{Cl|SWAP}} x2%, x3%
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} sflag% = 0
-'
-{{Cl|IF...THEN|IF}} y2% = y3% {{Cl|THEN}}
- ' Draw a flat bottomed triangle
- ydiff1% = y2% - y1%
- ydiff2% = y3% - y1%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x2% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x1%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x1%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y2%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- {{Cl|EXIT SUB}}
-{{Cl|ELSE}}
- {{Cl|IF...THEN|IF}} y1% = y2% {{Cl|THEN}}
- '
- ' Draw a flat topped triangle
- ydiff1% = y3% - y1%
- ydiff2% = y3% - y2%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x3% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x2%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x2%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y3%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- x1% = sx!: x2% = ex!
- {{Cl|EXIT SUB}}
- {{Cl|ELSE}}
- ' Draw a general purpose triangle
- ' First draw the flat bottom portion (top half)
- ydiff1% = y2% - y1%
- ydiff2% = y3% - y1%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x2% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x1%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x1%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y2%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- ' Then draw the flat topped portion (bottom half)
- x1% = x2%
- x2% = ex!
- y1% = y2%
- ydiff1% = y3% - y1%
- ydiff2% = y3% - y2%
- {{Cl|IF...THEN|IF}} ydiff1% <> 0 {{Cl|THEN}}
- slope1! = (x3% - x1%) / ydiff1%
- {{Cl|ELSE}}
- slope1! = 0
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} ydiff2% <> 0 {{Cl|THEN}}
- slope2! = (x3% - x2%) / ydiff2%
- {{Cl|ELSE}}
- slope2! = 0
- {{Cl|END IF}}
- sx! = x1%: ex! = x2%
- {{Cl|FOR...NEXT|FOR}} y% = y1% {{Cl|TO}} y3%
- {{Cl|CALL}} DrawHline({{Cl|CINT}}(sx!), {{Cl|CINT}}(ex!), y%, col%)
- sx! = sx! + slope1!
- ex! = ex! + slope2!
- {{Cl|NEXT}}
- x1% = sx!: x2% = ex!
- {{Cl|END IF}}
-{{Cl|END IF}}
-'
-{{Cl|END SUB}}
-{{CodeEnd}}{{small|Adapted from a demo by Andrew L. Ayers}}
-
-
-''Example 4:'' Using a desktop image with _MAPTRIANGLE _ANTICLOCKWISE rendering.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
-
-ss32 = {{Cl|_SCREENIMAGE}} 'take a 32bit software screenshot
-{{Cl|_SETALPHA}} 128, , ss32 'make it a bit transparent
-ss33 = {{Cl|_COPYIMAGE}}(ss32, 33) 'convert it to a hardware image (mode 33)
-{{Cl|_FREEIMAGE}} ss32 'we don't need this anymore
-
-DO
- {{Cl|CLS}} , {{Cl|_RGB}}(0, 128, 255) 'use our software screen as a blue backdrop
-
- 'rotate our destination points
- 'the QB64 3D co-ordinate system is the same as OpenGL's:
- ' negative z is in front of you, if it doesn't have a negative z value you won't see it!
- ' x goes from left to right, 0 is the middle of the screen
- ' y goes from bottom to top, 0 is the middle of the screen
- scale = 10
- dist = -10
- angle = angle + 0.1
- x1 = {{Cl|SIN}}(angle) * scale
- z1 = {{Cl|COS}}(angle) * scale
- x2 = {{Cl|SIN}}(angle + 3.14) * scale 'adding 3.14 adds 180 degrees
- z2 = {{Cl|COS}}(angle + 3.14) * scale
- 'what we performed above is a 2D/horizontal rotation of points
- '(3D rotations are beyond the scope of this example)
-
- 'draw the triangle
- '_ANTICLOCKWISE makes it only draw when our triangle is facing the correct direction
- '_SMOOTH applies linear filtering to avoid a pixelated look
-
- {{Cl|_MAPTRIANGLE}} '''_ANTICLOCKWISE''' ({{Cl|_WIDTH (function)|_WIDTH}}(ss33) / 2, 0)-(0, {{Cl|_HEIGHT}}(ss33))-({{Cl|_WIDTH (function)|_WIDTH}}(ss33),_
- {{Cl|_HEIGHT}}(ss33)), ss33 TO(0, scale, dist)-(x1, -scale, z1 + dist)-(x2, -scale, z2 + dist), , '''_SMOOTH'''
-
- {{Cl|_LIMIT}} 30
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}}
-{{CodeEnd}}
-: '''Tip:''' If you are using Linux you might want to replace "[[_SCREENIMAGE]]" with a [[_LOADIMAGE]] command if you don't see anything.
-
-
-{{PageSeeAlso}}
-* [[_PUTIMAGE]]
-* [[_LOADIMAGE]]
-* [[_COPYIMAGE]]
-* [[GET (graphics statement)]], [[PUT (graphics statement)]]
-* [[STEP]], [[SIN]], [[COS]]
-* [[Hardware images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MAPUNICODE_(function)__1111111111_(00000000).txt b/internal/help/_MAPUNICODE_(function)__1111111111_(00000000).txt
deleted file mode 100644
index 11aa2b585..000000000
--- a/internal/help/_MAPUNICODE_(function)__1111111111_(00000000).txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:29}}
-{{DISPLAYTITLE:_MAPUNICODE (function)}}
-The [[_MAPUNICODE]] function returns the [[Unicode]] (UTF-32) code point value of a mapped [[ASCII]] character code.
-
-
-{{PageSyntax}}
-: {{Parameter|utfValue&}} = [[_MAPUNICODE]]({{Parameter|asciiCode%}})
-
-
-{{PageDescription}}
-* UTF-32 values have 4-byte encoding so the return variable should be [[LONG]].
-* The {{Parameter|asciiCode%}} can be any [[INTEGER]] value from 0 to 255.
-* Returns can be used to verify or catalog the present Unicode mapping.
-* The function returns Unicode values for the control characters, CHR$(127) and extended characters without mapping them first.
-
-
-{{PageExamples}}
-''Example:'' Store function return values in an array for ASCII codes 0 to 255 to restore them later.
-{{CodeStart}}
-{{Cl|DIM}} Unicode&(255)
-{{Cl|SCREEN (statement)|SCREEN}} 0
-{{Cl|_FONT}} {{Cl|_LOADFONT}}("C:\Windows\Fonts\Cour.ttf", 20, "MONOSPACE") 'select monospace font
-
-{{Cl|FOR...NEXT|FOR}} ascii = 0 {{Cl|TO}} 255
-Unicode&(ascii) = {{Cl|_MAPUNICODE (function)|_MAPUNICODE}}(ascii) 'read Unicode values
-{{Cl|PRINT}} Unicode&(ascii); 'display values in demo
-{{Cl|NEXT}}
- 'rest of program
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MAPUNICODE]] {{text|(statement)}}
-* [[Unicode]], [[Code Pages]] {{text|(by region)}}
-* [[ASCII]], [[CHR$]], [[ASC]]
-* [[Text Using Graphics]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MAPUNICODE__1111111111.txt b/internal/help/_MAPUNICODE__1111111111.txt
deleted file mode 100644
index ab237f6be..000000000
--- a/internal/help/_MAPUNICODE__1111111111.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:28}}
-{{DISPLAYTITLE:_MAPUNICODE}}
-The [[_MAPUNICODE]] statement maps a [[Unicode]] value to an [[ASCII]] character code value.
-
-
-
-{{PageSyntax}}
-: [[_MAPUNICODE]] {{Parameter|unicode&}} '''TO''' {{Parameter|asciiCode%}}
-
-
-* The [[LONG]] {{Parameter|unicode&}} value is a [[HEX$|hexadecimal]] or decimal code value from a [[Unicode]] [[Code Pages|Code Page]].
-* The {{Parameter|asciiCode%}} [[INTEGER]] parameter is any [[ASCII]] or Extended code value from 0 to 255.
-* Use the Unicode Page Table values listed here: [http://en.wikipedia.org/wiki/Category:DOS_code_pages DOS Code Pages] or [http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/ Windows Mapping]
-* Once the codes are mapped, key entries will display the unicode character in the '''monospace ''' [[_FONT|font]] selected.
-* The [[_MAPUNICODE (function)|_MAPUNICODE]] function can be used to verify or read the present [[Unicode]] UTF32 code point settings.
-* '''[[_MAPUNICODE]] can place the Unicode characters TO any [[ASCII]] code space you desire (0 to 255)'''.
-
-
-{{PageExamples}}
-''Example:'' Converting the extended [[ASCII]] characters to other characters using DATA from the Unicode [[Code Pages]].
-{{CodeStart}}
-{{Cl|SCREEN}} 0
-{{Cl|_FONT}} {{Cl|_LOADFONT}}("C:\windows\fonts\cour.ttf", 20, "MONOSPACE")
-
-{{Cl|RESTORE}} Microsoft_pc_cpMIK
-{{Cl|FOR...NEXT|FOR}} ASCIIcode = 128 {{Cl|TO}} 255
- {{Cl|READ}} unicode
- {{Cl|_MAPUNICODE}} Unicode {{Cl|TO}} ASCIIcode
-{{Cl|NEXT}}
-
-
-{{Cl|FOR...NEXT|FOR}} i = 128 {{Cl|TO}} 255
- {{Cl|PRINT}} {{Cl|CHR$}}(i) + " ";
- cnt = cnt + 1
- {{Cl|IF...THEN|IF}} cnt {{Cl|MOD}} 16 = 0 {{Cl|THEN}} {{Cl|PRINT}}
-{{Cl|NEXT}}
-{{Cl|END}}
-
-Microsoft_pc_cpMIK:
-{{Cl|DATA}} 1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055
-{{Cl|DATA}} 1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071
-{{Cl|DATA}} 1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087
-{{Cl|DATA}} 1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103
-{{Cl|DATA}} 9492,9524,9516,9500,9472,9532,9571,9553,9562,9566,9577,9574,9568,9552,9580,9488
-{{Cl|DATA}} 9617,9618,9619,9474,9508,8470,167,9559,9565,9496,9484,9608,9604,9612,9616,9600
-{{Cl|DATA}} 945,223,915,960,931,963,181,964,934,920,937,948,8734,966,949,8745
-{{Cl|DATA}} 8801,177,8805,8804,8992,8993,247,8776,176,8729,183,8730,8319,178,9632,160
-{{CodeEnd}}
-: ''Note:'' The Unicode data field is created by adding DATA before each line listed for the appropriate [[Code Pages|Code Page]].
-
-
-
-{{PageSeeAlso}}
-* [[_MAPUNICODE (function)]]
-* [[ASCII]], [[Unicode]], [[_FONT]]
-* [[_KEYHIT]], [[_KEYDOWN]]
-* [[ASC]], [[INKEY$]], [[CHR$]]
-* [[Code Pages]] {{text|(by region)}}
-* [[Text Using Graphics]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MEMCOPY__1111111.txt b/internal/help/_MEMCOPY__1111111.txt
deleted file mode 100644
index 37783478a..000000000
--- a/internal/help/_MEMCOPY__1111111.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:32}}
-{{DISPLAYTITLE:_MEMCOPY}}
-The [[_MEMCOPY]] statement copies a block of bytes from one memory offset to another offset in memory.
-
-
-{{PageSyntax}}
-: [[_MEMCOPY]] {{Parameter|sourceBlock}}, {{Parameter|sourceBlock.OFFSET}}, {{Parameter|sourceBlock.SIZE}} [[TO]] {{Parameter|destBlock}}, {{Parameter|destBlock.OFFSET}}
-
-
-{{Parameters}}
-* {{Parameter|sourceBlock}} is the source memory block name created AS [[_MEM]].
-* {{Parameter|sourceBlock.OFFSET}} is the dot [[_OFFSET]] within the source memory block to read from.
-* {{Parameter|sourceBlock.SIZE}} is the total number of bytes to transfer based on actual size.
-* {{Parameter|destBlock}} is the destination [[_MEM]] memory block name to transfer data to.
-* {{Parameter|destBlock.OFFSET}} is the dot [[_OFFSET]] within the dest [[_MEM]] memory block to write to.
-
-
-{{PageDescription}}
-* The dot OFFSET is the memory block's start location in memory. Add bytes to place data further into the block.
-* The dot SIZE is the total byte size of the memory block to transfer. You can transfer all or a portion of the data bytes.
-* The memory block regions may overlap.
-* '''Always free memory blocks after values have been transferred to variables and are no longer required.'''
-
-
-{{PageExamples}}
-''Example:'' Swapping data from one [[STRING]] variable to another. Fixed length strings are recommended for speed.
-{{CodeStart}}
-{{Cl|DIM}} m {{Cl|AS}} {{Cl|_MEM}}
-{{Cl|DIM}} n {{Cl|AS}} {{Cl|_MEM}}
-
-m = {{Cl|_MEMNEW}}(10)
-n = {{Cl|_MEMNEW}}(100)
-
-{{Cl|_MEMPUT}} m, m.OFFSET, "1234567890"
-
-s$ = {{Cl|SPACE$}}(10) 'to load into a variable length string set its length first
-{{Cl|_MEMGET}} m, m.OFFSET, s$
-{{Cl|PRINT}} "in:[" + s$ + "]"
-
-{{Cl|_MEMCOPY}} m, m.OFFSET, m.SIZE {{Cl|TO}} n, n.OFFSET 'put m into n
-
-b$ = {{Cl|SPACE$}}(10)
-{{Cl|_MEMGET}} n, n.OFFSET, b$
-{{Cl|PRINT}} "out:[" + b$ + "]"
-{{Cl|_MEMFREE}} m: {{Cl|_MEMFREE}} n 'always clear the memory when done
-{{CodeEnd}}
-
-
-''Snippet:'' Instead of copying each array element, one at a time in nested [[FOR...NEXT|FOR]] loops, _MEMCOPY does it in one statement instantly.
-{{TextStart}}
-'copy array a to array b one index at a time:
-{{Cb|FOR...NEXT|FOR}} i1 = 0 {{Cb|TO}} 100
- {{Cb|FOR...NEXT|FOR}} i2 = 0 {{Cb|TO}} 100
- b(i1, i2) = a(i1, i2)
- {{Cb|NEXT}}
-{{Cb|NEXT}}
-
-'copy array a to array b in memory instantly:
-{{Cb|DIM}} ma {{Cl|AS}} {{Cb|_MEM}}: ma = {{Cb|_MEM (function)|_MEM}}(a()) 'place array data into blocks
-{{Cb|DIM}} mb {{Cl|AS}} {{Cb|_MEM}}: mb = {{Cb|_MEM (function)|_MEM}}(b())
-{{Cb|_MEMCOPY}} ma, ma.OFFSET, ma.SIZE {{Cb|TO}} mb, mb.OFFSET
-{{Cb|_MEMFREE}} ma: {{Cb|_MEMFREE}} mb 'clear the memory when done
-{{TextEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MEM]], [[_MEM (function)]]
-* [[_MEMNEW]], [[_MEMGET (function)]]
-* [[_MEMIMAGE]], [[_MEMELEMENT]]
-* [[_MEMGET]], [[_MEMPUT]]
-* [[_MEMFILL]], [[_MEMFREE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMELEMENT__1111111111.txt b/internal/help/_MEMELEMENT__1111111111.txt
deleted file mode 100644
index 27e59c560..000000000
--- a/internal/help/_MEMELEMENT__1111111111.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:33}}
-{{DISPLAYTITLE:_MEMELEMENT}}
-The [[_MEMELEMENT]] function returns a [[_MEM]] block referring to a variable's memory, but not past it.
-
-
-{{PageSyntax}}
-: {{Parameter|memoryBlock}} = [[_MEMELEMENT]]({{Parameter|referenceVariable}})
-
-
-* The {{Parameter|referenceVariable}} parameter designates the existing variable name using the memory block.
-* _MEMELEMENT is the same as [[_MEM]] but in an array it returns the specifications of an element, not the entire array.
-* All values created by memory functions MUST be freed using [[_MEMFREE]] with a valid [[_MEM]] variable type.
-* The _MEMELEMENT type contains the following '''read-only''' elements where ''name'' is the variable name:
-:: ''name'''''.OFFSET''' is the beginning offset of the memory block AS [[_OFFSET]]
-:: ''name'''''.SIZE''' returns the largest available region of memory of the ELEMENT in bytes AS [[_OFFSET]]
-:: ''name'''''.ELEMENTSIZE''' is the [[_BYTE]] size of the elements within the block AS [[_OFFSET]]
-
-:::* 2 = [[INTEGER]] values have an element size of 2 bytes
-:::* 4 = [[LONG]] integer and [[SINGLE]] float values have an element size of 4 bytes
-:::* 8 = [[DOUBLE]] float and [[_INTEGER64]] values have an element size of 8 bytes
-:::* 32 = [[_FLOAT]] values have an element size of 32 bytes
-:::* [[LEN]] = [[STRING]] or [[_OFFSET]] byte sizes vary so use [[LEN]](variable) for the number of bytes.
-:: ''name'''''.TYPE''' is the type (represented as bits combined to form a value) AS [[LONG]] (see below).
-
-==.TYPE values (version 1.000 and up)==
-:::* 0 = UDT ([[TYPE|user defined type]]) or memory created by [[_MEMNEW]]
-:::* 1 = 1 bit ELEMENT.SIZE=1 *Only used along with specific types (currently integers or floats)
-:::* 2 = 2 bit. ELEMENT.SIZE=2 *
-:::* 4 = 4 bit. ELEMENT.SIZE=4 *
-:::* 8 = 8 bit. ELEMENT.SIZE=8 *
-:::* 16 = 16 bit. ELEMENT.SIZE=16 *
-:::* 32 = 32 bit. ELEMENT.SIZE=32 *
-:::* 64 = 64 bit. ELEMENT.SIZE=64 *
-:::* 128 = 128 bit. ELEMENT.SIZE=128 *
-:::* 256 = 256 bit. ELEMENT.SIZE=256 *
-:::* 512(+ bit*) = integer types only(ie. whole numbers)
-:::* 1024(+ bit*) = floating point types only(ie. numbers that can have a decimal point)
-:::* 2048 = [[STRING]] type only
-:::* 4096(+ 512 + bit*) = [[_UNSIGNED]] integer type only
-:::* 8192 = [[_MEM]] type only
-:::* 16384(+ 512 + bit*)= [[_OFFSET]] type only
-''Note: If a future integer, float or other type doesn't have a size that is 1,2,4,8,16,32,64,128 or 256 it won't have a size-bit set.''
-
-===Versions prior to 1.000===
-:::* 1 = Integer types such as [[_BYTE]], [[INTEGER]], [[LONG]], [[_INTEGER64]] or [[_OFFSET]]
-:::* 2 = [[_UNSIGNED]] variable types. Value must be added to the variable type value.(2 cannot be used by itself)
-:::* 3 = ALL [[_UNSIGNED]] [[INTEGER]] type values.(add 1 + 2)
-:::* 4 = Floating point types such as [[SINGLE]], [[DOUBLE]] or [[_FLOAT]]
-:::* 8 = [[STRING]]
-:::* 0 = unknown(eg. created with [[_MEMNEW]]) or [[TYPE|user-defined-types]]
-
-'''Note: [[_MEM]] and [[_OFFSET]] values cannot be cast to other variable types.'''
-
-
-{{PageExamples}}
-''Example:'' Comparing the specifications returned by [[_MEM]] and _MEMELEMENT from an array.
-{{CodeStart}}
-{{Cl|DIM}} a(1 {{Cl|TO}} 100) {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-
-{{Cl|DIM}} m1 {{Cl|AS}} {{Cl|_MEM}}
-{{Cl|DIM}} m2 {{Cl|AS}} {{Cl|_MEM}}
-
-m1 = {{Cl|_MEM (function)|_MEM}}(a(50)) 'function returns information about array up to specific element
-{{Cl|PRINT}} m1.OFFSET, m1.SIZE, m1.TYPE, m1.ELEMENTSIZE
-
-m2 = {{Cl|_MEMELEMENT}}(a(50)) 'function returns information about the specific element
-{{Cl|PRINT}} m2.OFFSET, m2.SIZE, m2.TYPE, m2.ELEMENTSIZE
-
-{{Cl|END}}
-{{CodeEnd}}
-: Output using VERSION .954 ONLY .TYPE values: 1 (integer) + 2 (unsigned)
-{{OutputStart}}28377205 51 3 1
-28377205 1 3 1 {{OutputEnd}}
-: ''Explanation:'' [[_MEM]] returns the info about the array to that element while _MEMELEMENT returns info about that element only.
-::* [[_MEM]] value returns the available array .SIZE as 51 bytes from the designated array element.
-::* [[_MEMELEMENT]] value returns the available element .SIZE as one byte.
-
-
-{{PageSeeAlso}}
-* [[_MEM]]
-* [[_MEMNEW]]
-* [[_MEMGET]], [[_MEMPUT]]
-* [[_MEMFREE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MEMEXISTS__111111111.txt b/internal/help/_MEMEXISTS__111111111.txt
deleted file mode 100644
index da796b0fb..000000000
--- a/internal/help/_MEMEXISTS__111111111.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:35}}
-{{DISPLAYTITLE:_MEMEXISTS}}
-The [[_MEMEXISTS]] function returns true (-1) if the memory block variable name specified exists in memory and false (0) if it does not.
-
-
-{{PageSyntax}}
-: {{Parameter|result}} = [[_MEMEXISTS]]({{Parameter|memBlock}})
-
-
-{{PageDescription}}
-* The {{Parameter|memBlock}} variable name must have been created using [[DIM]] memBlock [[AS]] [[_MEM]] type ([[DIM]].
-* The function verifies that the memory variable exists in memory before using a passed block, to avoid generating QB64 errors.
-* Typically, this function is used by a [[DECLARE LIBRARY|LIBRARY]] [[SUB]] or [[FUNCTION]] which accepts a [[_MEM]] structure as input, to avoid an error.
-
-
-{{Parameter|See Also:}}
-* [[_MEM (function)]]
-* [[_MEMELEMENT]], [[_MEMCOPY]]
-* [[_MEMIMAGE]], [[_MEMNEW]]
-* [[_MEMGET]], [[_MEMPUT]]
-* [[_MEMFILL]], [[_MEMFREE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MEMFILL__1111111.txt b/internal/help/_MEMFILL__1111111.txt
deleted file mode 100644
index 085603d74..000000000
--- a/internal/help/_MEMFILL__1111111.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:36}}
-{{DISPLAYTITLE:_MEMFILL}}
-The [[_MEMFILL]] statement converts a value to a specified type, then fills memory with that type including any non-whole remainder.
-
-
-{{PageSyntax}}
-: [[_MEMFILL]] {{Parameter|memoryBlock}}, {{Parameter|memoryBlock.OFFSET}}, {{Parameter|fillBytes}}, {{Parameter|value}} [AS {{Parameter|variableType}}]
-
-
-{{Parameters}}
-* The {{Parameter|memoryBlock}} [[_MEM]] memory block is the block referenced to be filled.
-* {{Parameter|memoryBlock.OFFSET}} is the starting offset of the above referenced memory block.
-* The {{Parameter|fillBytes}} is the number of bytes to fill the memory block.
-* The {{Parameter|value}} is the value to place in the memory block at the designated OFFSET position.
-* A literal or variable {{Parameter|value}} can be optionally set [[AS]] a variable [[type]] appropriate for the memory block.
-
-
-{{PageDescription}}
-* To clear previous data from a [[_MEMNEW]] memory block, use _MEMFILL with a {{Parameter|value}} of 0.
-
-
-{{PageExamples}}
-''Example:'' Filling array values quickly using FOR loops or a simple memory fill.
-{{CodeStart}}
-{{Cl|DIM}} a(100, 100) {{Cl|AS}} {{Cl|LONG}}
-{{Cl|DIM}} b(100, 100) {{Cl|AS}} {{Cl|LONG}}
-
-'filling array a with value 13
-{{Cl|FOR...NEXT|FOR}} i1 = 0 {{Cl|TO}} 100
- {{Cl|FOR...NEXT|FOR}} i2 = 0 {{Cl|TO}} 100
- a(i1, i2) = 13
- {{Cl|NEXT}}
-{{Cl|NEXT}}
-
-'filling array b with value 13
-{{Cl|DIM}} mema {{Cl|AS}} {{Cl|_MEM}}
-mema = {{Cl|_MEM (function)|_MEM}}(b())
-{{Cl|_MEMFILL}} mema, mema.OFFSET, mema.SIZE, 13 {{Cl|AS}} {{Cl|LONG}}
-{{Cl|_MEMFREE}} mema
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MEM]], [[_MEM (function)]]
-* [[_MEMIMAGE]], [[_MEMNEW]]
-* [[_MEMGET]], [[_MEMPUT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMFREE__1111111.txt b/internal/help/_MEMFREE__1111111.txt
deleted file mode 100644
index 5c3803d99..000000000
--- a/internal/help/_MEMFREE__1111111.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:37}}
-{{DISPLAYTITLE:_MEMFREE}}
-The [[_MEMFREE]] statement frees the designated memory block [[_MEM]] value and must be used with all memory functions.
-
-
-{{PageSyntax}}
-: [[_MEMFREE]] {{Parameter|memoryVariable}}
-
-
-{{Parameters}}
-* ALL designated [[_MEM]] type {{Parameter|memoryVariable}} values must be freed to conserve memory when they are no longer used or needed.
-
-
-{{PageDescription}}
-* Since [[_MEM]] type variables cannot use a suffix, use [[DIM]] {{Parameter|memoryVariable}} [[AS]] [[_MEM]] to create memory handle variables.
-* All values created by memory functions must be freed using [[_MEMFREE]] with a valid [[_MEM]] variable.
-
-
-{{PageSeeAlso}}
-* [[_MEM]] {{text|(variable type)}}
-* [[_MEM (function)]]
-* [[_MEMNEW]] {{text|(function)}}
-* [[_MEMIMAGE]] {{text|(function)}}
-* [[_MEMELEMENT]] {{text|(function)}}
-* [[_MEMGET (function)]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMGET_(function)__111111_(00000000).txt b/internal/help/_MEMGET_(function)__111111_(00000000).txt
deleted file mode 100644
index ecd929c31..000000000
--- a/internal/help/_MEMGET_(function)__111111_(00000000).txt
+++ /dev/null
@@ -1,47 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:39}}
-{{DISPLAYTITLE:_MEMGET (function)}}
-The [[_MEMGET]] function returns a value from a specific memory block name at the specified OFFSET using a certain variable type.
-
-
-{{PageSyntax}}
-: {{Parameter|returnValue}} = [[_MEMGET]]({{Parameter|memoryBlock}}, {{Parameter|bytePosition}}, {{Parameter|variableType}})
-
-
-{{Parameters}}
-* Returns a value of the {{Parameter|variableType}} designated. The holding variable must match that [[TYPE]].
-* {{Parameter|memoryBlock}} is a [[_MEM]] variable type memory block name created by [[_MEMNEW]] or the [[_MEM (function)|_MEM]] function.
-* {{Parameter|bytePosition}} is the {{Parameter|memoryBlock}}.[[OFFSET]] memory start position plus any bytes to move into the block.
-* {{Parameter|variableType}} is a variable [[TYPE]] like [[_BYTE]], [[INTEGER]], [[SINGLE]], [[DOUBLE]], etc.
-
-
-{{PageDescription}}
-* {{Parameter|memoryBlock}}.[[OFFSET]] returns the starting byte position of the block. Add bytes to move into the block.
-* The variable type held in the memory block can determine the next {{Parameter|bytePosition}} to read.
-* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[type]]s regardless of the value held.
-* [[STRING]] values should be of a defined length. Variable length strings can actually move around in memory and not be found.
-* '''_MEMGET variable values that are assigned a variable [[type]] other than a memory type do not need to be freed.'''
-
-
-{{PageExamples}}
-''Example:'' [[DEF SEG]] and [[VARPTR]] are no longer necessary to do things in memory just like [[POKE]] and [[PEEK]] do.
-{{CodeStart}}
-{{Cl|DIM}} o {{Cl|AS}} {{Cl|_MEM}}
-o = {{Cl|_MEM (function)|_MEM}}(d&) 'OLD... o% = VARPTR(d&)
-{{Cl|_MEMPUT}} o, o.OFFSET + 1, 3 {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}} 'a POKE
-v = {{Cl|_MEMGET (function)|_MEMGET}}(o, o.OFFSET + 1, {{Cl|_UNSIGNED}} {{Cl|_BYTE}}) 'a PEEK
-{{Cl|PRINT}} v 'prints 3
-{{Cl|PRINT}} d& 'prints 768 because the 2nd byte of d& has been set to 3 or 3 * 256
-{{Cl|_MEMFREE}} o
-{{CodeEnd}}
-:''Explanation:'' The memory block and OFFSET are given by [[_MEMPUT]] and the _MEMGET function, with the designated type.
-
-
-{{PageSeeAlso}}
-* [[_MEM]], [[MEM (function)]]
-* [[_MEMGET]], [[_MEMPUT]]
-* [[_MEMNEW]], [[_MEMFILL]]
-* [[_MEMCOPY]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMGET__111111.txt b/internal/help/_MEMGET__111111.txt
deleted file mode 100644
index 13c15597c..000000000
--- a/internal/help/_MEMGET__111111.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:38}}
-{{DISPLAYTITLE:_MEMGET}}
-The [[_MEMGET]] statement reads a portion of a memory block at an OFFSET position into a variable, array or user defined type.
-
-
-{{PageSyntax}}
-: [[_MEMGET]] {{Parameter|memoryBlock}}, {{Parameter|bytePosition}}, {{Parameter|destinationVariable}}
-
-
-* {{Parameter|memoryBlock}} is a [[_MEM]] variable type memory block name created by [[_MEMNEW]] or the [[_MEM (function)|_MEM]] function.
-* {{Parameter|bytePosition}} is the {{Parameter|memoryBlock}}.[[OFFSET]] memory start position plus any bytes to move into the block.
-* {{Parameter|destinationVariable}} is the variable assigned to hold the data. The number of bytes read is determined by the variable [[type]] used.
-
-
-{{PageDescription}}
-* The [[_MEMGET]] statement is similar to the [[GET]] statement used in files, but the position is required.
-* The memory block name.[[OFFSET]] returns the starting byte position of the block. Add bytes to move into the block.
-* The variable type held in the memory block can determine the next {{Parameter|bytePosition}} to read.
-* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[type]]s regardless of the value held.
-* [[STRING]] values should be of a defined length. Variable length strings can actually move around in memory and not be found.
-
-
-{{PageExamples]]
-''Example:'' Shows how to read the PSET color values from a program's [[SCREEN]] memory to an array.
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-{{Cl|PSET}} (0, 0), 123
-{{Cl|PSET}} (1, 0), 222 'create screen image
-
-'here is an array
-{{Cl|DIM}} screen_array(319, 199) {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}} 'use screen dimensions from 0
-
-'here's how we can copy the screen to our array
-{{Cl|DIM}} m {{Cl|AS}} {{Cl|_MEM}}
-m = {{Cl|_MEMIMAGE}} '0 or no handle necessary when accessing the current program screen
-{{Cl|_MEMGET}} m, m.OFFSET, screen_array()
-
-'here's the proof
-{{Cl|PRINT}} screen_array(0, 0) 'print 123
-{{Cl|PRINT}} screen_array(1, 0) 'print 222
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MEMGET (function)]]
-* [[_MEMPUT]]
-* [[_MEM]]
-* [[_MEMIMAGE]]
-* [[_MEMFREE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMIMAGE__11111111.txt b/internal/help/_MEMIMAGE__11111111.txt
deleted file mode 100644
index fe0b11709..000000000
--- a/internal/help/_MEMIMAGE__11111111.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:41}}
-{{DISPLAYTITLE:_MEMIMAGE}}
-The [[_MEMIMAGE]] function returns a [[_MEM]] value referring to an image's memory using a designated image handle.
-
-
-{{PageSyntax}}
-: {{Parameter|imageBlock}} = [[_MEMIMAGE]][({{Parameter|imageHandle&}})]
-
-
-{{Parameters}}
-* The {{Parameter|imageBlock}} [[_MEM]] type variable holds the read-only elements .OFFSET, .SIZE, .TYPE and .ELEMENTSIZE.
-* If the optional {{Parameter|imageHandle&}} isn't passed, it is assumed to be the current [[_DEST]]ination program screen image.
-
-
-{{PageDescription}}
-* Use the function to place images into memory access blocks for faster data access.
-* All values created by this function must be freed using [[_MEMFREE]] with a valid [[_MEM]] [[type]] variable.
-* Image handle values and the memory used must still be freed using [[_FREEIMAGE]] when no longer required.
-
-
-{{PageExamples}}
-''Example 1:'' Darkening an image using memory with [[$CHECKING]]:OFF for greater speed. Use any 24 bit image file name on the second code line.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(1024, 768, 32)
-i& = {{Cl|_LOADIMAGE}}("turtle.jpg") '<<<<<<<<<<<<< use any 24 bit image file
-
-{{Cl|FOR...NEXT|FOR}} n! = 1 {{Cl|TO}} 0.01 {{Cl|STEP}} -0.01
- i2& = {{Cl|_COPYIMAGE}}(i&)
- DarkenImage i2&, n!
- {{Cl|_PUTIMAGE}} (0, 0), i2&
- {{Cl|_FREEIMAGE}} i2&
- {{Cl|_DISPLAY}}
-{{Cl|NEXT}}
-
-{{Cl|SUB}} DarkenImage (Image {{Cl|AS}} {{Cl|LONG}}, Value_From_0_To_1 {{Cl|AS}} {{Cl|SINGLE}})
-{{Cl|IF...THEN|IF}} Value_From_0_To_1 <= 0 {{Cl|OR (boolean)|OR}} Value_From_0_To_1 >= 1 {{Cl|OR (boolean)|OR}} {{Cl|_PIXELSIZE}}(Image) <> 4 {{Cl|THEN}} {{Cl|EXIT SUB}}
-{{Cl|DIM}} Buffer {{Cl|AS}} {{Cl|_MEM}}: Buffer = {{Cl|_MEMIMAGE}}(Image) 'Get a memory reference to our image
-{{Cl|DIM}} Frac_Value {{Cl|AS}} {{Cl|LONG}}: Frac_Value = Value_From_0_To_1 * 65536 'Used to avoid slow floating point calculations
-{{Cl|DIM}} O {{Cl|AS}} {{Cl|_OFFSET}}, O_Last {{Cl|AS}} {{Cl|_OFFSET}}
-O = Buffer.OFFSET 'We start at this offset
-O_Last = Buffer.OFFSET + {{Cl|_WIDTH (function)|_WIDTH}}(Image) * {{Cl|_HEIGHT}}(Image) * 4 'We stop when we get to this offset
-'use on error free code ONLY!
-{{Cl|$CHECKING}}:OFF
-DO
- {{Cl|_MEMPUT}} Buffer, O, {{Cl|_MEMGET (function)|_MEMGET}}(Buffer, O, {{Cl|_UNSIGNED}} {{Cl|_BYTE}}) * Frac_Value \ 65536 {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}
- {{Cl|_MEMPUT}} Buffer, O + 1, {{Cl|_MEMGET (function)|_MEMGET}}(Buffer, O + 1, {{Cl|_UNSIGNED}} {{Cl|_BYTE}}) * Frac_Value \ 65536 {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}
- {{Cl|_MEMPUT}} Buffer, O + 2, {{Cl|_MEMGET (function)|_MEMGET}}(Buffer, O + 2, {{Cl|_UNSIGNED}} {{Cl|_BYTE}}) * Frac_Value \ 65536 {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}}
- O = O + 4
-{{Cl|LOOP}} {{Cl|UNTIL}} O = O_Last
-'turn checking back on when done!
-{{Cl|$CHECKING}}:ON
-{{Cl|_MEMFREE}} Buffer
-{{Cl|END SUB}}
-{{CodeEnd}}{{small|Code by Galleon}}
-: ''Explanation:'' The second value passed to DarkenImage is a value from 0.0 to 1.0 where 0.0 is full darkness and 1 is none.
-
-
-''Example 2:'' Reading information stored in an image with [[_MEMIMAGE]] to print [[ASC]] text characters to the screen.
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-{{Cl|_FULLSCREEN}}
-{{Cl|PSET}} (0, 0), {{Cl|ASC}}("H")
-{{Cl|PSET}} (1, 0), {{Cl|ASC}}("E")
-{{Cl|PSET}} (2, 0), {{Cl|ASC}}("L")
-{{Cl|PSET}} (3, 0), {{Cl|ASC}}("L")
-{{Cl|PSET}} (4, 0), {{Cl|ASC}}("O")
-{{Cl|PSET}} (5, 0), 32
-{{Cl|PSET}} (6, 0), {{Cl|ASC}}("W")
-{{Cl|PSET}} (7, 0), {{Cl|ASC}}("O")
-{{Cl|PSET}} (8, 0), {{Cl|ASC}}("R")
-{{Cl|PSET}} (9, 0), {{Cl|ASC}}("L")
-{{Cl|PSET}} (10, 0), {{Cl|ASC}}("D")
-{{Cl|DIM}} m {{Cl|AS}} {{Cl|_MEM}}
-m = {{Cl|_MEMIMAGE}}
-x1$ = {{Cl|_MEMGET (function)|_MEMGET}}(m, m.OFFSET, {{Cl|STRING}} * 11) 'convert numbers to ASCII text characters
-{{Cl|_MEMFREE}} m 'free memory when done
-{{Cl|LOCATE}} 10, 1: {{Cl|PRINT}} {{Cl|LEN}}(x1$) 'prints 11 as byte length
-{{Cl|PRINT}} x1$ 'prints HELLO WORLD
-{{Cl|END}}
-{{CodeEnd}}
-: ''Notes:'' The colors in the upper left corner are the text data used. An image could hold a hidden text message this way.
-
-
-{{PageSeeAlso}}
-* [[_MEM]]
-* [[_MEMNEW]]
-* [[_MEMGET]], [[_MEMPUT]]
-* [[_MEMFREE]]
-* [[$CHECKING]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMNEW__111111.txt b/internal/help/_MEMNEW__111111.txt
deleted file mode 100644
index 8b3e7afd5..000000000
--- a/internal/help/_MEMNEW__111111.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:42}}
-{{DISPLAYTITLE:_MEMNEW}}
-The [[_MEMNEW]] function allocates new memory and returns a [[_MEM]] memory block referring to it.
-
-
-{{PageSyntax}}
-: {{Parameter|memoryBlock}} = [[_MEMNEW]]({{Parameter|byteSize}})
-
-
-{{Parameters}}
-* The {{Parameter|byteSize}} parameter is the desired byte size of the memory block based on the variable [[type]] it will hold.
-
-
-{{PageDescription}}
-* The {{Parameter|memoryBlock}} value created holds the elements .OFFSET, .SIZE, .TYPE and .ELEMENTSIZE.
-* [[_MEMNEW]] does not clear the data previously in the memory block it allocates, for speed purposes.
-* To clear previous data from a new memory block, use [[_MEMFILL]] with a byte value of 0.
-* When a new memory block is created the memory .TYPE value will be 0.
-* '''If the read only memory block .SIZE is 0, the memory block was not created.'''
-* '''All values created by memory functions must be freed using [[_MEMFREE]] with a valid [[_MEM]] variable.'''
-
-
-{{PageExamples}}
-''Example:'' Shows how [[SINGLE]] numerical values can be passed, but non-fixed [[STRING]] lengths cannot get the value.
-{{CodeStart}}
-{{Cl|DIM}} m {{Cl|AS}} {{Cl|_MEM}}
-{{Cl|DIM}} f {{Cl|AS}} {{Cl|STRING}} * 5
-m = {{Cl|_MEMNEW}}(5) 'create new memory block of 5 bytes
-a = 12345.6
-{{Cl|_MEMPUT}} m, m.OFFSET, a 'put single value
-{{Cl|_MEMGET}} m, m.OFFSET, b 'get single value
-{{Cl|PRINT}} "b = "; b
-c$ = "Doggy"
-{{Cl|_MEMPUT}} m, m.OFFSET, c$ 'put 5 byte string value
-{{Cl|_MEMGET}} m, m.OFFSET, d$ 'get unfixed length string value
-{{Cl|_MEMGET}} m, m.OFFSET, f 'get 5 byte string value
-e$ = {{Cl|_MEMGET (function)|_MEMGET}}(m, m.OFFSET, {{Cl|STRING}} * 5) 'get 5 byte string value
-{{Cl|PRINT}} "d$ = "; d$; {{Cl|LEN}}(d$) 'prints empty string
-{{Cl|PRINT}} "e$ = "; e$; {{Cl|LEN}}(e$)
-{{Cl|PRINT}} "f = "; f; {{Cl|LEN}}(f)
-{{CodeEnd}}
-{{OutputStart}}b = 12345.6
-d$ = 0
-e$ = Doggy 5
-f = Doggy 5 {{OutputEnd}}
-
-
-
-{{PageSeeAlso}}
-* [[_MEM]], [[_MEMPUT]]
-* [[_MEMGET]], [[_MEMGET (function)]]
-* [[_MEMFILL]], [[_MEMFREE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMPUT__111111.txt b/internal/help/_MEMPUT__111111.txt
deleted file mode 100644
index 7553c5c9c..000000000
--- a/internal/help/_MEMPUT__111111.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:43}}
-{{DISPLAYTITLE:_MEMPUT}}
-The [[_MEMPUT]] statement writes data to a portion of a designated memory block at an [[OFFSET]] position.
-
-
-{{PageSyntax}}
-: [[_MEMPUT]] {{Parameter|memoryBlock}}, {{Parameter|bytePosition}}, {{Parameter|sourceVariable}} [AS {{Parameter|type}}]
-
-
-{{Parameters}}
-* {{Parameter|memoryBlock}} is a [[_MEM]] variable type memory block name created by [[_MEMNEW]] or the [[_MEM (function)|_MEM]] function.
-* {{Parameter|bytePosition}} is the {{Parameter|memoryBlock}}.[[OFFSET]] start position plus any bytes needed to read specific values.
-* The {{Parameter|sourceVariable}} type designates the size and {{Parameter|bytePosition}} it should be written to. It can be a variable, [[arrays|array]] or user defined type.
-* {{Parameter|bytePosition}} can be converted [[AS]] a specific variable ''[[TYPE|type]]'' before being written to the {{Parameter|memoryBlock}} as bytes.
-
-
-{{PageDescription}}
-* The _MEMPUT statement is similar to the [[PUT]] file statement, but {{Parameter|bytePosition}} is required.
-* The {{Parameter|memoryBlock}}.[[OFFSET]] returns the starting byte position of the block. Add bytes to move into the block.
-* The variable type held in the memory block can determine the next ''byte position'' to write a value.
-* [[LEN]] can be used to determine the byte size of numerical or user defined variable [[type]]s regardless of the value held.
-* [[STRING]] values should be of a defined length. Variable length strings can actually move around in memory and not be found.
-
-
-{{PageDescription}}
-''Example:'' _MEMPUT can be used just like [[POKE]] without [[DEF SEG]].
-{{CodeStart}}
-{{Cl|DIM}} o {{Cl|AS}} {{Cl|_MEM}}
-o = {{Cl|_MEM (function)|_MEM}}(d&)
-{{Cl|_MEMPUT}} o, o.OFFSET + 1, 3 {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}} 'POKE
-v = {{Cl|_MEMGET (function)|_MEMGET}}(o, o.OFFSET + 1, {{Cl|_UNSIGNED}} {{Cl|_BYTE}}) 'PEEK
-{{Cl|PRINT}} v 'prints 3
-{{Cl|PRINT}} d& 'print 768 because the 2nd byte of d& has been set to 3 or 3 * 256
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MEMGET]], [[_MEMGET (function)]]
-* [[_MEM]], [[_MEM (function)]]
-* [[_MEMIMAGE]], [[_MEMNEW]]
-* [[_MEMFREE]], [[_MEMCOPY]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MEMSOUND__11111111.txt b/internal/help/_MEMSOUND__11111111.txt
deleted file mode 100644
index c105d614a..000000000
--- a/internal/help/_MEMSOUND__11111111.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:44}}
-{{DISPLAYTITLE:_MEMSOUND}}
-The [[_MEMSOUND]] function returns a [[_MEM]] value referring to a sound's raw data in memory using a designated sound handle created by the [[_SNDOPEN]] function.
-
-
-{{PageSyntax}}
-: {{Parameter|soundBlock}} = [[_MEMSOUND]][({{Parameter|soundHandle&}}, {{Parameter|channel%}})]
-
-
-{{PageParameters}}
-* The {{Parameter|soundBlock}} [[_MEM]] type variable holds the read-only elements .OFFSET, .SIZE, .ELEMENTSIZE, and .SOUND.
-** .ELEMENTSIZE will contain the number of bytes-per-sample the audio contains. Usually returns 2 (16-bit audio).
-** .SOUND will contain the same handle value as returned by the [[_SNDOPEN]] function.
-* The second parameter {{Parameter| channel%}} must be 1 (left channel/mono) or 2 (right channel, for stereo files).
-
-
-{{PageDescription}}
-* Use the function to access raw sound data in memory for direct access.
-* Sound handle values and the memory used must still be freed using [[_SNDCLOSE]] when no longer required.
-* If .SIZE returns 0, that means the data could not be accessed. It may happen if you try to access the right channel in a mono file, for example.
-
-
-{{PageAvailability}}
-* '''QB64 1.5 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example 1:'' Checking that a sound file is stereo.
-{{CodeStart}}
-song& = {{Cl|_SNDOPEN}}("song.wav") 'replace song.wav with a sound file you have
-{{Cl|IF}} song& = 0 {{Cl|THEN}} {{Cl|PRINT}} "Load failed.": {{Cl|END}}
-
-{{Cl|DIM}} leftchannel {{Cl|AS}} {{Cl|_MEM}}, rightchannel {{Cl|AS}} {{Cl|_MEM}}
-leftchannel = {{Cl|_MEMSOUND}}(song&, 1)
-rightchannel = {{Cl|_MEMSOUND}}(song&, 2)
-
-{{Cl|IF}} rightchannel.SIZE > 0 {{Cl|THEN}} {{Cl|PRINT}} "This file is STEREO"
-{{Cl|IF}} rightchannel.SIZE = 0 {{Cl|AND}} leftchannel.SIZE > 0 {{Cl|THEN}}
- {{Cl|PRINT}} "This file is MONO"
-{{Cl|ELSEIF}} rightchannel.SIZE = 0 {{Cl|AND}} leftchannel.SIZE = 0 {{Cl|THEN}}
- {{Cl|PRINT}} "An error occurred."
-{{Cl|END IF}}
-
-{{Cl|_SNDCLOSE}} song& 'closing the sound releases the mem blocks
-{{CodeEnd}}
-
-
-''Example 2:'' Plotting a sound's waves.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 327, 32)
-song& = {{Cl|_SNDOPEN}}("drums.ogg") 'replace drums.ogg with a sound file you have
-{{Cl|IF}} song& = 0 {{Cl|THEN}} {{Cl|PRINT}} "Load failed.": {{Cl|END}}
-
-{{Cl|DIM}} leftchannel {{Cl|AS}} {{Cl|_MEM}}
-leftchannel = {{Cl|_MEMSOUND}}(song&, 1)
-
-{{Cl|IF}} leftchannel.SIZE = 0 {{Cl|THEN}}
- {{Cl|PRINT}} "An error occurred."
- {{Cl|END}}
-{{Cl|END IF}}
-
-{{Cl|DIM}} i {{Cl|AS}} {{Cl|_OFFSET}}
-i = 0
-{{Cl|DO}}
- {{Cl|_MEMGET}} leftchannel, leftchannel.OFFSET + i, a% 'get sound data
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} i; "/"; leftchannel.SIZE
- {{Cl|LINE}} (x, {{Cl|_HEIGHT}} / 2)-{{Cl|STEP}}(0, a% / 100), {{Cl|_RGB32}}(0, 111, 0) 'plot wave
- x = x + 1
- {{Cl|IF}} x > {{Cl|_WIDTH}} {{Cl|THEN}}
- x = 0
- {{Cl|LINE}} (0, 0)-({{Cl|_WIDTH}}, {{Cl|_HEIGHT}}), {{Cl|_RGB32}}(0, 120), BF 'fade out screen
- {{Cl|END}} {{Cl|IF}}
- i = i + 2
- {{Cl|IF}} i + 2 > leftchannel.SIZE {{Cl|THEN}} {{Cl|EXIT}} {{Cl|DO}}
- {{Cl|_LIMIT}} 500
-{{Cl|LOOP}}
-
-{{Cl|_SNDCLOSE}} song& 'closing the sound releases the mem blocks
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MEM]], [[_MEMIMAGE]]
-* [[_MEMNEW]]
-* [[_MEMGET]], [[_MEMPUT]]
-* [[_MEMFREE]]
-* [[$CHECKING]]
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MEM_(function)__111_(00000000).txt b/internal/help/_MEM_(function)__111_(00000000).txt
deleted file mode 100644
index 124e3ca63..000000000
--- a/internal/help/_MEM_(function)__111_(00000000).txt
+++ /dev/null
@@ -1,73 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:30}}
-{{DISPLAYTITLE:_MEM (function)}}
-The [[_MEM]] function returns a _MEM block referring to the largest possible continuous memory region beginning at a variable's offset.
-
-
-{{PageSyntax}}
-: {{Parameter|memoryBlock}} = [[_MEM]]({{Parameter|referenceVariable}})
-
-===Unsecure syntax===
-: {{Parameter|memoryBlock}} = [[_MEM]]({{Parameter|offset}}, {{Parameter|byteSize}})
-
-
-{{PageParameters}}
-* The {{Parameter|memoryBlock}} created will hold the {{Parameter|referenceVariable}} or [[arrays|array]] value(s), type and byte size in a separate memory area.
-* The secure syntax {{Parameter|referenceVariable}} is an existing variable's referenced memory block.
-* The unsecure syntax's designated {{Parameter|offset}} and {{Parameter|byteSize}} cannot be guaranteed. '''Avoid if possible.'''
-
-
-{{PageDescription}}
-* The {{Parameter|memoryBlock}} [[_MEM]] type variable holds the following read-only elements: OFFSET, SIZE, TYPE and ELEMENTSIZE.
-* All values created by memory functions MUST be freed using [[_MEMFREE]] with a valid [[_MEM]] variable type.
-* '''_MEM function cannot reference variable length [[STRING]] variable values. String values must be designated as a fixed-[[LEN|length]] string.'''
-
-
-{{PageExamples}}
-''Example:'' Assigning values to reference variables in memory.
-{{CodeStart}}
-{{Cl|DIM}} {{Cl|SHARED}} m(3) {{Cl|AS}} {{Cl|_MEM}}
-{{Cl|DIM}} {{Cl|SHARED}} Saved(3)
-
-m(1) = {{Cl|_MEM (function)|_MEM}}(x)
-m(2) = {{Cl|_MEM (function)|_MEM}}(y)
-m(3) = {{Cl|_MEM (function)|_MEM}}(z)
-
-x = 3: y = 5: z = 8
-{{Cl|PRINT}} x, y, z
-Save x, y, z
-x = 30: y = 50: z = 80
-{{Cl|PRINT}} x, y, z
-
-RestoreIt
-{{Cl|PRINT}} x, y, z
-
-{{Cl|_MEMFREE}} m(1)
-{{Cl|_MEMFREE}} m(2)
-{{Cl|_MEMFREE}} m(3)
-{{Cl|END}}
-
-{{Cl|SUB}} Save (n1, n2, n3)
-Saved(1) = n1
-Saved(2) = n2
-Saved(3) = n3
-{{Cl|END SUB}}
-
-{{Cl|SUB}} RestoreIt
-{{Cl|_MEMPUT}} m(1), m(1).OFFSET, Saved(1)
-{{Cl|_MEMPUT}} m(2), m(2).OFFSET, Saved(2)
-{{Cl|_MEMPUT}} m(3), m(3).OFFSET, Saved(3)
-{{Cl|END SUB}}
-{{CodeEnd}}{{small|Code by SMcNeill}}
-
-
-{{PageSeeAlso}}
-* [[_MEM]] {{text|(variable type)}}
-* [[_MEMNEW]], [[_MEMCOPY]], [[_MEMFREE]]
-* [[_MEMGET]], [[_MEMPUT]], [[_MEMFILL]]
-* [[_MEMIMAGE]], [[_MEMSOUND]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MEM__111.txt b/internal/help/_MEM__111.txt
deleted file mode 100644
index ef32d5c27..000000000
--- a/internal/help/_MEM__111.txt
+++ /dev/null
@@ -1,158 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:31}}
-{{DISPLAYTITLE:_MEM}}
-The [[_MEM]] variable type can be used when working with memory blocks. It has no variable [[Variable Types|type]] suffix.
-
-
-{{PageSyntax}}
-: [[DIM]] m [[AS]] [[_MEM]]
-
-
-{{PageDescription}}
-''Variable TYPE:''
-* Memory DOT values are actually part of the built in memory variable [[Variable Types|type]] in QB64. The following [[TYPE]] is built in:
-{{WhiteStart}}
-TYPE memory_type
- OFFSET AS _OFFSET 'start location of block(changes with byte position)
- SIZE AS _OFFSET 'size of block remaining at offset(changes with position)
- TYPE AS _OFFSET 'type description of variable used(never changes)
- ELEMENTSIZE AS _OFFSET 'byte size of values inside the block(never changes)
- IMAGE AS LONG 'the image handle used when _MEMIMAGE(handle) is used
- SOUND AS LONG 'the sound handle used when _MEMSOUND(handle) is used
-END TYPE
-
-{{text|The above [[TYPE]] is for clarification purposes only. It '''doesn't need''' to be pasted in
a program to use _MEM.|red}}
-
-{{text|'''IMPORTANT NOTE:''' ''As of Build 20170802/57 onward (early v1.2 development), mem.TYPE has
been changed to be an _OFFSET, just as mem.SIZE and mem.ELEMENTSIZE.''|red}}
-{{WhiteEnd}}
-
-===Usage===
-* The _MEM type contains the following '''read-only''' elements where ''name'' is the _MEM variable name:
-:: ''name'''''.OFFSET''' is the current start position in the memory block AS [[_OFFSET]]. Add bytes to change position.
-:: ''name'''''.SIZE''' is the remaining size of the block at current position in bytes AS [[_OFFSET]]
-:: ''name'''''.TYPE''' is the type (represented as bits combined to form a value) AS [[_OFFSET]]:
-
-==.TYPE values (version 1.000 and up)==
-:::* [bit 0] 1* byte types (_BYTE)
-:::* [bit 1] 2* byte types (INTEGER)
-:::* [bit 2] 4* byte types (LONG or SINGLE)
-:::* [bit 3] 8* byte types (DOUBLE or _INTEGER64)
-:::* [bit 4] 16* byte types (reserved for future use)
-:::* [bit 5] 32* byte types (_FLOAT)
-:::* [bit 6] 64* byte types (reserved for future use)
-:::* [bit 7] 128 = integer types (_BYTE, INTEGER, LONG, _INTEGER64) (added to *)
-:::* [bit 8] 256 = floating point types (SINGLE, DOUBLE, _FLOAT) (added to *)
-:::* [bit 9] 512 = STRING types (fixed length or variable length)
-:::* [bit 10] 1024 = _UNSIGNED types (added to *+128)
-:::* [bit 11] 2048 = pixel data usually from _MEMIMAGE (added to 1+128+1024 for 256 color screens, or 2+128+1024 for text screens, or 4+128+1024 for 32-bit color screens)
-:::* [bit 12] 4096 = _MEM TYPE structure (NOT added to 32768)
-:::* [bit 13] 8192 = _OFFSET type (added to 4+128+[1024] or 8+128+[1024] or future_size+128+[1024])
-:::* [bit 14] 16384 = data created/defined by _MEMNEW(size) or _MEMNEW(offset,size)
-:::* [bit 15] 32768 = a custom, user defined type (ie. created with TYPE name ... END TYPE)
-:::* [bit 16] 65536 = an array of data (added to other type values defining the array's data type)
-''Note: If a future integer, float or other type doesn't have a size that is 1,2,4,8,16,32,64,128 or 256 it won't have a size-bit set.''
-
-===Versions prior to 1.000===
-:::* 1 = Integer types such as [[_BYTE]], [[INTEGER]], [[LONG]], [[_INTEGER64]] or [[_OFFSET]]
-:::* 2 = [[_UNSIGNED]] variable types. Value must be added to the variable type value.(2 cannot be used by itself)
-:::* 3 = ALL [[_UNSIGNED]] [[INTEGER]] type values.(add 1 + 2)
-:::* 4 = Floating point types such as [[SINGLE]], [[DOUBLE]] or [[_FLOAT]]
-:::* 8 = [[STRING]]
-:::* 0 = unknown(eg. created with [[_MEMNEW]]) or [[TYPE|user-defined-types]]
-
-* '''Note: [[_OFFSET]] values cannot be cast to other variable [[Variable Types|type]]s reliably. _MEM is a reserved custom variable [[Variable Types|type]].'''
-* '''[[_MEM (function)|_MEM]] cannot reference variable length [[STRING]] variable values. String values must be designated as a fixed-[[LEN|length]] string.'''
-
-
-{{PageExamples}}
-''Example 1:'' Demonstration of .IMAGE to determine an image's dimensions, .TYPE to verify the type and [[_MEMEXISTS]] to check image has not been freed
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(500, 500, 32)
-i = {{Cl|_LOADIMAGE}}("qb64_trans.png", 32)
-{{Cl|_PUTIMAGE}} (0, 0), i
-{{Cl|DIM}} m {{Cl|AS}} {{Cl|_MEM}}
-m = {{Cl|_MEMIMAGE}}(i)
-'try uncommenting the following line and see what happens
-'{{Cl|_MEMFREE}} m
-t = m.{{Cl|TYPE}}
-{{Cl|IF...THEN|IF}} t {{Cl|AND (boolean)|AND}} 2048 {{Cl|THEN}}
- {{Cl|PRINT}} "this is/was an image"
- {{Cl|IF...THEN|IF}} {{Cl|_MEMEXISTS}}(m) {{Cl|THEN}} 'check if memory m is still available
- {{Cl|PRINT}} t {{Cl|AND (boolean)|AND}} 7; "bytes per pixel"
- {{Cl|PRINT}} "image handle "; m.IMAGE
- {{Cl|PRINT}} "image width"; {{Cl|_WIDTH (function)|_WIDTH}}(m.IMAGE)
- {{Cl|PRINT}} "image height"; {{Cl|_HEIGHT}}(m.IMAGE)
- {{Cl|ELSE}} {{Cl|PRINT}} "Memory already freed!"
- {{Cl|END IF}}
-{{Cl|END IF}}
-{{CodeEnd}}
-
-
-''Example 2:'' Converts the current [[_DEST|destination]] [[SCREEN]] 13 image memory altered by [[PSET]] to a [[STRING]] value. SCREEN 13 only.
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-{{Cl|PSET}} (0, 0), {{Cl|ASC}}("H") 'top left corner of screen
-{{Cl|PSET}} (1, 0), {{Cl|ASC}}("E")
-{{Cl|PSET}} (2, 0), {{Cl|ASC}}("L")
-{{Cl|PSET}} (3, 0), {{Cl|ASC}}("L")
-{{Cl|PSET}} (4, 0), {{Cl|ASC}}("O")
-
-{{Cl|DIM}} m {{Cl|AS}} {{Cl|_MEM}}
-m = {{Cl|_MEMIMAGE}}(0) 'copy the screen memory to m
-x1$ = {{Cl|_MEMGET (function)|_MEMGET}}(m, m.OFFSET, {{Cl|STRING}} * 5) 'get at block start position
-{{Cl|LOCATE}} 2, 1:{{Cl|PRINT}} {{Cl|LEN}}(x1$) 'prints 5 bytes as size is STRING * 5
-{{Cl|PRINT}} x1$ 'prints HELLO as ASCII character values
-{{Cl|PRINT}} m.OFFSET; m.SIZE; m.ELEMENTSIZE
-{{Cl|_MEMFREE}} m
-{{CodeEnd}}
-{{OutputStart}}
- 5
-HELLO
- 5448320 6400 1
-{{OutputEnd}}
-: ''Explanation:'' When a numerical [[_BYTE]] value is converted to a [[STRING]], each byte is converted to an [[ASCII]] character. The QB64 IDE will capitalize _MEM dot values.
-{{WhiteStart}} m.SIZE = 320 * 200 = 6400 bytes
- m.ELEMENTSIZE = 1 byte
-{{WhiteEnd}}
-
-''Example 3:'' Using _MEM to convert _OFFSET to _INTEGER64.
-{{CodeStart}}
-DIM x AS INTEGER
-DIM m AS _MEM
-m = _MEM(x)
-PRINT m.OFFSET
-PRINT ConvertOffset(m.OFFSET)
-
-
-FUNCTION ConvertOffset&& (value AS _OFFSET)
-$CHECKING:OFF
-DIM m AS _MEM 'Define a memblock
-m = _MEM(value) 'Point it to use value
-$IF 64BIT THEN
- 'On 64 bit OSes, an OFFSET is 8 bytes in size. We can put it directly into an Integer64
- _MEMGET m, m.OFFSET, ConvertOffset&& 'Get the contents of the memblock and put the values there directly into ConvertOffset&&
-$ELSE
- 'However, on 32 bit OSes, an OFFSET is only 4 bytes. We need to put it into a LONG variable first
- _MEMGET m, m.OFFSET, temp& 'Like this
- ConvertOffset&& = temp& 'And then assign that long value to ConvertOffset&&
-$END IF
-_MEMFREE m 'Free the memblock
-$CHECKING:ON
-END FUNCTION
-
-{{CodeEnd}}
-
-''Explanation:'' The above will print two numbers which should match. These numbers will vary, as they're representations of where X is stored in memory, and that position is going to vary every time the program is run. What it should illustrate, however, is a way to convert _OFFSET to _INTEGER64 values, which can sometimes be useful when trying to run calculations involving mem.SIZE, mem.TYPE, or mem.ELEMENTSIZE.
-
-
-
-{{PageSeeAlso}}
-* [[_MEM (function)]], [[_MEMELEMENT]]
-* [[_MEMNEW]], [[_MEMCOPY]], [[_MEMFREE]]
-* [[_MEMGET]], [[_MEMPUT]], [[_MEMFILL]]
-* [[_MEMIMAGE]], [[_MEMSOUND]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MK$__11$.txt b/internal/help/_MK$__11$.txt
deleted file mode 100644
index 1a33c0495..000000000
--- a/internal/help/_MK$__11$.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:47}}
-{{DISPLAYTITLE:_MK$}}
-The [[_MK$]] function can convert any numerical type into an [[ASCII]] [[STRING]] value that can be converted back using [[_CV]].
-
-
-{{PageSyntax}}
-:{{Parameter|string_value$}} = [[_MK$]]({{Parameter|numericalType}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalType}} is any QB64 numerical type: [[INTEGER]], [[LONG]], [[SINGLE]], [[DOUBLE]], [[_INTEGER64]], [[_BYTE]] or [[_BIT]].
-* Whole integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} must match the {{Parameter|numericalType}} used.
-
-
-{{PageDescription}}
-* Supports converting any QBasic or '''QB64''' numerical value into a string value.
-* Some resulting [[ASCII]] string characters might not be able to be printed to the screen.
-
-
-{{PageSeeAlso}}
-* [[_CV]] {{text|(QB64 conversion function)}}
-* [[MKI$]], [[CVI]], [[INTEGER]]
-* [[MKL$]], [[CVL]], [[LONG]]
-* [[MKS$]], [[CVS]], [[SINGLE]]
-* [[MKD$]], [[CVD]], [[DOUBLE]]
-* [[MKSMBF$]], [[CVSMBF]] {{text|(Microsoft Binary Format)}}
-* [[MKDMBF$]], [[CVDMBF]] {{text|(Microsoft Binary Format)}}
-* [[PDS(7.1) Procedures#CURRENCY|CURRENCY]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSEBUTTON__11111111111.txt b/internal/help/_MOUSEBUTTON__11111111111.txt
deleted file mode 100644
index ff556c7ee..000000000
--- a/internal/help/_MOUSEBUTTON__11111111111.txt
+++ /dev/null
@@ -1,175 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:48}}
-{{DISPLAYTITLE:_MOUSEBUTTON}}
-The [[_MOUSEBUTTON]] function returns the button status of a specified mouse button when read after [[_MOUSEINPUT]].
-
-
-{{PageSyntax}}
-: {{Parameter|buttonStatus%%}} = [[_MOUSEBUTTON]]({{Parameter|buttoNumber}})
-
-
-{{Parameters}}
-* [[INTEGER]] {{Parameter|buttoNumber}} designates the mouse button to read (See [[_DEVICES]] for more than 3).
-** 1 = Left mouse button
-** 2 = Right mouse button
-** 3 = Center or scroll button
-
-
-{{PageDescription}}
-* Returns -1 if the corresponding {{Parameter|buttoNumber}} is pressed or zero when released.
-* Read [[_MOUSEINPUT]] first to return the current button up or down status. (See Example 2)
-* Button clicks and mouse movements will be remembered and should be cleared after an [[INPUT]] statement or other interruption.
-* To clear unread mouse input, use a [[_MOUSEINPUT]] loop that loops until it returns 0.
-* Use [[_DEVICE$]] to find the "[MOUSE]" [[_DEVICES]] number to find the number of buttons available using [[_LASTBUTTON]].
-* '''Note:''' The center mouse button can also be read as [[_BUTTON]](2) on [[_DEVICEINPUT]](2) when a mouse is present.
-
-
-{{PageExamples}}
-''Example 1:'' Finding the number of mouse buttons available in QB64. This could also be used for other controller devices.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} d = 1 {{Cl|TO}} {{Cl|_DEVICES}} 'number of input devices found
- dev$ = {{Cl|_DEVICE$}}(d)
- {{Cl|IF...THEN|IF}} {{Cl|INSTR}}(dev$, "[MOUSE]") {{Cl|THEN}} buttons = {{Cl|_LASTBUTTON}}(d): {{Cl|EXIT}} {{Cl|FOR...NEXT|FOR}}
-{{Cl|NEXT}}
-{{Cl|PRINT}} buttons; "mouse buttons available"
-{{CodeEnd}}
-
-
-''Example 2:'' How to monitor when a button is down or wait until a mouse button is not held down.
-{{CodeStart}}
-{{Cl|PRINT}} "Hold down the left mouse button until you want to quit!"
-DO
- i = {{Cl|_MOUSEINPUT}} ' read #1
- {{Cl|IF...THEN|IF}} {{Cl|_MOUSEBUTTON}}(1) {{Cl|THEN}} {{Cl|PRINT}} "Left button down!": {{Cl|EXIT DO}}
-{{Cl|LOOP}}
-{{Cl|DO...LOOP|DO}} ' need to wait
- i = {{Cl|_MOUSEINPUT}} ' read #2 until the mouse
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|NOT}} {{Cl|_MOUSEBUTTON}}(1) ' button is released
-
-{{Cl|PRINT}} "DONE!"
-{{CodeEnd}}
-
-
-''Example 3:'' Checking for a click or a double-click by the user.
-{{CodeStart}}
-{{Cl|DO...LOOP|DO}} 'main program loop
-
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}} 'check mouse status
- buttondown = {{Cl|_MOUSEBUTTON}}(1)
- {{Cl|LOOP}}
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} buttondown 'check for button release
- i = {{Cl|_MOUSEINPUT}}
- buttondown = {{Cl|_MOUSEBUTTON}}(1)
- Click = 1
- {{Cl|LOOP}}
-
- {{Cl|IF...THEN|IF}} Click = 1 {{Cl|THEN}} 'if button was pressed and released
- t = {{Cl|TIMER}} + .3
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|TIMER}} < t 'check for a second press within .3 seconds
- i = {{Cl|_MOUSEINPUT}}
- {{Cl|IF...THEN|IF}} {{Cl|_MOUSEBUTTON}}(1) {{Cl|THEN}} Click = 2: {{Cl|EXIT DO}}
- {{Cl|LOOP}}
- {{Cl|IF...THEN|IF}} Click = 2 {{Cl|THEN}} {{Cl|PRINT}} "Double click" {{Cl|ELSE}} {{Cl|PRINT}} "Click"
- {{Cl|END IF}}
- Click = 0: buttondown = 0 'reset where needed
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{CodeEnd}}
-: ''Explanation:'' To find the current button status read [[_MOUSEINPUT]] repeatedly. The [[TIMER]] loop looks for a second click.
-
-
-''Example 4:'' Verifying that a user clicked and released a mouse button on a program button.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|LINE}} (250, 250)-(300, 300), 14, BF
-
-{{Cl|DO...LOOP|DO}}
- Mouser mx, my, mb
- {{Cl|IF...THEN|IF}} mb {{Cl|THEN}}
- {{Cl|IF...THEN|IF}} mx >= 250 {{Cl|AND (boolean)|AND}} my >= 250 {{Cl|AND (boolean)|AND}} mx <= 300 {{Cl|AND (boolean)|AND}} my <= 300 {{Cl|THEN}} 'button down
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} mb 'wait for button release
- Mouser mx, my, mb
- {{Cl|LOOP}}
- 'verify mouse still in box area
- {{Cl|IF...THEN|IF}} mx >= 250 {{Cl|AND (boolean)|AND}} my >= 250 {{Cl|AND (boolean)|AND}} mx <= 300 {{Cl|AND (boolean)|AND}} my <= 300 {{Cl|THEN}} {{Cl|PRINT}} "Click verified on yellow box!"
- {{Cl|END IF}}
- {{Cl|END IF}}
-{{Cl|LOOP}}
-
-{{Cl|SUB}} Mouser (x, y, b)
-mi = {{Cl|_MOUSEINPUT}}
-b = {{Cl|_MOUSEBUTTON}}(1)
-x = {{Cl|_MOUSEX}}
-y = {{Cl|_MOUSEY}}
-{{Cl|END SUB}}
-{{CodeEnd}}
-: ''Explanation:'' The mouse SUB has no internal [[_MOUSEINPUT]] loop so that no button presses, releases or moves are missed.
-: If the above read procedure goes to another one, it may be advisable to skip over unread input in a [[_MOUSEINPUT]] only loop.
-{{TextStart}}{{Cb|SUB}} Catchup
-{{Cb|DO...LOOP|DO}} {{Cb|WHILE}} {{Cb|_MOUSEINPUT}}: {{Cb|LOOP }}
-{{Cb|END SUB}}
-{{TextEnd}}
-: The above procedure can be used to catch up after [[INPUT]], [[LINE INPUT]] or [[INPUT$]] delays when mouse input may accumulate.
-
-
-''Example 5:'' Combining mouse button or keyboard selections in a menu or test:
-{{CodeStart}}
-{{Cl|DO...LOOP|DO}} 'main program loop in demo only
- {{Cl|LOCATE}} 10, 10: {{Cl|PRINT}} "A" 'position A, B & C in same position on every question
- {{Cl|LOCATE}} 12, 10: {{Cl|PRINT}} "B"
- {{Cl|LOCATE}} 14, 10: {{Cl|PRINT}} "C" 'demo only
-
- {{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 10 'get user answer loop
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}: {{Cl|LOOP}} 'read mouse
- K$ = {{Cl|UCASE$}}({{Cl|INKEY$}}) 'read keypresses also
- x% = {{Cl|_MOUSEX}}
- y% = {{Cl|_MOUSEY}}
- Lclick = {{Cl|_MOUSEBUTTON}}(1)
-
- {{Cl|LOCATE}} 20, 10: {{Cl|PRINT}} x%, y%, Lclick 'only used to find mouse coordinates
- {{Cl|IF...THEN|IF}} x% = 10 {{Cl|AND (boolean)|AND}} y% = 10 {{Cl|AND (boolean)|AND}} Lclick {{Cl|THEN}} 'position clicked
- DO
- i = {{Cl|_MOUSEINPUT}}
- x% = {{Cl|_MOUSEX}}
- y% = {{Cl|_MOUSEY}}
- {{Cl|LOOP}} {{Cl|WHILE}} {{Cl|_MOUSEBUTTON}}(1)
- {{Cl|IF...THEN|IF}} x% = 10 {{Cl|AND (boolean)|AND}} y% = 10 {{Cl|THEN}} K$ = "A" 'position released
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} x% = 10 {{Cl|AND (boolean)|AND}} y% = 12 {{Cl|AND (boolean)|AND}} Lclick {{Cl|THEN}} 'position clicked
- DO
- i = {{Cl|_MOUSEINPUT}}
- x% = {{Cl|_MOUSEX}}
- y% = {{Cl|_MOUSEY}}
- {{Cl|LOOP}} {{Cl|WHILE}} {{Cl|_MOUSEBUTTON}}(1)
- {{Cl|IF...THEN|IF}} x% = 10 {{Cl|AND (boolean)|AND}} y% = 12 {{Cl|THEN}} K$ = "B" 'position released
- {{Cl|END IF}}
- {{Cl|IF...THEN|IF}} x% = 10 {{Cl|AND (boolean)|AND}} y% = 14 {{Cl|AND (boolean)|AND}} Lclick {{Cl|THEN}} 'position clicked
- DO
- i = {{Cl|_MOUSEINPUT}}
- x% = {{Cl|_MOUSEX}}
- y% = {{Cl|_MOUSEY}}
- {{Cl|LOOP}} {{Cl|WHILE}} {{Cl|_MOUSEBUTTON}}(1)
- {{Cl|IF...THEN|IF}} x% = 10 {{Cl|AND (boolean)|AND}} y% = 14 {{Cl|THEN}} K$ = "C" 'position released
- {{Cl|END IF}}
- {{Cl|LOOP}} {{Cl|UNTIL}} K$ = "A" {{Cl|OR (boolean)|OR}} K$ = "B" {{Cl|OR (boolean)|OR}} K$ = "C" '{{Cl|GOTO}} next question
-
- {{Cl|IF...THEN|IF}} {{Cl|LEN}}(K$) {{Cl|THEN}} 'DEMO ONLY
- {{Cl|LOCATE}} 22, 35: {{Cl|PRINT}} " Answer = "; K$ 'display user answer at location
- {{Cl|_DELAY}} 2 'allow time for user to view answer
- {{Cl|LOCATE}} 22, 35: {{Cl|PRINT}} "SELECT AGAIN"
- K$ = "" 'reset K$
- {{Cl|END IF}}
-{{Cl|LOOP}} 'DEMO only loop use red X box to quit
-{{CodeEnd}} {{small|Code by Ted Weissgerber}}
-: ''Explanation:'' User can cancel letter selection by moving pointer off letter before releasing the left mouse button.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEX]], [[_MOUSEY]], [[_MOUSEWHEEL]]
-* [[_MOUSEINPUT]], [[_MOUSEMOVE]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]]
-* [[_DEVICES]], [[_DEVICE$]], [[_LASTBUTTON]]
-* [[_BUTTON]], [[_BUTTONCHANGE]] {{text|([[DEVICES|devices]])}}
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSEHIDE__111111111.txt b/internal/help/_MOUSEHIDE__111111111.txt
deleted file mode 100644
index 9d6dce0c4..000000000
--- a/internal/help/_MOUSEHIDE__111111111.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:49}}
-{{DISPLAYTITLE:_MOUSEHIDE}}
-The [[_MOUSEHIDE]] statement hides the mouse cursor.
-
-
-{{PageSyntax}}
-: [[_MOUSEHIDE]]
-
-
-{{PageSeeAlso}}
-* [[_MOUSESHOW]]
-* [[_MOUSEINPUT]]
-* [[_MOUSEMOVE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MOUSEINPUT__1111111111.txt b/internal/help/_MOUSEINPUT__1111111111.txt
deleted file mode 100644
index 1ece5a33c..000000000
--- a/internal/help/_MOUSEINPUT__1111111111.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:50}}
-{{DISPLAYTITLE:_MOUSEINPUT}}
-The [[_MOUSEINPUT]] function is used to monitor any new mouse positions, button presses or movements of the scroll wheel. Must be called before other mouse information becomes available.
-
-
-{{PageSyntax}}
-:{{Parameter|infoExists%%}} = [[_MOUSEINPUT]]
-
-
-{{PageDescription}}
-* Returns -1 if new mouse information is available, otherwise it returns 0.
-* Must be called before reading any of the other mouse functions. The function will not miss any mouse input even during an [[INPUT]] entry.
-* Use in a loop to monitor the mouse buttons, scroll wheel and coordinate positions.
-* To clear all previous mouse data, use [[_MOUSEINPUT]] in a loop until it returns 0.
-
-
-{{PageExamples}}
-''Example 1:'' Mouse coordinate, click and scroll events are returned sequentially inside of a _MOUSEINPUT loop.
-{{CodeStart}}
-DO
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}} ' Check the mouse status
- {{Cl|PRINT}} {{Cl|_MOUSEX}}, {{Cl|_MOUSEY}}, {{Cl|_MOUSEBUTTON}}(1), {{Cl|_MOUSEWHEEL}}
- {{Cl|LOOP}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-{{CodeEnd}}
-: ''Explanation:'' The latest mouse function status can be read after the loop. [[_LIMIT]] and [[_DELAY]] loops will slow returns down.
-
-
-''Example 2:'' How to use a _MOUSEINPUT loop to locate [[PSET]] positions on a screen using a right mouse button click.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-
-{{Cl|DO...LOOP|DO}} ' main program loop
-
- ' your program code
-
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}'mouse status changes only
- x = {{Cl|_MOUSEX}}
- y = {{Cl|_MOUSEY}}
- {{Cl|IF...THEN|IF}} x > 0 {{Cl|AND (boolean)|AND}} x < 640 {{Cl|AND (boolean)|AND}} y > 0 {{Cl|AND (boolean)|AND}} y < 480 {{Cl|THEN}}
- {{Cl|IF...THEN|IF}} {{Cl|_MOUSEBUTTON}}(2) {{Cl|THEN}}
- {{Cl|PSET}} (x, y), 15
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} x, y
- {{Cl|END IF}}
- {{Cl|END IF}}
- {{Cl|LOOP}}
-
- ' your program code
-
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{CodeEnd}}
-
-
-''Example 3:'' Clearing any mouse data read before or during an [[INPUT]] entry. Press "I" to enter input:
-{{CodeStart}}
-{{Cl|PRINT}} "Press I to enter input! Press Q to quit"
-{{Cl|DO...LOOP|DO}}
- K$ = {{Cl|UCASE$}}({{Cl|INKEY$}})
- {{Cl|DO...LOOP|DO}}
- {{Cl|IF...THEN|IF}} {{Cl|_MOUSEBUTTON}}(1) = -1 {{Cl|THEN}} {{Cl|PRINT}} "*" 'indicates a mouse click event
- {{Cl|LOOP}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
- {{Cl|IF...THEN|IF}} K$ = "Q" {{Cl|THEN}} {{Cl|END}}
- {{Cl|IF...THEN|IF}} K$ = "I" {{Cl|THEN}} 'press I to enter text
- {{Cl|INPUT}} "Click the mouse and enter something: ", entry$ 'enter some text
- {{Cl|GOSUB}} Clickcheck 'clear mouse data
- {{Cl|END IF}}
-{{Cl|LOOP}}
-
-{{Cl|END}}
-
-Clickcheck:
-count = 0
-{{Cl|DO...LOOP|DO}}
- count = count + 1
-{{Cl|LOOP}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
-{{Cl|PRINT}} count 'returns the number of loops before mouse data is cleared
-{{Cl|RETURN}}
-{{CodeEnd}}
-:''Explanation:'' Click the mouse a few times while entering [[INPUT]] text. When Enter is pressed, the number of loops are displayed.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEX]], [[_MOUSEY]], [[_MOUSEBUTTON]], [[_MOUSEWHEEL]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]], [[_MOUSEMOVE]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MOUSEMOVEMENTX__11111111111111.txt b/internal/help/_MOUSEMOVEMENTX__11111111111111.txt
deleted file mode 100644
index 95a39868d..000000000
--- a/internal/help/_MOUSEMOVEMENTX__11111111111111.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:52}}
-{{DISPLAYTITLE:_MOUSEMOVEMENTX}}
-The [[_MOUSEMOVEMENTX]] function returns the relative horizontal position of the mouse cursor as positive or negative values.
-
-
-{{PageSyntax}}
-: ''horizontalMove'' = [[_MOUSEMOVEMENTX]]
-
-
-* Returns the relative horizontal cursor pixel position compared to the previous cursor position. Negative values are moves to the left.
-* '''Note:''' A [[_MOUSESHOW]] statement will disable [[_MOUSEMOVEMENTX]] or [[_MOUSEMOVEMENTY]] relative mouse movement reads.
-* Can also be used to check for any mouse movements to enable a program or close [[Screen Saver Programs]].
-* Sets the mouse to a relative movement mode which can be read by [[_WHEEL]] instead of [[_AXIS]] as mouse [[_DEVICES|device]] 2.
-
-
-{{PageExamples}}
-''Example 1:'' Since values returned are relative to the last position, the returns can be positive or negative.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-PX = 320: PY = 240 'center position
-{{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 200
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
- PX = PX + {{Cl|_MOUSEMOVEMENTX}}
- PY = PY + {{Cl|_MOUSEMOVEMENTY}}
- {{Cl|LOOP}}
- {{Cl|CLS}}
- {{Cl|CIRCLE}} (PX, PY), 10, 10
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} PX, PY
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-{{CodeEnd}}
-
-
-''Example 2:'' MOD is used to keep horizontal movement of the circle and cursor inside of the SCREEN 13 window(320).
-{{CodeStart}}
-{{Cl|SCREEN}} 13, , 1, 0
-{{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 200
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
- x = x + {{Cl|_MOUSEMOVEMENTX}}
- y = y + {{Cl|_MOUSEMOVEMENTY}}
- {{Cl|LOOP}}
- x = (x + 320) {{Cl|MOD}} 320 'keeps object on screen
- y = (y + 200) {{Cl|MOD}} 200 'remove if off screen moves are desired
- {{Cl|CLS}}
- {{Cl|CIRCLE}} (x, y), 20
- {{Cl|PCOPY}} 1, 0
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" 'press any key to exit
-{{CodeEnd}}
-: '''NOTE:''' When using the function this way, give the user a keypress exit option. Make sure the user has some way to exit that is not dependent on clicking the X button.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEMOVEMENTY]]
-* [[_MOUSEINPUT]], [[_MOUSEX]]
-* [[_DEVICES]], [[_DEVICEINPUT]]
-* [[_WHEEL]], [[_LASTWHEEL]]
-* [[_AXIS]], [[_LASTAXIS]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]]
-* [[Screen Saver Programs]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSEMOVEMENTY__11111111111111.txt b/internal/help/_MOUSEMOVEMENTY__11111111111111.txt
deleted file mode 100644
index 7260d5f42..000000000
--- a/internal/help/_MOUSEMOVEMENTY__11111111111111.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:54}}
-{{DISPLAYTITLE:_MOUSEMOVEMENTY}}
-The [[_MOUSEMOVEMENTY]] function returns the relative vertical position of the mouse cursor as positive or negative values.
-
-
-{{PageSyntax}}
-: {{Parameter|verticalMove}} = [[_MOUSEMOVEMENTY]]
-
-
-* Returns the relative vertical cursor pixel position compared to the previous cursor position. Negative values are up moves.
-* '''Note:''' A [[_MOUSESHOW]] statement will disable [[_MOUSEMOVEMENTX]] or [[_MOUSEMOVEMENTY]] relative mouse movement reads.
-* Can also be used to check for any mouse movements to enable a program or close [[Screen Saver Programs]].
-* Sets the mouse to a relative movement mode which can be read by [[_WHEEL]] instead of [[_AXIS]] as mouse [[_DEVICES|device]] 2.
-
-
-''Example:'' MOD is used to keep vertical movement of circle and cursor inside of the SCREEN 13 window(200).
-{{CodeStart}}
-{{Cl|SCREEN}} 13, , 1, 0
-{{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 200
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
- x = x + {{Cl|_MOUSEMOVEMENTX}}
- y = y + {{Cl|_MOUSEMOVEMENTY}}
- {{Cl|LOOP}}
- x = (x + 320) {{Cl|MOD}} 320 'keeps object on screen
- y = (y + 200) {{Cl|MOD}} 200 'remove if off screen moves are desired
- {{Cl|CLS}}
- {{Cl|CIRCLE}} (x, y), 20
- {{Cl|PCOPY}} 1, 0
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" 'press any key to exit
-{{CodeEnd}}
-: '''NOTE:''' When using the function this way, give the user a keypress exit option. Make sure the user has some way to exit that is not dependent on clicking the X button.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEMOVEMENTX]]
-* [[_MOUSEINPUT]], [[_MOUSEX]]
-* [[_DEVICES]], [[_DEVICEINPUT]]
-* [[_WHEEL]], [[_LASTWHEEL]]
-* [[_AXIS]], [[_LASTAXIS]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]]
-* [[Screen Saver Programs]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSEMOVE__111111111.txt b/internal/help/_MOUSEMOVE__111111111.txt
deleted file mode 100644
index f0287e57c..000000000
--- a/internal/help/_MOUSEMOVE__111111111.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:51}}
-{{DISPLAYTITLE:_MOUSEMOVE}}
-The [[_MOUSEMOVE]] statement moves the mouse pointer to a new position on the screen as determined by the column and row coordinates.
-
-
-{{PageSyntax}}
-:[[_MOUSEMOVE]] {{Parameter|column%}}, {{Parameter|row%}}
-
-
-{{Parameters}}
-* {{Parameter|column%}} is the horizontal pixel coordinate to place the mouse pointer and can be any value from 0 to [[_WIDTH (function)|_WIDTH]](0) - 1.
-* {{Parameter|row%}} is the vertical pixel position to place the mouse pointer and can be any value from 0 to [[_HEIGHT]](0) - 1
-
-
-{{PageDescription}}
-* Maximum coordinate values are based on a program's current [[SCREEN]] mode resolution or the pixel size set by [[_NEWIMAGE]].
-* [[SCREEN]] 0 uses text block coordinates. '''Coordinates off the screen area will create an "Illegal Function Call" [[ERROR Codes|ERROR]]'''
-* Can be used to position the pointer to a default dialog button or move the cursor away from a button so it is not clicked twice.
-* Does not require [[_MOUSEINPUT]] to be used, but all moves will be remembered and can be read by mouse functions.
-
-
-==Availability==
-* '''Versions prior to 1.000''' (Version 1.000 had this function disabled for compatibility reasons.)
-* '''Version 1.1 and up'''
-
-
-{{PageExamples}}
-''Example:'' How to move the mouse cursor using remembered mouse movements. Press any key to quit.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-i = {{Cl|_MOUSEINPUT}} 'start reading mouse events before INPUT to hold in memory
-{{Cl|PRINT}}
-{{Cl|INPUT}} "Move the mouse pointer and make a few clicks, then press Enter!", dummy$
-{{Cl|_MOUSEMOVE}} 1, 1
-DO: {{Cl|_LIMIT}} 30
- count = count + 1
- i = {{Cl|_MOUSEINPUT}}
- x = {{Cl|_MOUSEX}}: y = {{Cl|_MOUSEY}}
- b = {{Cl|_MOUSEBUTTON}}(1)
- {{Cl|PRINT}} count, x, y, b
- {{Cl|_MOUSEMOVE}} x, y
-{{Cl|LOOP}} {{Cl|UNTIL}} i = 0 {{Cl|OR (boolean)|OR}} {{Cl|INKEY$}} > ""
-{{Cl|PRINT}} "Done!"
-{{CodeEnd}}
-: ''Explanation:'' The [[_MOUSEINPUT]] function will hold previous and _MOUSEMOVE events so press any key when you want to quit.
-
-: '''Note: [[INPUT]], [[INPUT$]] and [[LINE INPUT]] will allow continued reading of mouse events while awaiting program user input!'''
-: It is recommended that a [[WHILE]] [[_MOUSEINPUT]]: [[WEND]] loop be used immediately after to clear stored mouse events.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEX]], [[_MOUSEY]]
-* [[_NEWIMAGE]], [[_SCREENIMAGE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSESHOW__111111111.txt b/internal/help/_MOUSESHOW__111111111.txt
deleted file mode 100644
index 6f74a580d..000000000
--- a/internal/help/_MOUSESHOW__111111111.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:55}}
-{{DISPLAYTITLE:_MOUSESHOW}}
-The [[_MOUSESHOW]] statement displays the mouse cursor and can change its shape.
-
-
-{{PageSyntax}}
-: [[_MOUSESHOW]] [{{Parameter|cursorShape$}}]
-
-
-{{PageDescription}}
-* Simply use the statement whenever [[_MOUSEHIDE]] has been used previously.
-* In '''version 1.000 and up''' the following {{Parameter|cursorShape$}} can be displayed:
-:_MOUSESHOW "LINK" will display an upward pointing hand cursor used to denote hypertext
-:_MOUSESHOW "TEXT" will display the I cursor often used in text entry areas
-:_MOUSESHOW "CROSSHAIR" will display a crosshair cursor
-:_MOUSESHOW "VERTICAL" will display vertical arrow cursor for movement
-:_MOUSESHOW "HORIZONTAL" will display horizontal arrow cursor for movement
-:_MOUSESHOW "TOPLEFT_BOTTOMRIGHT" will display bottom diagonal arrow cursor for movement
-:_MOUSESHOW "TOPRIGHT_BOTTOMLEFT" will display bottom diagonal arrow cursor for movement
-:_MOUSESHOW "DEFAULT" can be used after a mouse cursor statement above was previously used.
-* This statement will also disable [[_MOUSEMOVEMENTX]] or [[_MOUSEMOVEMENTY]] relative mouse movement reads.
-* The mouse cursor will not interfere with any print or graphic screen changes in '''QB64'''.
-
-
-===QBasic/QuickBASIC===
-* _MOUSEHIDE statements do not accumulate like they did with [[CALL ABSOLUTE|ABSOLUTE]] or [[INTERRUPT]] in QBasic.
-
-
-{{PageExamples}}
-''Example 1:'' '''QB64 1.000 and up''' allow special cursors to be displayed by using special string parameters:
-{{CodeStart}}
-{{Cl|_MOUSESHOW}} "default": {{Cl|_DELAY}} 0.5
-{{Cl|_MOUSESHOW}} "link": {{Cl|_DELAY}} 0.5 'a hand, typically used in web browsers
-{{Cl|_MOUSESHOW}} "text": {{Cl|_DELAY}} 0.5
-{{Cl|_MOUSESHOW}} "crosshair": {{Cl|_DELAY}} 0.5
-{{Cl|_MOUSESHOW}} "vertical": {{Cl|_DELAY}} 0.5
-{{Cl|_MOUSESHOW}} "horizontal": {{Cl|_DELAY}} 0.5
-{{Cl|_MOUSESHOW}} "topleft_bottomright": {{Cl|_DELAY}} 0.5
-{{Cl|_MOUSESHOW}} "topright_bottomleft": {{Cl|_DELAY}} 0.5
-{{CodeEnd}}
-: '''Note:''' There is no hourglass, stopwatch or spinning colorful wheel in the list. The fact is that these typically only appear in a program when something has gone terribly wrong and the program has crashed or frozen.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEHIDE]]
-* [[_MOUSEINPUT]]
-* [[_MOUSEMOVE]]
-* [[_MOUSEX]], [[_MOUSEY]]
-* [[_MOUSEBUTTON]]
-* [[_MOUSEMOVEMENTX]], [[_MOUSEMOVEMENTY]]
-* [[_DEVICES]], [[_DEVICE$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSEWHEEL__1111111111.txt b/internal/help/_MOUSEWHEEL__1111111111.txt
deleted file mode 100644
index b5e0fd497..000000000
--- a/internal/help/_MOUSEWHEEL__1111111111.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:56}}
-{{DISPLAYTITLE:_MOUSEWHEEL}}
-The [[_MOUSEWHEEL]] function returns a positive or negative [[INTEGER]] value indicating mouse scroll events since the last read of [[_MOUSEINPUT]].
-
-
-{{PageSyntax}}
-: {{Parameter|scrollAmount%}} = [[_MOUSEWHEEL]]
-
-
-{{PageDescription}}
-* Returns -1 when scrolling up and 1 when scrolling down with 0 indicating no movement since last read.
-* After an event has been read, the value resets to 0 automatically so cumulative position values must be added.
-* If no movement on the wheel has occurred since the last [[_MOUSEINPUT]] read, [[_MOUSEWHEEL]] returns 0.
-
-
-{{PageExamples}}
-''Example 1:'' Reading the cumulative mouse wheel "clicks".
-{{CodeStart}}
- DO: {{Cl|_LIMIT}} 100
- DO WHILE {{Cl|_MOUSEINPUT}}
- Scroll = Scroll + {{Cl|_MOUSEWHEEL}}
- LOCATE 10, 20: PRINT Scroll
- LOOP
- LOOP UNTIL INKEY$ = CHR$(13) ' press Enter to quit
-{{CodeEnd}}
-
-
-''Example 2:'' A simple text scrolling routine using the mouse wheel value to read a text array.
-{{CodeStart}}
-{{Cl|DIM}} Array$(100)
-{{Cl|LINE INPUT}} "Enter a file name with 100 or more lines of text: ", file$
-{{Cl|OPEN}} file$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1
-{{Cl|DO...LOOP|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1)
- inputcount = inputcount + 1
- {{Cl|LINE INPUT (file statement)|LINE INPUT}} #1, Array$(inputcount)
- {{Cl|IF...THEN|IF}} inputcount = 100 {{Cl|THEN}} {{Cl|EXIT DO}}
-{{Cl|LOOP}}
-{{Cl|FOR...NEXT|FOR}} n = 1 {{Cl|TO}} 21: {{Cl|PRINT}} Array$(n): {{Cl|NEXT}}
-{{Cl|CLOSE}} #1
-DO
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
- {{Cl|IF...THEN|IF}} row >= 0 {{Cl|THEN}} row = row + {{Cl|_MOUSEWHEEL}} {{Cl|ELSE}} row = 0 'prevent under scrolling
- {{Cl|IF...THEN|IF}} row > inputcount - 20 {{Cl|THEN}} row = inputcount - 20 'prevent over scrolling
- {{Cl|IF...THEN|IF}} prevrow <> row {{Cl|THEN}} 'look for a change in row value
- {{Cl|IF...THEN|IF}} row > 0 {{Cl|AND (boolean)|AND}} row <= inputcount - 20 {{Cl|THEN}}
- {{Cl|CLS}}: {{Cl|LOCATE}} 2, 1
- {{Cl|FOR...NEXT|FOR}} n = row {{Cl|TO}} row + 20
- {{Cl|PRINT}} Array$(n)
- {{Cl|NEXT}}
- {{Cl|END IF}}
- {{Cl|END IF}}
- prevrow = row 'store previous row value
- {{Cl|LOOP}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} > ""
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-Note: You will need a text file that is large enough for this example.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEX]], [[_MOUSEY]], [[_MOUSEBUTTON]]
-* [[_MOUSEINPUT]], [[_MOUSEMOVE]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_MOUSEX__111111.txt b/internal/help/_MOUSEX__111111.txt
deleted file mode 100644
index 3ce22c652..000000000
--- a/internal/help/_MOUSEX__111111.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:57}}
-{{DISPLAYTITLE:_MOUSEX}}
-The [[_MOUSEX]] function returns the current horizontal (column) mouse cursor position when read after [[_MOUSEINPUT]].
-
-
-{{PageSyntax}}
-: {{Parameter|pixelColumn%}} = [[_MOUSEX]]
-
-
-{{PageDescription}}
-* [[SCREEN]] 0 returns the [[INTEGER]] horizontal text column position (from build 20170817/62 onward); older versions return a [[SINGLE]] horizontal text column position. Use [[INTEGER]] variables to avoid floating decimal returns.
-* Graphic screen modes 1, 2 and 7 to 13 and [[_NEWIMAGE]] 32 bit return the [[INTEGER]] pixel columns.
-* To calculate text columns in graphic modes, divide the return by 8 or the [[_FONTWIDTH]] of [[_FONT]] characters.
-* [[_MOUSEINPUT]] must be used to detect any changes in the mouse position and is '''required''' for any coordinate returns.
-
-
-==QBasic/QuickBASIC==
-* In [[SCREEN]] 0, QBasic's [[CALL ABSOLUTE|ABSOLUTE]] returned graphic coordinates. QB64 mouse functions return the text coordinates.
-
-
-{{PageExamples}}
-''Example:'' A simple mouse drawing board using [[_MOUSEX]] and [[_MOUSEY]] coordinate values.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-{{Cl|LINE}} (99, 9)-(601, 401), 7, BF
-{{Cl|LINE}} (101, 11)-(599, 399), 8, BF
-tm$ = " Column = ### Row = ### Button1 = ## Button2 = ## Button3 = ##"
-{{Cl|LOCATE}} 29, 20: {{Cl|PRINT}} "LeftButton = draw - RightButton = Erase";
-{{Cl|DO}}: K$ = {{Cl|INKEY$}}
- {{Cl|DO}} {{Cl|WHILE}} {{Cl|_MOUSEINPUT}}
- X = {{Cl|_MOUSEX}}: Y = {{Cl|_MOUSEY}}
- {{Cl|IF}} X > 100 {{Cl|AND (boolean)|AND}} X < 600 {{Cl|AND (boolean)|AND}} PX > 100 {{Cl|AND (boolean)|AND}} PX < 600 {{Cl|THEN}}
- {{Cl|IF}} Y > 10 {{Cl|AND (boolean)|AND}} Y < 400 {{Cl|AND (boolean)|AND}} PY > 10 {{Cl|AND (boolean)|AND}} PY < 400 {{Cl|THEN}}
- {{Cl|IF}} {{Cl|_MOUSEBUTTON}}(1) {{Cl|THEN}} {{Cl|LINE}} (PX, PY)-(X, Y), 15
- {{Cl|IF}} {{Cl|_MOUSEBUTTON}}(2) {{Cl|THEN}} {{Cl|LINE}} (101, 11)-(599, 399), 8, BF
- {{Cl|END IF}}
- {{Cl|END IF}}
- PX = X: PY = Y
- {{Cl|LOCATE}} 28, 10: {{Cl|PRINT USING}} tm$; X; Y; {{Cl|_MOUSEBUTTON}}(1); {{Cl|_MOUSEBUTTON}}(2); {{Cl|_MOUSEBUTTON}}(3)
- {{Cl|LOOP}}
-{{Cl|LOOP}} {{Cl|UNTIL}} K$ = {{Cl|CHR$}}(27)
-{{Cl|SYSTEM}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MOUSEY]]
-* [[_MOUSEBUTTON]], [[_MOUSEWHEEL]]
-* [[_MOUSEINPUT]], [[_MOUSEMOVE]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]]
-* [[_MOUSEMOVEMENTX]], [[_MOUSEMOVEMENTY]] {{text|(relative pointer moves)}}
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_MOUSEY__111111.txt b/internal/help/_MOUSEY__111111.txt
deleted file mode 100644
index 4fef98368..000000000
--- a/internal/help/_MOUSEY__111111.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:58}}
-{{DISPLAYTITLE:_MOUSEY}}
-The [[_MOUSEY]] function returns the current vertical (row) mouse cursor position when read after [[_MOUSEINPUT]].
-
-
-{{PageSyntax}}
-: {{Parameter|pixelRow%}} = [[_MOUSEY]]
-
-
-{{PageDescription}}
-* [[SCREEN]] 0 returns the [[INTEGER]] vertical text row position (from build 20170817/62 onward); older versions return a [[SINGLE]] vertical text row position. Use [[INTEGER]] variables to avoid floating decimal returns.
-* Graphic screen modes 1, 2 and 7 to 13 and [[_NEWIMAGE]] 32 bit return the [[INTEGER]] pixel columns.
-* To calculate text rows in graphic modes divide the return by 16 or the [[_FONTHEIGHT]] of [[_FONT]] characters.
-* [[_MOUSEINPUT]] must be used to detect any changes in the mouse position and is '''required''' for any coordinate returns.
-
-
-==QBasic/QuickBASIC==
-* In [[SCREEN]] 0, QBasic's [[CALL ABSOLUTE|ABSOLUTE]] returned graphic coordinates. QB64 mouse functions return the text coordinates.
-
-
-{{PageExamples}}
-''Example:'' Highlighting a row of text in Screen 0.
-{{CodeStart}}
-minX = 20: maxX = 60: minY = 10: maxY = 24
-selection = 0 'the screen Y coordinate of the previously highlighted item
-{{Cl|FOR}} i% = 1 {{Cl|TO}} 25: {{Cl|LOCATE}} i%, 40: {{Cl|PRINT}} i%;: {{Cl|NEXT}}
-{{Cl|DO}}: {{Cl|_LIMIT}} 100
- {{Cl|IF}} {{Cl|_MOUSEINPUT}} {{Cl|THEN}}
- 'Un-highlight any selected row
- {{Cl|IF}} selection {{Cl|THEN}} selectRow selection, minX, maxX, 0
- x = {{Cl|_MOUSEX}}
- y = {{Cl|_MOUSEY}}
- {{Cl|IF}} x >= minX {{Cl|AND (boolean)|AND}} x <= maxX {{Cl|AND (boolean)|AND}} y >= minY {{Cl|AND (boolean)|AND}} y <= maxY {{Cl|THEN}}
- selection = y
- {{Cl|ELSE}}
- selection = 0
- {{Cl|END IF}}
- 'Highlight any selected row
- {{Cl|IF}} selection {{Cl|THEN}} SelectRow selection, minX, maxX, 2
- {{Cl|IF}} {{Cl|_MOUSEBUTTON}}(1) {{Cl|THEN}} {{Cl|LOCATE}} 1, 2: {{Cl|PRINT}} x, y, selection
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|SUB}} SelectRow (y, x1, x2, col)
-{{Cl|DEF SEG}} = {{Cl|&H}}B800
-addr& = (x1 - 1 + (y - 1) * {{Cl|_WIDTH (function)|_WIDTH}}) * 2 + 1
-{{Cl|FOR}} x = x1 {{Cl|TO}} x2
- oldCol = {{Cl|PEEK}}(addr&) {{Cl|AND (boolean)|AND}} {{Cl|&B}}10001111 ' Mask foreground color and blink bit
- {{Cl|POKE}} addr&, oldCol {{Cl|OR}} ((col {{Cl|AND (boolean)|AND}} {{Cl|&B}}111) * {{Cl|&B}}10000) ' Apply background color
- addr& = addr& + 2
-{{Cl|NEXT}}
-{{Cl|END SUB}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_MOUSEX]], [[_MOUSEBUTTON]], [[_MOUSEWHEEL]]
-* [[_MOUSEINPUT]], [[_MOUSEMOVE]]
-* [[_MOUSESHOW]], [[_MOUSEHIDE]]
-* [[_MOUSEMOVEMENTX]], [[_MOUSEMOVEMENTY]] {{text|(relative pointer moves)}}
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_NEWIMAGE__11111111.txt b/internal/help/_NEWIMAGE__11111111.txt
deleted file mode 100644
index 9722af919..000000000
--- a/internal/help/_NEWIMAGE__11111111.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:00}}
-{{DISPLAYTITLE:_NEWIMAGE}}
-The [[_NEWIMAGE]] function prepares a window image surface and returns the [[LONG]] [[handle]] value.
-
-
-{{PageSyntax}}
-: {{Parameter|handle&}} = [[_NEWIMAGE]]({{Parameter|width&}}, {{Parameter|height&}}[, {''0''|''1''|''2''|''7''|''8''|''9''|''10''|''11''|''12''|''13''|''256''|''32''}])
-
-
-{{Parameters}}
-* Minimum [[LONG]] screen dimensions are {{Parameter|width&}} >= 1, {{Parameter|height&}} >= 1 measured in pixels as [[INTEGER]] or [[LONG]] values.
-** For mode 0 (text), {{Parameter|width&}} and {{Parameter|height&}} are measured in character blocks, not pixels.
-* Mode is either a QBasic type [[SCREEN|screen]] mode (0 to 2 or 7 to 13), 256 colors or 32 bit (16 million colors) compatible.
-
-
-{{PageDescription}}
-* If the mode is omitted, an image will be created with the same BPP mode, font (which may block freeing of that font), palette, selected colors, transparent color, blend state and print method settings as the current [[_DEST]]ination image/[[SCREEN|screen]] page.
-* Valid [[LONG]] [[handle]] returns are less than -1. Invalid handles equal -1 and a zero or positive value is also invalid.
-* You can create any sized window (limited by the OS) in any emulated [[SCREEN]] mode or 32 bit using this function.
-* Default text block size in emulated [[SCREEN]] modes 1, 2, 7, 8 and 13 is 8 X 8; 9 and 10 is 8 X 14; 11, 12, 256 and 32 bit is 8 X 16. The text block pixel size will allow you to calculate the available text rows and columns in a custom sized screen.
-* To view the image page, just use [[SCREEN]] {{Parameter|handle&}}. Even if another procedure changes the screen mode and clears the screen, the image can be restored later by using the same SCREEN handle mode.
-* Use the [[_COPYIMAGE]] function to preserve a SCREEN handle value when changing to another screen mode to restore it later.
-* '''32 bit screen surface backgrounds (black) have zero [[_ALPHA]] so that they are transparent when placed over other surfaces.'''
-: Use [[CLS]] or [[_DONTBLEND]] to make a new surface background [[_ALPHA]] 255 or opague.
-* '''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].'''
-* '''It is important to free unused or uneeded images with [[_FREEIMAGE]] to prevent CPU [[ERROR_Codes#Other_Errors|memory overflow errors]].'''
-* '''Do not try to free image handles currently being used as the active [[SCREEN]]. Change screen modes first.'''
-
-
-{{PageExamples}}
-''Example 1:'' Shrinking a SCREEN 0 text window's size:
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(28, 25, 0)
-{{CodeEnd}}
-
-
-''Example 2:'' Creating an 800 by 600 window version of SCREEN 12 with 256 colors (text 37 X 100):
-{{CodeStart}}
-handle& = {{Cl|_NEWIMAGE}}(800, 600, 256)
-{{Cl|SCREEN (statement)|SCREEN}} handle&
-{{CodeEnd}}
-
-
-''Example 3:'' Setting up a 32 bit SCREEN with _NEWIMAGE for page flipping in QB64.
-{{CodeStart}}
-SCREEN _NEWIMAGE(640, 480, 32), , 1, 0
-{{CodeEnd}}
-: ''Note:'' [[_DISPLAY]] may be used as a substitute for page flipping or [[PCOPY]].
-
-
-''Example 4:'' Switching between two different SCREEN modes
-{{CodeStart}}
-{{Cl|_TITLE}} "Switching {{Cl|SCREEN}} modes"
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}} (800, 600, 256)
-mode1& = {{Cl|_DEST}} 'get current screen mode handle
-mode2& = {{Cl|_NEWIMAGE}} (300, 200, 13)
-
-{{Cl|_DEST}} mode2& 'prepare small window
-{{Cl|COLOR}} 10: {{Cl|LOCATE}} 10, 13: {{Cl|PRINT}} "mode2& = "; mode2&
-{{Cl|COLOR}} 13: {{Cl|LOCATE}} 16, 16: {{Cl|PRINT}} "First"
-
-{{Cl|_DEST}} mode1& 'work in main window
-{{Cl|LOCATE}} 5
-{{Cl|FOR...NEXT|FOR}} c = 1 {{Cl|TO}} 248
- Color c: {{Cl|PRINT}} c;
-{{Cl|NEXT}}
-{{Cl|COLOR}} 12: {{Cl|LOCATE}} 20, 44: {{Cl|PRINT}} "mode1& = "; mode1&
-{{Cl|COLOR}} 11: {{Cl|LOCATE}} 30, 34: {{Cl|PRINT}} "Press a key to goto Pop-up Window"
-{{Cl|DO...LOOP|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|SCREEN}} mode2& 'switch to small window
-{{Cl|DO...LOOP|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|SCREEN}} mode1& 'back to main window
-{{Cl|COLOR}} 12: {{Cl|LOCATE}} 37, 43: {{Cl|PRINT}} "One more time!"
-{{Cl|DO...LOOP|DO}}: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
-
-{{Cl|SCREEN}} mode2& 'back to small window
-{{Cl|COLOR}} 14: {{Cl|LOCATE}} 16, 16: {{Cl|PRINT}} "LAST "
-{{CodeEnd}}
-:''Explanation:'' The [[_DEST (function)|_DEST]] function can determine the present screen mode destination handle. The second _NEWIMAGE handle is created using a SCREEN 13 palette(256 colors also). Each SCREEN is worked on after changing the destination with [[_DEST]] ''handle&'' statement. Images can be created before viewing them. When a key is pressed the second SCREEN created is displayed and so on.
-
-:'''Legacy SCREEN modes can also return a _DEST value, but the value will create a handle error.''' To restore legacy screens get the[[_COPYIMAGE]] function value before changing screens. Then restore it using SCREEN oldmode&.
-
-
-===More examples===
-* [[SAVEIMAGE]] (Bitmap creation)
-* [[_FILE$]] (restoring previous screen)
-* [[_PIXELSIZE]] (GetImage function example)
-
-
-{{PageSeeAlso}}
-* [[_COPYIMAGE]]
-* [[_LOADIMAGE]]
-* [[_FREEIMAGE]]
-* [[_PUTIMAGE]]
-* [[_SCREENIMAGE]]
-* [[_CLIPBOARDIMAGE (function)]]
-* [[SCREEN]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_NUMLOCK_(function)__1111111_(00000000).txt b/internal/help/_NUMLOCK_(function)__1111111_(00000000).txt
deleted file mode 100644
index 5a9cc15f0..000000000
--- a/internal/help/_NUMLOCK_(function)__1111111_(00000000).txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:02}}
-{{DISPLAYTITLE: _NUMLOCK (function)}}
-The [[_NUMLOCK (function)| _NUMLOCK]] function returns the current state of the Num Lock key as on (-1) or off (0).
-
-
-{{PageSyntax}}
-: {{Parameter|keyStatus%%}} = [[_NUMLOCK (function)| _NUMLOCK]]
-
-
-{{PageAvailability}}
-* '''QB64 1.4 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageSeeAlso}}
-* [[_CAPSLOCK (function)]], [[_SCROLLLOCK (function)]]
-* [[_CAPSLOCK]] (statement), [[_NUMLOCK]] (statement), [[_SCROLLLOCK]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_NUMLOCK__1111111.txt b/internal/help/_NUMLOCK__1111111.txt
deleted file mode 100644
index 5fbe6f505..000000000
--- a/internal/help/_NUMLOCK__1111111.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:03}}
-{{DISPLAYTITLE: _NUMLOCK}}
-The [[_NUMLOCK]] statement sets the state of the Num Lock key.
-
-
-{{PageSyntax}}
-: [[_NUMLOCK]] {ON|OFF|_TOGGLE}
-
-
-{{PageAvailability}}
-* '''QB64 1.4 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageSeeAlso}}
-* [[_CAPSLOCK (function)]], [[_NUMLOCK (function)]], [[_SCROLLLOCK (function)]]
-* [[_CAPSLOCK]] (statement), [[_SCROLLLOCK]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_OFFSET_(function)__111111_(00000000).txt b/internal/help/_OFFSET_(function)__111111_(00000000).txt
deleted file mode 100644
index 7c9d1af17..000000000
--- a/internal/help/_OFFSET_(function)__111111_(00000000).txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:04}}
-{{DISPLAYTITLE:_OFFSET (function)}}
-The [[_OFFSET]] function returns the memory offset of/within a given variable.
-
-
-{{PageSyntax}}
-: {{Parameter|offset%&}} = [[_OFFSET]]({{Parameter|variable}})
-
-
-{{PageDescription}}
-* The {{Parameter|variable}} parameter can be any type of numerical or [[STRING|string]] variable name.
-* API [[DECLARE LIBRARY|LIBRARY]] parameter or [[TYPE|type]] names may include '''lp, ptr''' or '''p''' which designates them as a pointer type.
-* _OFFSET function return values should be stored in [[_OFFSET]] type variables. As no other variable type is 'elastic' like [[_OFFSET]], there can be no guarantee that any other variable type can hold the value of an _OFFSET.
-* Returns the memory offset of variables, user-defined-types & elements, arrays & indices and the base offset of [[STRING]]s.
-* Offset values are currently only useful when used in conjunction with [[_MEM]] or [[DECLARE LIBRARY]] procedures.
-* OFFSET values are used as a part of the [[_MEM]] variable [[type]] in QB64; {{Parameter|variable}}.OFFSET returns or sets the current position in memory.
-* '''Warning:''' QB64 variable length strings can move about in memory at any time. If you get the _OFFSET of a variable length sting on one line and use it on the next it may not be there anymore.''' To be safe, move variable length strings into fixed length strings first.'''
-
-
-{{PageExamples}}
-''Example:'' Using memcpy with the _OFFSET function values as parameters.
-{{CodeStart}}
-{{Cl|DECLARE DYNAMIC LIBRARY|DECLARE CUSTOMTYPE LIBRARY}}
- {{Cl|SUB}} memcpy ({{Cl|BYVAL}} dest {{Cl|AS}} {{Cl|_OFFSET}}, {{Cl|BYVAL}} source {{Cl|AS}} {{Cl|_OFFSET}}, {{Cl|BYVAL}} bytes {{Cl|AS}} {{Cl|LONG}})
-{{Cl|DECLARE LIBRARY|END DECLARE}}
-
-a$ = "1234567890"
-b$ = "ABCDEFGHIJ"
-
-memcpy {{Cl|_OFFSET (function)|_OFFSET}}(a$) + 5, {{Cl|_OFFSET (function)|_OFFSET}}(b$) + 5, 5
-{{Cl|PRINT}} a$
-{{CodeEnd}}
-{{OutputStart}}12345FGHIJ
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_OFFSET]] {{text|(variable type)}}
-* [[DECLARE LIBRARY]]
-* [[DECLARE DYNAMIC LIBRARY]]
-* [[Using _OFFSET]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_OFFSET__111111.txt b/internal/help/_OFFSET__111111.txt
deleted file mode 100644
index 593b42430..000000000
--- a/internal/help/_OFFSET__111111.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:05}}
-{{DISPLAYTITLE:_OFFSET}}
-The [[_OFFSET]] variable type stores the location of a value in memory. The byte size varies as required by the system.
-
-
-{{PageSyntax}}
-: [[DIM]] variable [[AS]] '''_OFFSET'''
-
-
-{{PageDescription}}
-* _OFFSET types can be created as signed or [[_UNSIGNED]] at the programmer's discretion.
-* The type suffix for _OFFSET is '''%&''' which designates the integer value's flexible size.
-* Offset values are only useful when used in conjunction with [[_MEM]] or [[DECLARE LIBRARY]] procedures.
-* OFFSET values are used as a part of the [[_MEM]] variable [[type]] in QB64. Variable.OFFSET returns or sets the current position in memory.
-* API [[DECLARE LIBRARY|LIBRARY]] parameter or [[TYPE|type]] names may include '''lp, ptr''' or '''p''' which designates them as a pointer type.
-* '''Warning: _OFFSET values cannot be cast to other variable type values reliably.'''
-* '''Warning: Variable length [[STRING]] values can move about in memory at any time.''' If you get the _OFFSET of a variable length sting on one code line and use it on the next it may not be there anymore.''' To be safe, move variable length strings into fixed length strings first.'''
-
-
-{{PageExamples}}
-''Example:'' The SHBrowseForFolder function receives information about the folder selected by the user in Windows XP and 7.
-{{CodeStart}}
-{{Cl|DECLARE DYNAMIC LIBRARY|DECLARE CUSTOMTYPE LIBRARY}}
- {{Cl|FUNCTION}} FindWindow& ({{Cl|BYVAL}} ClassName AS {{Cl|_OFFSET}}, WindowName$)
-{{Cl|END}} {{Cl|DECLARE LIBRARY|DECLARE}}
-
-{{Cl|_TITLE}} "Super Window"
-hwnd& = FindWindow(0, "Super Window" + {{Cl|CHR$}}(0))
-
-{{Cl|TYPE}} BROWSEINFO 'typedef struct _browseinfo '[http://msdn.microsoft.com/en-us/library/bb773205%28v=vs.85%29.aspx Microsoft MSDN]
- hwndOwner {{Cl|AS}} {{Cl|LONG}} ' ' HWND
- pidlRoot {{Cl|AS}} {{Cl|_OFFSET}} ' ' PCIDLIST_ABSOLUTE
- pszDisplayName {{Cl|AS}} {{Cl|_OFFSET}} ' ' LPTSTR
- lpszTitle {{Cl|AS}} {{Cl|_OFFSET}} ' ' LPCTSTR
- ulFlags {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}} ' UINT
- lpfn {{Cl|AS}} {{Cl|_OFFSET}} ' ' BFFCALLBACK
- lParam {{Cl|AS}} {{Cl|_OFFSET}} ' ' LPARAM
- iImage {{Cl|AS}} {{Cl|LONG}} ' ' int
-{{Cl|END}} {{Cl|TYPE}} 'BROWSEINFO, *PBROWSEINFO, *LPBROWSEINFO;
-
-{{Cl|DECLARE LIBRARY|DECLARE DYNAMIC LIBRARY}} "shell32"
- {{Cl|FUNCTION}} SHBrowseForFolder%& (x {{Cl|AS}} BROWSEINFO) '[http://msdn.microsoft.com/en-us/library/bb762115%28v=vs.85%29.aspx Microsoft MSDN]
- {{Cl|SUB}} SHGetPathFromIDList ({{Cl|BYVAL}} lpItem {{Cl|AS}} {{Cl|_OFFSET}}, {{Cl|BYVAL}} szDir {{Cl|AS}} {{Cl|_OFFSET}}) '[http://msdn.microsoft.com/en-us/library/bb762194%28VS.85%29.aspx Microsoft MSDN]
-{{Cl|DECLARE LIBRARY|END DECLARE}}
-
-{{Cl|DIM}} b {{Cl|AS}} BROWSEINFO
-b.hwndOwner = hwnd
-{{Cl|DIM}} s {{Cl|AS}} {{Cl|STRING}} * 1024
-b.pszDisplayName = {{Cl|_OFFSET (function)|_OFFSET}}(s$)
-a$ = "Choose a folder!!!" + {{Cl|CHR$}}(0)
-b.lpszTitle = {{Cl|_OFFSET (function)|_OFFSET}}(a$)
-{{Cl|DIM}} o {{Cl|AS}} {{Cl|_OFFSET}}
-o = SHBrowseForFolder(b)
-{{Cl|IF...THEN|IF}} o {{Cl|THEN}}
- {{Cl|PRINT}} {{Cl|LEFT$}}(s$, {{Cl|INSTR}}(s$, {{Cl|CHR$}}(0)) - 1)
- {{Cl|DIM}} s2 {{Cl|AS}} {{Cl|STRING}} * 1024
- SHGetPathFromIDList o, {{Cl|_OFFSET (function)|_OFFSET}}(s2$)
- {{Cl|PRINT}} {{Cl|LEFT$}}(s2$, {{Cl|INSTR}}(s2$, {{Cl|CHR$}}(0)) - 1)
-{{Cl|ELSE}}
- {{Cl|PRINT}} "Cancel?"
-{{Cl|END IF}}
-{{CodeEnd}}
-{{small|Code by Galleon}}
-
-
-{{PageSeeAlso}}
-* [[_WINDOWHANDLE]]
-* [[Using _OFFSET]]
-* [[_OFFSET (function)]], [[_MEM]]
-* [[DECLARE LIBRARY]]
-* [[DECLARE DYNAMIC LIBRARY]]
-* [[Variable Types]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_OPENCLIENT__1111111111.txt b/internal/help/_OPENCLIENT__1111111111.txt
deleted file mode 100644
index 121b6818e..000000000
--- a/internal/help/_OPENCLIENT__1111111111.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:07}}
-The [[_OPENCLIENT]] function connects to a Host on the Internet as a Client and returns the Client status handle.{{PageSyntax}}
-:{{Parameter|clientHandle&}} = [[_OPENCLIENT]]('''"TCP/IP:8080:12:30:1:10"''')
-{{PageDescription}}
-*An [[ERROR Codes|Illegal Function Call]] error will be triggered if the function is called with a string argument of the wrong syntax.
-*Connects to a host somewhere on the internet as a client.
-*Valid {{Parameter|clientHandle&}} values are negative. 0 means that the connection failed. Always check that the handle returned is not 0.
-*[[CLOSE]] client_handle closes the client. A failed handle of value 0 does not need to be closed.
-{{PageExamples}}''Example 1:'' Attempting to connect to a local host(your host) as a client. A zero return indicates failure.{{CodeStart}}
-
-client = {{Cl|_OPENCLIENT}}("TCP/IP:7319:localhost")
-{{Cl|IF...THEN|IF}} client {{Cl|THEN}}
- {{Cl|PRINT}} "[Connected to " + {{Cl|_CONNECTIONADDRESS}}(client) + "]"
-{{Cl|ELSE}} {{Cl|PRINT}} "[Connection Failed!]"
-{{Cl|END IF}}
-{{CodeEnd}}
-:'''NOTE:''' Try a valid TCP/IP port setting to test this routine!
-''Example 2:'' Using a "raw" Download function to download the QB64 bee image and displays it.{{CodeStart}}
-'replace the fake image address below with a real image address you want to download
-{{Cl|IF...THEN|IF}} Download("www.qb64.org/qb64.png", "qb64logo.png", 10) {{Cl|THEN}} ' timelimit = 10 seconds
- {{Cl|SCREEN}} {{Cl|_LOADIMAGE}}("qb64logo.png",32)
-{{Cl|ELSE}}: {{Cl|PRINT}} "Couldn't download image."
-{{Cl|END IF}}
-{{Cl|SLEEP}}
-{{Cl|SYSTEM}}
-' ---------- program end -----------
-
-{{Cl|FUNCTION}} Download (url$, file$, timelimit) ' returns -1 if successful, 0 if not
-url2$ = url$
-x = {{Cl|INSTR}}(url2$, "/")
-{{Cl|IF...THEN|IF}} x {{Cl|THEN}} url2$ = {{Cl|LEFT$}}(url$, x - 1)
-client = {{Cl|_OPENCLIENT}}("TCP/IP:80:" + url2$)
-{{Cl|IF...THEN|IF}} client = 0 {{Cl|THEN}} {{Cl|EXIT FUNCTION}}
-e$ = {{Cl|CHR$}}(13) + {{Cl|CHR$}}(10) ' end of line characters
-url3$ = {{Cl|RIGHT$}}(url$, {{Cl|LEN}}(url$) - x + 1)
-x$ = "GET " + url3$ + " HTTP/1.1" + e$
-x$ = x$ + "Host: " + url2$ + e$ + e$
-{{Cl|PUT (TCP/IP statement)|PUT}} #client, , x$
-t! = {{Cl|TIMER}} ' start time
-{{Cl|DO}}
- {{Cl|_DELAY}} 0.05 ' 50ms delay (20 checks per second)
- {{Cl|GET (TCP/IP statement)|GET}} #client, , a2$
- a$ = a$ + a2$
- i = {{Cl|INSTR}}(a$, "Content-Length:")
- {{Cl|IF...THEN|IF}} i {{Cl|THEN}}
- i2 = {{Cl|INSTR}}(i, a$, e$)
- {{Cl|IF...THEN|IF}} i2 {{Cl|THEN}}
- l = {{Cl|VAL}}({{Cl|MID$}}(a$, i + 15, i2 - i -14))
- i3 = {{Cl|INSTR}}(i2, a$, e$ + e$)
- {{Cl|IF...THEN|IF}} i3 {{Cl|THEN}}
- i3 = i3 + 4 'move i3 to start of data
- {{Cl|IF...THEN|IF}} ({{Cl|LEN}}(a$) - i3 + 1) = l {{Cl|THEN}}
- {{Cl|CLOSE}} client ' CLOSE CLIENT
- d$ = {{Cl|MID$}}(a$, i3, l)
- fh = {{Cl|FREEFILE}}
- {{Cl|OPEN}} file$ {{Cl|FOR}} {{Cl|OUTPUT}} {{Cl|AS}} #fh: {{Cl|CLOSE}} #fh ' erase existing file?
-
- {{Cl|OPEN}} file$ {{Cl|FOR}} {{Cl|BINARY}} {{Cl|AS}} #fh
- {{Cl|PUT}} #fh, , d$
- {{Cl|CLOSE}} #fh
- Download = -1 'indicates download was successfull
- {{Cl|EXIT FUNCTION}}
- {{Cl|END IF}} ' availabledata = l
- {{Cl|END IF}} ' i3
- {{Cl|END IF}} ' i2
- {{Cl|END IF}} ' i
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|TIMER}} > t! + timelimit ' (in seconds)
-{{Cl|CLOSE}} client
-{{Cl|END FUNCTION}}
-{{CodeEnd}}{{PageSeeAlso}}
-*[[_OPENHOST]], [[_OPENCONNECTION]]
-*[[_CONNECTED]], [[_CONNECTIONADDRESS$]]
-*[[Email Demo]], [[Inter-Program Data Sharing Demo]]
-*[[Downloading Files]]
-{{PageNavigation}}
diff --git a/internal/help/_OPENCONNECTION__11111111111111.txt b/internal/help/_OPENCONNECTION__11111111111111.txt
deleted file mode 100644
index 0f7ea5fa3..000000000
--- a/internal/help/_OPENCONNECTION__11111111111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:08}}
-{{DISPLAYTITLE:_OPENCONNECTION}}
-The [[_OPENCONNECTION]] function opens a connection from a client that the host has detected and returns a status handle.
-
-
-{{PageSyntax}}
-:{{Parameter|connectHandle}} = [[_OPENCONNECTION]]({{Parameter|hostHandle}})
-
-
-{{PageDescription}}
-* Valid {{Parameter|connectHandle}} values returned are negative numbers.
-* If the syntax is correct but they fail to begin/connect, a {{Parameter|connectHandle}} of 0 is returned.
-* Always check if the handle returned is 0 (failed) before continuing.
-* [[CLOSE]] #{{Parameter|connectHandle}} closes the connection. Failed connections({{Parameter|connectHandle}} = 0) do not need to be closed.
-* As a '''Host''' you can check for new clients (users). Each will have a unique connection handle.
-* Creates an [[ERROR Codes|Illegal Function Call]] error if called with a string argument of the wrong syntax.
-* Handle values can be used as the open number by [[GET (TCP/IP statement)|GET #]] read statement and [[PUT (TCP/IP statement)|PUT #]] write statement.
-
-
-{{PageSeeAlso}}
-* [[_OPENHOST]], [[_OPENCLIENT]]
-* [[_CONNECTED]], [[_CONNECTIONADDRESS]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_OPENHOST__11111111.txt b/internal/help/_OPENHOST__11111111.txt
deleted file mode 100644
index 2fcaa4a94..000000000
--- a/internal/help/_OPENHOST__11111111.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:09}}
-{{DISPLAYTITLE:_OPENHOST}}
-The [[_OPENHOST]] function opens a Host which listens for new connections and returns a Host status handle.
-
-
-{{PageSyntax}}
-: {{Parameter|hostHandle}} = [[_OPENHOST]]('''"TCP/IP:8080"''')
-
-
-{{PageDescription}}
-* Creates an [[ERROR Codes|Illegal Function Call]] error if called with a string argument of the wrong syntax.
-* The port used in the syntax example is 8080.
-* Valid {{Parameter|hostHandle}} values are negative numbers.
-* If the syntax is correct but they fail to begin/connect a {{Parameter|hostHandle}} of 0 is returned.
-* Always check if the handle returned is 0 (failed) before continuing.
-* [[CLOSE]] {{Parameter|hostHandle}} closes the host. A failed handle value of 0 does not need to be closed.
-
-
-
-{{PageSeeAlso}}
-* [[_OPENCONNECTION]], [[_OPENCLIENT]]
-* [[_CONNECTED]], [[_CONNECTIONADDRESS]]
-* [[Email Demo]], [[Inter-Program Data Sharing Demo]]
-* [[Downloading Files]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_OS$__11$.txt b/internal/help/_OS$__11$.txt
deleted file mode 100644
index c227de5fd..000000000
--- a/internal/help/_OS$__11$.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:12}}
-The [[_OS$]] function returns the operating system and QB64 compiler bit version used to compile a QB64 program.
-
-
-{{PageSyntax}}
-: {{Parameter|compilerVersion$}} = [[_OS$]]
-
-
-{{PageDescription}}
-* Returns a [[STRING]] listing the OS as [WINDOWS], [LINUX] or [MACOSX] and the compiler bit format of [32BIT] or [64BIT]. Example: {{text|[WINDOWS][32BIT]}}
-* Allows a BAS program to be compiled with QB64 in Windows, Linux or MacOSX using different OS or language specifications.
-* Use the return {{Parameter|compilerVersion$}} to specify the current OS code to use when a BAS program is compiled using another version of the QB64 compiler.
-* Windows can use either a 32 (default) or 64 bit compiler. Linux and Mac use 64 bit by default.
-
-
-
-{{PageSeeAlso}}
-* [[ENVIRON$]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_PALETTECOLOR_(function)__111111111111_(00000000).txt b/internal/help/_PALETTECOLOR_(function)__111111111111_(00000000).txt
deleted file mode 100644
index fb1d6c374..000000000
--- a/internal/help/_PALETTECOLOR_(function)__111111111111_(00000000).txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:15}}
-{{DISPLAYTITLE:_PALETTECOLOR (function)}}
-The [[_PALETTECOLOR (function)|_PALETTECOLOR]] function is used to return the 32 bit attribute color setting of an image or screen page handle's palette.
-
-
-{{PageSyntax}}
-: {{Parameter|color32Value&}} = [[_PALETTECOLOR (function)|_PALETTECOLOR]]({{Parameter|attributeNumber%}}, {{Parameter|imgHandle&}})
-
-
-{{PageDescription}}
-* {{Parameter|attributeNumber%}} is the color attribute value from 0 to 255 for 1, 4 or 8 bit images.
-* {{Parameter|imgHandle&}} is the image handle being read for color data. Zero can be used to read the current screen mode palette.
-* Returns the 32 bit color value to be used by the 32 bit RGB functions.
-* For 32 bit images send the _PALETTECOLOR return value to [[_RED32]], [[_GREEN32]] and [[_BLUE32]] functions to get the red, green, and blue intensity values.
-* '''Although 32 bit palette values are returned, the function cannot be used with 32 bit images or screen modes.'''
-
-
-{{PageExamples}}
-''Example:'' How _PALETTECOLOR works on 32 bit RGB compared to a 4 BPP(SCREEN 12) QBasic procedure.
-{{CodeStart}}
-SCREEN 12 'can use any QBasic legacy screen mode
-DIM RGB(0 TO 47) AS INTEGER 'color intensity array
-FOR c& = 0 TO 15
- 'OUT &H3C7, c& 'set color attribute to read
- value32& = {{Cl|_PALETTECOLOR (function)|_PALETTECOLOR}}(c&, 0) 'sets color value to read of an image page handle.
- 'red% = INP(&H3C9)
- red% = {{Cl|_RED32}}(value32&)
- 'green% = INP(&H3C9)
- green% = {{Cl|_GREEN32}}(value32&)
- 'blue% = INP(&H3C9)
- blue% = {{Cl|_BLUE32}}(value32&)
- RGB(c& * 3) = red%: RGB((c& * 3) + 1) = green%: RGB((c& * 3) + 2) = blue%
-NEXT
-FOR i = 0 TO 47 STEP 3
- RGBval$ = LTRIM$(STR$(RGB(i))) + "," + STR$(RGB(i + 1)) + "," + STR$(RGB(i + 2)) + ")"
- PRINT "Color"; i / 3, "_RGB(" + RGBval$;
- PRINT
-NEXT
-END
-{{CodeEnd}}
-
-:''Explanation:'' To save a bitmap or other image you need the RGB color settings or the colors will look all wrong. You can store that information into a larger image array and [[GET (graphics statement)|GET]] the image AFTER the color settings. Just GET the image starting at Array(48).
-
-
-{{PageSeeAlso}}
-* [[_PALETTECOLOR]] (statement)
-* [[_NEWIMAGE]], [[_LOADIMAGE]]
-* [[SAVEIMAGE]] (example code)
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_PALETTECOLOR__111111111111.txt b/internal/help/_PALETTECOLOR__111111111111.txt
deleted file mode 100644
index f493747c6..000000000
--- a/internal/help/_PALETTECOLOR__111111111111.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:13}}
-{{DISPLAYTITLE:_PALETTECOLOR}}
-The [[_PALETTECOLOR]] statement sets the color value of a palette entry of an image using 256 color modes or less (4 or 8 BPP).
-
-
-{{PageSyntax}}
-:[[_PALETTECOLOR]] {{Parameter|attribute%}}, {{Parameter|newColor&}}[, {{Parameter|destHandle&}}]
-
-
-{{PageDescription}}
-* The {{Parameter|attribute%}} is the palette index number of the color to set, ranging from 0 to 15 (4 bit) or 0 to 255 (8 bit) color modes.
-* The [[LONG]] {{Parameter|newColor&}} is the new color value to set using [[_RGB32]] or [[_RGBA32]] values or using [[HEX$ 32 Bit Values]].
-* If {{Parameter|destHandle&}} is omitted, [[_DEST|destination]] is assumed to be the current write page or screen surface.
-* If {{Parameter|attribute%}} is outside of image or [[SCREEN|screen]] mode attribute range (0 to 15 or 0 to 255), an [[ERROR Codes|illegal function call]] error will occur.
-* If {{Parameter|destHandle&}} does not use a palette, an [[ERROR Codes|illegal function call]] error occurs. '''Will not work in 24/32 bit color palette modes.'''
-* If {{Parameter|destHandle&}} is an invalid handle value, an [[ERROR Codes|invalid handle]] error occurs.
-
-
-'''Basic's 16 Default Color Attributes (non-[[DAC]])'''
-{{OutputStart}}{{text|  Attribute    Description     Red   Green   Blue 32 HEX HTML Name |Gold}}
- Â 0 Black 0 0 0 000000 Black
-{{text| Â 1 Dark Blue 0 0 42 00008B DarkBlue|#00208B}}
-{{text| Â 2 Dark Green 0 42 0 006400 DarkGreen|#006400}}
-{{text| Â 3 Dark Cyan 0 42 42 008B8B DarkCyan|#008B8B}}
-{{text| Â 4 Dark Red 42 0 0 8B0000 DarkRed|#8B0000}}
-{{text| Â 5 Dark Magenta 42 0 42 8B008B DarkMagenta|#8B008B}}
-{{text| Â 6 Dark Yellow 42 21 0 DAA520 GoldenRod|#DAA520}}
-{{text| Â 7 Light Grey 42 42 42 D3D3D3 LightGrey|#D3D3D3}}
-{{text| 8 Dark Grey 21 21 21 696969 DimGray|#696969}}
-{{text| Â 9 Blue 21 21 63 0000FF Blue|#1515FF}}
-{{text| 10 Green 21 63 21 15FF15 Lime|#15FF15}}
-{{text| 11 Cyan 21 63 63 15FFFF Cyan|#15FFFF}}
-{{text| 12 Red 63 21 21 FF1515 Red|#FF1515}}
-{{text| 13 Magenta 63 21 63 FF15FF Magenta|#FF15FF}}
-{{text| 14 Yellow 63 63 21 FFFF00 Yellow|#FFFF00}}
-{{text| 15 White 63 63 63 FFFFFF White|#FFFFFF}}
-{{OutputEnd}}
-[http://www.w3schools.com/html/html_colornames.asp HTML Color Table Values and Names] or [http://www.tayloredmktg.com/rgb/#OR Other RGB colors]
-::: ''Note:'' '''QB64''' 32 bit color intensity values from 0 to 255 can be found by multiplying above values by 4.
-
-''Summary:'' The red, green, and blue intensity values can be changed using [[OUT]] or [[PALETTE]] statements. Some '''QBasic''' RGB color attribute values can be changed in [[DAC]] [[SCREEN (statement)|SCREEN]] modes and the [[DAC]] RGB intensity settings may be different.
-
-
-{{PageExamples}}
-''Example:'' Creating custom background colors in SCREEN 0 that follow the text. [[CLS]] makes entire background one color.
-{{CodeStart}}
-{{Cl|_PALETTECOLOR}} 1, {{Cl|_RGB32}}(255, 255, 255) ' white.
-{{Cl|_PALETTECOLOR}} 2, {{Cl|_RGB32}}(255, 170, 170) ' lighter red.
-{{Cl|_PALETTECOLOR}} 3, {{Cl|_RGB32}}(255, 85, 85) ' light red.
-{{Cl|_PALETTECOLOR}} 4, {{Cl|_RGB32}}(255, 0, 0) ' red.
-{{Cl|_PALETTECOLOR}} 5, {{Cl|_RGB32}}(170, 0, 0) ' dark red.
-{{Cl|_PALETTECOLOR}} 6, {{Cl|_RGB32}}(85, 0, 0) ' darker red.
-
-{{Cl|COLOR}} 0, 1: {{Cl|PRINT}} "black on white."
-{{Cl|COLOR}} 0, 2: {{Cl|PRINT}} "black on lighter red."
-{{Cl|COLOR}} 0, 3: {{Cl|PRINT}} "black on light red."
-{{Cl|COLOR}} 0, 4: {{Cl|PRINT}} "black on red."
-{{Cl|COLOR}} 0, 5: {{Cl|PRINT}} "black on dark red."
-{{Cl|COLOR}} 0, 6: {{Cl|PRINT}} "black on darker red.
-
-{{Cl|COLOR}} 1, 6: {{Cl|PRINT}} "white on darker red"
-{{Cl|COLOR}} 2, 6: {{Cl|PRINT}} "ligher red on darker red"
-{{CodeEnd}}
-
-: ''Note:'' [[_PALETTECOLOR]] expects [[LONG]] [[_RGB32]] or [[_RGBA32]] 32 bit color values, not [[_RGB]] or [[_RGBA]] palette attribute values.
-
-
-{{PageSeeAlso}}
-* [[COLOR]], [[_RGB32]], [[_RGBA32]]
-* [[_PALETTECOLOR (function)]]
-* [[PALETTE]], [[OUT]], [[INP]]
-* [[Images]]
-* [[HEX$ 32 Bit Values]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_PIXELSIZE__111111111.txt b/internal/help/_PIXELSIZE__111111111.txt
deleted file mode 100644
index a6cd8b55b..000000000
--- a/internal/help/_PIXELSIZE__111111111.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:17}}
-{{DISPLAYTITLE:_PIXELSIZE}}
-The [[_PIXELSIZE]] function returns the color depth (Bits Per Pixel) of an image as 0 for text, 1 for 1 to 8 BPP or 4 for 32 bit.
-
-
-{{PageSyntax}}
-: {{Parameter|pixelSize%}} = [[_PIXELSIZE]][({{Parameter|imageHandle&}})]
-
-
-{{PageDescription}}
-* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current write page.
-* Returns:
-** 0 if the image or screen page specified by {{Parameter|imageHandle&}} is in text mode.
-** 1 if the image specified by {{Parameter|imageHandle&}} is in 1 (B & W), 4 (16 colors) or 8 (256 colors) BPP mode.
-** 4 if the image specified is a 24/32-bit compatible mode. Pixels use three bytes, one per red, green and blue color intensity.
-* The [[SCREEN]] or [[_NEWIMAGE]] or [[_LOADIMAGE]] color mode (256 or 32) can influence the pixel sizes that can be returned.
-* If {{Parameter|imageHandle&}} is an invalid handle, then an [[ERROR Codes|invalid handle]] error occurs.
-
-
-{{PageExamples}}
-''Snippet:'' Saving Images for later program use. Handle values could be saved to an array.
-{{TextStart}}
-
-handle1& = _Getimage(sx1, sy1, sx2, sy2, sourcehandle&) ' function call
-
-{{Cb|FUNCTION}} GetImage& (sx1, sy1, sx2, sy2, sourcehandle&)
-bytespp = {{Cb|_PIXELSIZE}}(sourcehandle&)
-{{Cb|IF...THEN|IF}} bytespp = 4 {{Cb|THEN}} Pal = 32 {{Cb|ELSE}} {{Cb|IF...THEN|IF}} bytespp = 1 {{Cb|THEN}} Pal = 256 {{Cb|ELSE}} {{Cb|EXIT FUNCTION}}
-h& = {{Cb|_NEWIMAGE}}({{Cb|ABS}}(sx2 - sx1) + 1, {{Cb|ABS}}(sy2 - sy1) + 1, Pal)
-{{Cb|_PUTIMAGE}} (0, 0), sourcehandle&, h&, (sx1, sy1)-(sx2, sy2) 'image is not displayed
-GetImage& = h&
-{{Cb|END FUNCTION}}
-{{TextEnd}}
-{{small|Adapted from code by Galleon}}
-
-
-===More examples===
-* [[SAVEIMAGE]] {{text|(SUB to convert image to bitmap)}}
-* [[SaveIcon32]] {{text|(convert any image to icon)}}
-* [[ThirtyTwoBit SUB]] {{text|(convert partial image to bitmap)}}
-* [[Bitmaps]]
-
-
-{{PageSeeAlso}}
-* [[_LOADIMAGE]]
-* [[_NEWIMAGE]]
-* [[_PUTIMAGE]]
-* [[_COPYPALETTE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_PI__11.txt b/internal/help/_PI__11.txt
deleted file mode 100644
index 6d3928bb1..000000000
--- a/internal/help/_PI__11.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:16}}
-{{DISPLAYTITLE: _PI}}
-The [[_PI]] function returns '''ã''' as a [[_FLOAT]] value with an optional multiplier parameter.
-
-
-{{PageSyntax}}
-: {{Parameter|circumference}} = [[_PI]][({{Parameter|multiplier}})]
-
-
-{{Parameters}}
-* Optional {{Parameter|multiplier}} (''2 * radius'' in above syntax) allows multiplication of the π value.
-
-
-{{PageDescription}}
-* Function can be used in to supply π or multiples in a program.
-* Accuracy is determined by the return variable type [[AS]] [[SINGLE]], [[DOUBLE]] or [[_FLOAT]].
-* The ã value can also be derived using 4 * [[ATN]](1) for a [[SINGLE]] value.
-
-
-{{PageExamples}}
-''Example:'' Calculating the area of a circle using a [[SINGLE]] variable in this case.
-{{CodeStart}}radius = 5
-circlearea = {{Cl|_PI}}(radius ^ 2)
-PRINT circlearea
-{{CodeEnd}}
-{{OutputStart}} 78.53982
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_ATAN2]], [[TAN]]
-* [[ATN]] {{text|(arctangent)}}
-* [[SIN]], [[COS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_PRESERVE__11111111.txt b/internal/help/_PRESERVE__11111111.txt
deleted file mode 100644
index 8bdede437..000000000
--- a/internal/help/_PRESERVE__11111111.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:18}}
-{{DISPLAYTITLE:_PRESERVE}}
-The [[_PRESERVE]] [[REDIM]] action preserves the current contents of [[$DYNAMIC|dynamic]] [[arrays]], when resizing or changing indices.
-
-
-{{PageSyntax}}
-: [[REDIM]] [[_PRESERVE]] array({{Parameter|newLowerIndex&}} [TO {{Parameter|newUpperIndex&}}]) [AS variabletype]
-
-
-{{PageDescription}}
-* [[REDIM]] or the [[$DYNAMIC]] metacommand must be used when the array is first created to be able to resize and preserve.
-* If [[_PRESERVE]] is not used, the current contents of the array are cleared by [[REDIM]].
-** All element values of an array are preserved if the array size is increased.
-** The remaining elements of the array are preserved if the array size is decreased.
-** If the new index range is different from the original, all values will be moved to the new corresponding indices.
-* '''REDIM [[_PRESERVE]] cannot change the number of array dimensions, but can change the number of elements.'''
-* '''Always use the same array [[TYPE]] suffix ([[AS]] type) or a new array type with the same name may be created.'''
-
-
-{{PageErrors}}
-* [[SUB]] or [[FUNCTION]] arrays created using [[REDIM]] require that they be recreated to be used after arrays are [[ERASE]]d.
-* '''Warning:''' Do not use negative upper array index values as an "Out of Memory" [[ERROR Codes|error]] (or global Operating System errors) will occur.'''
-* Use [[_PRESERVE]] before [[SHARED]] or an "invalid variable name" error will occur.
-
-
-{{PageExamples}}
-''Example 1:'' Changing the upper and lower array bounds
-
-{{CodeStart}}
-{{Cl|REDIM}} a(5 {{Cl|TO}} 10) ' create array as dynamic using REDIM
-a(5) = 123
-{{Cl|REDIM}} {{Cl|_PRESERVE}} a(20 {{Cl|TO}} 40)
-{{Cl|PRINT}} a(20)
-{{CodeEnd}}
-:''Explanation:'' a(20) is now the 123 value a(5) was. The upper or lower bounds of arrays can be changed, but the type cannot. New array indices like a(40) are null(0) or empty strings. If the array element count is not reduced, all of the data will be preserved.
-
-
-''Example 2:'' Sizing an array while storing file data.
-
-{{CodeStart}}
-{{Cl|REDIM}} Array$(1) 'create a dynamic string array
-filename$ = "Readme.txt" 'QB64 information text file
-{{Cl|OPEN}} filename$ {{Cl|FOR (file statement)|FOR}} {{Cl|INPUT (file mode)|INPUT}} {{Cl|AS}} #1
-{{Cl|DO}} {{Cl|UNTIL}} {{Cl|EOF}}(1)
- count = count + 1
- {{Cl|IF}} count > {{Cl|UBOUND}}(Array$) {{Cl|THEN}}
- {{Cl|REDIM}} {{Cl|_PRESERVE}} Array$(count * 3 / 2)'increase array's size by 50% without losing data
- {{cl|END IF}}
-
- {{Cl|LINE INPUT (file statement)|LINE INPUT}} #1, textline$
- Array$(count) = textline$
-{{Cl|LOOP}}
-{{Cl|CLOSE}} #1
-{{Cl|FOR...NEXT|FOR}} c = 1 {{Cl|TO}} count
-{{Cl|PRINT}} Array$(c)
-{{Cl|IF...THEN|IF}} c {{Cl|MOD}} 20 = 0 {{Cl|THEN}} k$ = {{Cl|INPUT$}}(1)
-{{Cl|NEXT}}
-{{Cl|END}}
-{{CodeEnd}}
-
-
-
-{{PageSeeAlso}}
-* [[REDIM]]
-* [[$DYNAMIC]]
-* [[Arrays]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_PRINTIMAGE__1111111111.txt b/internal/help/_PRINTIMAGE__1111111111.txt
deleted file mode 100644
index 4729383fa..000000000
--- a/internal/help/_PRINTIMAGE__1111111111.txt
+++ /dev/null
@@ -1,174 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:19}}
-{{DISPLAYTITLE:_PRINTIMAGE}}
-The [[_PRINTIMAGE]] statement prints a colored image on the printer, stretching it to full paper size first.
-
-
-{{PageSyntax}}
-: [[_PRINTIMAGE]] {{Parameter|imageHandle&}}
-
-
-
-* {{Parameter|imageHandle&}} is created by the [[_LOADIMAGE]], [[_NEWIMAGE]] or [[_COPYIMAGE]] functions.
-* Use a white background to save ink. {{InlineCode}}[[CLS]] , _RGB(255, 255, 255){{InlineCodeEnd}} can be used to set the white background in any [[SCREEN]] mode.
-* The image may be stretched disproportionately using normal screen sizes. To compensate, use a [[_NEWIMAGE]] screen that is proportional to the paper size. ''e.g.'' A 640 X 900 SCREEN page is roughly the same as 3 times a 210mm X 297mm paper size.
-* [[_NEWIMAGE]] or graphic screen pages can use [[_PRINTSTRING]] to print different sized text [[_FONT]]s.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]
-
-
-{{PageExamples}}
-''Example 1:'' Shows how to transfer custom font text on screen pages to the printer in Windows. Change the font path for other OS's.
-{{CodeStart}}PageScale = 10
-PageHeight = 297 * PageScale 'A4 paper size is 210 X 297 mm
-PageWidth = 210 * PageScale
-Page& = {{Cl|_NEWIMAGE}}(PageWidth, PageHeight, 32)
-{{Cl|_DEST}} Page&: {{Cl|CLS}} , {{Cl|_RGB}}(255, 255, 255): {{Cl|_DEST}} 0 'make background white to save ink!
-CursorPosY = 0
-
-'example text to print
-PointSize = 12
-text$ = "The rain in Spain falls mainly on the plain."
-{{Cl|GOSUB}} PrintText
-
-PointSize = 50
-text$ = "BUT!"
-{{Cl|GOSUB}} PrintText
-
-PointSize = 12
-text$ = "In Hartford, Hereford, and Hampshire, hurricanes hardly happen."
-{{Cl|GOSUB}} PrintText
-
-{{Cl|INPUT}} "Preview (Y/N)?", i$ 'print preview of screen (optional)
-{{Cl|IF...THEN|IF}} {{Cl|UCASE$}}(i$) = "Y" {{Cl|THEN}}
- Prev& = {{Cl|_NEWIMAGE}}(600, 900, 32) 'print preview smaller image
- _PUTIMAGE Page&, Prev&
- {{Cl|SCREEN (statement)|SCREEN}} Prev&
- DO: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
- {{Cl|SCREEN (statement)|SCREEN}} 0
-{{Cl|END IF}}
-
-{{Cl|INPUT}} "Print on printer (Y/N)?", i$ 'print screen page on printer
-{{Cl|IF...THEN|IF}} {{Cl|UCASE$}}(i$) = "Y" {{Cl|THEN}}
- {{Cl|_PRINTIMAGE}} Page&
-{{Cl|END IF}}
-
-{{Cl|END}}
-
-PrintText:
-FontHeight = {{Cl|INT}}(PointSize * 0.3527 * PageScale)
-FontHandle = {{Cl|_LOADFONT}}("c:\windows\fonts\times.ttf", FontHeight)
-{{Cl|_DEST}} Page&
-{{Cl|_FONT}} FontHandle
-{{Cl|COLOR}} {{Cl|_RGB}}(255, 0, 0), {{Cl|_RGBA}}(0, 0, 0, 0) 'RED text on clear black background
-{{Cl|_PRINTSTRING}} (0, CursorPosY), text$
-{{Cl|_FONT}} 16 'change to the QB64 default font to free it
-{{Cl|_FREEFONT}} FontHandle
-{{Cl|_DEST}} 0
-CursorPosY = CursorPosY + FontHeight 'adjust print position down
-{{Cl|RETURN}}
-{{CodeEnd}}
-{{small|Code by Galleon}}
-:''Explanation:'' CLS with the color white makes sure that the background is not printed a color. The PrintText [[GOSUB]] sets the [[COLOR]] of the text to red with a transparent background using [[_RGBA]] to set the [[_ALPHA]] transparency to zero or clear black.
-
-
-''Example 2:'' Printing an old SCREEN 12 [[ASCII]] table using a deeper sized page to prevent stretching by [[_PRINTIMAGE]].
-{{CodeStart}}
-{{Cl|_TITLE}} "Print Preview ASCII Table"
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 900, 256) 'size is proportional to 210mm X 297mm(8-1/2 X 11) paper
-
-{{Cl|OUT}} {{Cl|&H}}3C8, 0: {{Cl|OUT}} {{Cl|&H}}3C9, 63: {{Cl|OUT}} {{Cl|&H}}3C9, 63: {{Cl|OUT}} {{Cl|&H}}3C9, 63 'white background saves ink!
-
-Align 8, 2, "ASCII and Extended Character Code Table using {{Cl|CHR$}}(n%)"
-{{Cl|PRINT}} {{Cl|STRING$}}(80, 223)
-{{Cl|COLOR}} 40
-{{Cl|PRINT}} " ";
-{{Cl|FOR...NEXT|FOR}} i% = 0 {{Cl|TO}} 13
- {{Cl|PRINT}} i%;: SetCHR {{Cl|CSRLIN}}, {{Cl|POS}}(0), 40, i%
- {{Cl|LOCATE}} {{Cl|CSRLIN}}, {{Cl|POS}}(0) + 1
-{{Cl|NEXT}} i%
-{{Cl|FOR...NEXT|FOR}} i% = 14 {{Cl|TO}} 16
- {{Cl|PRINT}} i%; {{Cl|CHR$}}(i%);
-{{Cl|NEXT}}
-{{Cl|LOCATE}} {{Cl|CSRLIN}} + 1, 2
-{{Cl|FOR...NEXT|FOR}} i = 17 {{Cl|TO}} 27
- {{Cl|PRINT}} i; {{Cl|CHR$}}(i);
-{{Cl|NEXT}}
-{{Cl|FOR...NEXT|FOR}} i% = 28 {{Cl|TO}} 31
- {{Cl|PRINT}} i%;: SetCHR {{Cl|CSRLIN}}, {{Cl|POS}}(0), 40, i%
- {{Cl|LOCATE}} {{Cl|CSRLIN}}, {{Cl|POS}}(0) + 1
-{{Cl|NEXT}} i%
-{{Cl|LOCATE}} {{Cl|CSRLIN}} + 1, 2
-{{Cl|COLOR}} 2: {{Cl|PRINT}} 32; {{Cl|CHR$}}(32);
-{{Cl|FOR...NEXT|FOR}} i% = 33 {{Cl|TO}} 255
- {{Cl|SELECT CASE}} i%
- {{Cl|CASE}} 45, 58, 71, 84: {{Cl|LOCATE}} {{Cl|CSRLIN}} + 1, 1
- {{Cl|CASE}} {{Cl|IS}} > 96: {{Cl|IF...THEN|IF}} (i% - 97) {{Cl|MOD}} 11 = 0 {{Cl|THEN}} {{Cl|LOCATE}} {{Cl|CSRLIN}} + 1, 1
- {{Cl|END SELECT}}
- {{Cl|SELECT CASE}} i%
- {{Cl|CASE}} 48 {{Cl|TO}} 57: {{Cl|COLOR}} 9 'denotes number keys 48 to 57
- {{Cl|CASE}} 65 {{Cl|TO}} 90: {{Cl|COLOR}} 5 ' A to Z keys 65 to 90
- {{Cl|CASE}} 97 {{Cl|TO}} 122: {{Cl|COLOR}} 36 'a to z keys 97 to 122
- {{Cl|CASE}} 127 {{Cl|TO}} 175: {{Cl|COLOR}} 42
- {{Cl|CASE}} 176 {{Cl|TO}} 223: {{Cl|COLOR}} 6 'drawing characters 176 to 223
- {{Cl|CASE}} {{Cl|IS}} > 223: {{Cl|COLOR}} 42
- {{Cl|CASE ELSE}}: {{Cl|COLOR}} 2
- {{Cl|END SELECT}}
- {{Cl|IF...THEN|IF}} i% = 98 {{Cl|OR (boolean)|OR}} i% = 99 {{Cl|OR (boolean)|OR}} i% = 100 {{Cl|THEN}} {{Cl|PRINT}} {{Cl|SPACE$}}(1);
- {{Cl|PRINT}} " "; i%; {{Cl|CHR$}}(i%);
-{{Cl|NEXT}} i%
-{{Cl|COLOR}} 3: {{Cl|PRINT}} "= NBSP(Non-Breaking Space)"
-{{Cl|COLOR}} 8: {{Cl|PRINT}} {{Cl|STRING$}}(80, {{Cl|CHR$}}(220))
-Border 8
-{{Cl|COLOR}} 4: {{Cl|LOCATE}} 27, 4: {{Cl|PRINT}} "7) BELL, 8) Backspace, 9) Tab, 10) LineFeed(printer), 12) FormFeed(printer)"
-{{Cl|LOCATE}} 28, 4: {{Cl|PRINT}} " 13) Return, 26) End Of File, 27) Escape 30) Line up, 31) Line down "
-
-Align 13, 29, "Press Ctrl + P to PRINT!"
-
-DO: {{Cl|SLEEP}}: K$ = {{Cl|INKEY$}}: {{Cl|LOOP}} {{Cl|UNTIL}} K$ <> ""
-Align 13, 29, {{Cl|SPACE$}}(50)
-{{Cl|IF...THEN|IF}} K$ = {{Cl|CHR$}}(16) {{Cl|THEN}}
- {{Cl|_PRINTIMAGE}} 0 '<<<<<<<<<<<< to PRINTER
- Align 11, 29, "Use the ASCII Table for a reference of the codes!"
- {{Cl|SOUND}} 700, 4
-{{Cl|END IF}}
-K$ = {{Cl|INPUT$}}(1)
-{{Cl|SYSTEM}}
-
-{{Cl|SUB}} Align (Tclr, Trow, txt$)
-Tcol = 41 - ({{Cl|LEN}}(txt$) \ 2)
-{{Cl|COLOR}} Tclr: {{Cl|LOCATE}} Trow, Tcol: {{Cl|PRINT}} txt$;
-{{Cl|END SUB}}
-
-{{Cl|SUB}} Border (clr%)
-{{Cl|COLOR}} clr%
-{{Cl|FOR...NEXT|FOR}} row = 1 {{Cl|TO}} 30
- {{Cl|LOCATE}} row, 1: {{Cl|PRINT}} {{Cl|CHR$}}(179);
- {{Cl|LOCATE}} row, 80: {{Cl|PRINT}} {{Cl|CHR$}}(179);
-{{Cl|NEXT}} row
-{{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} {{Cl|STRING$}}(80, 196);
-{{Cl|LOCATE}} 30, 1: {{Cl|PRINT}} {{Cl|STRING$}}(80, 196);
-{{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} {{Cl|CHR$}}(218);
-{{Cl|LOCATE}} 1, 80: {{Cl|PRINT}} {{Cl|CHR$}}(191);
-{{Cl|LOCATE}} 30, 1: {{Cl|PRINT}} {{Cl|CHR$}}(192);
-{{Cl|LOCATE}} 30, 80: {{Cl|PRINT}} {{Cl|CHR$}}(217);
-{{Cl|END SUB}}
-
-{{Cl|SUB}} SetCHR (Trow, Tcol, FG, ASCode)
-Srow = 16 * (Trow - 1): Scol = 8 * (Tcol - 1) 'convert text to graphic coordinates
-{{Cl|COLOR}} FG: {{Cl|_PRINTSTRING}} (Scol, Srow), {{Cl|CHR$}}(ASCode)
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-:''Explanation:'' The [[ASCII]] character table was originally made in [[SCREEN]] 12 (640 X 480) and was adapted to 256 colors.
-
-
-{{PageSeeAlso}}
-* [[_LOADIMAGE]], [[_NEWIMAGE]]
-* [[_COPYIMAGE]]
-* [[LPRINT]]
-* [[Windows Printer Settings]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_PRINTMODE_(function)__111111111_(00000000).txt b/internal/help/_PRINTMODE_(function)__111111111_(00000000).txt
deleted file mode 100644
index 78d81be22..000000000
--- a/internal/help/_PRINTMODE_(function)__111111111_(00000000).txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:22}}
-{{DISPLAYTITLE:_PRINTMODE (function)}}
-The [[_PRINTMODE (function)|_PRINTMODE]] function returns the current [[_PRINTMODE]] status as a numerical value from 1 to 3 in graphic screen modes.
-
-
-{{PageSyntax}}
-: {{Parameter|currentPrintMode}} = [[_PRINTMODE (function)|_PRINTMODE]][({{Parameter|imageHandle&}})]
-
-
-{{Parameters}}
-* If no {{Parameter|imageHandle&}} is given, the current [[_DEST|destination]] [[SCREEN]] page or image is assumed.
-
-
-{{PageDescription}}
-* Returns a status value from 1 to 3 designating the current mode setting:
-** '''1''': mode is _KEEPBACKGROUND
-** '''2''': mode is _ONLYBACKGROUND
-** '''3''': mode is _FILLBACKGROUND '''(default)'''
-* '''The [[_PRINTMODE]] statement and function can only be used in graphic screen modes, not SCREEN 0'''
-
-
-{{PageSeeAlso}}
-* [[_PRINTMODE]]
-* [[_LOADFONT]]
-* [[_NEWIMAGE]]
-* [[_PRINTSTRING]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_PRINTMODE__111111111.txt b/internal/help/_PRINTMODE__111111111.txt
deleted file mode 100644
index bed49ee38..000000000
--- a/internal/help/_PRINTMODE__111111111.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:21}}
-{{DISPLAYTITLE:_PRINTMODE}}
-The [[_PRINTMODE]] statement sets the text or [[_FONT]] printing mode on an image when using [[PRINT]] or [[_PRINTSTRING]].
-
-
-{{PageSyntax}}
-: [[_PRINTMODE]] {''_KEEPBACKGROUND''|''_ONLYBACKGROUND''|''_FILLBACKGROUND''}[, {{Parameter|imageHandle&}}]
-
-
-{{Parameters}}
-* One of 3 mode keywords is mandatory when using this statement to deal with the text background.
-**''_KEEPBACKGROUND'' (mode 1): Text background transparent. Only the text is displayed over anything behind it.
-**''_ONLYBACKGROUND'' (mode 2): Text background only is displayed. Text is transparent to anything behind it.
-**''_FILLBACKGROUND'' (mode 3): Text and background block anything behind them like a normal [[PRINT]]. '''Default setting.'''
-* If the optional {{Parameter|imageHandle&}} is omitted or is 0 then the setting will be applied to the current [[_DEST|destination]] image.
-
-
-{{PageDescription}}
-* Use the [[_PRINTMODE (function)]] to find the current [[_PRINTMODE]] setting mode number for an image.
-* '''The _PRINTMODE statement and function can only be used on graphic images, not text-based ones such as SCREEN 0'''
-
-
-{{PageExamples}}
-''Example:'' Using _PRINTMODE with [[PRINT]] in a graphic screen mode. The background used is CHR$(219) = â–ˆ
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-{{Cl|COLOR}} 8: {{Cl|LOCATE}} 10, 10: {{Cl|PRINT}} {{Cl|STRING$}}(3, 219) 'background
-{{Cl|_PRINTMODE}} _KEEPBACKGROUND
-{{Cl|COLOR}} 15: {{Cl|LOCATE}} 10, 10: {{Cl|PRINT}} {{Cl|_PRINTMODE}}
-{{Cl|END}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_PRINTMODE (function)]]
-* [[_PRINTSTRING]]
-* [[_LOADFONT]]
-* [[_NEWIMAGE]]
-* [[PRINT]], [[_PRINT USING]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_PRINTSTRING__11111111111.txt b/internal/help/_PRINTSTRING__11111111111.txt
deleted file mode 100644
index 716304e54..000000000
--- a/internal/help/_PRINTSTRING__11111111111.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:23}}
-{{DISPLAYTITLE:_PRINTSTRING}}
-The [[_PRINTSTRING]] statement prints text [[STRING|strings]] using graphic column and row coordinate positions.
-
-
-{{PageSyntax}}
-: [[_PRINTSTRING]]({{Parameter|column}}, {{Parameter|row}}), {{Parameter|textExpression$}}[, {{Parameter|imageHandle&}}]
-
-
-{{Parameters}}
-* {{Parameter|column}} and {{Parameter|row}} are [[INTEGER]] or [[LONG]] starting PIXEL (graphic) column and row coordinates to set text or custom fonts.
-* {{Parameter|textExpression$}} is any literal or variable [[STRING|string]] value of text to be displayed.
-* {{Parameter|imageHandle&}} is the optional image or destination to use. Zero designates current [[SCREEN (statement)|SCREEN]] page.
-
-
-{{PageDescription}}
-* The starting coordinate sets the top left corner of the text to be printed. Use [[_FONTHEIGHT]] to calculate that text or [[_FONT|font]] position
-* The [[_FONT]] size can affect the [[SCREEN (statement)|screen]] and row heights.
-** Custom fonts are not required. [[_PRINTSTRING]] can print all [[ASCII]] characters.
-* [[_PRINTWIDTH]] can be used to determine how wide a text print will be so that the screen width is not exceeded.
-* If the {{Parameter|imageHandle&}} is omitted, the current image, page or screen destination is used.
-* Can use the current font alpha blending with a designated image background. See the [[_RGBA]] function example.
-* Use the [[_PRINTMODE]] statement before printing to set how the background is rendered.
-** Use the [[_PRINTMODE (function)]] to find the current _PRINTMODE setting.
-* In SCREEN 0 (text only), [[_PRINTSTRING]] works as one-line replacement for '''LOCATE x, y: PRINT text$''', without changing the current cursor position.
-
-
-==Availability==
-* In versions of QB64 prior to 1.000 _PRINTSTRING can only be used in graphic, 256 color or 32 bit screen modes, not SCREEN 0.''
-
-
-{{PageExamples}}
-''Example 1:'' Printing those unprintable [[ASCII]] control characters is no longer a problem!
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 256)
-
-{{Cl|FOR...NEXT|FOR}} code = 0 {{Cl|TO}} 31
- chrstr$ = chrstr$ + {{Cl|CHR$}}(code) + {{Cl|SPACE$}}(1)
-{{Cl|NEXT}}
-
-{{Cl|_FONT}} {{Cl|_LOADFONT}}("C:\Windows\Fonts\Cour.ttf", 20, "MONOSPACE") 'select monospace font
-
-{{Cl|_PRINTSTRING}} (0, 16), chrstr$
-
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}
- ☺ ☻ ♥ ♦ ♣ ♠• ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼ ► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ → ↠∟ ↔ ▲ ▼
-{{OutputEnd}}
-
-
-''Example 2:'' Making any '''QB64 program window''' larger using a SUB that easily converts PRINT to [[_PRINTSTRING]].
-{{CodeStart}}
-Scr13& = {{Cl|_NEWIMAGE}}(320, 200, 13) 'this is the old SCREEN 13 image page to set the image
-Big13& = {{Cl|_NEWIMAGE}}(640, 480, 256) 'use 4 X 3 aspect ratio that QBasic used when full screen
-
-{{Cl|SCREEN (statement)|SCREEN}} Big13&
-{{Cl|_DEST}} Scr13&
-image1& = {{Cl|_LOADIMAGE}}("Howie.BMP", 256)
-image2& = {{Cl|_LOADIMAGE}}("Howie2.BMP", 256)
-{{Cl|_PUTIMAGE}} (10, 20), image1&, Scr13&
-{{Cl|_PUTIMAGE}} (160, 20), image2&, Scr13&
-{{Cl|_COPYPALETTE}} image1&, Scr13&
-{{Cl|COLOR}} 151: {{Cl|LOCATE}} 2, 4: PRINTS "Screen 13 Height Reduction to 83%"
-{{Cl|LOCATE}} 22, 22: PRINTS {{Cl|CHR$}}(24) + " 4 X 3 Proportion" 'use {{Cl|concatenation}}
-{{Cl|LOCATE}} 24, 21: PRINTS {{Cl|CHR$}}(27) + " Stretched at 100%" 'instead of a {{Cl|semicolon}}!
-{{Cl|_COPYPALETTE}} Scr13&, Big13& 'required when imported image colors are used
-{{Cl|_PUTIMAGE}} , Scr13&, Big13& 'stretches the screen to double the size
-K$ = {{Cl|INPUT$}}(1)
-{{Cl|END}}
-
-{{Cl|SUB}} PRINTS (Text$)
-row% = ({{Cl|CSRLIN}} - 1) * {{Cl|_FONTHEIGHT}} 'finds current screen page text or font row height
-col% = ({{Cl|POS}}(0) - 1) * {{Cl|_PRINTWIDTH}}("W") 'finds current page text or font column width
-{{Cl|_PRINTSTRING}} (col%, row%), Text$
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-: ''Explanation:'' The procedure above creates a larger version of a SCREEN 13 window by stretching it with [[_PUTIMAGE]]. It cannot stretch PRINTed text so [[_PRINTSTRING]] must be used instead. [[LOCATE]] sets the PRINT cursor position for [[CSRLIN]] and [[POS]](0) to read. The SUB then converts the coordinates to graphical ones. Then '''change''' [[PRINT]] to PRINTS using the IDE '''Search Menu'''.
-[https://www.dropbox.com/s/tcdik1ajegbeiz4/HOWIE.zip?dl=0 Download of Example 2 Bitmap images]
-
-
-''Example 3:'' Rotating a text string around a graphic object.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} 12
-{{Cl|DIM}} row {{Cl|AS}} {{Cl|INTEGER}}, cnt {{Cl|AS}} {{Cl|INTEGER}}, cstart {{Cl|AS}} {{Cl|SINGLE}}, cend {{Cl|AS}} {{Cl|SINGLE}}
-{{Cl|DIM}} xrot {{Cl|AS}} {{Cl|INTEGER}}, yrot {{Cl|AS}} {{Cl|INTEGER}}, scale {{Cl|AS}} {{Cl|INTEGER}}
-' {{Cl|_FULLSCREEN}} 'full screen optional
-cstart = 0: cend = 8 * {{Cl|ATN}}(1)
-xrot = 6: yrot = 60: scale = 4
-row = 1
-{{Cl|CIRCLE}} (320, 240), 15, 9: {{Cl|PAINT}} {{Cl|STEP}}(0, 0), 9
-{{Cl|DO}}
- {{Cl|FOR...NEXT|FOR}} i = cstart {{Cl|TO}} cend {{Cl|STEP}} .04
- x = 300 + (scale * 40 - (row * xrot)) * {{Cl|COS}}(i)
- y = 200 + (scale * 40 - (row * yrot)) * {{Cl|SIN}}(i)
- cnt = cnt + 1
- {{Cl|COLOR}} 7: {{Cl|_PRINTSTRING}} (x, y), "HELLO WORLD!", 0 'display
- {{Cl|IF}} cnt = {{Cl|LEN}}(text$) * 8 {{Cl|THEN}} cnt = 0: {{Cl|EXIT DO}}
- {{Cl|_DISPLAY}}
- {{Cl|COLOR}} 0: {{Cl|_PRINTSTRING}} (x, y), "HELLO WORLD!", 0 'erase
- {{Cl|_DELAY}} 0.02
- {{Cl|NEXT}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-{{Cl|COLOR}} 15
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Adapted from code by Unseen Machine}}
-
-
-
-{{PageSeeAlso}}
-* [[_NEWIMAGE]], [[_PRINTWIDTH]], [[_PRINTMODE]]
-* [[_CONTROLCHR]] {{text|(turns [[ASCII]] control characters OFF or ON)}}
-* [[_FONT]], [[_LOADFONT]], [[_FONTHEIGHT]], [[_FONTWIDTH]]
-* [[_SCREENIMAGE]], [[_SCREENPRINT]]
-* [[Text Using Graphics]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_PRINTWIDTH__1111111111.txt b/internal/help/_PRINTWIDTH__1111111111.txt
deleted file mode 100644
index 6a9f8a809..000000000
--- a/internal/help/_PRINTWIDTH__1111111111.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:24}}
-{{DISPLAYTITLE:_PRINTWIDTH}}
-The [[_PRINTWIDTH]] function returns the width in pixels of the text [[STRING|string]] specified.
-
-
-{{PageSyntax}}
-: {{Parameter|pixelWidth%}} = [[_PRINTWIDTH]]({{Parameter|textToPrint$}}[, {{Parameter|destinationHandle&}}])
-
-
-{{PageDescription}}
-* {{Parameter|textToPrint$}} is any literal or variable [[STRING]] value.
-* If the {{Parameter|destinationHandle&}} is omitted, the current destination image or screen page is used.
-* Useful to find the width of the font print [[STRING|string]] before actually printing it.
-* Can be used with variable-width fonts or built-in fonts, unlike [[_FONTWIDTH]] which requires a MONOSPACE font handle.
-* In SCREEN 0, _PRINTWIDTH returns the character length of a text string, exactly as [[LEN]]({{Parameter|textToPrint$}}) ('''version 1.000 and up''').
-
-
-{{PageExamples}}
-''Example:'' SUB returns font or screen mode's text block size using _PRINTWIDTH and [[_FONTHEIGHT]] without a handle parameter.
-{{CodeStart}}
-{{Cl|DO}}
- {{Cl|INPUT}} "Enter Screen mode 1, 2 or 7 to 13: ", scr$
- mode% = {{Cl|VAL}}(scr$)
-{{Cl|LOOP}} {{Cl|UNTIL}} mode% > 0
-{{Cl|SCREEN (statement)|SCREEN}} mode%
-{{Cl|INPUT}} "Enter first name of TTF font to use or hit enter for text size: ", TTFont$
-{{Cl|IF}} {{Cl|LEN}}(TTFont$) {{Cl|THEN}} {{Cl|INPUT (file mode)|INPUT}} "Enter font height: ", hi$
-height& = {{Cl|VAL}}(hi$)
-{{Cl|IF}} height& > 0 {{Cl|THEN}} {{Cl|_FONT}} {{Cl|_LOADFONT}}("C:\Windows\Fonts\" + TTFont$ + ".ttf", height&, style$)
-
-TextSize wide&, high& 'get the font or current screen mode's text block pixel size
-
-{{Cl|_PRINTSTRING}} (20, 100), {{Cl|CHR$}}(1) + {{Cl|STR$}}(wide&) + " X" + {{Cl|STR$}}(high&) + " " + {{Cl|CHR$}}(2)
-
-{{Cl|END}}
-
-{{Cl|SUB}} TextSize (TextWidth&, TextHeight&)
-TextWidth& = {{Cl|_PRINTWIDTH}}("W") 'measure width of one font or text character
-TextHeight& = {{Cl|_FONTHEIGHT}} 'can measure normal text block heights also
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Code by Ted Weissgerber}}
-'''Note:''' The SUB procedure does not need the font handle for font sizes after [[_FONT]] enables one.
-
-
-{{PageSeeAlso}}
-* [[_FONTWIDTH]], [[_FONTHEIGHT]]
-* [[_NEWIMAGE]], [[_LOADFONT]]
-* [[_PRINTSTRING]], [[_FONT]]
-* [[Text Using Graphics]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_PUTIMAGE__11111111.txt b/internal/help/_PUTIMAGE__11111111.txt
deleted file mode 100644
index dbe289e95..000000000
--- a/internal/help/_PUTIMAGE__11111111.txt
+++ /dev/null
@@ -1,194 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:25}}
-{{DISPLAYTITLE:_PUTIMAGE}}
-[[_PUTIMAGE]] puts an area of a source image to an area of a destination image in one operation, like [[GET (graphics statement)|GET]] and [[PUT (graphics statement)|PUT]].
-
-
-{{PageSyntax}}
-:[[_PUTIMAGE]] [STEP] [({{Parameter|dx1}}, {{Parameter|dy1}})-[STEP][({{Parameter|dx2}}, {{Parameter|dy2}})]][, {{Parameter|sourceHandle&}}][, {{Parameter|destHandle&}}][, ][STEP][({{Parameter|sx1}}, {{Parameter|sy1}})[-STEP][({{Parameter|sx2}}, {{Parameter|sy2}})]][''_SMOOTH'']
-
-===Sample usage===
-
-::[[_PUTIMAGE]] {{text|'full source image to fit full destination area after [[_SOURCE]] and [[_DEST]] are set}}
-
-::[[_PUTIMAGE]] , {{Parameter|sourceHandle&}}, {{Parameter|destHandle&}} {{text|'size full source to fit full destination area}}
-
-::[[_PUTIMAGE]] (''dx1'', ''dy1''), {{Parameter|sourceHandle&}}, {{Parameter|destHandle&}} {{text|'full source to top-left corner destination position}}
-
-::[[_PUTIMAGE]] (''dx1'', ''dy1'')-(''dx2'', ''dy2''), {{Parameter|sourceHandle&}}, {{Parameter|destHandle&}} {{text|'size full source to destination coordinate area}}
-
-::[[_PUTIMAGE]] (''dx1'', ''dy1''), {{Parameter|sourceHandle&}}, {{Parameter|destHandle&}}, (''sx1'', ''sy1'')-(''sx2'', ''sy2'') {{text|'portion of source to the top-left corner of the destination page}}
-
-::[[_PUTIMAGE]] , {{Parameter|sourceHandle&}}, {{Parameter|destHandle&}}, (''sx1'', ''sy1'')-(''sx2'', ''sy2'') {{text|'portion of source to full destination area}}
-
-::[[_PUTIMAGE]] (''dx1'', ''dy1'')-(''dx2'', ''dy2''), {{Parameter|sourceHandle&}}, {{Parameter|destHandle&}},(''sx1'', ''sy1'') {{text|'right side of source from top-left corner to destination}}
-
-
-::Note: The top-left corner position designates the leftmost and topmost portion of the image to use.
-
-
-{{Parameters}}
-* Relative coordinates to a previous graphical object can be designated using [[STEP]] as opposed to literal surface coordinates (version '''1.000''' and up).
-* Coordinates ''dx'' and ''dy'' map the box area of the [[_DEST|destination]] area to use. When omitted the entire desination area is used. If only one coordinate is used, the source is placed with its original dimensions. Coordinates can be set to flip or resize the image.
-** {{Parameter|dx1}} = the column coordinate at which the insertion of the source will begin (leftmost); when larger than ''dx2'', reverses image.
-** {{Parameter|dy1}} = the row coordinate at which the insertion of the source will begin (topmost); when larger than ''dy2'', inverts image.
-** {{Parameter|dx2}} = the column coordinate at which the insertion of the source will end (rightmost); further apart, widens image.
-** {{Parameter|dy2}} = the row coordinate at which the insertion of the source will end (bottommost); closer together, shrinks image
-* {{Parameter|sourceHandle&}} = the [[LONG]] handle of the [[_SOURCE|source]] image created with [[_NEWIMAGE]], [[_LOADIMAGE]] or [[_COPYIMAGE]].
-* {{Parameter|destHandle&}} = the [[LONG]] handle of the [[_DEST|destination]] image may be created with [[_NEWIMAGE]], [[SCREEN]] or [[_DEST|destination]] 0.
-* Coordinates ''sx'' and ''sy'' [[GET (graphics statement)|GET]] the box area of the [[_SOURCE|source]] image to transfer to the [[_DEST|destination]] image, page or [[SCREEN|screen]]:
-** {{Parameter|sx1}} = the column coordinate of the left-most pixel to include of the source. When omitted, the entire image is used
-** {{Parameter|sy1}} = the row coordinate of the upper-most pixel to include of the source. When omitted, the entire image is used
-** {{Parameter|sx2}} = the column coordinate of the right-most pixel to include of the source. Can be omitted to get rest of image.
-** {{Parameter|sy2}} = the row coordinate of the bottom-most pixel to include of the source. Can be omitted to get rest of image.
-* ''_SMOOTH'' applies linear filtering ('''version 1.000 and up''').
-
-'''Note: The [[PUT (graphics statement)|PUT]] options PSET, PRESET, AND, OR and XOR are not available with _PUTIMAGE. QB64 can use [[_ALPHA|transparency]] of colors to achieve the same results.'''
-
-
-{{PageDescription}}
-* _PUTIMAGE can be used without any handle parameters if the [[_SOURCE]] and/or [[_DEST]] are already defined.
-* If the area of the source is bigger or smaller than the area of the destination then the image is adjusted to fit that area.
-* Supports 32 bit alpha blending, color key transparency, true type fonts, stretching, mirroring/flipping, and a variety of graphics file formats including gif, png, bmp & jpg. '''32 bit screen surface backgrounds (black) have zero [[_ALPHA]] and are transparent when placed over other surfaces.''' Use [[CLS]] or [[_DONTBLEND]] to make a new surface background [[_ALPHA]] 255 or opaque.
-* All graphical surfaces, including screen pages, can be acted upon in the same manner, and are referred to as "images".
-* '''Hardware images''' (created using mode '''33''' via [[_LOADIMAGE]] or [[_COPYIMAGE]]) can be used as the source or destination.
-* [[Handle]]s are used to identify graphical surfaces. Positive values are used to refer to screen pages. -1 (negative one) indicates an invalid surface. It is recommended to store image handles in [[LONG]] variables. Passing an invalid handle generates an [[ERROR Codes|"Invalid handle"]] error.
-* When handles are not passed (or cannot be passed) to subs/functions then the default destination image or source image is referenced. These are set to the active page when the SCREEN statement is called, but can be changed to any image. So it is possible to read from one image using [[POINT]] and write to a different one with [[PSET]].
-* '''[[PRINT]]ed text cannot be transferred and positioned accurately.''' Use [[_PRINTSTRING]] for graphical text or font placement.
-* '''Images are not deallocated when the [[SUB]] or [[FUNCTION]] they are created in ends. Free them with [[_FREEIMAGE]].'''
-* '''It is important to free discarded or unused images with [[_FREEIMAGE]] to prevent CPU memory overflow errors.'''
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}
- {{Cl|SCREEN (statement)|SCREEN}} 13
- a& = {{Cl|_NEWIMAGE}}(640, 200, 13) ' creates a 640 * 200 image with the {{Cl|LONG}} handle a&
- {{Cl|_DEST}} a& ' makes image a& the default drawing output.
- {{Cl|LINE}} (10, 10)-(100, 100), 12, BF ' draws a filled box (BF) into destination
- {{Cl|_PUTIMAGE}} (0, 0)-(320, 200), a&, 0, (0, 0)-(320, 200)
-{{CodeEnd}}
-:''Explanation:''
-: 1) A graphics mode is set by using [[SCREEN (statement)|SCREEN]] 13 which can use up to 256 colors.
-: 2) A new image is created that is 640 X 200 and uses the palette compatible with SCREEN 13 (256 colors).
-: 3) [[_DEST]] a& makes the image with handle 'a&' the default image to draw on instead of the screen (which is [[_DEST]] 0).
-: 4) Next a filled box (BF) is drawn from 10, 10 to 100, 100 with red color (12) to the destination image (set by [[_DEST]] a&)
-: 5) Now we put the image from 0, 0 to 320, 200 from the image with the handle 'a&' to the screen (always handle 0) and puts this image into the coordinates 0, 0 to 320, 200. If we want to stretch the image we can alter these coordinates.
-
-:'''Note:''' All arguments are optional. If you want to simply put the whole image of the source to the whole image of the destination then you omit the area (x, y)-(x2, y2) on both sides, the last line of the example can be replaced by [[_PUTIMAGE]] , a&, 0 which indeed will stretch the image since image a& is bigger than the screen (the screen is 320 * 200 and a& is 640 * 200)
-
-
-''Example 2: ''You don't need to do anything special to use a .PNG image with alpha/transparency. Here's a simple example:
-
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-{{Cl|CLS}} , {{Cl|_RGB}}(0, 255, 0)
-i = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''') 'any 32 bit image (ie. with alpha channel)
-{{Cl|_PUTIMAGE}} (0, 0), i ' places image at upper left corner of window w/o stretching it
-
-{{CodeEnd}}
-
-: ''Explanation:'' When QB64 loads a 256 color .PNG file containing a transparent color, that color will be treated as transparent when _PUTIMAGE is used to put it onto another image. So actually, you can use a 256-color .PNG file containing transparency information in a 256 color screen mode in QB64.
-
-
-''Example 3:'' Flipping and enlarging an image with _PUTIMAGE by swapping or increasing the desination coordinates.
-{{CodeStart}}
-{{Cl|DEFLNG}} A-Z
-dest_handle = {{Cl|_NEWIMAGE}}(640, 480, 32)
-{{Cl|SCREEN (statement)|SCREEN}} dest_handle '32 bit Screen 12 dimensions
-source_handle = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''', 32) 'any 32 bit image (ie. with alpha channel)
-dx1 = 0: dy1 = 0
-dx2 = {{Cl|_WIDTH (function)|_WIDTH}}(source_handle) - 1: dy2 = {{Cl|_HEIGHT}}(source_handle) - 1 'image dimensions - 1
-{{Cl|LOCATE}} 29, 33: {{Cl|PRINT}} "Press any Key!";
-'normal image coordinate values based on the dimensions of the image:
-{{Cl|_PUTIMAGE}} (dx1, dy1)-(dx2, dy2), source_handle, dest_handle
-{{Cl|LOCATE}} 20, 34: {{Cl|PRINT}} "Normal layout"
-{{Cl|LOCATE}} 24, 10: {{Cl|PRINT}} "_PUTIMAGE (dx1, dy1)-(dx2, dy2), source_handle, dest_handle"
-K$ = {{Cl|INPUT$}}(1)
-'to flip the image on the x axis, swap the dx coordinate values:
-{{Cl|_PUTIMAGE}} (dx2, dy1)-(dx1, dy2), source_handle, dest_handle
-{{Cl|LOCATE}} 20, 34: {{Cl|PRINT}} "Flip by X axis"
-{{Cl|LOCATE}} 24, 10: {{Cl|PRINT}} "_PUTIMAGE (dx2, dy1)-(dx1, dy2), source_handle, dest_handle"
-K$ = {{Cl|INPUT$}}(1)
-'to flip image on y axis, swap the dy coordinate values:
-{{Cl|_PUTIMAGE}} (dx1, dy2)-(dx2, dy1), source_handle, dest_handle
-{{Cl|LOCATE}} 20, 34: {{Cl|PRINT}} "Flip by Y axis"
-{{Cl|LOCATE}} 24, 10: {{Cl|PRINT}} "_PUTIMAGE (dx1, dy2)-(dx2, dy1), source_handle, dest_handle "
-K$ = {{Cl|INPUT$}}(1)
-'to flip both, swap both the dx and dy coordinate values:
-{{Cl|_PUTIMAGE}} (dx2, dy2)-(dx1, dy1), source_handle, dest_handle
-{{Cl|LOCATE}} 20, 34: {{Cl|PRINT}} "Flip on both axis"
-{{Cl|LOCATE}} 24, 10: {{Cl|PRINT}} "_PUTIMAGE (dx2, dy2)-(dx1, dy1), source_handle, dest_handle"
-K$ = {{Cl|INPUT$}}(1)
-'to enlarge, double the second set of values plus any offset of the first coordinates:
-{{Cl|_PUTIMAGE}} (dx1, dy1)-((2 * dx2) + dx1, (2 * dy2) + dy1), source_handle, dest_handle
-{{Cl|LOCATE}} 20, 34: {{Cl|PRINT}} "Double image size"
-{{Cl|LOCATE}} 24, 2:
-{{Cl|PRINT}} "_PUTIMAGE (dx1, dy1)-((2 * dx2) + dx1, (2 * dy2) + dy1), s_handle, d_handle
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Adapted from code by Darth Who}}
-
-
-''Example 4:'' Using _PUTIMAGE to scroll a larger image created on a separate [[_NEWIMAGE]] screen page with QB64.
-{{CodeStart}}
-{{Cl|RANDOMIZE}} {{Cl|TIMER}}
-ws& = {{Cl|_NEWIMAGE}}(2560, 1440, 32) 'large image page
-s& = {{Cl|_NEWIMAGE}}(1280, 720, 32)' program screen
-
-{{Cl|_DEST}} ws& 'create large image of random filled circles
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 50
- x = {{Cl|RND}}(1) * 2560
- y = {{Cl|RND}}(1) * 1440
- clr& = {{Cl|_RGB32}}({{Cl|RND}}(1) * 255, {{Cl|RND}}(1) * 255, {{Cl|RND}}(1) * 255)
- {{Cl|CIRCLE}} (x, y), {{Cl|RND}}(1) * 300, clr&
- {{Cl|PAINT}} (x, y), clr&
-{{Cl|NEXT}}
-{{Cl|PRINT}} "This is a demo of some screen scrolling. Use the number pad keys to scroll. 4 goes left, 6 goes right. 8 up, 2 down. ESC key will close this program."
-x = 0: y = 0
-{{Cl|SCREEN}} s&
-
-DO
- {{Cl|CLS}}
- {{Cl|_PUTIMAGE}} (0, 0), ws&, 0, (x, y)-(x + 1279, y + 719)
- a$ = {{Cl|INKEY$}}
- {{Cl|SELECT CASE}} a$
- {{Cl|CASE}} "4": x = x - 10: {{Cl|IF...THEN|IF}} x < 0 {{Cl|THEN}} x = 0
- {{Cl|CASE}} "6": x = x + 10: {{Cl|IF...THEN|IF}} x > 1280 {{Cl|THEN}} x = 1280
- {{Cl|CASE}} "8": y = y - 10: {{Cl|IF...THEN|IF}} y < 0 {{Cl|THEN}} y = 0
- {{Cl|CASE}} "2": y = y + 10: {{Cl|IF...THEN|IF}} y > 720 {{Cl|THEN}} y = 720
- {{Cl|CASE}} {{Cl|CHR$}}(32): {{Cl|SYSTEM}}
- {{Cl|END SELECT}}
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}}
-{{CodeEnd}}{{small|Code example by SMcNeill}}
-
-
-''Example 5:'' _PUTIMAGE can be used with no parameters at all if the [[_SOURCE]] and [[_DEST]] are already set.
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-h& = {{Cl|_NEWIMAGE}}(640, 480, 256)
-{{Cl|_DEST}} h&
-{{Cl|_PRINTSTRING}} (10, 10), "This _PUTIMAGE used no parameters!"
-{{Cl|_SOURCE}} h&
-{{Cl|_DEST}} 0
-{{Cl|_PUTIMAGE}}
-{{Cl|END}}
-{{CodeEnd}}
-
-
-
-===More examples===
-* [[Bitmaps]] (Bitmap Screenshots)
-* [[SAVEIMAGE]] (Converts Images to Bitmaps)
-
-
-{{PageSeeAlso}}
-* [[_LOADIMAGE]], [[_NEWIMAGE]]
-* [[_COPYIMAGE]], [[_SCREENIMAGE]]
-* [[_MAPTRIANGLE]], [[STEP]]
-* [[_DEST]], [[_SOURCE]], [[_FREEIMAGE]]
-* [[Hardware images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_R2D__121.txt b/internal/help/_R2D__121.txt
deleted file mode 100644
index 960771171..000000000
--- a/internal/help/_R2D__121.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:27}}
-{{DISPLAYTITLE:_R2D}}
-The [[_R2D]] function converts a '''radian''' value into a '''degree''' value.
-
-
-{{PageSyntax}}
-: {{Parameter|result!}} = [[_R2D]]({{Parameter|num}})
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Coverting Radian into Degree.
-{{CodeStart}}
-INPUT "Give me an angle in Radians ", D
-R = _R2D(D)
-PRINT "That angle in Degrees is "; R
-{{CodeEnd}}
-{{OutputStart}}
-Give me an angle in Radians 0.5
-That angle in Degrees is 28.64789
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]], [[_D2R]]
-* [[_G2D]], [[_G2R]]
-* [[_R2G]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_R2G__121.txt b/internal/help/_R2G__121.txt
deleted file mode 100644
index d7086711c..000000000
--- a/internal/help/_R2G__121.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:30}}
-{{DISPLAYTITLE:_R2G}}
-The [[_R2G]] function converts a '''radian''' value into a '''gradient''' value.
-
-
-{{PageSyntax}}
-: {{Parameter|result!}} = [[_R2G]]({{Parameter|num}})
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Coverting Radian into Gradient.
-{{CodeStart}}
-INPUT "Give me an angle in Radians ", D
-R = _R2G(D)
-PRINT "That angle in Gradient is "; R
-{{CodeEnd}}
-{{OutputStart}}
-Give me an angle in Radians 0.5
-That angle in Gradient is 31.83099
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_D2G]], [[_D2R]]
-* [[_G2D]], [[_G2R]]
-* [[_R2D]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_READBIT__1111111.txt b/internal/help/_READBIT__1111111.txt
deleted file mode 100644
index 200055e1c..000000000
--- a/internal/help/_READBIT__1111111.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:33}}
-{{DISPLAYTITLE:_READBIT}}
-The [[_READBIT]] function is used to check the state of a specified bit of a integer value.
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_READBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalVariable}} is the variable to read the state of a bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]].
-* Integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} the number of the bit to be read.
-
-
-{{PageDescription}}
-* Used to check the current state of a bit in an integer value.
-* Returns -1 if the bit is set(1), otherwise returns 0 if the bit is not set(0)
-* Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on)
-
-==Availability==
-* '''Version 1.4 and up'''.
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}
-A~%% = {{Cl|_SETBIT}}(A~%%,4)
-{{Cl|PRINT}} "Bit 4 is currently ";
-IF {{Cl|_READBIT}}(A~%%,4) = -1 THEN {{Cl|PRINT}} "ON" ELSE {{Cl|PRINT}} "OFF"
-{{Cl|PRINT}} "And bit 2 is currently ";
-IF {{Cl|_READBIT}}(A~%%,2) = -1 THEN {{Cl|PRINT}} "ON" ELSE {{Cl|PRINT}} "OFF"
-{{CodeEnd}}
-{{OutputStart}}
-Bit 4 is currently ON
-And bit 2 is currently OFF
-{{OutputEnd}}
-
-''Example 2:''
-{{CodeStart}}
-B& = 12589575
-{{Cl|PRINT}} "B& ="; B&
-FOR I%% = 31 TO 0 STEP -1 '32 bits for a {{Cl|LONG}} value
- Binary$ = Binary$ + {{Cl|LTRIM$}}({{Cl|STR$}}({{Cl|ABS}}({{Cl|_READBIT}}(B&, I%%))))
-NEXT I%%
-{{Cl|PRINT}} "B& in binary is: "; Binary${{CodeEnd}}
-{{OutputStart}}
-B& = 12589575
-B& in binary is: 00000000110000000001101000000111
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SHL]], [[_SHR]], [[INTEGER]], [[LONG]]
-* [[_SETBIT]], [[_BYTE]], [[_INTEGER64]]
-* [[_RESETBIT]], [[_TOGGLEBIT]]
-
-{{PageNavigation}}
diff --git a/internal/help/_RED32__11132.txt b/internal/help/_RED32__11132.txt
deleted file mode 100644
index 87bdd05a7..000000000
--- a/internal/help/_RED32__11132.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:32}}
-{{DISPLAYTITLE:_RED32}}
-The [[_RED32]] function returns the red component intensity of a 32-bit image or surface color.
-
-
-{{PageSyntax}}
-: {{Parameter|red32color&}} = [[_RED32]]({{Parameter|rgbaColor&}})
-
-
-{{PageDescription}}
-* {{Parameter|rgbaColor&}} is the 32-bit ''RGBA'' color value to retrieve the red component intensity value from.
-* ''RGBA'' color values are returned by the [[_PALETTECOLOR (function)|_PALETTECOLOR]], [[POINT]], [[_RGB]], [[_RGB32]], [[_RGBA]] or [[_RGBA32]] functions.
-* [[LONG]] intensity values returned range from 0 (no intensity, not present) to 255 (full intensity).
-
-
-{{PageExamples}}
-* See the example in [[POINT]].
-
-
-{{PageSeeAlso}}
-* [[_BLUE32]], [[_GREEN32]]
-* [[_RGB32]], [[_RED]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_RED__111.txt b/internal/help/_RED__111.txt
deleted file mode 100644
index cd93d253e..000000000
--- a/internal/help/_RED__111.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:31}}
-{{DISPLAYTITLE:_RED}}
-The [[_RED]] function returns the palette index or the red component intensity of a 32-bit image color.
-
-
-{{PageSyntax}}
-: {{Parameter|redIntensity&}} = [[_RED]]({{Parameter|rgbaColorIndex&}}[, {{Parameter|imageHandle&}}])
-
-
-{{PageDescription}}
-* {{Parameter|rgbaColorIndex&}} is the ''RGBA'' color value or palette index of the color to retrieve the red component intensity from.
-* The [[LONG]] intensity value returned ranges from 0 (no intensity, not present) to 255 (full intensity).
-* {{Parameter|imageHandle&}} is optional.
-* If {{Parameter|imageHandle&}} specifies a 32-bit color image, {{Parameter|rgbaColorIndex&}} is interpreted as a 32-bit ''RGBA'' color value.
-* If {{Parameter|imageHandle&}} specifies an image that uses a palette, {{Parameter|rgbaColorIndex&}} is interpreted as a palette index.
-* If {{Parameter|imageHandle&}} is not specified, it is assumed to be the current write page.
-* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error occurs.
-* If {{Parameter|rgbaColorIndex&}} is outside the range of valid indexes for a given image mode, an [[ERROR Codes|illegal function call]] error occurs.
-* Uses index parameters passed by the [[_RGB]], [[_RGBA]], [[_RGB32]] or [[_RGBA32]] functions.
-
-
-{{PageExamples}}
-* See the example in [[POINT]].
-
-
-{{PageSeeAlso}}
-* [[_GREEN]], [[_BLUE]]
-* [[_RGB]], [[RGB32]]
-* [[_LOADIMAGE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RESETBIT__11111111.txt b/internal/help/_RESETBIT__11111111.txt
deleted file mode 100644
index c5906120c..000000000
--- a/internal/help/_RESETBIT__11111111.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:34}}
-{{DISPLAYTITLE:_RESETBIT}}
-The [[_RESETBIT]] function is used to set a specified bit of a numerical value to 0 (OFF state).
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_RESETBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalVariable}} is the variable to set the bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]].
-* Integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} the number of the bit to be set.
-
-
-{{PageDescription}}
-* Can be used to manually manipulate individual bits of an integer value by setting them to 0 (OFF state).
-* Resetting a bit that is already set to 0 will have no effect.
-* Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on)
-
-==Availability==
-* '''Version 1.4 and up'''.
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}A~%% = 0 '{{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|PRINT}} A~%%
-A~%% = {{Cl|_SETBIT}}(A~%%,6) 'set the seventh bit of A~%%
-{{Cl|PRINT}} A~%%
-A~%% = {{Cl|_RESETBIT}}(A~%%,6) 'Reset the seventh bit of A~%%
-{{Cl|PRINT}} A~%%
-{{CodeEnd}}
-{{OutputStart}}
- 0
- 64
- 0
-{{OutputEnd}}
-
-
-
-{{PageSeeAlso}}
-* [[_SHL]], [[_SHR]], [[INTEGER]], [[LONG]]
-* [[_SETBIT]], [[_BYTE]], [[_INTEGER64]]
-* [[_READBIT]], [[_TOGGLEBIT]]
-
-{{PageNavigation}}
diff --git a/internal/help/_RESIZEHEIGHT__111111111111.txt b/internal/help/_RESIZEHEIGHT__111111111111.txt
deleted file mode 100644
index bb4bfc37c..000000000
--- a/internal/help/_RESIZEHEIGHT__111111111111.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:39}}
-{{DISPLAYTITLE:_RESIZEHEIGHT}}
-The [[_RESIZEHEIGHT]] function returns the user resized screen pixel height if [[$RESIZE]]:ON allows it and [[_RESIZE (function)|_RESIZE]] returns -1
-
-
-{{PageSyntax}}
-: {{Parameter|newHeight&}} = [[_RESIZEHEIGHT]]
-
-
-{{Parameter|Details:}}
-* [[_RESIZE (function)|_RESIZE]] function must return true (-1) before the requested screen dimensions can be returned by the function.
-* The program should decide if the request is allowable for proper program interaction.
-
-
-==Availability==
-* '''Version 1.000 and up'''.
-
-
-{{PageExamples}}
-''Example:'' Resize the current screen image according to user's request.
-{{CodeStart}}
-{{Cl|$RESIZE}}:ON
-
-s& = {{Cl|_NEWIMAGE}}(300, 300, 32)
-{{Cl|SCREEN}} s&
-
-bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any image
-
-{{Cl|DO}}
- {{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN
- oldimage& = s&
- s& = _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 32)
- SCREEN s&
- {{Cl|_FREEIMAGE}} oldimage&
- END IF
-
- {{Cl|CLS}}
-
- 'Center the QB64 bee image:
- x = {{Cl|_WIDTH (function)|_WIDTH}} / 2 - _WIDTH(bee&) / 2
- y = {{Cl|_HEIGHT}} / 2 - _HEIGHT(bee&) / 2
- {{Cl|_PUTIMAGE}} (x, y), bee&
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[$RESIZE]]
-* [[_RESIZE (function)]]
-* [[_RESIZEWIDTH]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RESIZEWIDTH__11111111111.txt b/internal/help/_RESIZEWIDTH__11111111111.txt
deleted file mode 100644
index 2135ff954..000000000
--- a/internal/help/_RESIZEWIDTH__11111111111.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:40}}
-{{DISPLAYTITLE:_RESIZEWIDTH}}
-The [[_RESIZEWIDTH]] function returns the user resized screen pixel width if [[$RESIZE]]:ON allows it and [[_RESIZE (function)|_RESIZE]] returns -1
-
-
-{{PageSyntax}}
-: {{Parameter|newWidth&}} = [[_RESIZEWIDTH]]
-
-
-{{PageDescription}}
-* [[_RESIZE (function)|_RESIZE]] function must return true (-1) before the requested screen dimensions can be returned by the function.
-* The program should decide if the request is allowable for proper program interaction.
-
-
-==Availability==
-* '''Version 1.000 and up'''.
-
-
-{{PageExamples}}
-''Example:'' Resize the current screen image according to user's request.
-{{CodeStart}}
-{{Cl|$RESIZE}}:ON
-
-s& = {{Cl|_NEWIMAGE}}(300, 300, 32)
-{{Cl|SCREEN}} s&
-
-bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any image
-
-{{Cl|DO}}
- {{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN
- oldimage& = s&
- s& = _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 32)
- SCREEN s&
- {{Cl|_FREEIMAGE}} oldimage&
- END IF
-
- {{Cl|CLS}}
-
- 'Center the QB64 bee image:
- x = {{Cl|_WIDTH (function)|_WIDTH}} / 2 - _WIDTH(bee&) / 2
- y = {{Cl|_HEIGHT}} / 2 - _HEIGHT(bee&) / 2
- {{Cl|_PUTIMAGE}} (x, y), bee&
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[$RESIZE]]
-* [[_RESIZE (function)]]
-* [[_RESIZEHEIGHT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RESIZE_(function)__111111_(00000000).txt b/internal/help/_RESIZE_(function)__111111_(00000000).txt
deleted file mode 100644
index f753e1888..000000000
--- a/internal/help/_RESIZE_(function)__111111_(00000000).txt
+++ /dev/null
@@ -1,57 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:38}}
-{{DISPLAYTITLE:_RESIZE (function)}}
-The [[_RESIZE]] function returns true (-1) when a user has attempted to resize the program window and [[$RESIZE]]:ON has allowed it.
-
-
-{{PageSyntax}}
-: IF '''_RESIZE''' THEN rx& = [[_RESIZEWIDTH]]: ry& = [[_RESIZEHEIGHT]]
-
-
-{{PageDescription}}
-* The function returns -1 if a program screen resize was attempted by the user.
-* After the function returns -1, [[_RESIZEWIDTH]] and [[_RESIZEHEIGHT]] can return the new requested dimensions in pixels.
-* The [[$RESIZE]]:ON [[metacommand]] must be used so the program is created with a user resizable window.
-
-
-==Availability==
-* '''Version 1.000 and up'''.
-
-
-{{PageExamples}}
-''Example:'' Resize the current screen image according to user's request.
-{{CodeStart}}
-{{Cl|$RESIZE}}:ON
-
-s& = {{Cl|_NEWIMAGE}}(300, 300, 32)
-{{Cl|SCREEN}} s&
-
-bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'any image
-
-{{Cl|DO}}
- {{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN
- oldimage& = s&
- s& = _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 32)
- SCREEN s&
- {{Cl|_FREEIMAGE}} oldimage&
- END IF
-
- {{Cl|CLS}}
-
- 'Center the QB64 bee image:
- x = {{Cl|_WIDTH (function)|_WIDTH}} / 2 - _WIDTH(bee&) / 2
- y = {{Cl|_HEIGHT}} / 2 - _HEIGHT(bee&) / 2
- {{Cl|_PUTIMAGE}} (x, y), bee&
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[$RESIZE]] {{text|(metacommand)}}
-* [[_RESIZE]]
-* [[_RESIZEWIDTH]], [[_RESIZEHEIGHT]] {{text|(requested pixel dimensions)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RESIZE__111111.txt b/internal/help/_RESIZE__111111.txt
deleted file mode 100644
index 53ec76237..000000000
--- a/internal/help/_RESIZE__111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:37}}
-{{DISPLAYTITLE:_RESIZE}}
-The [[_RESIZE]] statement sets resizing of the window ON or OFF and sets the method as _STRETCH or _SMOOTH.
-
-
-{{PageSyntax}}
-: [[_RESIZE]] [{ON|OFF}][, {_STRETCH|_SMOOTH}]
-
-
-{{Parameters}}
-* When resizing is turned OFF no method is listed.
-* When resizing is turned ON or left empty, a ''_STRETCH'' or ''_SMOOTH'' method can be used.
-
-
-{{PageDescription}}
-* Before this statement can be used, you must add the [[$RESIZE]]''':ON''' metacommand to your program.
-
-
-{{PageSeeAlso}}
-* [[$RESIZE]]
-* [[_RESIZE (function)]]
-* [[_RESIZEHEIGHT]]
-* [[_RESIZEWIDTH]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RGB32__11132.txt b/internal/help/_RGB32__11132.txt
deleted file mode 100644
index 93ddb5e4e..000000000
--- a/internal/help/_RGB32__11132.txt
+++ /dev/null
@@ -1,144 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:43}}
-{{DISPLAYTITLE:_RGB32}}
-The [[_RGB32]] function returns the 32-bit ''RGBA'' color value with specified red, green and blue component intensities and optional alpha.
-
-
-{{PageSyntax}}
-''Original syntax'':
-:{{Parameter|color32value~&}} = [[_RGB32]]({{Parameter|red&}}, {{Parameter|green&}}, {{Parameter|blue&}})
-
-''Alternative Syntax 2'':
-:{{Parameter|color32value~&}} = [[_RGB32]]({{Parameter|red&}}, {{Parameter|green&}}, {{Parameter|blue&}}, {{Parameter|alpha&}})
-
-''Alternative Syntax 3'':
-:{{Parameter|color32value~&}} = [[_RGB32]]({{Parameter|intensity&}}, {{Parameter|alpha&}})
-
-''Alternative Syntax 4'':
-:{{Parameter|color32value~&}} = [[_RGB32]]({{Parameter|intensity&}})
-
-
-{{Parameters}}
-* {{Parameter|red&}} specifies the red [[LONG]] component intensity from 0 to 255.
-* {{Parameter|green&}} specifies the green [[LONG]] component intensity from 0 to 255.
-* {{Parameter|blue&}} specifies the blue [[LONG]] component intensity from 0 to 255.
-* {{Parameter|alpha&}} specifies the alpha [[LONG]] component from 0 to 255.
-* {{Parameter|intensity&}} specifies the red, green and blue [[LONG]] components intensity from 0 to 255 simultaneously, to generate a shade of gray.
-
-{{PageDescription}}
-* The value returned is always a 32-bit [[_UNSIGNED]] [[LONG]] color value, as is the [[POINT]] value.
-* '''Return variable types must be [[_UNSIGNED]] [[LONG]] or [[LONG]], otherwise resulting color may lose the [[_BLUE]] value.'''
-* Parameter values outside of the 0 to 255 range are clipped.
-* Returns [[LONG]] 32 bit hexadecimal values from '''&H00{{text|00|red}}{{text|00|green}}{{text|00|blue}}''' to '''&HFF{{text|FF|red}}{{text|FF|green}}{{text|FF|blue}}'''.
-* When [[LONG]] values are [[PUT]] to file, the ARGB values become BGRA. Use [[LEFT$]]([[MKL$]]({{Parameter|color32value~&}}), 3) to place 3 colors.
-* '''NOTE: Default 32-bit backgrounds are clear black or [[_RGB32]](0, 0). Use [[CLS]] to make the black opaque.'''
-
-
-==Availability==
-* Alternative syntaxes available with '''version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example 1:'' Converting the color port RGB intensity palette values 0 to 63 to 32 bit hexadecimal values.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|DIM}} hex32$(15)
-{{Cl|FOR...NEXT|FOR}} attribute = 1 {{Cl|TO}} 15
- {{Cl|OUT}} {{Cl|&H}}3C7, attribute 'set color attribute to read
- red = {{Cl|INP}}({{Cl|&H}}3C9) * 4 'multiply by 4 to convert intensity to 0 to 255 RGB values
- grn = {{Cl|INP}}({{Cl|&H}}3C9) * 4
- blu = {{Cl|INP}}({{Cl|&H}}3C9) * 4
- hex32$(attribute) = "{{Cl|&H}}" + {{Cl|HEX$}}({{Cl|_RGB32}}(red, grn, blu)) 'always returns the 32 bit value
- {{Cl|COLOR}} attribute
- {{Cl|PRINT}} "{{Cl|COLOR}}" + {{Cl|STR$}}({{Cl|_RGB}}(red, grn, blu)) + " = " + hex32$(attribute) 'closest attribute
-{{Cl|NEXT}}
-{{CodeEnd}}
-{{OutputStart}}{{text|COLOR 1 = &HFF0000A8|#0000A8}}
-{{text|COLOR 2 = &HFF00A800|#00A800}}
-{{text|COLOR 3 = &HFF00A8A8|#00A8A8}}
-{{text|COLOR 4 = &HFFA80000|#A80000}}
-{{text|COLOR 5 = &HFFA800A8|#A800A8}}
-{{text|COLOR 6 = &HFFA85400|#A85400}}
-{{text|COLOR 7 = &HFFA8A8A8|#A8A8A8}}
-{{text|COLOR 8 = &HFF545454|#545454}}
-{{text|COLOR 9 = &HFF5454FC|#5454FC}}
-{{text|COLOR 10 = &HFF54FC54|#54FC54}}
-{{text|COLOR 11 = &HFF54FCFC|#54FCFC}}
-{{text|COLOR 12 = &HFFFC5454|#FC5454}}
-{{text|COLOR 13 = &HFFFC54FC|#FC54FC}}
-{{text|COLOR 14 = &HFFFCFC54|#FCFC54}}
-{{text|COLOR 15 = &HFFFCFCFC|#FCFCFC}}
-{{OutputEnd}}
-:''Note:'' This procedure also shows how the returns from [[_RGB]] and [[_RGB32]] differ in a non-32 bit screen mode.
-
-
-''Example 2:'' Working with 32 bit colors.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-
-{{Cl|CLS}} , {{Cl|_RGB32}}(0, 0, 128) 'deep blue background
-
-{{Cl|LINE}} (100, 100)-(540, 380), {{Cl|_RGB}}(255, 0, 0), BF ' a red box
-{{Cl|LINE}} (200, 200)-(440, 280), {{Cl|_RGB}}(0, 255, 0), BF ' a green box
-
-
-{{Cl|SLEEP}} 'Just so we can see our pretty background before we print anything on it.
-
-
-{{Cl|COLOR}} {{Cl|_RGB32}}(255, 255, 255), 0 'White on NO BACKGROUND
-
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} 10
- {{Cl|PRINT}} "This is just a whole bunch of happy nothing! Happy World!!"
-{{Cl|NEXT}}
-{{Cl|PRINT}}: {{Cl|PRINT}}: {{Cl|PRINT}}:
-
-{{Cl|COLOR}} 0, {{Cl|_RGB32}}(0, 0, 0) 'And here, we're going with NO {{Cl|COLOR}} text, with a BLACK background.
-'Notice how this doesn't change the color on the screen at all, where the text is, but does toss a black background to it.
-
-{{Cl|LOCATE}} , 15: {{Cl|PRINT}} "NOTICE HOW OUR 0 {{Cl|COLOR}} WORKS?"
-{{Cl|PRINT}}
-{{Cl|LOCATE}} , 15: {{Cl|PRINT}} "NEAT, HUH?"
-{{Cl|SLEEP}}
-SYSTEM
-{{CodeEnd}}{{small|Code by Steve McNeill}}
-
-
-''Example 3:'' Comparing the output of the new _RGB32 syntaxes (starting with version 1.3) and their equivalents in previous versions.
-{{CodeStart}}
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(400, 400, 32)
-
-{{Cl|COLOR}} {{Cl|_RGB32}}(255, 255, 255)
-{{Cl|PRINT}} "White"
-{{Cl|COLOR}} {{Cl|_RGB32}}(255)
-{{Cl|PRINT}} "White, too, but with less typing"
-{{Cl|PRINT}}
-
-{{Cl|COLOR}} {{Cl|_RGB32}}(80, 80, 80)
-{{Cl|PRINT}} "Dark gray"
-{{Cl|COLOR}} {{Cl|_RGB32}}(80)
-{{Cl|PRINT}} "Same gray, but with less typing"
-{{Cl|PRINT}}
-
-{{Cl|COLOR}} {{Cl|_RGBA32}}(255, 255, 255, 120)
-{{Cl|PRINT}} "White with alpha of 120 (out of 255)"
-{{Cl|COLOR}} {{Cl|_RGB32}}(255, 120)
-{{Cl|PRINT}} "White with alpha of 120 - but with less typing"
-{{Cl|PRINT}}
-
-{{Cl|COLOR}} {{Cl|_RGBA32}}(255, 0, 255, 110)
-{{Cl|PRINT}} "Magenta, 110 alpha"
-{{Cl|COLOR}} {{Cl|_RGB32}}(255, 0, 255, 110)
-{{Cl|PRINT}} "Magenta too, 110 alpha - but with less typing"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_RGBA32]], [[_RGB]], [[_RGBA]]
-* [[_RED32]], [[_GREEN32]], [[_BLUE32]]
-* [[_PALETTECOLOR]]
-* [[HEX$ 32 Bit Values]]
-* [[SAVEIMAGE]]
-* [http://www.w3schools.com/html/html_colornames.asp Hexadecimal Color Values]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RGBA32__111132.txt b/internal/help/_RGBA32__111132.txt
deleted file mode 100644
index 92350f010..000000000
--- a/internal/help/_RGBA32__111132.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:45}}
-{{DISPLAYTITLE:_RGBA32}}
-The [[_RGBA32]] function returns the 32-bit ''RGBA'' color value with the specified red, green, blue and alpha component intensities.
-
-
-{{PageSyntax}}
-: {{Parameter|color32value~&}} = [[_RGBA32]]({{Parameter|red&}}, {{Parameter|green&}}, {{Parameter|blue&}}, {{Parameter|alpha&}})
-
-
-{{PageDescription}}
-* The value returned is a 32-bit [[_UNSIGNED]] [[LONG]] color value.
-* '''Return variable types must be [[_UNSIGNED]] [[LONG]] or resulting color may lose the [[_BLUE]] value.'''
-* {{Parameter|red&}} specifies the red component intensity from 0 to 255.
-* {{Parameter|green&}} specifies the green component intensity from 0 to 255.
-* {{Parameter|blue&}} specifies the blue component intensity from 0 to 255.
-* {{Parameter|alpha&}} specifies the [[_ALPHA|''alpha'']] component transparency value from 0 (fully transparent) to 255 (opaque).
-* Alpha or intensity values outside of the valid range of 0 to 255 are clipped.
-* Returns [[LONG]] 32-bit hexadecimal values from '''&H00{{text|00|red}}{{text|00|green}}{{text|00|blue}}''' to '''&HFF{{text|FF|red}}{{text|FF|green}}{{text|FF|blue}}''' with varying [[_ALPHA]] transparency.
-* When [[LONG]] values are [[PUT]] to file, the ARGB values become BGRA. Use [[LEFT$]]([[MKL$]]({{Parameter|color32value~&}}), 3) to place 3 colors.
-* '''NOTE: Default 32-bit backgrounds are clear black or [[_RGBA]](0, 0, 0, 0). Use [[CLS]] to make the black opaque.'''
-
-
-{{PageExamples}}
-''Example:'' Changing the [[ALPHA]] value to fade an image in and out using a 32 bit PNG image.
-{{CodeStart}}
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(600, 400, 32)
-
-img& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'use any 24/32 bit image
-'Turn off auto display
-{{Cl|_DISPLAY}}
-
-' Fade in
-{{Cl|FOR...NEXT|FOR}} i% = 255 {{Cl|TO}} 0 {{Cl|STEP}} -5
- {{Cl|_LIMIT}} 20 'control fade speed
- {{Cl|_PUTIMAGE}} (0, 0)-(600, 400), img&
- {{Cl|LINE}} (0, 0)-(600, 400), {{Cl|_RGBA}}(0, 0, 0, i%), BF 'decrease black box transparency
- {{Cl|_DISPLAY}}
-{{Cl|NEXT}}
-
-' Fade out
-{{Cl|FOR...NEXT|FOR}} i% = 0 {{Cl|TO}} 255 {{Cl|STEP}} 5
- {{Cl|_LIMIT}} 20 'control fade speed
- {{Cl|_PUTIMAGE}} (0, 0)-(600, 400), img&
- {{Cl|LINE}} (0, 0)-(600, 400), {{Cl|_RGBA}}(0, 0, 0, i%), BF 'increase black box transparency
- {{Cl|_DISPLAY}}
-{{Cl|NEXT}}
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Unseen Machine}}
-
-
-{{PageSeeAlso}}
-* [[_RGB32]], [[_RGBA]], [[_RGB]]
-* [[_RED32]], [[_GREEN32]], [[_BLUE32]]
-* [[HEX$ 32 Bit Values]], [[POINT]]
-* [[SAVEIMAGE]]
-* [http://www.w3schools.com/html/html_colornames.asp Hexadecimal Color Values]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_RGBA__1111.txt b/internal/help/_RGBA__1111.txt
deleted file mode 100644
index ce33b6285..000000000
--- a/internal/help/_RGBA__1111.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:44}}
-{{DISPLAYTITLE:_RGBA}}
-The [[_RGBA]] function returns the closest palette index (legacy SCREEN modes) OR the 32-bit [[LONG]] color value (32-bit screens).
-
-
-{{PageSyntax}}
-: {{Parameter|colorIndex~&}} = [[_RGBA]]({{Parameter|red&}}, {{Parameter|green&}}, {{Parameter|blue&}}, {{Parameter|alpha&}}[, {{Parameter|imageHandle&}}]''')'''
-
-
-* The value returned is either the closest color attribute number or a 32-bit [[_UNSIGNED]] [[LONG]] color value.
-* '''Return variable types must be [[LONG]] or the resulting color may lose the [[_BLUE]] value.'''
-* {{Parameter|red&}} specifies the red component intensity from 0 to 255.
-* {{Parameter|green&}} specifies the green component intensity from 0 to 255.
-* {{Parameter|blue&}} specifies the blue component intensity from 0 to 255.
-* The [[_ALPHA|''alpha&'']] value can be set to make the color transparent (0), opaque (255) or somewhere in between.
-* Parameter values outside of the 0 to 255 range are clipped.
-* Returns [[LONG]] 32-bit hexadecimal values from '''&H00{{text|00|red}}{{text|00|green}}{{text|00|blue}}''' to '''&HFF{{text|FF|red}}{{text|FF|green}}{{text|FF|blue}}''' with varying [[_ALPHA]] transparency.
-* When [[LONG]] values are [[PUT]] to file, the ARGB values become BGRA. Use [[LEFT$]]([[MKL$]]({{Parameter|colorIndex~&}}), 3) to place 3 colors.
-* If {{Parameter|imageHandle&}} is omitted, the image is assumed to be the current [[_DEST|destination]] or [[SCREEN]] page.
-* Allows the blending of pixel colors red, green and blue to create any of 16 million colors.
-* '''NOTE: Default 32-bit backgrounds are clear black or [[_RGBA]](0, 0, 0, 0). Use [[CLS]] to make the black opaque.'''
-
-
-{{PageExamples}}
-''Example:'' Setting a font's background color alpha to clear to overlay a second text color.
-{{CodeStart}}
-scrn& = {{Cl|_NEWIMAGE}}(400, 400, 32)
-{{Cl|SCREEN (statement)|SCREEN}} scrn&
-fnt& = {{Cl|_LOADFONT}}("C:\WINDOWS\FONTS\ARIAL.TTF", 26)
-{{Cl|_FONT}} fnt&
-X% = 20
-Y% = 20
-{{Cl|COLOR}} {{Cl|_RGB}}(255, 255, 255), {{Cl|_RGB}}(0, 0, 0) 'Foreground set to WHITE background to BLACK
-{{Cl|_PRINTSTRING}} (X%, Y%), "Hello World"
-{{Cl|COLOR}} {{Cl|_RGB}}(255, 0, 0), {{Cl|_RGBA}}(0, 0, 0, 0) 'Foreground set to RED background to TRANSPARENT BLACK
-{{Cl|_PRINTSTRING}} (X% + 2, Y% + 2), "Hello World"
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Unseen Machine}}
-''Explanation:'' [[_PRINTSTRING]] allows text or font colors to be alpha blended in 32 bit screens.
-
-
-{{PageSeeAlso}}
-* [[_RGB]], [[_RGB32]], [[_RGBA32]]
-* [[_RED]], [[_GREEN]], [[_BLUE]]
-* [[_LOADIMAGE]]
-* [[_PRINTSTRING]]
-* [[HEX$ 32 Bit Values]], [[POINT]]
-* [[SAVEIMAGE]]
-* [http://www.w3schools.com/html/html_colornames.asp Hexadecimal Color Values]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_RGB__111.txt b/internal/help/_RGB__111.txt
deleted file mode 100644
index f111df467..000000000
--- a/internal/help/_RGB__111.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:41}}
-{{DISPLAYTITLE:_RGB}}
-The [[_RGB]] function returns the closest palette attribute index (legacy SCREEN modes) OR the [[LONG]] 32-bit color value (32-bit screens).
-
-
-{{PageSyntax}}
-: {{Parameter|colorIndex~&}} = [[_RGB]]({{Parameter|red&}}, {{Parameter|green&}}, {{Parameter|blue&}}[, {{Parameter|imageHandle&}}])
-
-
-{{PageDescription}}
-* The value returned is either the closest color attribute number or a 32-bit [[_UNSIGNED]] [[LONG]] color value.
-* '''Return variable types must be [[LONG]] or resulting color may lose the [[_BLUE]] value.'''
-* {{Parameter|red&}} specifies the red component intensity from 0 to 255.
-* {{Parameter|green&}} specifies the green component intensity from 0 to 255.
-* {{Parameter|blue&}} specifies the blue component intensity from 0 to 255.
-* Intensity values outside the valid range are clipped.
-* Returns [[LONG]] 32-bit hexadecimal values from '''&HFF{{text|00|red}}{{text|00|green}}{{text|00|blue}}''' to '''&HFF{{text|FF|red}}{{text|FF|green}}{{text|FF|blue}}''', always with full [[_ALPHA]].
-* When [[LONG]] values are [[PUT]] to file, the ARGB values become BGRA. Use [[LEFT$]]([[MKL$]]({{Parameter|colorIndex~&}}), 3) to place 3 colors.
-* If the {{Parameter|imageHandle&}} is omitted the image is assumed to be the current [[_DEST|destination]] or [[SCREEN]] page.
-* Colors returned are always opaque as the transparency value is always 255. Use [[_ALPHA]] or [[_CLEARCOLOR]] to change it.
-* '''NOTE: Default 32-bit backgrounds are clear black or [[_RGBA]](0, 0, 0, 0). Use [[CLS]] to make the black opaque.'''
-
-
-{{PageExamples}}
-''Example:'' Converting the color port RGB intensity palette values 0 to 63 to 32 bit hexadecimal values.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|DIM}} hex32$(15)
-{{Cl|FOR...NEXT|FOR}} attribute = 1 {{Cl|TO}} 15
- {{Cl|OUT}} {{Cl|&H}}3C7, attribute 'set color attribute to read
- red = {{Cl|INP}}({{Cl|&H}}3C9) * 4 'multiply by 4 to convert intensity to 0 to 255 RGB values
- grn = {{Cl|INP}}({{Cl|&H}}3C9) * 4
- blu = {{Cl|INP}}({{Cl|&H}}3C9) * 4
- hex32$(attribute) = "{{Cl|&H}}" + {{Cl|HEX$}}({{Cl|_RGB32}}(red, grn, blu)) 'always returns the 32 bit value
- {{Cl|COLOR}} attribute
- {{Cl|PRINT}} "{{Cl|COLOR}}" + {{Cl|STR$}}({{Cl|_RGB}}(red, grn, blu)) + " = " + hex32$(attribute) 'closest attribute
-{{Cl|NEXT}}
-{{CodeEnd}}
-{{OutputStart}}{{text|COLOR 1 = &HFF0000A8|#0000A8}}
-{{text|COLOR 2 = &HFF00A800|#00A800}}
-{{text|COLOR 3 = &HFF00A8A8|#00A8A8}}
-{{text|COLOR 4 = &HFFA80000|#A80000}}
-{{text|COLOR 5 = &HFFA800A8|#A800A8}}
-{{text|COLOR 6 = &HFFA85400|#A85400}}
-{{text|COLOR 7 = &HFFA8A8A8|#A8A8A8}}
-{{text|COLOR 8 = &HFF545454|#545454}}
-{{text|COLOR 9 = &HFF5454FC|#5454FC}}
-{{text|COLOR 10 = &HFF54FC54|#54FC54}}
-{{text|COLOR 11 = &HFF54FCFC|#54FCFC}}
-{{text|COLOR 12 = &HFFFC5454|#FC5454}}
-{{text|COLOR 13 = &HFFFC54FC|#FC54FC}}
-{{text|COLOR 14 = &HFFFCFC54|#FCFC54}}
-{{text|COLOR 15 = &HFFFCFCFC|#FCFCFC}}
-{{OutputEnd}}
-:''Note:'' This procedure also shows how the returns from [[_RGB]] and [[_RGB32]] differ in a non-32 bit screen mode.
-
-
-{{PageSeeAlso}}
-* [[_RGBA]], [[_RGB32]], [[_RGBA32]]
-* [[_RED]], [[_GREEN]], [[_BLUE]]
-* [[_LOADIMAGE]], [[_NEWIMAGE]]
-* [[HEX$ 32 Bit Values]], [[POINT]]
-* [[SAVEIMAGE]]
-* [http://www.w3schools.com/html/html_colornames.asp Hexadecimal Color Values]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_ROUND__11111.txt b/internal/help/_ROUND__11111.txt
deleted file mode 100644
index eae5b954a..000000000
--- a/internal/help/_ROUND__11111.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:46}}
-{{DISPLAYTITLE:_ROUND}}
-The [[_ROUND]] function rounds to the closest even [[INTEGER]], [[LONG]] or [[_INTEGER64]] numerical value.
-
-
-{{PageSyntax}}
-: {{Parameter|value}} = [[_ROUND]]({{Parameter|number}})
-
-
-{{PageDescription}}
-* Can round [[SINGLE]], [[DOUBLE]] or [[_FLOAT]] floating decimal point parameter values.
-* Can be used when numerical values exceed the limits of [[CINT]] or [[CLNG]].
-* Rounding is done to the closest even [[INTEGER|integer]] value. The same as QBasic does with [[\|integer division]].
-
-
-''Example:'' Displays how QB64 rounds to the closest even integer value.
-{{CodeStart}}
-{{Cl|PRINT}} {{Cl|_ROUND}}(0.5)
-{{Cl|PRINT}} {{Cl|_ROUND}}(1.5)
-{{Cl|PRINT}} {{Cl|_ROUND}}(2.5)
-{{Cl|PRINT}} {{Cl|_ROUND}}(3.5)
-{{Cl|PRINT}} {{Cl|_ROUND}}(4.5)
-{{Cl|PRINT}} {{Cl|_ROUND}}(5.5)
-{{CodeEnd}}
-{{OutputStart}}0
-2
-2
-4
-4
-6
-{{OutputEnd}}
-
-
-''See also:''
-* [[INT]], [[CINT]]
-* [[FIX]], [[CLNG]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SCREENCLICK__11111111111.txt b/internal/help/_SCREENCLICK__11111111111.txt
deleted file mode 100644
index 1e0c5b94c..000000000
--- a/internal/help/_SCREENCLICK__11111111111.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:47}}
-{{DISPLAYTITLE:_SCREENCLICK}}
-The [[_SCREENCLICK]] statement simulates clicking on a pixel coordinate on the desktop screen with the left mouse button.
-
-
-{{PageSyntax}}
-: [[_SCREENCLICK]] {{Parameter|column%}}, {{Parameter|row%}}[, {{Parameter|button%}}]
-
-
-{{PageDescription}}
-* {{Parameter|column%}} is the horizontal pixel coordinate position on the screen.
-* {{Parameter|row%}} is the vertical pixel coordinate position on the screen.
-* Optional {{Parameter|button%}} can be used to specify left button (1, default), right button (2) or middle button (3) (available with '''build 20170924/68''').
-* Coordinates can range from 0 to the [[_DESKTOPWIDTH]] and [[_DESKTOPHEIGHT]]. The desktop image acquired by [[_SCREENIMAGE]] can be used to map the coordinates required.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]
-
-
-{{PageSeeAlso}}
-* [[_SCREENIMAGE]], [[_SCREENPRINT]]
-* [[_SCREENMOVE]], [[_SCREENX]], [[_SCREENY]]
-* [[_DESKTOPWIDTH]], [[_DESKTOPHEIGHT]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SCREENEXISTS__111111111111.txt b/internal/help/_SCREENEXISTS__111111111111.txt
deleted file mode 100644
index 2b1418e49..000000000
--- a/internal/help/_SCREENEXISTS__111111111111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:48}}
-{{DISPLAYTITLE:_SCREENEXISTS}}
-The [[_SCREENEXISTS]] function returns true (-1) once a screen has been created.
-
-
-{{PageSyntax}}
-: {{Parameter|screenReady%%}} = [[_SCREENEXISTS]]
-
-
-{{PageDescription}}
-* Function returns true (-1) once a program screen is available to use or change.
-* Can be used to avoid program errors because a screen was not ready for input or alterations.
-** Use before [[_TITLE]], [[_SCREENMOVE]] and other functions that require the output window to have been created.
-
-
-{{PageExamples}}
-;Example:Waiting in a loop until the screen exists to add the title. The [[_LIMIT]] prevents the loop from using all CPU time while waiting.
-{{CodeStart}}
-{{Cl|SCREEN}} 12
-{{Cl|DO}}: {{Cl|_LIMIT}} 10: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|_SCREENEXISTS}}
-{{Cl|_TITLE}} "My Title"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_FULLSCREEN]]
-* [[_SCREENIMAGE]]
-* [[$CONSOLE]]
-* [[$RESIZE]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_SCREENHIDE__1111111111.txt b/internal/help/_SCREENHIDE__1111111111.txt
deleted file mode 100644
index 99aa330bc..000000000
--- a/internal/help/_SCREENHIDE__1111111111.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:50}}
-{{DISPLAYTITLE:_SCREENHIDE}}
-The [[_SCREENHIDE]] statement can be used to hide the main program window in a section of code.
-
-
-{{PageSyntax}}
-: [[_SCREENHIDE]]
-
-
-{{PageDescription}}
-* Use [[_SCREENHIDE]] to get rid of the main program window until later in the program.
-* Use the respective [[Metacommand]] to get rid of the program window throughout a program or when using [[$CONSOLE]].
-
-
-{{PageSeeAlso}}
-* [[$SCREENHIDE]], [[$SCREENSHOW]], [[$CONSOLE]] ([[Metacommand#QB64 Metacommands|QB64 Metacommands]])
-* [[_SCREENSHOW]], [[_CONSOLE]]
-* [[_SCREENICON]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_SCREENICON_(function)__1111111111_(00000000).txt b/internal/help/_SCREENICON_(function)__1111111111_(00000000).txt
deleted file mode 100644
index 0d24e46d0..000000000
--- a/internal/help/_SCREENICON_(function)__1111111111_(00000000).txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:52}}
-{{DISPLAYTITLE:_SCREENICON (function)}}
-The [[_SCREENICON (function)|_SCREENICON]] function returns true (-1) or false (0) to indicate whether the window has been minimized to an icon on the taskbar.
-
-
-{{PageSyntax}}
-: {{Parameter|isMinimized%%}} = [[_SCREENICON (function)|_SCREENICON]]
-
-
-{{PageDescription}}
-* The function returns true (-1) when the program is minimized to the task bar and false (0) when not.
-
-
-{{PageSeeAlso}}
-* [[_SCREENICON]]
-* [[_SCREENHIDE]]
-* [[_SCREENSHOW]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_SCREENICON__1111111111.txt b/internal/help/_SCREENICON__1111111111.txt
deleted file mode 100644
index de5a0cc7f..000000000
--- a/internal/help/_SCREENICON__1111111111.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:53}}
-{{DISPLAYTITLE:_SCREENICON}}
-The [[_SCREENICON]] statement can be used to minimize the main program window to the taskbar.
-
-
-{{PageSyntax}}
-: [[_SCREENICON]]
-
-
-{{PageDescription}}
-* Use [[_SCREENICON]] to minimize the main program window to the taskbar.
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageSeeAlso}}
-* [[$SCREENHIDE]], [[$SCREENSHOW]], [[$CONSOLE]] (QB64 [[Metacommand]]s)
-* [[_SCREENHIDE]], [[_SCREENSHOW]], [[_CONSOLE]]
-* [[_SCREENICON (function)]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SCREENIMAGE__11111111111.txt b/internal/help/_SCREENIMAGE__11111111111.txt
deleted file mode 100644
index 6a15e0050..000000000
--- a/internal/help/_SCREENIMAGE__11111111111.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:54}}
-{{DISPLAYTITLE:_SCREENIMAGE}}
-The [[_SCREENIMAGE]] function stores the current desktop image or a portion of it and returns an image handle.
-
-
-{{PageSyntax}}
-: {{Parameter|imageHandle&}} = [[_SCREENIMAGE]]({{Parameter|column1}}, {{Parameter|row1}}, {{Parameter|column2}}, {{Parameter|row2}})]
-
-
-{{PageDescription}}
-* {{Parameter|imageHandle&}} is the handle to the new image in memory that will contain the desktop screenshot.
-* The optional screen {{Parameter|column}} and {{Parameter|row}} positions can be used to get only a portion of the desktop image.
-* The desktop image or partial image is always a 32-bit image.
-* The current screen resolution or width-to-height aspect ratio can be obtained with [[_DESKTOPWIDTH]] and [[_DESKTOPHEIGHT]].
-* Can be used to take screenshots of the desktop or used with [[_PRINTIMAGE]] to print them.
-* It is important to free unused or uneeded image handles with [[_FREEIMAGE]] to prevent memory overflow errors.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword not Supported in Linux or MAC versions]]
-
-
-{{PageExamples}}
-''Example:'' Determining the present screen resolution of user's PC for a screensaver program.
-{{CodeStart}}
- desktop& = {{Cl|_SCREENIMAGE}}
- MaxScreenX& = {{Cl|_WIDTH (function)|_WIDTH}}(desktop&)
- MaxScreenY& = {{Cl|_HEIGHT}}(desktop&)
- {{Cl|_FREEIMAGE}} desktop& 'free image after measuring screen(it is not displayed)
- {{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(MaxScreenX&, MaxScreenY&, 256) 'program window is sized to fit
- {{Cl|_SCREENMOVE}} _MIDDLE
-{{CodeEnd}}
-
-
-===Sample code to save images to disk===
-*[[SAVEIMAGE]]
-*[[Program ScreenShots]] (member-contributed program for legacy screen modes)
-* [[ThirtyTwoBit SUB]]
-* [[SaveIcon32]]
-
-
-
-{{PageSeeAlso}}
-* [[_SCREENCLICK]], [[_SCREENPRINT]]
-* [[_SCREENMOVE]], [[_SCREENX]], [[_SCREENY]]
-* [[_WIDTH (function)|_WIDTH]], [[_HEIGHT]]
-* [[_DESKTOPWIDTH]], [[_DESKTOPHEIGHT]]
-* [[_FULLSCREEN]], [[_PRINTIMAGE]]
-* [[Screen Saver Programs]]
-* [[Bitmaps]], [[Icons and Cursors]]
-* [[Hardware images]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SCREENMOVE__1111111111.txt b/internal/help/_SCREENMOVE__1111111111.txt
deleted file mode 100644
index 5e088f6b4..000000000
--- a/internal/help/_SCREENMOVE__1111111111.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:38:45}}
-{{DISPLAYTITLE:_SCREENMOVE}}
-The [[_SCREENMOVE]] statement positions the program window on the desktop using designated coordinates.
-
-
-{{PageSyntax}}
-: [[_SCREENMOVE]] {{{Parameter|column&}}, {{Parameter|row&}}|_MIDDLE}
-
-
-{{Parameters}}
-* Positions the program window on the desktop using the {{Parameter|column&}} and {{Parameter|row&}} pixel coordinates for the upper left corner.
-* '''_MIDDLE''' can be used instead to automatically center the program window on the desktop, in any screen resolution.
-
-
-{{PageDescription}}
-* The program's [[SCREEN]] dimensions may influence the desktop position that can be used to keep the entire window on the screen.
-* Use [[_DESKTOPWIDTH]] and [[_DESKTOPHEIGHT]] to find the current desktop resolution to place the program's window.
-* On dual monitors a negative {{Parameter|column&}} position or a value greater than the main screen width can be used to position a window in another monitor.
-* '''A small delay may be necessary when a program first starts up to properly orient the screen on the desktop properly.''' See [[_SCREENEXISTS]].
-* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword not supported in Linux versions]]'''
-
-
-{{PageExamples}}
-''Example 1:'' Calculating the border and header offsets by comparing a coordinate move with _MIDDLE by using trial and error.
-{{CodeStart}}
-userwidth& = {{Cl|_DESKTOPWIDTH}}: userheight& = {{Cl|_DESKTOPHEIGHT}} 'get current screen resolution
-{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 256)
-scrnwidth& = {{Cl|_WIDTH}}: scrnheight& = {{Cl|_HEIGHT}} 'get the dimensions of the program screen
-
-{{Cl|_SCREENMOVE}} (userwidth& \ 2 - scrnwidth& \ 2) - 3, (userheight& \ 2 - scrnheight& \ 2) - 29
-{{Cl|_DELAY}} 4
-{{Cl|_SCREENMOVE}} _MIDDLE 'check centering
-
-{{Cl|END}}
-{{CodeEnd}}
-: When positioning the window, offset the position by -3 columns and - 29 rows to calculate the top left corner coordinate.
-
-
-''Example 2:'' Moving a program window to a second monitor positioned to the right of the main desktop.
-{{CodeStart}}
-wide& = {{Cl|_DESKTOPWIDTH}}
-high& = {{Cl|_DESKTOPHEIGHT}}
-
-{{Cl|PRINT}} wide&; "X"; high&
-
-{{Cl|_DELAY}} 4
-{{Cl|_SCREENMOVE}} wide& + 200, 200 'positive value for right monitor 2
-
-img2& = {{Cl|_SCREENIMAGE}}
-wide2& = {{Cl|_WIDTH (function)|_WIDTH}}(img2&)
-high2& = {{Cl|_HEIGHT}}(img2&)
-{{Cl|PRINT}} wide2&; "X"; high2&
-{{Cl|_DELAY}} 4
-{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}} 'moves program back to main monitor 1
-{{CodeEnd}}
-: ''Notes:'' Change the [[_SCREENMOVE]] column to negative for a left monitor.
-
-'''[[_FULLSCREEN]] works in the primary monitor and may push all running programs to a monitor on the right.'''
-
-
-{{PageSeeAlso}}
-* [[_SCREENX]], [[_SCREENY]]
-* [[_SCREENIMAGE]], [[_DESKTOPWIDTH]], [[_DESKTOPHEIGHT]]
-* [[_SCREENPRINT]]
-* [[_SCREENEXISTS]]
-* [[_NEWIMAGE]], [[SCREEN (statement)]]
-
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SCREENPRINT__11111111111.txt b/internal/help/_SCREENPRINT__11111111111.txt
deleted file mode 100644
index 60ae38191..000000000
--- a/internal/help/_SCREENPRINT__11111111111.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:55}}
-{{DISPLAYTITLE:_SCREENPRINT}}
-The [[_SCREENPRINT]] statement simulates typing text into a Windows focused program.
-
-
-{{PageSyntax}}
-: [[_SCREENPRINT]] {{Parameter|text$}}
-
-
-{{PageDescription}}
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword not supported in Linux or MAC versions]]
-* {{Parameter|text$}} is the text to be typed into a focused program's text entry area, one character at a time.
-* Set the focus to a desktop program by using the [[_SCREENIMAGE]] handle as the [[_SOURCE]]. Use the image to map the desired area.
-* [[_SCREENCLICK]] can also be used to set the focus to a program's text entry area on the desktop.
-*'''Note: If the focus is not set correctly, the text may be printed to the QB64 IDE, if open, or not printed at all.'''
-* Ctrl + letter key shortcuts can be simulated using the appropriate [[ASCII]] Control character codes 1 to 26 shown below:
-{{WhiteStart}} CTRL + A = CHR$(1) ☺ StartHeader (SOH) CTRL + B = CHR$(2) ☻ StartText (STX)
- CTRL + C = CHR$(3) ♥ EndText (ETX) CTRL + D = CHR$(4) ♦ EndOfTransmit (EOT)
- CTRL + E = CHR$(5) ♣ Enquiry (ENQ) CTRL + F = CHR$(6) ♠Acknowledge (ACK)
- CTRL + G = CHR$(7) • [[BEEP]] (BEL) CTRL + H = CHR$(8) ◘ '''[Backspace]''' (BS)
- CTRL + I = CHR$(9) â—‹ Horiz.Tab '''[Tab]''' CTRL + J = CHR$(10) â—™ LineFeed(printer) (LF)
- CTRL + K = CHR$(11) ♂ Vert. Tab (VT) CTRL + L = CHR$(12) ♀ FormFeed(printer) (FF)
- CTRL + M = CHR$(13) ♪ '''[Enter]''' (CR) CTRL + N = CHR$(14) ♫ ShiftOut (SO)
- CTRL + O = CHR$(15) ☼ ShiftIn (SI) CTRL + P = CHR$(16) ► DataLinkEscape (DLE)
- CTRL + Q = CHR$(17) ◄ DevControl1 (DC1) CTRL + R = CHR$(18) ↕ DeviceControl2 (DC2)
- CTRL + S = CHR$(19) ‼ DevControl3 (DC3) CTRL + T = CHR$(20) ¶ DeviceControl4 (DC4)
- CTRL + U = CHR$(21) § NegativeACK (NAK) CTRL + V = CHR$(22) ▬ Synchronous Idle (SYN)
- CTRL + W = CHR$(23) ↨ EndTXBlock (ETB) CTRL + X = CHR$(24) ↑ Cancel (CAN)
- CTRL + Y = CHR$(25) ↓ EndMedium (EM) CTRL + Z = CHR$(26) → End Of File(SUB) (EOF)
-{{WhiteEnd}}
-
-
-{{PageExamples}}
-''Example:'' Printing text into a Windows text editor (Notepad) and copying to the clipboard. May not work on all systems.
-{{CodeStart}}
-{{Cl|DEFLNG}} A-Z
-{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
-{{Cl|PRINT}} "OPENing and MAXIMIZING Notepad in 5 seconds..."; : {{Cl|_DELAY}} 5
-{{Cl|SHELL}} {{Cl|_DONTWAIT}} "START /MAX NotePad.exe" 'opens Notepad file "untitled.txt"
-'detect notepad open and maximized
-'condition: 80% or more of the screen is white
-{{Cl|DO}} 'read the desktop screen image for maximized window
- s = {{Cl|_SCREENIMAGE}}
- {{Cl|_SOURCE}} s
- z = 0
- {{Cl|FOR...NEXT|FOR}} y = 0 {{Cl|TO}} {{Cl|_HEIGHT}}(s) - 1 'scan for large white area
- {{Cl|FOR...NEXT|FOR}} x = 0 {{Cl|TO}} _{{Cl|WIDTH}}(s) - 1
- c = {{Cl|POINT}}(x, y)
- {{Cl|IF}} c = {{Cl|_RGB32}}(255, 255, 255) {{Cl|THEN}} z = z + 1
- {{Cl|NEXT}}
- {{Cl|NEXT}}
- {{Cl|IF}} z / ({{Cl|_HEIGHT}}(s) * _{{Cl|WIDTH}}(s)) > 0.8 {{Cl|THEN}} {{Cl|EXIT DO}} 'when 80% of screen is white
- {{Cl|_FREEIMAGE}} s 'free desktop image
- {{Cl|_LIMIT}} 1 'scans 1 loop per second
-{{Cl|PRINT}} ".";
-{{Cl|LOOP}}
-{{Cl|PRINT}}
-{{Cl|PRINT}} "NOTEPAD detected as OPEN and MAXIMIZED"
-
-
-{{Cl|_SCREENPRINT}} "HELLO WORLD"
-{{Cl|SLEEP}} 2
-{{Cl|_SCREENPRINT}} {{Cl|CHR$}}(8) + {{Cl|CHR$}}(8) + {{Cl|CHR$}}(8) + {{Cl|CHR$}}(8) + {{Cl|CHR$}}(8) 'backspace 5 characters
-{{Cl|SLEEP}} 3
-{{Cl|_SCREENPRINT}} "QB64!"
-{{Cl|SLEEP}} 2
-{{Cl|_SCREENPRINT}} {{Cl|CHR$}}(1) 'CTRL + A select all
-{{Cl|SLEEP}} 2
-{{Cl|_SCREENPRINT}} {{Cl|CHR$}}(3) 'CTRL + C copy to clipboard
-{{Cl|SLEEP}} 2
-{{Cl|PRINT}} {{Cl|_CLIPBOARD$}}
-{{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "QB64 ROCKS!"
-{{Cl|SLEEP}} 2
-{{Cl|_SCREENPRINT}} {{Cl|CHR$}}(22) 'CTRL + V paste from clipboard
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Galleon}}
-:''Explanation:'' If the Windows shortcuts are set up properly, printing ASCII Control characters acts like the user selected the control + letter combinations to ''Select all'' (CHR$(1)), ''Copy'' (CHR$(3)) and ''Paste'' (CHR$(22)) the text with the Windows Clipboard. If the editor program's CTRL key combinations are different, use the matching letter [[ASCII]] code from A = 1 to Z = 26 in the text editor.
-
-
-{{PageSeeAlso}}
-* [[_SCREENIMAGE]], [[_SCREENCLICK]]
-* [[_SCREENMOVE]], [[_SCREENX]], [[_SCREENY]]
-* [[ASCII]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SCREENSHOW__1111111111.txt b/internal/help/_SCREENSHOW__1111111111.txt
deleted file mode 100644
index 6fd3b1b65..000000000
--- a/internal/help/_SCREENSHOW__1111111111.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:57}}
-{{DISPLAYTITLE:_SCREENSHOW}}
-The [[_SCREENSHOW]] statement can be used to display the main program window in a section of code.
-
-
-{{PageSyntax}}
-: [[_SCREENSHOW]]
-
-
-{{PageDescription}}
-* Use [[_SCREENSHOW]] to display the main program window after it was hidden by [[_SCREENHIDE]].
-
-
-{{PageSeeAlso}}
-* [[$SCREENHIDE]], [[$SCREENSHOW]], [[$CONSOLE]] ([[Metacommand#QB64 Metacommands|QB64 Metacommands]])
-* [[_SCREENHIDE]], [[_CONSOLE]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_SCREENX__1111111.txt b/internal/help/_SCREENX__1111111.txt
deleted file mode 100644
index b836b25e0..000000000
--- a/internal/help/_SCREENX__1111111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:58}}
-{{DISPLAYTITLE:_SCREENX}}
-The [[_SCREENX]] function returns the current column pixel coordinate of the program window on the desktop.
-
-
-{{PageSyntax}}
-: {{Parameter|positionX&}} = [[_SCREENX]]
-
-
-{{PageDescription}}
-* Function returns the current program window's upper left corner column position on the desktop.
-* Use [[_DESKTOPWIDTH]] and [[_DESKTOPHEIGHT]] to find the current Windows desktop resolution to adjust the position with [[_SCREENMOVE]].
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword not Supported in Linux or MAC versions]]
-
-
-{{PageExamples}}
-''Example:'' Clicks and opens program window header menu:
-{{CodeStart}}{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}}
-{{Cl|_SCREENCLICK}} {{Cl|_SCREENX}} + 10, {{Cl|_SCREENY}} + 10
-{{Cl|PRINT}} "Hello window!"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SCREENY]]
-* [[_SCREENIMAGE]]
-* [[_SCREENCLICK]]
-* [[_SCREENPRINT]]
-* [[_SCREENMOVE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SCREENY__1111111.txt b/internal/help/_SCREENY__1111111.txt
deleted file mode 100644
index 6d93f2279..000000000
--- a/internal/help/_SCREENY__1111111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:39:59}}
-{{DISPLAYTITLE:_SCREENY}}
-The [[_SCREENY]] function returns the current row pixel coordinate of the program window on the desktop.
-
-
-{{PageSyntax}}
-: {{Parameter|positionY&}} = [[_SCREENY]]
-
-
-{{PageDescription}}
-* Function returns the current program window's upper left corner row position on the desktop.
-* Use [[_DESKTOPWIDTH]] and [[_DESKTOPHEIGHT]] to find the current user's Windows desktop resolution to adjust the position with [[_SCREENMOVE]].
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword not Supported in Linux or MAC versions]]
-
-
-{{PageExamples}}
-''Example:'' Clicks and opens program window header menu:
-{{CodeStart}}{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}}
-{{Cl|_SCREENCLICK}} {{Cl|_SCREENX}} + 10, {{Cl|_SCREENY}} + 10
-{{Cl|PRINT}} "Hello window!"
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SCREENX]]
-* [[_SCREENIMAGE]]
-* [[_SCREENCLICK]]
-* [[_SCREENPRINT]]
-* [[_SCREENMOVE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SCROLLLOCK_(function)__1111111111_(00000000).txt b/internal/help/_SCROLLLOCK_(function)__1111111111_(00000000).txt
deleted file mode 100644
index e95fed17f..000000000
--- a/internal/help/_SCROLLLOCK_(function)__1111111111_(00000000).txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:01}}
-{{DISPLAYTITLE: _SCROLLLOCK (function)}}
-The [[_SCROLLLOCK (function)| _SCROLLLOCK]] function returns the current state of the Scroll Lock key as on (-1) or off (0).
-
-
-{{PageSyntax}}
-: {{Parameter|keyStatus%%}} = [[_SCROLLLOCK (function)| _SCROLLLOCK]]
-
-
-{{PageAvailability}}
-* '''QB64 1.4 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageSeeAlso}}
-* [[_CAPSLOCK (function)]], [[_NUMLOCK (function)]]
-* [[_CAPSLOCK]] (statement), [[_NUMLOCK]] (statement), [[_SCROLLLOCK]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SCROLLLOCK__1111111111.txt b/internal/help/_SCROLLLOCK__1111111111.txt
deleted file mode 100644
index 19adededc..000000000
--- a/internal/help/_SCROLLLOCK__1111111111.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:02}}
-{{DISPLAYTITLE: _SCROLLLOCK}}
-The [[_SCROLLLOCK]] statement sets the state of the Scroll Lock key.
-
-
-{{PageSyntax}}
-: [[_SCROLLLOCK]] {ON|OFF|_TOGGLE}
-
-
-{{PageAvailability}}
-* '''QB64 1.4 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-{{PageSeeAlso}}
-* [[_CAPSLOCK (function)]], [[_NUMLOCK (function)]], [[_SCROLLLOCK (function)]]
-* [[_CAPSLOCK]] (statement), [[_NUMLOCK]] (statement)
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SETALPHA__11111111.txt b/internal/help/_SETALPHA__11111111.txt
deleted file mode 100644
index 60498b7f1..000000000
--- a/internal/help/_SETALPHA__11111111.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:03}}
-{{DISPLAYTITLE:_SETALPHA}}
-The [[_SETALPHA]] statement sets the alpha channel transparency level of some or all of the pixels of an image.
-
-
-{{PageSyntax}}
-: [[_SETALPHA]] {{Parameter|alpha&}}[, {{Parameter|color1&}}][ [[TO]] {{Parameter|colour2&}}] [, {{Parameter|imageHandle&}}]
-
-
-{{Parameters}}
-* {{Parameter|alpha&}} is the new alpha level to set, ranging from 0 (transparent) to 255 (opaque).
-* {{Parameter|color1&}} designates the 32-bit [[LONG]] color value or range of color values {{Parameter|color1&}} TO {{Parameter|colour2&}} to set the transparency.
-* If no color value or range of colors is given, the entire image's alpha is changed, including any [[_CLEARCOLOR]] settings.
-* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current write page or [[_DEST|destination]] image.
-
-
-{{PageDescription}}
-* In the first syntax, the alpha level of all pixels is set to {{Parameter|alpha&}}.
-* In the second syntax, the alpha level of all pixels matching the color {{Parameter|color1&}} is set to {{Parameter|alpha&}}.
-* In the third syntax, the alpha level of all pixels with red, green, blue and alpha channels in the range [{{Parameter|color1&}} TO {{Parameter|color2&}}] are set.
-* The [[_ALPHA]] setting makes a 32-bit color transparent, opaque or something in between. Zero is clear and 255 totally blocks underlying images. Use it to see through backgrounds or image colors.
-* If {{Parameter|alpha&}} is outside that range, an [[ERROR Codes|illegal function call]] error will occur.
-* If the image specified by {{Parameter|imageHandle&}} uses a palette, an [[ERROR Codes|invalid handle]] error will occur.
-* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|illegal function call]] error will occur.
-* '''NOTE: 32-bit [[_NEWIMAGE]] screen page backgrounds are transparent black or [[_ALPHA]] 0. Use [[_DONTBLEND]] or [[CLS]] for opaque.'''
-
-
-{{PageExamples}}
-''Example:'' Using a _SETALPHA color range to fade an image in and out while not affecting the transparent white background.
-{{CodeStart}}
-main = {{Cl|_NEWIMAGE}}(640, 480, 32)
-{{Cl|SCREEN}} main
-{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}}
-
-Image1& = {{Cl|_LOADIMAGE}}("qb64_trans.png") '<<< PNG file with white background to hide
-{{Cl|_SOURCE}} Image1&
-clr~& = {{Cl|POINT}}(0, 0) 'find background color of image
-{{Cl|_CLEARCOLOR}} clr~&, Image1& 'set background color as transparent
-
-topclr~& = clr~& - {{Cl|_RGBA}}(1, 1, 1, 0) 'get topmost color range just below full white
-{{Cl|_DEST}} main
-
-a& = 0
-d = 1
-DO
- {{Cl|_LIMIT}} 10 'regulate speed of fade in and out
- {{Cl|CLS}} ', {{Cl|_RGB}}(255, 0, 0)
- a& = a& + d
- {{Cl|IF...THEN|IF}} a& = 255 {{Cl|THEN}} d = -d
- {{Cl|_SETALPHA}} a&, 0 {{Cl|TO}} topclr~&, Image1& 'affects all colors below bright white
- {{Cl|_PUTIMAGE}} (0, 342), Image1&
- {{Cl|LOCATE}} 1, 1: {{Cl|PRINT}} "Alpha: "; a&
- {{Cl|_DISPLAY}}
-{{Cl|LOOP}} {{Cl|UNTIL}} a& = 0
-{{CodeEnd}}
-: ''Explanation:'' The [[POINT]] value minus [[_RGBA]](1, 1, 1, 0) subtracts a small amount from the bright white color value so that the top [[_SETALPHA]] color range will not affect the [[_CLEARCOLOR]] transparency of the bright white PNG background.
-
-
-{{PageSeeAlso}}
-* [[_ALPHA]], [[_ALPHA32]]
-* [[_RGBA]], [[_RGBA32]]
-* [[_CLEARCOLOR]]
-* [[_CLEARCOLOR (function)]]
-* [[_BLEND]], [[_DONTBLEND]]
-* [[COLOR]], [[Images]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SETBIT__111111.txt b/internal/help/_SETBIT__111111.txt
deleted file mode 100644
index 9dad7817a..000000000
--- a/internal/help/_SETBIT__111111.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:04}}
-{{DISPLAYTITLE:_SETBIT}}
-The [[_SETBIT]] function is used to set a specified bit of a numerical value to 1 (on state).
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_SETBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalVariable}} is the variable to set the bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]].
-* Integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} the number of the bit to be set.
-
-
-{{PageDescription}}
-* Can be used to manually manipulate individual bits of an integer value by setting them to 1 (on state).
-* Setting a bit that is already set to 1 will have no effect.
-* Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on)
-
-==Availability==
-* '''Version 1.4 and up'''.
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}A~%% = 0 '{{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|PRINT}} A~%%
-A~%% = {{Cl|_SETBIT}}(A~%%,6) 'set the seventh bit of A~%%
-{{Cl|PRINT}} A~%%
-{{CodeEnd}}
-{{OutputStart}}
- 0
- 64
-{{OutputEnd}}
-
-
-
-{{PageSeeAlso}}
-* [[_SHL]], [[_SHR]], [[INTEGER]], [[LONG]]
-* [[_READBIT]], [[_BYTE]], [[_INTEGER64]]
-* [[_RESETBIT]], [[_TOGGLEBIT]]
-
-{{PageNavigation}}
diff --git a/internal/help/_SHELLHIDE__111111111.txt b/internal/help/_SHELLHIDE__111111111.txt
deleted file mode 100644
index e2905a7dc..000000000
--- a/internal/help/_SHELLHIDE__111111111.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:05}}
-{{DISPLAYTITLE:_SHELLHIDE}}
-The [[_SHELLHIDE]] function hides the console window and returns any [[INTEGER]] code sent when a program exits.
-
-
-{{PageSyntax}}
-: {{Parameter|returnCode%}} = [[_SHELLHIDE]]({{Parameter|externalCommand$}})
-
-
-{{Parameters}}
-* The literal or variable [[STRING]] {{Parameter|externalCommand$}} parameter can be any external command or call to another program.
-
-
-{{PageDescription}}
-* A QB64 program can return codes specified after [[END]] or [[SYSTEM]] calls.
-* The {{Parameter|returnCode%}} is usually 0 when the external program ends with no errors.
-
-
-{{PageExamples}}
-''Example:'' Shelling to another QB64 program will return the exit code when one is set in the program that is run.
-{{CodeStart}}
-returncode% = {{Cl|_SHELLHIDE}}("DesktopSize") 'replace call with your program EXE
-
-{{Cl|PRINT}} returncode%
-
-{{Cl|END}}
-{{CodeEnd}}
-: ''Explanation:'' To set a program exit code use an [[INTEGER]] parameter value after [[END]] or [[SYSTEM]] in the called program.
-
-
-{{PageSeeAlso}}
-* [[SHELL (function)]]
-* [[SHELL]], [[_HIDE]]
-* [[_CONSOLE]], [[$CONSOLE]]
-* [[SYSTEM]], [[END]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SHL__111.txt b/internal/help/_SHL__111.txt
deleted file mode 100644
index e77b0fe0d..000000000
--- a/internal/help/_SHL__111.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:06}}
-{{DISPLAYTITLE:_SHL}}
-The [[_SHL]] function is used to shift the bits of a numerical value to the left.
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_SHL]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalVariable}} is the variable to shift the bits of and can be of the following types: [[INTEGER]], [[LONG]],[[_INTEGER64]], or [[_BYTE]].
-* Integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} is the number of places to shift the bits.
-* While 0 is a valid value it will have no affect on the variable being shifted.
-
-
-{{PageDescription}}
-* Allows for multiplication of a value by 2 faster than normal multiplication (see example 2 below).
-* Bits that reach the end of a variable's bit count are dropped (when using a variable of the same type - otherwise they will carry over).
-* The type of variable used to store the results should match the type of the variable being shifted.
-
-
-==Availability==
-* '''Version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}A~%% = 1 'set right most bit of an{{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|PRINT}} A~%%
-{{Cl|PRINT}} {{Cl|_SHL}}(A~%%,7)
-B~%% = {{Cl|_SHL}}(A~%%,8) 'shift the bit off the left 'edge'
-{{Cl|PRINT}} B~%%
-{{CodeEnd}}
-{{OutputStart}}
- 1
- 128
- 0
-{{OutputEnd}}
-
-
-''Example 2:''
-{{CodeStart}}
-A~%% = 1
-{{Cl|FOR}} I%% = 0 {{Cl|TO}} 8
- {{Cl|PRINT}} {{Cl|_SHL}}(A~%%, I%%)
-{{Cl|FOR...NEXT|NEXT}} I%%
-{{CodeEnd}}
-{{OutputStart}}
- 1
- 2
- 4
- 8
- 16
- 32
- 64
- 128
- 256
-{{OutputEnd}}
-* Note: When directly [[PRINT]]ing to screen, the result is calculated internally using a larger variable type so the left most bit is carried to the next value.
-** To avoid this store the result in a variable of the same type before printing.
-
-{{PageSeeAlso}}
-* [[_SHR]], [[INTEGER]], [[LONG]]
-* [[_BYTE]], [[_INTEGER64]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SHR__111.txt b/internal/help/_SHR__111.txt
deleted file mode 100644
index af1fb9422..000000000
--- a/internal/help/_SHR__111.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:08}}
-{{DISPLAYTITLE:_SHR}}
-The [[_SHR]] function is used to shift the bits of a numerical value to the right.
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_SHR]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalVariable}} is the variable to shift the bits of and can be of the following types: [[INTEGER]], [[LONG]], [[_INTEGER64]], or [[_BYTE]].
-* Integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} the number of places to shift the bits.
-* While 0 is a valid value it will have no affect on the variable being shifted.
-
-
-{{PageDescription}}
-* Allows for division of a value by 2 faster than normal division (see example 2 below).
-* Bits that reach the end of a variables bit count are dropped.
-* The type of variable used to store the results should match the type of the variable being shifted.
-* NOTE: When dealing with SIGNED variables, shifting the bits right will leave the sign bit set. This is due to how C++ deals with bit shifting under the hood.
-
-==Availability==
-* '''Version 1.3 and up'''.
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}A~%% = 128 'set left most bit of an{{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|PRINT}} A~%%
-{{Cl|PRINT}} {{Cl|_SHR}}(A~%%,7)
-{{Cl|PRINT}} {{Cl|_SHR}}(A~%%,8) 'shift the bit off the right 'edge'
-{{CodeEnd}}
-{{OutputStart}}
- 128
- 1
- 0
-{{OutputEnd}}
-
-
-''Example 2:''
-{{CodeStart}}
-A~%% = 128
-{{Cl|FOR}} I%% = 0 {{Cl|TO}} 8
- {{Cl|PRINT}} {{Cl|_SHR}}(A~%%, I%%)
-{{Cl|FOR...NEXT|NEXT}} I%%
-{{CodeEnd}}
-{{OutputStart}}
- 128
- 64
- 32
- 16
- 8
- 4
- 2
- 1
- 0
-{{OutputEnd}}
-
-{{PageSeeAlso}}
-* [[_SHL]], [[INTEGER]], [[LONG]]
-* [[_BYTE]], [[_INTEGER64]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDBAL__111111.txt b/internal/help/_SNDBAL__111111.txt
deleted file mode 100644
index 25e399e8b..000000000
--- a/internal/help/_SNDBAL__111111.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:09}}
-{{DISPLAYTITLE:_SNDBAL}}
-The [[_SNDBAL]] statement attempts to set the balance or 3D position of a sound.
-
-
-{{PageSyntax}}
-: [[_SNDBAL]] {{Parameter|handle&}}[, {{Parameter|x!}}][, {{Parameter|y!}}][, {{Parameter|z!}}][, {{Parameter|channel&}}]]
-
-
-{{Parameters}}
-* ''handle&'' is a valid sound handle created by the [[_SNDOPEN]] function.
-* {{Parameter|x!}} distance values go from left (negative) to right (positive).
-* {{Parameter|y!}} distance values go from below (negative) to above (positive).
-* {{Parameter|z!}} distance values go from behind (negative) to in front (positive).
-* {{Parameter|channel&}} value 1 denotes left (mono) and 2 denotes right (stereo) channel (beginning with '''build 20170811/60''')
-
-
-{{PageDescription}}
-*Attempts to position a sound in 3D space, or as close to it as the underlying software libraries allow. In some cases, this will be true 3D positioning, in others, a mere volume adjustment based on distance alone.
-*Omitted x!, y! or z! [[SINGLE]] values are set to 0 or not changed in '''build 20170811/60 onward'''.
-*By setting the x! value to -1 or 1 it plays the sound at full volume from the appropriate speaker.
-*Sounds at a distance of 1 or -1 are played at full volume. Sounds further than a distance of 1000 cannot be heard.
-*The volume decreases linearly (at a constant gradient) over distance. Half volume = 500.
-* An "'''Illegal Function Call'''" error can occur if another sound is using the primary or same channel position.
-* Opened sound files must have the [[_SNDOPEN|"VOL"]] capability to use this statement in versions '''before build 20170811/60.'''
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}
-h& = {{Cl|_SNDOPEN}}("LOL.wav", "SYNC,VOL")
-{{Cl|_SNDBAL}} h&, 1
-{{Cl|_SNDPLAY}} h&
-{{CodeEnd}}
-
-
-''Example:'' Loading a sound after '''build 20170811/60''' - no need to specify "sound capabilities" in [[_SNDOPEN]].
-{{CodeStart}}
-s& = {{Cl|_SNDOPEN}}("song.ogg")
-{{Cl|PRINT}} "{{Cl|READ}}Y"; s&
-{{Cl|_SNDPLAY}} s&
-{{Cl|_SNDLOOP}} s&
-
-
-xleft = -1
-xright = 1
-DO
- k$ = {{Cl|INKEY$}}
- {{Cl|SELECT CASE}} k$
- {{Cl|CASE}} "f"
- xleft = xleft - 0.1
- {{Cl|_SNDBAL}} s&, xleft, , , 1
- {{Cl|CASE}} "g"
- xleft = xleft + 0.1
- {{Cl|_SNDBAL}} s&, xleft, , , 1
- {{Cl|CASE}} "h"
- xright = xright - 0.1
- {{Cl|_SNDBAL}} s&, xright, , , 2
- {{Cl|CASE}} "j"
- xright = xright + 0.1
- {{Cl|_SNDBAL}} s&, xright, , , 2
- {{Cl|CASE}} "n"
- volume = volume - 0.1
- {{Cl|_SNDVOL}} s&, volume
- {{Cl|CASE}} "m"
- volume = volume + 0.1
- {{Cl|_SNDVOL}} s&, volume
- {{Cl|CASE}} "p"
- {{Cl|_SNDPAUSE}} s&
- {{Cl|CASE}} " "
- {{Cl|_SNDPLAY}} s&
- {{Cl|CASE}} "i"
- {{Cl|PRINT}} {{Cl|_SNDPLAYING}}(s&)
- {{Cl|PRINT}} {{Cl|_SNDPAUSED}}(s&)
- {{Cl|SLEEP}}
- {{Cl|CASE}} "b"
- {{Cl|_SNDSETPOS}} s&, 110
- {{Cl|CASE}} "l"
- {{Cl|_SNDLIMIT}} s&, 10
- {{Cl|PRINT}} "LIM"
- {{Cl|SLEEP}}
- {{Cl|CASE}} "k"
- {{Cl|_SNDSTOP}} s&
- {{Cl|CASE}} "c"
- {{Cl|_SNDCLOSE}} s&
- {{Cl|SLEEP}}
- s2& = {{Cl|_SNDOPEN}}("song.ogg")
- {{Cl|CASE}} "d"
- s2& = {{Cl|_SNDCOPY}}(s&)
- {{Cl|_SNDPLAY}} s2&
- {{Cl|END SELECT}}
- {{Cl|LOCATE}} 1, 1
- {{Cl|PRINT}} xleft, xright, volume, {{Cl|_SNDGETPOS}}(s&); " "
-LOOP
-{{CodeEnd}}{{small|Code by Johny B}}
-
-
-{{PageSeeAlso}}
-*[[_SNDOPEN]], [[_SNDVOL]], [[_SNDLIMIT]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDCLOSE__11111111.txt b/internal/help/_SNDCLOSE__11111111.txt
deleted file mode 100644
index 37578c321..000000000
--- a/internal/help/_SNDCLOSE__11111111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:10}}
-{{DISPLAYTITLE:_SNDCLOSE}}
-The [[_SNDCLOSE]] statement frees and unloads an open sound using a [[_SNDOPEN]] or [[_SNDCOPY]] handle.
-
-
-{{PageSyntax}}
-: [[_SNDCLOSE]] {{Parameter|handle&}}
-
-
-{{PageDescription}}
-* If the sound is still playing, it will be freed automatically after it finishes.
-** Closing a looping/paused/etc. sound means it is never freed until the QB64 program terminates.
-* When your QB64 program terminates, all sounds are automatically freed.
-
-
-{{PageSeeAlso}}
-*[[_SNDSTOP]], [[_SNDPAUSE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDCOPY__1111111.txt b/internal/help/_SNDCOPY__1111111.txt
deleted file mode 100644
index 7433c2724..000000000
--- a/internal/help/_SNDCOPY__1111111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:11}}
-{{DISPLAYTITLE:_SNDCOPY}}
-The [[_SNDCOPY]] function copies a sound to a new handle so that two or more of the same sound can be played at once. The passed handle parameter is from the [[_SNDOPEN]] function.
-
-
-{{PageSyntax}}
-: {{Parameter|copyHandle&}} = [[_SNDCOPY]]({{Parameter|handle&}})
-
-
-{{PageDescription}}
-* Returns a new handle to the a copy in memory of the sound data referred to by the source handle.
-* No changes to the source handle (such as a volume change) are inherited.
-* The sound data referred to by the handle and its copies are not freed until all of them are closed.
-* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"SYNC" capability]] to use this function.
-
-
-{{PageSeeAlso}}
-* [[_SNDPLAYCOPY]]
-* [[_SNDOPEN]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDGETPOS__111111111.txt b/internal/help/_SNDGETPOS__111111111.txt
deleted file mode 100644
index 0f576ed3d..000000000
--- a/internal/help/_SNDGETPOS__111111111.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:12}}
-{{DISPLAYTITLE:_SNDGETPOS}}
-The [[_SNDGETPOS]] function returns the current playing position in seconds using a handle from [[_SNDOPEN]].
-
-
-{{PageSyntax}}
-:{{Parameter|position}} = [[_SNDGETPOS]]({{Parameter|handle&}})
-
-
-{{PageDescription}}
-*Returns the current playing position in seconds from an open sound file.
-*If a sound isn't playing, it returns 0.
-*If a sound is paused, it returns the paused position.
-*For a looping sound, the value returned continues to increment and does not reset to 0 when the sound loops.
-* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"SETPOS" capability]] to use this function.
-
-
-{{PageExamples}}
-''Example:'' To check the current playing position in an MP3 file, use [[_SNDPLAY]] with [[_SNDGETPOS]] printed in a loop:
-{{CodeStart}}
-SoundFile& = {{Cl|_SNDOPEN}}("YourSoundFile.mp3") '<<< your MP3 sound file here!
-{{Cl|_SNDSETPOS}} SoundFile&, 5.5 'set to play sound 5 1/2 seconds into music
-{{Cl|_SNDPLAY}} SoundFile& 'play sound
-Do: {{Cl|_LIMIT}} 60
- LOCATE 5, 2: PRINT "Current play position> "; {{Cl|_SNDGETPOS}}(SoundFile&)
-LOOP UNTIL {{Cl|_KEYDOWN}}(27) OR {{Cl|NOT}} {{Cl|_SNDPLAYING}}(SoundFile&) 'ESC or end of sound exit
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDSETPOS]]
-* [[_SNDOPEN]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDLEN__111111.txt b/internal/help/_SNDLEN__111111.txt
deleted file mode 100644
index 5259198d4..000000000
--- a/internal/help/_SNDLEN__111111.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:13}}
-{{DISPLAYTITLE:_SNDLEN}}
-The [[_SNDLEN]] function returns the length in seconds of a loaded sound using a handle from the [[_SNDOPEN]] function.
-
-
-{{PageSyntax}}
-: {{Parameter|soundLength}} = [[_SNDLEN]]({{Parameter|handle&}})
-
-
-{{PageDescription}}
-* Returns the length of a sound in seconds.
-* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"LEN" capability]] to use this function.
-
-
-{{PageSeeAlso}}
-* [[_SNDCOPY]], [[_SNDLIMIT]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDLIMIT__11111111.txt b/internal/help/_SNDLIMIT__11111111.txt
deleted file mode 100644
index 5bee1d150..000000000
--- a/internal/help/_SNDLIMIT__11111111.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:14}}
-{{DISPLAYTITLE:_SNDLIMIT}}
-The [[_SNDLIMIT]] statement stops playing a sound after it has been playing for a set number of seconds.
-
-
-{{PageSyntax}}
-: [[_SNDLIMIT]] {{Parameter|handle&}}, {{Parameter|numberOfSeconds!}}
-
-
-{{Parameters}}
-* The {{Parameter|handle&}} variable name is created using the [[_SNDOPEN]] function from a loaded sound file.
-* {{Parameter|numberOfSeconds!}} is a [[SINGLE]] value of seconds that the sound will play.
-
-
-{{PageDescription}}
-*Sets how long a sound will be played in seconds. If the limit is set after the sound is started, the timer starts counting down from when the limit is applied, not from the start of playing.
-*Set {{Parameter|numberOfSeconds!}} to 0 seconds to remove the limit.
-*Pausing or stopping the sound will also remove the limit.
-
-
-{{PageExamples}}
-{{CodeStart}}
-{{Cl|_SNDLIMIT}} h&, 5.5
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDOPEN]], [[_SNDLEN]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDLOOP__1111111.txt b/internal/help/_SNDLOOP__1111111.txt
deleted file mode 100644
index c476637d4..000000000
--- a/internal/help/_SNDLOOP__1111111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:15}}
-{{DISPLAYTITLE:_SNDLOOP}}
-The [[_SNDLOOP]] statement is like [[_SNDPLAY]] but the sound is looped. Uses a handle from the [[_SNDOPEN]] function.
-
-
-{{PageSyntax}}
-: [[_SNDLOOP]] {{Parameter|handle&}}
-
-
-{{PageDescription}}
-*Plays the sound identified by {{Parameter|handle&}} in a loop.
-
-
-{{PageExamples}}
-''Example:'' Loading a sound or music file and playing it in a loop until a key is pressed.
-{{CodeStart}}
-bg = {{Cl|_SNDOPEN}}("back.ogg") '<<<<<<<<<< change to your sound file name
-{{Cl|_SNDLOOP}} bg
-
-DO
- {{Cl|_LIMIT}} 10 'keep CPU resources used low
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" 'key press program exit
-{{Cl|_SNDSTOP}} bg
-{{Cl|_SNDCLOSE}} bg
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDOPEN]], [[_SNDSTOP]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDOPENRAW__1111111111.txt b/internal/help/_SNDOPENRAW__1111111111.txt
deleted file mode 100644
index df659188c..000000000
--- a/internal/help/_SNDOPENRAW__1111111111.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:18}}
-{{DISPLAYTITLE:_SNDOPENRAW}}
-The [[_SNDOPENRAW]] function opens a new channel to fill with _SNDRAW content to manage multiple dynamically generated sounds.
-
-
-{{PageSyntax}}
-: {{Parameter|pipeHandle&}} = [[_SNDOPENRAW]]
-
-
-{{PageDescription}}
-* You can manage multiple dynamically generated sounds at once without having to worry about mixing.
-* Use [[_SNDCLOSE]] to remove the pipe sound handles from memory.
-
-
-{{PageExamples}}
-''Example:'' Combining 2 sounds without worrying about mixing:
-{{CodeStart}}
-a = {{Cl|_SNDOPENRAW}}
-b = {{Cl|_SNDOPENRAW}}
-
-{{Cl|FOR...NEXT|FOR}} x = 1 {{Cl|TO}} 100000
- {{Cl|_SNDRAW}} {{Cl|SIN}}(x / 10), , a 'fill with a tone
- {{Cl|_SNDRAW}} {{Cl|RND}} * 1 - 0.5, , b 'fill with static
-{{Cl|NEXT}}
-
-{{Cl|_SNDCLOSE}} a
-{{Cl|_SNDCLOSE}} b
-{{CodeEnd}}{{small|Code by Galleon}}
-
-
-{{PageSeeAlso}}
-* [[_SNDRAWDONE]]
-* [[_SNDRAW]]
-* [[_SNDCLOSE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDOPEN__1111111.txt b/internal/help/_SNDOPEN__1111111.txt
deleted file mode 100644
index 4e9a2bcda..000000000
--- a/internal/help/_SNDOPEN__1111111.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:17}}
-{{DISPLAYTITLE:_SNDOPEN}}
-The [[_SNDOPEN]] function loads a sound file into memory and returns a [[LONG]] handle value above 0.
-
-
-{{PageSyntax}}
-: {{Parameter|soundHandle&}} = [[_SNDOPEN]]({{Parameter|fileName$}})
-
-
-{{PageDescription}}
-* Returns a [[LONG]] {{Parameter|soundHandle&}} value to the sound file in memory. '''A zero value means the sound could not be loaded.'''
-* The literal or variable [[STRING]] sound {{Parameter|fileName$}} can be '''WAV, OGG or MP3''' file types.
-* '''Always check the handle value returned is greater than zero before attempting to play the sound.'''
-* The handle can be used by most of the _SND sound playing functions and statements in QB64 except [[_SNDPLAYFILE]] which plays a sound file directly from the disk and does not use a handle value.
-* Handles can be closed with [[_SNDCLOSE]] when the sound is no longer necessary.
-* If a WAV sound file won't play, try it using the Windows [[Windows_Libraries#Play_WAV_Sounds|Play WAV sounds library]] to check it or convert the sound file to OGG.
-
-
-{{PageExamples}}
-''Snippet 1:'' Loading a sound file to use in the program later. Only load it once and use the handle any time you want.
-{{CodeStart}}
-h& = {{Cl|_SNDOPEN}}("dog.wav")
-IF h& = 0 THEN BEEP ELSE {{Cl|_SNDPLAY}} h& 'check for valid handle before using!
-{{CodeEnd}}
-
-
-''Snippet 2:'' Playing a sound from 2 different speakers based on program results.
-{{CodeStart}}
-Laff& = {{Cl|_SNDOPEN}}("KONGlaff.ogg") 'load sound file and get LONG handle value
-{{Cl|IF}} LaffX! < -1 {{Cl|THEN}} LaffX! = -1 'set full volume to left speaker
-{{Cl|IF}} LaffX! > 1 {{Cl|THEN}} LaffX! = 1 'set full volume to right speaker
-
-{{Cl|_SNDBAL}} Laff&, LaffX! 'balance sound to left or right speaker
-{{Cl|_SNDPLAY}} Laff& 'play sound
-{{CodeEnd}}
-
-
-''Example:'' Playing a file and controlling playback:
-{{CodeStart}}
-s& = {{Cl|_SNDOPEN}}("song.ogg")
-{{Cl|PRINT}} "{{Cl|READ}}Y"; s&
-{{Cl|_SNDPLAY}} s&
-{{Cl|_SNDLOOP}} s&
-
-
-xleft = -1
-xright = 1
-DO
- k$ = {{Cl|INKEY$}}
- {{Cl|SELECT CASE}} k$
- {{Cl|CASE}} "f"
- xleft = xleft - 0.1
- {{Cl|_SNDBAL}} s&, xleft, , , 1
- {{Cl|CASE}} "g"
- xleft = xleft + 0.1
- {{Cl|_SNDBAL}} s&, xleft, , , 1
- {{Cl|CASE}} "h"
- xright = xright - 0.1
- {{Cl|_SNDBAL}} s&, xright, , , 2
- {{Cl|CASE}} "j"
- xright = xright + 0.1
- {{Cl|_SNDBAL}} s&, xright, , , 2
- {{Cl|CASE}} "n"
- volume = volume - 0.1
- {{Cl|_SNDVOL}} s&, volume
- {{Cl|CASE}} "m"
- volume = volume + 0.1
- {{Cl|_SNDVOL}} s&, volume
- {{Cl|CASE}} "p"
- {{Cl|_SNDPAUSE}} s&
- {{Cl|CASE}} " "
- {{Cl|_SNDPLAY}} s&
- {{Cl|CASE}} "i"
- {{Cl|PRINT}} {{Cl|_SNDPLAYING}}(s&)
- {{Cl|PRINT}} {{Cl|_SNDPAUSED}}(s&)
- {{Cl|SLEEP}}
- {{Cl|CASE}} "b"
- {{Cl|_SNDSETPOS}} s&, 110
- {{Cl|CASE}} "l"
- {{Cl|_SNDLIMIT}} s&, 10
- {{Cl|PRINT}} "LIM"
- {{Cl|SLEEP}}
- {{Cl|CASE}} "k"
- {{Cl|_SNDSTOP}} s&
- {{Cl|CASE}} "c"
- {{Cl|_SNDCLOSE}} s&
- {{Cl|SLEEP}}
- s2& = {{Cl|_SNDOPEN}}("song.ogg")
- {{Cl|CASE}} "d"
- s2& = {{Cl|_SNDCOPY}}(s&)
- {{Cl|_SNDPLAY}} s2&
- {{Cl|END SELECT}}
- {{Cl|LOCATE}} 1, 1
- {{Cl|PRINT}} xleft, xright, volume, {{Cl|_SNDGETPOS}}(s&); " "
-LOOP
-{{CodeEnd}}{{small|Code by Johny B}}
-
-
-
-{{PageSeeAlso}}
-* [[_SNDCLOSE]], [[_SNDPLAY]], [[_SNDSTOP]]
-* [[_SNDPAUSE]], [[_SNDLOOP]], [[_SNDLIMIT]]
-* [[_SNDSETPOS]], [[_SNDGETPOS]]
-* [[_SNDPLAYING]], [[_SNDPAUSED]]
-* [[_SNDCOPY]], [[_SNDPLAYCOPY]]
-* [[_SNDBAL]], [[_SNDLEN]], [[_SNDVOL]]
-* [[_SNDPLAYFILE]] {{text|(plays a named sound file directly and closes)}}
-* [[_SNDRAW]], [[_SNDRATE]], [[_SNDRAWLEN]] {{text|(raw sounds without files)}}
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDPAUSED__111111111.txt b/internal/help/_SNDPAUSED__111111111.txt
deleted file mode 100644
index 627fccbc0..000000000
--- a/internal/help/_SNDPAUSED__111111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:20}}
-{{DISPLAYTITLE:_SNDPAUSED}}
-The [[_SNDPAUSED]] function checks if a sound is paused. Uses a handle parameter passed from [[_SNDOPEN]].
-
-
-{{PageSyntax}}
-: {{Parameter|isPaused%%}} = [[_SNDPAUSED]]({{Parameter|handle&}})
-
-
-{{PageDescription}}
-*Returns true (-1) if the sound is paused. False (0) if not paused.
-
-
-{{PageExamples}}
-{{CodeStart}}
-{{Cl|PRINT}} {{Cl|_SNDPAUSED}}(h&)
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDPAUSE]], [[_SNDPLAY]],
-* [[_SNDSTOP]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDPAUSE__11111111.txt b/internal/help/_SNDPAUSE__11111111.txt
deleted file mode 100644
index a9f5c1c27..000000000
--- a/internal/help/_SNDPAUSE__11111111.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:19}}
-{{DISPLAYTITLE:_SNDPAUSE}}
-The [[_SNDPAUSE]] statement pauses a sound using a handle from the [[_SNDOPEN]] function.
-
-
-{{PageSyntax}}
-: [[_SNDPAUSE]] {{Parameter|handle&}}
-
-
-{{PageDescription}}
-* Continue playing by calling [[_SNDPLAY]] {{Parameter|handle&}}
-* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"PAUSE" capability]] to use this function.
-
-
-{{PageSeeAlso}}
-* [[_SNDPLAY]], [[_SNDSTOP]]
-* [[_SNDPAUSED]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDPLAYCOPY__11111111111.txt b/internal/help/_SNDPLAYCOPY__11111111111.txt
deleted file mode 100644
index 8da662f25..000000000
--- a/internal/help/_SNDPLAYCOPY__11111111111.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:22}}
-{{DISPLAYTITLE:_SNDPLAYCOPY}}
-The [[_SNDPLAYCOPY]] statement copies a sound, plays it, and automatically closes the copy using a handle parameter passed from [[_SNDOPEN]] or [[_SNDCOPY]]
-
-
-{{PageSyntax}}
-: [[_SNDPLAYCOPY]] {{Parameter|handle&}}[, {{Parameter|volume!}}]
-
-
-{{Parameters}}
-* The [[LONG]] {{Parameter|handle&}} value is returned by [[_SNDOPEN]] using a specific sound file.
-* The {{Parameter|volume!}} parameter can be any [[SINGLE]] value from 0 (no volume) to 1 (full volume).
-
-
-{{PageDescription}}
-*Makes coding easier by doing all of the following automatically:
-:#Copies/duplicates the source handle (see [[_SNDCOPY]]).
-:#Changes the volume of the copy if volume is passed.
-:#Plays the copy.
-:#Closes the copy.
-* This statement is a better choice than [[_SNDPLAYFILE]] if the sound will be played often, reducing the burden on the computer.
-
-
-{{PageExamples}}
-''Example 1:'' Playing a previously opened sound at half volume.
-{{CodeStart}}
-{{Cl|_SNDPLAYCOPY}} applause&, 0.5
-{{CodeEnd}}
-
-
-''Example 2:'' Playing a song at random volumes.
-{{CodeStart}}
-chomp& = _SNDOPEN("chomp.wav")
-_SNDPLAYCOPY chomp&, 0.5 + RND * 0.49
-{{CodeEnd}}
-
-
-
-{{PageSeeAlso}}
-* [[_SNDOPEN]]
-* [[_SNDCOPY]]
-* [[_SNDPLAYFILE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDPLAYFILE__11111111111.txt b/internal/help/_SNDPLAYFILE__11111111111.txt
deleted file mode 100644
index 919382879..000000000
--- a/internal/help/_SNDPLAYFILE__11111111111.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:23}}
-{{DISPLAYTITLE:_SNDPLAYFILE}}
-The [[_SNDPLAYFILE]] statement is used to play a sound file without generating a handle, automatically closing it after playback finishes.
-
-
-{{PageSyntax}}
-:[[_SNDPLAYFILE]] {{Parameter|filename$}}[, {{Parameter|ignored%}}][, {{Parameter|volume!}}]
-
-
-{{PageDescription}}
-* Supported file formats are '''WAV, OGG and MP3'''. See [[_SNDOPEN]].
-* {{Parameter|ignored%}} is an optional parameter , accepted for historical reasons.
-** In versions prior to '''build 20170811/60''', {{Parameter|ignored%}} identified if a sound was to be loaded with [[_SNDOPEN|"SYNC" capabilities]], (-1 for true, 0 for false). This is true for all sound files in the latest versions, making this parameter safe to be ignored.
-* {{Parameter|volume!}} is a [[SINGLE]] value from 0 (silence) to 1 (full volume). If not used or outside this range, the sound will be played at full volume.
-* [[_SNDPLAYFILE]] never creates an error. If the sound cannot be played it takes no further action.
-* The sound is closed automatically after it finishes playing.
-* When a sound will be used often, open the file with [[_SNDOPEN]] and use [[_SNDPLAYCOPY]] to play the handle instead to reduce the burden on the computer.
-
-
-{{PageExamples}}
-''Example:'' Playing a sound file at half volume.
-{{CodeStart}}
-{{Cl|_SNDPLAYFILE}} "dog.wav", , .5
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDOPEN]], [[_SNDPLAY]]
-* [[_SNDPLAYCOPY]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDPLAYING__1111111111.txt b/internal/help/_SNDPLAYING__1111111111.txt
deleted file mode 100644
index 3872bd5e7..000000000
--- a/internal/help/_SNDPLAYING__1111111111.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:25}}
-{{DISPLAYTITLE:_SNDPLAYING}}
-The [[_SNDPLAYING]] function returns whether a sound is being played. Uses a handle from the [[_SNDOPEN]] or [[_SNDCOPY]] functions.
-
-
-{{PageSyntax}}
-:{{Parameter|isPlaying%}} = [[_SNDPLAYING]]({{Parameter|handle&}})
-
-
-{{PageDescription}}
-*Returns false (0) if a sound is not playing or true (-1) if it is.
-*If a sound is paused, [[_SNDPLAYING]] returns 0.
-
-
-{{PageExamples}}
-{{CodeStart}}
-{{Cl|PRINT}} {{Cl|_SNDPLAYING}}(h&)
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDPLAY]], [[_SNDPAUSE]], [[_SNDSTOP]]
-* [[_SNDPAUSED]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDPLAY__1111111.txt b/internal/help/_SNDPLAY__1111111.txt
deleted file mode 100644
index 4cfcd6835..000000000
--- a/internal/help/_SNDPLAY__1111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:21}}
-{{DISPLAYTITLE:_SNDPLAY}}
-The [[_SNDPLAY]] statement plays a sound designated by a file handle created by [[_SNDOPEN]].
-
-
-{{PageSyntax}}
-: [[_SNDPLAY]] {{Parameter|handle&}}
-
-
-{{PageDescription}}
-* Make sure that the {{Parameter|handle&}} value is not 0 before attempting to play it.
-
-
-{{PageExamples}}
-''Example:'' Checking a handle value before playing
-{{CodeStart}}
- {{Cl|IF...THEN|IF}} h& {{Cl|THEN}} {{Cl|_SNDPLAY}} h&
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDOPEN]], [[_SNDPAUSE]], [[_SNDPLAYING]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDRATE__1111111.txt b/internal/help/_SNDRATE__1111111.txt
deleted file mode 100644
index 5fa70152a..000000000
--- a/internal/help/_SNDRATE__1111111.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:26}}
-{{DISPLAYTITLE:_SNDRATE}}
-The [[_SNDRATE]] function returns the sample rate frequency per second of the current computer's sound card.
-
-
-{{PageSyntax}}
-: {{Parameter|sampleRate&}} = [[_SNDRATE]]
-
-
-{{PageDescription}}
-* The sample rate frequency per second value returned can be any [[LONG]] value. Common values are 22050 or 44100.
-* '''The sound card sample rate is determined by the sound card and it cannot be changed.'''
-
-
-{{PageExamples}}
-* See the example in [[_SNDRAW]].
-
-
-{{PageSeeAlso}}
-* [[_SNDRAW]]
-* [[_SNDRAWLEN]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDRAWDONE__1111111111.txt b/internal/help/_SNDRAWDONE__1111111111.txt
deleted file mode 100644
index 912924848..000000000
--- a/internal/help/_SNDRAWDONE__1111111111.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:28}}
-{{DISPLAYTITLE:_SNDRAWDONE}}
-[[_SNDRAWDONE]] ensures that the final buffer portion is played in short sound effects even if it is incomplete.
-
-
-{{PageSyntax}}
-: [[_SNDRAWDONE]] [{{Parameter|pipeHandle&}}]
-
-
-{{PageParameters}}
-* The optional {{Parameter|pipeHandle&}} parameter refers to the sound pipe opened using [[_SNDOPENRAW]].
-
-
-{{PageDescription}}
-* Use to force playing small buffers of [[_SNDRAW]] data.
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageSeeAlso}}
-* [[_SNDOPENRAW]]
-* [[_SNDRAW]]
-* [[_SNDRAWLEN]]
-* [[_SNDRATE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDRAWLEN__111111111.txt b/internal/help/_SNDRAWLEN__111111111.txt
deleted file mode 100644
index 917ba8593..000000000
--- a/internal/help/_SNDRAWLEN__111111111.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:29}}
-{{DISPLAYTITLE:_SNDRAWLEN}}
-The [[_SNDRAWLEN]] function returns the length, in seconds, of a [[_SNDRAW]] sound currently queued.
-
-
-{{PageSyntax}}
-: {{Parameter|length#}} = [[_SNDRAWLEN]] [{{Parameter|pipeHandle&}}]
-
-
-{{PageParameters}}
-* The optional {{Parameter|pipeHandle&}} parameter refers to the sound pipe opened using [[_SNDOPENRAW]].
-
-
-{{PageDescription}}
-* Use [[_SNDRAWLEN]] to determine the length of a sound queue during creation and when to stop playing the sound.
-* Ensure that [[_SNDRAWLEN]] is comfortably above 0 (until you've actually finished playing sound).
-* If you are getting occasional random clicks, this generally means that [[_SNDRAWLEN]] has dropped to 0.
-* The [[_SNDRATE]] determines how many samples are played per second. However, the timing is achieved by the sound card and [[_SNDRAWLEN]], not your program.
-* '''Do not attempt to use [[_TIMER]] or [[_DELAY]] or [[_LIMIT]] to control the timing of [[_SNDRAW]] sounds. You may use them as usual for delays or to limit your program's CPU usage, but the decision of how much sound to queue should only be based on the remaining _SNDRAWLEN'''.
-
-
-{{PageExamples}}
-* See the example in [[_SNDRAW]]
-
-
-{{PageSeeAlso}}
-* [[_SNDRAW]]
-* [[_SNDRATE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDRAW__111111.txt b/internal/help/_SNDRAW__111111.txt
deleted file mode 100644
index 290709388..000000000
--- a/internal/help/_SNDRAW__111111.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:27}}
-{{DISPLAYTITLE:_SNDRAW}}
-The [[_SNDRAW]] statement plays sound wave sample frequencies created by a program.
-
-
-{{PageSyntax}}
-: [[_SNDRAW]] {{Parameter|leftSample}}[, {{Parameter|rightSample}}][, {{Parameter|pipeHandle&}}]
-
-
-{{Parameters}}
-* The {{Parameter|leftSample}} and {{Parameter|rightSample}} value(s) can be any [[SINGLE]] or [[DOUBLE]] literal or variable frequency value from -1.0 to 1.0.
-* The {{Parameter|pipeHandle&}} parameter refers to the sound pipe opened using [[_SNDOPENRAW]].
-
-
-{{PageDescription}}
-* Specifying {{Parameter|pipeHandle&}} allows sound to be played through two or more channels at the same time ('''version 1.000 and up''').
-* If only {{Parameter|leftSample}} value is used, the sound will come out of both speakers.
-* Using _SNDRAW will pause any currently playing music.
-* _SNDRAW is designed for continuous play. It will not produce any sound until a significant number of samples have been queued. No sound is played if only a few samples are queued.
-* Ensure that [[_SNDRAWLEN]] is comfortably above 0 (until you've actually finished playing sound). If you are getting occasional unintended random clicks, this generally means that [[_SNDRAWLEN]] has dropped to 0.
-* _SNDRAW is not intended to queue up many minutes worth of sound. It will probably work but will chew up a lot of memory (and if it gets swapped to disk, your sound could be interrupted abruptly).
-* [[_SNDRATE]] determines how many samples are played per second, but timing is done by the sound card, not your program.
-* '''Do not attempt to use [[_TIMER]] or [[_DELAY]] or [[_LIMIT]] to control the timing of _SNDRAW. You may use them for delays or to limit your program's CPU usage, but how much to queue should only be based on the [[_SNDRAWLEN]].'''
-
-
-{{PageExamples}}
-''Example 1:'' Sound using a sine wave with _SNDRAW Amplitude * SIN(8 * ATN(1) * Duration * (Frequency / _SNDRATE))
-{{CodeStart}}
-FREQ = 400 'any frequency desired from 36 to 10,000
-Pi2 = 8 * {{Cl|ATN}}(1) '2 * pi
-Amplitude = .3 'amplitude of the signal from -1.0 to 1.0
-SampleRate = {{Cl|_SNDRATE}} 'sets the sample rate
-FRate = FREQ / SampleRate'
-{{Cl|FOR...NEXT|FOR}} Duration = 0 {{Cl|TO}} 5 * SampleRate 'play 5 seconds
- {{Cl|_SNDRAW}} Amplitude * {{Cl|SIN}}(Pi2 * Duration * FRate) 'sine wave
- '{{Cl|_SNDRAW}} Amplitude * {{Cl|SGN}}({{Cl|SIN}}(Pi2 * Duration * FRate)) 'square wave
-{{Cl|NEXT}}
-{{Cl|DO}}: LOOP {{Cl|WHILE}} {{Cl|_SNDRAWLEN}}
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by DarthWho}}
-:''Explanation:'' The loop Duration is determined by the number of seconds times the [[_SNDRATE]] number of samples per second. Square waves can use the same formula with Amplitude * [[SGN]](SIN(8 * ATN(1) * Duration * (Frequency/_SNDRATE))).
-
-
-''Example 2:'' A simple ringing bell tone that tapers off.
-{{CodeStart}}t = 0
-tmp$ = "Sample = ##.##### Time = ##.#####"
-LOCATE 1, 60: PRINT "Rate:"; {{Cl|_SNDRATE}}
-DO
- 'queue some sound
- DO WHILE {{Cl|_SNDRAWLEN}} < 0.1 'you may wish to adjust this
- sample = {{Cl|SIN}}(t * 440 * {{Cl|ATN}}(1) * 8) '440Hz sine wave (t * 440 * 2Ï€)
- sample = sample * {{Cl|EXP}}(-t * 3) 'fade out eliminates clicks after sound
- {{Cl|_SNDRAW}} sample
- t = t + 1 / {{Cl|_SNDRATE}} 'sound card sample frequency determines time
- LOOP
-
- 'do other stuff, but it may interrupt sound
- LOCATE 1, 1: PRINT USING tmp$; sample; t
-LOOP WHILE t < 3.0 'play for 3 seconds
-
-DO WHILE {{Cl|_SNDRAWLEN}} > 0 'Finish any left over queued sound!
-LOOP
-{{Cl|END}}
-{{CodeEnd}}
-{{small|Code by Artelius (responsible for the implementation of _SNDRAW)}}
-
-
-''Example 3:'' Routine uses _SNDRAW to display and play 12 notes from octaves 1 through 9.
-{{CodeStart}}
-{{Cl|DIM}} {{Cl|SHARED}} rate&
-rate& = {{Cl|_SNDRATE}}
-DO
- {{Cl|PRINT}} "Enter the octave 1 to 8 (0 quits!):";
- oct% = {{Cl|VAL}}({{Cl|INPUT$}}(1)): {{Cl|PRINT}} oct%
- {{Cl|IF...THEN|IF}} oct% = 0 {{Cl|THEN}} {{Cl|EXIT DO}}
- octave = oct% - 4 '440 is in the 4th octave, 9th note
- {{Cl|COLOR}} oct% + 1
- {{Cl|PRINT USING}} "Octave: ##"; oct%
- {{Cl|FOR...NEXT|FOR}} Note = 0 {{Cl|TO}} 11 'notes C to B
- fq = FreQ(octave, Note, note$)
- {{Cl|PRINT USING}} "#####.## \\"; fq, note$
- PlaySound fq
- {{Cl|IF...THEN|IF}} {{Cl|INKEY$}} > "" {{Cl|THEN}} {{Cl|EXIT DO}}
- {{Cl|NEXT}}
-{{Cl|LOOP}}
-{{Cl|END}}
-
-{{Cl|FUNCTION}} FreQ (octave, note, note$)
-FreQ = 440 * 2 ^ (octave + (note + 3) / 12 - 1) '* 12 note octave starts at C (3 notes up)
-note$ = {{Cl|MID$}}("C C#D D#E F F#G G#A A#B ", note * 2 + 1, 2)
-{{Cl|END FUNCTION}}
-
-{{Cl|SUB}} PlaySound (frq!) ' plays sine wave fading in and out
-SndLoop! = 0
-{{Cl|DO...LOOP|DO}} {{Cl|WHILE}} SndLoop! < rate&
- {{Cl|_SNDRAW}} {{Cl|SIN}}((2 * 4 * {{Cl|ATN}}(1) * SndLoop! / rate&) * frq!) * {{Cl|EXP}}(-(SndLoop! / rate&) * 3)
- SndLoop! = SndLoop! + 1
-{{Cl|LOOP}}
-{{Cl|DO}}: {{Cl|LOOP}} {{Cl|WHILE}} {{Cl|_SNDRAWLEN}} 'flush the sound playing buffer
-{{Cl|END SUB}}
-{{CodeEnd}}
-{{small|Code by CodeGuy}}
-
-
-{{PageSeeAlso}}
-* [[_SNDRATE]], [[_SNDRAWLEN]]
-* [[_SNDOPENRAW]], [[_SNDRAWDONE]]
-* [[_SNDOPEN]]
-* [[PLAY]], [[BEEP]]
-* Music Frequency table in [[SOUND]].
-* [[DTMF Phone Demo]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_SNDSETPOS__111111111.txt b/internal/help/_SNDSETPOS__111111111.txt
deleted file mode 100644
index beba38cfa..000000000
--- a/internal/help/_SNDSETPOS__111111111.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:30}}
-{{DISPLAYTITLE:_SNDSETPOS}}
-The [[_SNDSETPOS]] statement changes the current/starting playing position in seconds of a sound.
-
-
-{{PageSyntax}}
-: [[_SNDSETPOS]] {{Parameter|handle&}}, {{Parameter|position!}}
-
-
-{{PageDescription}}
-*Changes the current/starting playing position in seconds (a [[SINGLE]] value) of a sound in memory.
-*If {{Parameter|position!}} is past the length of the sound, playback will be interrupted.
-*Function cannot be called while a looping sound is being played (see [[_SNDLOOP]]).
-* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"SETPOS" capability]] to use this statement.
-
-
-{{PageExamples}}
-''Example:'' To check the current playing position in an MP3 file, use [[_SNDPLAY]] with [[_SNDGETPOS]] printed in a loop
-{{CodeStart}}
-SoundFile& = {{Cl|_SNDOPEN}}("YourSoundFile.mp3") '<<< your MP3 sound file here!
-{{Cl|_SNDSETPOS}} SoundFile&, 5.5 'set to play sound 5 1/2 seconds into music
-{{Cl|_SNDPLAY}} SoundFile& 'play sound
-Do: {{Cl|_LIMIT}} 60
- LOCATE 5, 2: PRINT "Current play position> "; {{Cl|_SNDGETPOS}}(SoundFile&)
-LOOP UNTIL {{Cl|_KEYDOWN}}(27) OR {{Cl|NOT}} {{Cl|_SNDPLAYING}}(SoundFile&) 'ESC or end of sound exit
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDGETPOS]], [[_SNDLEN]]
-* [[_SNDOPEN]], [[_SNDLIMIT]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDSTOP__1111111.txt b/internal/help/_SNDSTOP__1111111.txt
deleted file mode 100644
index 478f9de34..000000000
--- a/internal/help/_SNDSTOP__1111111.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:31}}
-{{DISPLAYTITLE:_SNDSTOP}}
-The [[_SNDSTOP]] statement stops a playing or paused sound using a handle from the [[_SNDOPEN]] or [[_SNDCOPY]] functions.
-
-
-{{PageSyntax}}
-: [[_SNDSTOP]] {{Parameter|handle&}}
-
-
-{{PageDescription}}
-* Sounds can be resumed using [[_SNDPLAY]] with the correct handle.
-
-
-{{PageExamples}}
-''Example:''
-{{CodeStart}}
-{{Cl|_SNDSTOP}} h&
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-* [[_SNDPAUSE]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SNDVOL__111111.txt b/internal/help/_SNDVOL__111111.txt
deleted file mode 100644
index b5a37f908..000000000
--- a/internal/help/_SNDVOL__111111.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:33}}
-{{DISPLAYTITLE:_SNDVOL}}
-The [[_SNDVOL]] statement sets the volume of a sound loaded in memory using a handle from the [[_SNDOPEN]] function.
-
-
-{{PageSyntax}}
-: [[_SNDVOL]] {{Parameter|handle&}}, {{Parameter|volume!}}
-
-
-{{PageDescription}}
-* {{Parameter|volume!}} is a value from 0 (silence) to 1 (full volume).
-* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"VOL" capability]] to use this function.
-
-
-{{PageExamples}}
-{{CodeStart}}
-h& = {{Cl|_SNDOPEN}}("bell.wav")
-{{Cl|_SNDVOL}} h&, 0.5
-{{Cl|_SNDPLAY}} h&
-{{CodeEnd}}
-
-
-{{PageSeeAlso}}
-*[[_SNDOPEN]], [[_SNDBAL]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SOURCE_(function)__111111_(00000000).txt b/internal/help/_SOURCE_(function)__111111_(00000000).txt
deleted file mode 100644
index ea8b9d051..000000000
--- a/internal/help/_SOURCE_(function)__111111_(00000000).txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:35}}
-{{DISPLAYTITLE:_SOURCE (function)}}
-The [[_SOURCE (function)|_SOURCE]] function returns the present image source handle value.
-
-
-{{PageSyntax}}
-: {{Parameter|currentSource&}} = [[_SOURCE (function)|_SOURCE]]
-
-
-{{PageDescription}}
-* Returns a handle value that is a [[LONG]] integer type.
-* Save the source handle to a [[LONG]] variable for later restoration using the [[_SOURCE]] statement.
-
-
-{{PageExamples}}
-See the examples in:
-* [[Bitmaps]]
-* [[SAVEIMAGE]]
-* [[SaveIcon32]]
-
-
-{{PageSeeAlso}}
-* [[_DEST (function)]]
-* [[_SOURCE]], [[_DEST]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_SOURCE__111111.txt b/internal/help/_SOURCE__111111.txt
deleted file mode 100644
index 36e9e5cba..000000000
--- a/internal/help/_SOURCE__111111.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:34}}
-{{DISPLAYTITLE:_SOURCE}}
-The [[_SOURCE]] statement establishes the image SOURCE using a handle created by [[_LOADIMAGE]], [[_NEWIMAGE]] or [[_COPYIMAGE]].
-
-
-{{PageSyntax}}
-: [[_SOURCE]] {{Parameter|handle&}}
-
-
-{{PageDescription}}
-* The handle is a [[LONG]] integer value from the [[_SOURCE (function)|_SOURCE]] function or a handle created by [[_NEWIMAGE]].
-* If the handle is designated as 0, it refers to the current [[SCREEN]] image.
-* A source image can only supply information to a program. [[POINT]] and [[GET (graphics statement)|GET]] might require a source other than the one currently active.
-
-
-{{PageExamples}}
-{{CodeStart}}
-{{Cl|SCREEN}} 13
-a = {{Cl|_NEWIMAGE}}(320,200,13)
-{{Cl|_DEST}} a
-{{Cl|PSET}} (100, 100), 15
-{{Cl|_SOURCE}} a
-{{Cl|_DEST}} 0
-{{Cl|PRINT}} {{Cl|POINT}}(100, 100)
-{{CodeEnd}}
-{{OutputStart}}
- 15
-{{OutputEnd}}
-: ''Explanation:'' Create a new image with handle 'a', then use [[_DEST]] to define the image to draw on. Draw a pixel then set the source to 'a' and use [[POINT]] to show what color is in that position. White (15) and is the color set with [[PSET]]. Use [[_DEST]] 0 for the screen to display the results.
-
-
-===More examples===
-See the examples in:
-* [[Bitmaps]]
-* [[SAVEIMAGE]]
-* [[SaveIcon32]]
-
-
-{{PageSeeAlso}}
-* [[_DEST]]
-* [[_SOURCE (function)]]
-* [[POINT]], [[GET (graphics statement)]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_STARTDIR$__11111111$.txt b/internal/help/_STARTDIR$__11111111$.txt
deleted file mode 100644
index 2627c2a6b..000000000
--- a/internal/help/_STARTDIR$__11111111$.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:36}}
-{{DISPLAYTITLE:_STARTDIR$}}
-The [[_STARTDIR$]] function returns the path a user called a QB64 program from.
-
-{{PageSyntax}}
-: {{Parameter|callPath$}} = [[_STARTDIR$]]
-
-
-{{PageDescription}}
-* Returns a [[STRING]] representing the user's program calling path.
-
-
-{{PageAvailability}}
-* '''QB64 1.0 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-''Example:'' Showcasing QB64 path functions:
-{{CodeStart}}
-{{Cl|$CONSOLE}}:ONLY
-{{Cl|_DEST}} {{Cl|_CONSOLE}}
-{{Cl|SHELL}} "cd"
-{{Cl|PRINT}} {{Cl|_CWD$}}
-{{Cl|PRINT}} {{Cl|_STARTDIR$}}
-{{Cl|SYSTEM}}
-{{CodeEnd}}{{small|Code by Galleon}}
-
-
-{{PageSeeAlso}}
-* [[_CWD$]]
-* [[SHELL]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_STRCMP__111111.txt b/internal/help/_STRCMP__111111.txt
deleted file mode 100644
index e2964ef81..000000000
--- a/internal/help/_STRCMP__111111.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:37}}
-{{DISPLAYTITLE:_STRCMP}}
-
-The [[_STRCMP]] function compares the relationship between two strings, comparing upper or lower case.
-
-
-{{PageSyntax}}
-: {{Parameter|comparison%}} = [[_STRCMP]]({{Parameter|string1$}}, {{Parameter|string2$}})
-
-
-{{PageDescription}}
-* Function returns -1 when {{Parameter|string1$}} is less than {{Parameter|string2$}}, 0 when equal or 1 when {{Parameter|string1$}} is greater than {{Parameter|string2$}}.
-* Upper case letters are valued less than lower case letters in the [[ASCII]] evaluation.
-
-
-{{PageSeeAlso}}
-* [[_STRICMP]]
-* [[STR$]]
-* [[STRING]]
-* [[ASCII]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_STRICMP__1111111.txt b/internal/help/_STRICMP__1111111.txt
deleted file mode 100644
index d6ef7c585..000000000
--- a/internal/help/_STRICMP__1111111.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:38}}
-{{DISPLAYTITLE:_STRICMP}}
-
-The [[_STRICMP]] function compares the relationship between two strings, ignoring upper or lower case letters.
-
-
-{{PageSyntax}}
-: {{Parameter|comparison%}} = [[_STRICMP]]({{Parameter|string1$}}, {{Parameter|string2$}})
-
-
-{{PageDescription}}
-* Function returns -1 when {{Parameter|string1$}} is less than {{Parameter|string2$}}, 0 when equal or 1 when {{Parameter|string1$}} is greater than {{Parameter|string2$}}.
-* Alphabet comparisons will be evaluated without regard to the letter case in the 2 strings.
-
-
-{{PageSeeAlso}}
-* [[_STRCMP]]
-* [[STR$]]
-* [[STRING]]
-* [[ASCII]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_TITLE$__11111$.txt b/internal/help/_TITLE$__11111$.txt
deleted file mode 100644
index b61e7f585..000000000
--- a/internal/help/_TITLE$__11111$.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:40}}
-{{DISPLAYTITLE:_TITLE$}}
-The [[_TITLE$]] function returns the program title last set by the [[_TITLE]] statement.
-
-
-{{PageSyntax}}
-: {{Parameter|currentTitle$}} = [[_TITLE$]]
-
-
-{{PageDescription}}
-* If no title has been set, the title bar will say "Untitled" and this function will return an empty [[STRING|string]] ("").
-
-
-{{PageAvailability}}
-* '''QB64 1.2 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageSeeAlso}}
-* [[_TITLE]]
-* [[_CONSOLETITLE]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_TITLE__11111.txt b/internal/help/_TITLE__11111.txt
deleted file mode 100644
index 283eb7dd8..000000000
--- a/internal/help/_TITLE__11111.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:39}}
-{{DISPLAYTITLE:_TITLE}}
-The [[_TITLE]] statement provides the program name in the title bar of the program window.
-
-
-{{PageSyntax}}
-: [[_TITLE]] {{Parameter|text$}}
-
-
-{{Parameters}}
-* {{Parameter|text$}} can be any literal or variable [[STRING]] or [[ASCII]] character value.
-
-
-{{PageDescription}}
-* The title can be changed anywhere in a program procedure.
-* The title bar will say "Untitled" if a title is not set.
-* Change the title of the [[$CONSOLE]] windows created using [[_CONSOLETITLE]]
-* '''Note: A [[_DELAY|delay]] may be required before the title can be set.''' See [[_SCREENEXISTS]].
-
-
-{{PageExamples}}
-''Example 1:'' How to create the window title bar.
-{{CodeStart}}
-{{Cl|_TITLE}} "My New Program"
-{{CodeEnd}}
-
-
-''Example 2:'' How to find the currently running program module name and current path using a Windows API Library.
-{{CodeStart}}
-{{Cl|_TITLE}} "My program"
-{{Cl|_DELAY}} 5 '5 second delay
-
-{{Cl|_TITLE}} {{Cl|MID$}}(TITLE$, 1, {{Cl|INSTR}}(TITLE$, ".") - 1)
-
-{{Cl|PRINT}} PATH$
-
-
-{{Cl|FUNCTION}} TITLE$ '=== SHOW CURRENT PROGRAM
-{{Cl|SHARED}} PATH$
-{{Cl|DECLARE LIBRARY}} 'Directory Information using KERNEL32 provided by Dav
- {{Cl|FUNCTION}} GetModuleFileNameA ({{Cl|BYVAL}} Module {{Cl|AS}} {{Cl|LONG}}, FileName {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} nSize {{Cl|AS}} {{Cl|LONG}})
-{{Cl|DECLARE LIBRARY|END DECLARE}}
-
-FileName$ = {{Cl|SPACE$}}(256)
-Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$))
-{{Cl|IF...THEN|IF}} Result {{Cl|THEN}}
- PATH$ = {{Cl|LEFT$}}(FileName$, Result)
- start = 1
- DO
- posit = {{Cl|INSTR}}(start, PATH$, "\")
- {{Cl|IF...THEN|IF}} posit {{Cl|THEN}} last = posit
- start = posit + 1
- {{Cl|LOOP}} {{Cl|UNTIL}} posit = 0
- TITLE$ = {{Cl|MID$}}(PATH$, last + 1)
- PATH$ = {{Cl|LEFT$}}(PATH$, last)
-{{Cl|ELSE}} TITLE$ = "": PATH$ = ""
-{{Cl|END IF}}
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-: ''Note:'' The actual module file name is returned. Not necessarily the Title value. The value returned can be used however.
-
-
-{{PageSeeAlso}}
-* [[_TITLE$]] (function)
-* [[_ICON]]
-* [[_DELAY]]
-* [[ASCII]]
-* [[_CONSOLETITLE]]
-* [[_SCREENEXISTS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_TOGGLEBIT__111111111.txt b/internal/help/_TOGGLEBIT__111111111.txt
deleted file mode 100644
index 60e329c80..000000000
--- a/internal/help/_TOGGLEBIT__111111111.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:42}}
-{{DISPLAYTITLE:_TOGGLEBIT}}
-The [[_TOGGLEBIT]] function is used to toggle a specified bit of a numerical value.
-
-
-{{PageSyntax}}
-:{{Parameter|result}} = [[_TOGGLEBIT]]({{Parameter|numericalVariable}}, {{Parameter|numericalValue}})
-
-
-{{Parameters}}
-* {{Parameter|numericalVariable}} is the variable to toggle the bit of and can be of the following types: [[_BYTE]], [[INTEGER]], [[LONG]], or [[_INTEGER64]].
-* Integer values can be signed or [[_UNSIGNED]].
-* {{Parameter|numericalValue}} the number of the bit to be set.
-
-
-{{PageDescription}}
-* Can be used to manually manipulate individual bits of an integer value by toggling their state.
-* A bit set to 1 is changed to 0 and a bit set to 0 is changed to 1.
-* Bits start at 0 (so a [[_BYTE]] has bits 0 to 7, [[INTEGER]] 0 to 15, and so on)
-
-==Availability==
-* '''Version 1.4 and up'''.
-
-
-{{PageExamples}}
-''Example 1:''
-{{CodeStart}}A~%% = 0 '{{Cl|_UNSIGNED}} {{Cl|_BYTE}}
-{{Cl|PRINT}} A~%%
-A~%% = {{Cl|_TOGGLEBIT}}(A~%%,4) 'toggle the fourth bit of A~%%
-{{Cl|PRINT}} A~%%
-A~%% = {{Cl|_TOGGLEBIT}}(A~%%,4) 'toggle the fourth bit of A~%%
-{{Cl|PRINT}} A~%%
-{{CodeEnd}}
-{{OutputStart}}
- 0
- 16
- 0
-{{OutputEnd}}
-
-
-
-{{PageSeeAlso}}
-* [[_SHL]], [[_SHR]], [[INTEGER]], [[LONG]]
-* [[_SETBIT]], [[_BYTE]], [[_INTEGER64]]
-* [[_RESETBIT]], [[_READBIT]]
-
-{{PageNavigation}}
diff --git a/internal/help/_TOTALDROPPEDFILES__11111111111111111.txt b/internal/help/_TOTALDROPPEDFILES__11111111111111111.txt
deleted file mode 100644
index eb4271281..000000000
--- a/internal/help/_TOTALDROPPEDFILES__11111111111111111.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:43}}
-{{DISPLAYTITLE:_TOTALDROPPEDFILES}}
-The [[_TOTALDROPPEDFILES]] function returns the number of items (files or folders) dropped in a program's window after [[_ACCEPTFILEDROP]] is enabled.
-
-
-{{PageSyntax}}
-: {{Parameter|totalFilesReceived&}} = [[_TOTALDROPPEDFILES]]
-
-
-{{PageDescription}}
-* After [[_ACCEPTFILEDROP]] is enabled, [[_TOTALDROPPEDFILES]] will return 0 until the user drops files or folders into the program's window.
-* When using [[_DROPPEDFILE]] to read the list sequentially, [[_TOTALDROPPEDFILES]] will be reset to 0 after the last item is retrieved (after [[_DROPPEDFILE]] returns an empty string "").
-* If using [[_DROPPEDFILE]] with an index, you must call [[_FINISHDROP]] after you finish working with the list.
-* When using [[_DROPPEDFILE]] to read the list with an index, [[_TOTALDROPPEDFILES]] will '''not''' be reset (and the list of items won't be cleared) until [[_FINISHDROP]] is called.
-* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''.
-
-
-{{PageAvailability}}
-* '''QB64 1.3 and up''' (QB64 Team)
-* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
-
-
-{{PageExamples}}
-* See example for [[_ACCEPTFILEDROP]]
-
-{{PageSeeAlso}}
-* [[_ACCEPTFILEDROP]], [[_DROPPEDFILE]], [[_FINISHDROP]]
-* [[_FILEEXISTS]], [[_DIREXISTS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_TRIM$__1111$.txt b/internal/help/_TRIM$__1111$.txt
deleted file mode 100644
index e314b737f..000000000
--- a/internal/help/_TRIM$__1111$.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:44}}
-{{DISPLAYTITLE:_TRIM$}}
-The [[_TRIM$]] function removes both leading and trailing space characters from a [[STRING]] value.
-
-
-{{PageSyntax}}
-:{{Parameter|return$}} = [[_TRIM$]]({{Parameter|text$}})
-
-
-{{PageDescription}}
-* Shorthand to using [[LTRIM$]]([[RTRIM$]]("text"))
-* {{Parameter|text$}} is the [[STRING]] value to trim.
-* If {{Parameter|text$}} contains no leading or trailing space characters, it is returned unchanged.
-* Convert fixed length [[STRING]] values by using a different {{parameter|return$}} variable.
-
-
-{{PageExamples}}
-''Example: Demonstrating how _TRIM$(text$) can replace LTRIM$(RTRIM$(text$)):
-{{CodeStart}}
-text$ = {{Cl|SPACE$}}(10) + "some text" + {{Cl|SPACE$}}(10)
-{{Cl|PRINT}} "[" + text$ + "]"
-{{Cl|PRINT}} "[" + {{Cl|RTRIM$}}(text$) + "]"
-{{Cl|PRINT}} "[" + {{Cl|LTRIM$}}(text$) + "]"
-{{Cl|PRINT}} "[" + {{Cl|LTRIM$}}({{Cl|RTRIM$}}(text$)) + "]"
-{{Cl|PRINT}} "[" + {{Cl|_TRIM$}}(text$) + "]"
-{{CodeEnd}}
-{{OutputStart}}[ some text ]
-[ some text]
-[some text ]
-[some text]
-[some text]
-{{OutputEnd}}
-
-
-{{PageSeeAlso}}
-* [[RTRIM$]], [[LTRIM$]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_UNSIGNED__11111111.txt b/internal/help/_UNSIGNED__11111111.txt
deleted file mode 100644
index bb41dab5b..000000000
--- a/internal/help/_UNSIGNED__11111111.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:45}}
-{{DISPLAYTITLE:_UNSIGNED}}
-[[_UNSIGNED]] defines a numerical value as being only positive.
-
-
-{{PageSyntax}}
-: [[DIM]] {{Parameter|variable}} [[AS]] [{{KW|_UNSIGNED}}] {{Parameter|datatype}}
-
-: [[_DEFINE]] {{Parameter|letterRange}} [[AS]] [{{KW|_UNSIGNED}}] {{Parameter|datatype}}
-
-
-{{PageDescription}}
-* Datatype can be any of the following: [[INTEGER]], [[LONG]], [[_BIT]], [[_BYTE]], [[_INTEGER64]], [[_OFFSET]]
-*'''[[SINGLE]], [[DOUBLE]] and [[_FLOAT]] variable types cannot be _UNSIGNED.'''
-* [[_UNSIGNED]] can be used in a [[_DEFINE]] statement to set undefined variable name first letters as all positive-only values.
-* Can also be used in [[DIM]] statements or subprocedure parameter definitions following [[AS]].
-* [[_UNSIGNED]] allows larger positive numerical variable value limits than signed ones.
-* The unsigned variable type suffix used is the '''tilde (~)''', right before the number's own type suffix: {{Parameter|variableName~&}}
-
-
-How negative values affect the [[_UNSIGNED]] value returned by a [[_BYTE]] (8 bits).
-{{WhiteStart}}
- 00000001 - unsigned & signed are both 1
- 01111111 - unsigned & signed are both 127
- 11111111 - unsigned is 255 but signed is -1
- 11111110 - unsigned is 254 but signed is -2
- 11111101 - unsigned is 253 but signed is -3
-{{WhiteEnd}}
-
-
-{{PageExamples}}
-''Example 1:'' In '''QB64''', when a signed [[INTEGER]] value exceeds 32767, the value may become a negative value:
-{{CodeStart}}
-i% = 38000
-{{Cl|PRINT}} i%
-{{CodeEnd}}{{OutputStart}}-27536
-{{OutputEnd}}
-:''Explanation:'' Use an [[_UNSIGNED]] [[INTEGER]] or a ~% variable type suffix for only positive integer values up to 65535.
-
-
-''Example 2:'' In '''QB64''', [[_UNSIGNED]] [[INTEGER]] values greater than 65535 cycle over again from zero:
-{{CodeStart}}
-i~% = 70000
-{{Cl|PRINT}} i~%
-{{CodeEnd}}{{OutputStart}} 4464
-{{OutputEnd}}
-:''Explanation:'' In QB64 an unsigned integer value of 65536 would be 0 with values increasing by the value minus 65536.
-
-
-''Example 3:'' Demonstrating how _UNSIGNED variables expand the [[INTEGER]] range.
-{{CodeStart}}
-{{Cl|DIM}} n {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|INTEGER}}
-{{Cl|DIM}} pn {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|INTEGER}}
-{{Cl|LOCATE}} 3, 6: {{Cl|PRINT}} "Press Esc to exit loop"
-{{Cl|FOR...NEXT|FOR}} n = 1 {{Cl|TO}} 80000
- {{Cl|_LIMIT}} 10000 ' 6.5 second loop
- {{Cl|LOCATE}} 12, 37: {{Cl|PRINT}} n ' display current value
- {{Cl|IF...THEN|IF}} n > 0 {{Cl|THEN}} pn = n ' find highest value
- {{Cl|IF...THEN|IF}} n = 0 {{Cl|THEN}} Count = Count + 1: {{Cl|LOCATE}} 14, 37: {{Cl|PRINT}} "Count:"; Count; "Max:"; pn
- {{Cl|IF...THEN|IF}} {{Cl|INP}}(&H60) = 1 {{Cl|THEN}} {{Cl|EXIT|EXIT FOR}} ' escape key exit
-{{Cl|NEXT}} n
-{{Cl|END}}
-{{CodeEnd}}
-{{OutputStart}}
-
- Press Esc to exit loop
-
-
-
-
- 65462
-
- Count: 13 Max: 65535
-
-
-{{OutputEnd}}
-''Explanation:'' The maximum value can only be 65535 (32767 + 32768) so the FOR loop repeats itself. Remove the [[_UNSIGNED]] parts and run it again.
-
-
-
-{{PageSeeAlso}}
-* DECLARE, [[SUB]], [[FUNCTION]]
-* [[DIM]], [[_DEFINE]]
-* [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]]
-* [[INTEGER]], [[LONG]], [[_INTEGER64]]
-* [[ABS]], [[SGN]]
-* [[Variable Types]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_WHEEL__11111.txt b/internal/help/_WHEEL__11111.txt
deleted file mode 100644
index 8fb5a81e8..000000000
--- a/internal/help/_WHEEL__11111.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:49}}
-{{DISPLAYTITLE:_WHEEL}}
-The [[_WHEEL]] function returns the relative position of a specified wheel number on a controller device.
-
-
-{{PageSyntax}}
-: {{Parameter|move}} = [[_WHEEL]]({{Parameter|wheelNumber%}})
-
-
-* Returns -1 when scrolling up and 1 when scrolling down with 0 indicating no movement since last read.
-* Add consecutive wheel values to determine a cumulative value over time for scrolling or moving objects.
-* {{Parameter|wheelNumber%}} must be a number which does not exceed the number of wheels found by the [[_LASTWHEEL]] function.
-* When a mouse indicates it has 3 wheels, the first two are for relative movement reads. The third wheel is for scrolling.
-* '''The number of [[_DEVICES]] must be read before using [[_DEVICE$]], [[_DEVICEINPUT]] or [[_LASTWHEEL]].'''
-
-
-{{PageExamples}}
-''Example 1:'' Reading multiple controller device buttons, axis and wheels.
-{{CodeStart}}
-{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} {{Cl|_DEVICES}}
- {{Cl|PRINT}} {{Cl|STR$}}(i) + ") " + {{Cl|_DEVICE$}}(i) + " Buttons:"; {{Cl|_LASTBUTTON}}(i); ",Axis:"; {{Cl|_LASTAXIS}}(i); ",Wheel:"; {{Cl|_LASTWHEEL}}(i)
-{{Cl|NEXT}}
-
-{{Cl|DO...LOOP|DO}}
- d& = {{Cl|_DEVICEINPUT}}
- {{Cl|IF...THEN|IF}} d& {{Cl|THEN}} ' the device number cannot be zero!
- {{Cl|PRINT}} "Found"; d&;
- {{Cl|FOR...NEXT|FOR}} b = 1 {{Cl|TO}} {{Cl|_LASTBUTTON}}(d&)
- {{Cl|PRINT}} {{Cl|_BUTTONCHANGE}}(b); {{Cl|_BUTTON}}(b);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} a = 1 {{Cl|TO}} {{Cl|_LASTAXIS}}(d&)
- {{Cl|PRINT}} {{Cl|_AXIS}}(a);
- {{Cl|NEXT}}
- {{Cl|FOR...NEXT|FOR}} w = 1 {{Cl|TO}} {{Cl|_LASTWHEEL}}(d&)
- {{Cl|PRINT}} {{Cl|_WHEEL}}(w);
- {{Cl|NEXT}}
- {{Cl|PRINT}}
- {{Cl|END IF}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27) 'escape key exit
-
-{{Cl|END}}
-{{CodeEnd}}
-: ''Note:'' When there is no device control to read, a [[FOR...NEXT|FOR]] n = 1 TO 0 loop will not run thus avoiding a control function read error.
-
-
-''Example 2:'' Why does a mouse have 3 wheels? Relative x and y movements can be read using the first 2 _WHEEL reads.
-{{CodeStart}}
-ignore = {{Cl|_MOUSEMOVEMENTX}} 'dummy call to put mouse into relative movement mode
-
-{{Cl|PRINT}} "Move your mouse and/or your mouse wheel (ESC to exit)"
-
-d = {{Cl|_DEVICES}} ' always read number of devices to enable device input
-DO: {{Cl|_LIMIT}} 30 'main loop
- {{Cl|DO...LOOP|DO}} {{Cl|WHILE}} {{Cl|_DEVICEINPUT}}(2) 'loop only runs during a device 2 mouse event
- {{Cl|PRINT}} {{Cl|_WHEEL}}(1), {{Cl|_WHEEL}}(2), {{Cl|_WHEEL}}(3)
- {{Cl|LOOP}}
-{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} = {{Cl|CHR$}}(27)
-{{CodeEnd}}
-: ''Explanation:'' Referencing the [[_MOUSEMOVEMENTX]] function hides the mouse and sets the mouse to a relative movement mode which can be read by [[_WHEEL]]. [[_DEVICEINPUT]](2) returns -1 (true) only when the mouse is moved, scrolled or clicked.
-
-
-{{PageSeeAlso}}
-* [[_MOUSEWHEEL]]
-* [[_LASTWHEEL]], [[_LASTBUTTON]], [[_LASTAXIS]]
-* [[_AXIS]], [[_BUTTON]], [[_BUTTONCHANGE]]
-* [[_DEVICES]], [[_DEVICE$]], [[_DEVICEINPUT]]
-* [[_MOUSEMOVEMENTX]], [[_MOUSEMOVEMENTY]]
-* [[Controller Devices]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_WIDTH_(function)__11111_(00000000).txt b/internal/help/_WIDTH_(function)__11111_(00000000).txt
deleted file mode 100644
index 8f276d77e..000000000
--- a/internal/help/_WIDTH_(function)__11111_(00000000).txt
+++ /dev/null
@@ -1,53 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:50}}
-{{DISPLAYTITLE:_WIDTH (function)}}
-The [[_WIDTH (function)|_WIDTH]] function returns the width of an image handle or of the current write page.
-
-
-{{PageSyntax}}
-: {{Parameter|columns&}} = [[_WIDTH (function)|_WIDTH]][({{Parameter|imageHandle&}})]
-
-
-{{PageDescription}}
-* If {{Parameter|imageHandle&}} is omitted, it's assumed to be the handle of the current [[SCREEN]] or write page.
-* To get the width of the current program [[SCREEN|screen]] window use zero for the handle value or nothing: {{Parameter|columns&}} = [[_WIDTH (function)|_WIDTH]](0) ''or'' {{Parameter|columns&}} = [[_WIDTH (function)|_WIDTH]]
-* If the image specified by {{Parameter|imageHandle&}} is in text only([[SCREEN]] 0) mode, the number of characters per row is returned.
-* If the image specified by {{Parameter|imageHandle&}} is in graphics mode, the number of pixels per row is returned.
-* If {{Parameter|imageHandle&}} is an invalid handle, then an [[ERROR Codes|invalid handle error]] is returned.
-* The last visible pixel coordinate of a program [[SCREEN|screen]] is '''[[_WIDTH (function)|_WIDTH]] - 1'''.
-
-
-{{PageExamples}}
-''Example:'' A SUB program that centers text in any graphic screen mode except text mode [[SCREEN (statement)|SCREEN]] 0.
-
-{{CodeStart}}
-
- s& = {{Cl|_NEWIMAGE}}(800, 600, 256)
- SCREEN s&
- Align 15, 5, s&, "This text is centered on the screen!"
-
- SUB Align (Tcolor, Trow, mode&, txt$)
- center& = {{Cl|_WIDTH (function)|_WIDTH}} (mode&) \ 2 'returns pixels in graphic modes
- MaxCol = (center& \ 8) + 1 'screen text width = 8 pixels
- Tcol = MaxCol - ({{Cl|LEN}}(txt$) \ 2)
- {{Cl|COLOR}} Tcolor: {{Cl|LOCATE}} Trow, Tcol: {{Cl|PRINT}} txt$;
- END SUB
-
-{{CodeEnd}}
-
-: ''Explanation:'' [[_NEWIMAGE]] enlarges a screen to 800 pixels wide which is what [[_WIDTH (function)|_WIDTH]] function will return. The center is 800 \ 2 or 400. Since the text width is 8 pixels, that is divided by 8 to get 50 as the center text column. Then half of the text length is subtracted to find the starting text print [[LOCATE]] column.
-
-
-: ''Note:'' The screen handle parameter is required because using no handle could assume other page handles created by functions like [[_NEWIMAGE]] or [[_PUTIMAGE]]. Use the correct handle in the SUB call! When using SCREEN 0, the MaxCol variable is not needed because _WIDTH returns the number of text columns, not pixels. Use the center value and add 1. '''Tcol = (center& + 1) - LEN(txt$) \ 2'''
-
-
-
-{{PageSeeAlso}}
-* [[_HEIGHT]], [[_LOADIMAGE]], [[_NEWIMAGE]]
-* [[WIDTH]]
-* [[Bitmaps]]
-
-
-{{PageNavigation}}
-
-[[Category:Latest]]
diff --git a/internal/help/_WINDOWHANDLE__111111111111.txt b/internal/help/_WINDOWHANDLE__111111111111.txt
deleted file mode 100644
index 82f917454..000000000
--- a/internal/help/_WINDOWHANDLE__111111111111.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:51}}
-{{DISPLAYTITLE:_WINDOWHANDLE}}
-The [[_WINDOWHANDLE]] function returns the window handle assigned to the current program by the OS. Windows-only.
-
-
-{{PageSyntax}}
-: {{Parameter|hwnd&&}} = [[_WINDOWHANDLE]]
-
-
-{{PageDescription}}
-* The result is an [[_INTEGER64]] number assigned by Windows to your running program.
-* Use it to make [[Windows Libraries|API calls]] that require a window handle to be passed.
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
-
-
-==Availability==
-* '''Build 20170924/68'''.
-
-
-{{PageExamples}}
-''Example:'' Showing the system-default message box in Windows.
-{{CodeStart}}
-'Message Box Constant values as defined by Microsoft (MBType)
-{{Cl|CONST}} MB_OK& = 0 'OK button only
-{{Cl|CONST}} MB_OKCANCEL& = 1 'OK & Cancel
-{{Cl|CONST}} MB_ABORTRETRYIGNORE& = 2 'Abort, Retry & Ignore
-{{Cl|CONST}} MB_YESNOCANCEL& = 3 'Yes, No & Cancel
-{{Cl|CONST}} MB_YESNO& = 4 'Yes & No
-{{Cl|CONST}} MB_RETRYCANCEL& = 5 'Retry & Cancel
-{{Cl|CONST}} MB_CANCELTRYCONTINUE& = 6 'Cancel, Try Again & Continue
-{{Cl|CONST}} MB_ICONSTOP& = 16 'Error stop sign icon
-{{Cl|CONST}} MB_ICONQUESTION& = 32 'Question-mark icon
-{{Cl|CONST}} MB_ICONEXCLAMATION& = 48 'Exclamation-point icon
-{{Cl|CONST}} MB_ICONINFORMATION& = 64 'Letter i in a circle icon
-{{Cl|CONST}} MB_DEFBUTTON1& = 0 '1st button default(left)
-{{Cl|CONST}} MB_DEFBUTTON2& = 256 '2nd button default
-{{Cl|CONST}} MB_DEFBUTTON3& = 512 '3rd button default(right)
-{{Cl|CONST}} MB_APPLMODAL& = 0 'Message box applies to application only
-{{Cl|CONST}} MB_SYSTEMMODAL& = 4096 'Message box on top of all other windows
-{{Cl|CONST}} MB_SETFOCUS& = 65536 'Set message box as focus
-{{Cl|CONST}} IDOK& = 1 'OK button pressed
-{{Cl|CONST}} IDCANCEL& = 2 'Cancel button pressed
-{{Cl|CONST}} IDABORT& = 3 'Abort button pressed
-{{Cl|CONST}} IDRETRY& = 4 'Retry button pressed
-{{Cl|CONST}} IDIGNORE& = 5 'Ignore button pressed
-{{Cl|CONST}} IDYES& = 6 'Yes button pressed
-{{Cl|CONST}} IDNO& = 7 'No button pressed
-{{Cl|CONST}} IDTRYAGAIN& = 10 'Try again button pressed
-{{Cl|CONST}} IDCONTINUE& = 1 'Continue button pressed
-'----------------------------------------------------------------------------------------
-
-{{Cl|DECLARE LIBRARY|DECLARE DYNAMIC LIBRARY}} "user32"
-{{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|LONG}}, Message {{Cl|AS}} {{Cl|STRING}}, Title {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} MBType {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}})
-{{Cl|DECLARE LIBRARY|END DECLARE}}
-
-DO
- msg& = 0: icon& = 0: DB& = 0
- {{Cl|INPUT}} "Enter Message Box type(0 to 6 other Quits): ", BOX&
- {{Cl|IF...THEN|IF}} BOX& < 0 {{Cl|OR (boolean)|OR}} BOX& > 6 {{Cl|THEN}} {{Cl|EXIT DO}}
-
- {{Cl|INPUT}} "Enter Icon&(0=none, 1=stop, 2=?, 3=!, 4=info): ", Icon&
-
- {{Cl|IF...THEN|IF}} BOX& {{Cl|THEN}} {{Cl|INPUT (file mode)|INPUT}} "Enter Default Button(1st, 2nd or 3rd): ", DB&
- {{Cl|IF...THEN|IF}} DB& {{Cl|THEN}} DB& = DB& - 1 'adjust value to 0, 1, or 2
- msg& = MsgBox&("Box Title", "Box text message", BOX&, Icon&, DB&, 4096) 'on top of all windows
-
- {{Cl|PRINT}} "Button ="; msg&
-{{Cl|LOOP}}
-{{Cl|END}}
-
-{{Cl|FUNCTION}} MsgBox& (Title$, Message$, BoxType&, Icon&, DBtn&, Mode&)
-{{Cl|SELECT CASE}} Icon&
- {{Cl|CASE}} 1: Icon& = MB_ICONSTOP& 'warning X-sign icon
- {{Cl|CASE}} 2: Icon& = MB_ICONQUESTION& 'question-mark icon
- {{Cl|CASE}} 3: Icon& = MB_ICONEXCLAMATION& 'exclamation-point icon
- {{Cl|CASE}} 4: Icon& = MB_ICONINFORMATION& 'lowercase letter i in circle
- {{Cl|CASE ELSE}}: Icon& = 0 'no icon
-{{Cl|END SELECT}}
-{{Cl|IF...THEN|IF}} BoxType& > 0 {{Cl|AND (boolean)|AND}} DBtn& > 0 {{Cl|THEN}} 'set default button as 2nd(256) or 3rd(512)
- {{Cl|SELECT CASE}} BoxType&
- {{Cl|CASE}} 2, 3, 6
- {{Cl|IF...THEN|IF}} DBtn& = 2 {{Cl|THEN}} Icon& = Icon& + MB_DEFBUTTON3& {{Cl|ELSE}} Icon& = Icon& + MB_DEFBUTTON2& '3 button
- {{Cl|CASE ELSE}}: Icon& = Icon& + MB_DEFBUTTON2& '2nd button default
- {{Cl|END SELECT}}
-{{Cl|END IF}}
-Focus& = MB_SetFocus&
-MsgBox& = MessageBoxA&({{Cl|_WINDOWHANDLE}}, Message$, Title$, BoxType& + Icon& + Mode& + Focus&) 'focus on button
-{{Cl|END FUNCTION}}
-{{CodeEnd}}
-:''Explanation:'' Notice how the call to the external dynamic library function MessageBoxA& passes _WINDOWHANDLE to the API and how the message box shown is created as a child of your program's window, not allowing the main window to be manipulated while the message box is open.
-
-{{PageSeeAlso}}
-* [[_WINDOWHASFOCUS]]
-* [[Windows Libraries]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_WINDOWHASFOCUS__11111111111111.txt b/internal/help/_WINDOWHASFOCUS__11111111111111.txt
deleted file mode 100644
index ce04e0632..000000000
--- a/internal/help/_WINDOWHASFOCUS__11111111111111.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:40:52}}
-{{DISPLAYTITLE:_WINDOWHASFOCUS}}
-The [[_WINDOWHASFOCUS]] function returns true (-1) if the current program's window has focus. Windows-only.
-
-
-{{PageSyntax}}
-: {{Parameter|hasFocus%%}} = [[_WINDOWHASFOCUS]]
-
-
-{{PageDescription}}
-* The function returns true (-1) if the current program is the topmost window on the user's desktop and has focus. If the current program is running behind another window, the function returns false (0).
-* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in macOS]].
-
-
-==Availability==
-* '''Build 20170924/68'''.
-
-
-{{PageExamples}}
-''Example:'' Detecting if the current program has focus. Windows and Linux-only.
-{{CodeStart}}
-DO
- {{Cl|IF}} {{Cl|_WINDOWHASFOCUS}} THEN
- {{Cl|COLOR}} 15, 6
- {{Cl|CLS}}
- {{Cl|PRINT}} "*** Hi there! ***"
- {{Cl|ELSE}}
- {{Cl|COLOR}} 0, 7
- CLS
- PRINT "(ain't nobody looking...)"
- {{Cl|END IF}}
- {{Cl|_DISPLAY}}
- {{Cl|_LIMIT}} 30
-{{Cl|LOOP}}
-{{CodeEnd}}
-: ''Explanation:'' The program will display ''"*** Hi There! ***"'' while the window is the topmost and is being manipulated by the user. If another window, the taskbar or the desktop are clicked, the program window loses focus and the message ''"(ain't nobody looking...)"'' is displayed.
-
-
-{{PageSeeAlso}}
-* [[_SCREENEXISTS]]
-
-
-{{PageNavigation}}
diff --git a/internal/help/_glAccum__0010000.txt b/internal/help/_glAccum__0010000.txt
deleted file mode 100644
index dacdd2192..000000000
--- a/internal/help/_glAccum__0010000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:49}}
-{{DISPLAYTITLE:_glAccum}}
-The '''_glAccum''' statement operates on the accumulation buffer.
-
-
-{{PageSyntax}}
-: '''_glAccum''' GLenum {{Parameter|op}}, GLfloat {{Parameter|value}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glaccum Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glBlendFunc]], [[_glClear]], [[_glClearAccum]]
-* [[_glCopyPixels]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glLogicOp]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [[_glReadBuffer]], [[_glReadPixels]]
-* [[_glScissor]], [[_glStencilOp]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glAlphaFunc__00100001000.txt b/internal/help/_glAlphaFunc__00100001000.txt
deleted file mode 100644
index b9ccc58b6..000000000
--- a/internal/help/_glAlphaFunc__00100001000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:51}}
-{{DISPLAYTITLE:_glAlphaFunc}}
-The '''_glAlphaFunc''' statement enables your application to set the alpha test function.
-
-
-{{PageSyntax}}
-: '''_glAlphaFunc''' GLenum {{Parameter|func}}, GLclampf {{Parameter|ref}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glalphafunc Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glBlendFunc]], [[_glClear]], [[_glDepthFunc]]
-* [[_glEnable]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsEnabled]]
-* [[_glStencilFunc]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glAreTexturesResident__001001000000010000000.txt b/internal/help/_glAreTexturesResident__001001000000010000000.txt
deleted file mode 100644
index 4fc8f1c75..000000000
--- a/internal/help/_glAreTexturesResident__001001000000010000000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:54}}
-{{DISPLAYTITLE:_glAreTexturesResident}}
-The '''_glAreTexturesResident''' function determines whether specified texture objects are resident in texture memory.
-
-
-{{PageSyntax}}
-: GLboolean {{Parameter|result}} = '''_glAreTexturesResident''' (GLsizei {{Parameter|n}}, const GLuint {{Parameter|*textures}}, GLboolean {{Parameter|*residences}})
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glaretexturesresident Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glBindTexture]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgettexparameter _glGetTexParameter]
-* [[_glPrioritizeTextures]], [[_glTexImage1D]], [[_glTexImage2D]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glArrayElement__00100001000000.txt b/internal/help/_glArrayElement__00100001000000.txt
deleted file mode 100644
index 56e0bffe7..000000000
--- a/internal/help/_glArrayElement__00100001000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:56}}
-{{DISPLAYTITLE:_glArrayElement}}
-The '''_glArrayElement''' statement specifies the array elements used to render a vertex.
-
-
-{{PageSyntax}}
-: '''_glArrayElement''' GLint {{Parameter|index}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glarrayelement Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glColorPointer]], [[_glDrawArrays]], [[_glEdgeFlagPointer]]
-* [[_glEnableClientState]], [[_glEnd]], [[_glGetPointerv]], [[_glGetString]]
-* [[_glIndexPointer]], [[_glNormalPointer]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glBegin__0010000.txt b/internal/help/_glBegin__0010000.txt
deleted file mode 100644
index daac04017..000000000
--- a/internal/help/_glBegin__0010000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:45:58}}
-{{DISPLAYTITLE:_glBegin}}
-The '''_glBegin''' and '''_glEnd''' statements delimit the vertices of a primitive or a group of like primitives.
-
-
-{{PageSyntax}}
-: '''_glBegin''' GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glbegin Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glCallList]], [[_glCallLists]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor-functions _glColor], [https://docs.microsoft.com/en-us/windows/win32/opengl/gledgeflag-functions _glEdgeFlag]
-* [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalcoord-functions _glEvalCoord], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalpoint _glEvalPoint], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glmaterial-functions _glMaterial], [https://docs.microsoft.com/en-us/windows/win32/opengl/glnormal-functions _glNormal], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexcoord-functions _glTexCoord], [https://docs.microsoft.com/en-us/windows/win32/opengl/glvertex-functions _glVertex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glBindTexture__0010001000000.txt b/internal/help/_glBindTexture__0010001000000.txt
deleted file mode 100644
index 8449197d4..000000000
--- a/internal/help/_glBindTexture__0010001000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:00}}
-{{DISPLAYTITLE:_glBindTexture}}
-The '''_glBindTexture''' statement enables the creation of a named texture that is bound to a texture target.
-
-
-{{PageSyntax}}
-: '''_glBindTexture''' GLenum {{Parameter|target}}, GLuint {{Parameter|texture}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glbindtexture Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAreTexturesResident]], [[_glDeleteTextures]], [[_glGenTextures]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glgettexparameter _glGetTexParameter], [[_glIsTexture]], [[_glPrioritizeTextures]], [[_glTexImage1D]]
-* [[_glTexImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glBitmap__00100000.txt b/internal/help/_glBitmap__00100000.txt
deleted file mode 100644
index 38ace6922..000000000
--- a/internal/help/_glBitmap__00100000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:02}}
-{{DISPLAYTITLE:_glBitmap}}
-The '''_glBitmap''' statement draws a bitmap.
-
-
-{{PageSyntax}}
-: '''_glBitmap''' GLSizei {{Parameter|width}}, GLSizei {{Parameter|height}}, GLfloat {{Parameter|xorig}}, GLfloat {{Parameter|yorig}}, GLfloat {{Parameter|xmove}}, GLfloat {{Parameter|ymove}}, const GLubyte {{Parameter|*bitmap}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glbitmap Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDrawPixels]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/glrasterpos-functions _glRasterPos]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glBlendFunc__00100001000.txt b/internal/help/_glBlendFunc__00100001000.txt
deleted file mode 100644
index f771abe34..000000000
--- a/internal/help/_glBlendFunc__00100001000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:05}}
-{{DISPLAYTITLE:_glBlendFunc}}
-The '''_glBlendFunc''' statement specifies pixel arithmetic.
-
-
-{{PageSyntax}}
-: '''_glBlendFunc''' GLenum {{Parameter|sfactor}}, GLenum {{Parameter|dfactor}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glblendfunc Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glBegin]], [[_glClear]], [[_glDisable]]
-* [[_glDrawBuffer]], [[_glEnable]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsEnabled]]
-* [[_glLogicOp]], [[_glStencilFunc]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCallList__0010001000.txt b/internal/help/_glCallList__0010001000.txt
deleted file mode 100644
index 07ac6d872..000000000
--- a/internal/help/_glCallList__0010001000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:07}}
-{{DISPLAYTITLE:_glCallList}}
-The '''_glCallList''' statement executes a display list.
-
-
-{{PageSyntax}}
-: '''_glCallList''' GLuint {{Parameter|list}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcalllist Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCallLists]], [[_glDeleteLists]], [[_glEnd]]
-* [[_glGenLists]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsList]], [[_glNewList]]
-* [[_glPopAttrib]], [[_glPopMatrix]], [[_glPushAttrib]], [[_glPushMatrix]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCallLists__00100010000.txt b/internal/help/_glCallLists__00100010000.txt
deleted file mode 100644
index 361ed0f0f..000000000
--- a/internal/help/_glCallLists__00100010000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:09}}
-{{DISPLAYTITLE:_glCallLists}}
-The '''_glCallLists''' statement executes a list of display lists.
-
-
-{{PageSyntax}}
-: '''_glCallLists''' GLsizei {{Parameter|n}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*lists}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcalllists Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCallList]], [[_glDeleteLists]], [[_glEnd]]
-* [[_glGenLists]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsList]], [[_glListBase]]
-* [[_glNewList]], [[_glPopAttrib]], [[_glPopMatrix]], [[_glPushAttrib]]
-* [[_glPushMatrix]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClearAccum__001000010000.txt b/internal/help/_glClearAccum__001000010000.txt
deleted file mode 100644
index 28a3b6be6..000000000
--- a/internal/help/_glClearAccum__001000010000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:14}}
-{{DISPLAYTITLE:_glClearAccum}}
-The '''_glClearAccum''' statement specifies the clear values for the accumulation buffer.
-
-
-{{PageSyntax}}
-: '''_glClearAccum''' GLfloat {{Parameter|red}}, GLfloat {{Parameter|green}}, GLfloat {{Parameter|blue}}, GLfloat {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glclearaccum Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glClear]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClearColor__001000010000.txt b/internal/help/_glClearColor__001000010000.txt
deleted file mode 100644
index 404a7957d..000000000
--- a/internal/help/_glClearColor__001000010000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:16}}
-{{DISPLAYTITLE:_glClearColor}}
-The '''_glClearColor''' statement specifies clear values for the color buffers.
-
-
-{{PageSyntax}}
-: '''_glClearColor''' GLclampf {{Parameter|red}}, GLclampf {{Parameter|green}}, GLclampf {{Parameter|blue}}, GLclampf {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glclearcolor Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glClear]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClearDepth__001000010000.txt b/internal/help/_glClearDepth__001000010000.txt
deleted file mode 100644
index 7a0907116..000000000
--- a/internal/help/_glClearDepth__001000010000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:18}}
-{{DISPLAYTITLE:_glClearDepth}}
-The '''_glClearDepth''' statement specifies the clear value for the depth buffer.
-
-
-{{PageSyntax}}
-: '''_glClearDepth''' GLclampd {{Parameter|depth}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcleardepth Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glClear]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClearIndex__001000010000.txt b/internal/help/_glClearIndex__001000010000.txt
deleted file mode 100644
index 0ba9ee37e..000000000
--- a/internal/help/_glClearIndex__001000010000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:20}}
-{{DISPLAYTITLE:_glClearIndex}}
-The '''_glClearIndex''' statement specifies the clear value for the color-index buffers.
-
-
-{{PageSyntax}}
-: '''_glClearIndex''' GLfloat {{Parameter|c}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glclearindex Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glClear]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClearStencil__00100001000000.txt b/internal/help/_glClearStencil__00100001000000.txt
deleted file mode 100644
index c8b8be694..000000000
--- a/internal/help/_glClearStencil__00100001000000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:22}}
-{{DISPLAYTITLE:_glClearStencil}}
-The '''_glClearStencil''' statement specifies the clear value for the stencil buffer.
-
-
-{{PageSyntax}}
-: '''_glClearStencil''' GLint {{Parameter|s}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glclearstencil Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glClear]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClear__0010000.txt b/internal/help/_glClear__0010000.txt
deleted file mode 100644
index c2af71799..000000000
--- a/internal/help/_glClear__0010000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:11}}
-{{DISPLAYTITLE:_glClear}}
-The '''_glClear''' statement clears buffers to preset values.
-
-
-{{PageSyntax}}
-: '''_glClear''' GLbitfield {{Parameter|mask}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glclear Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glClearAccum]], [[_glClearColor]], [[_glClearDepth]], [[_glClearIndex]]
-* [[_glClearStencil]], [[_glDrawBuffer]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glScissor]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glClipPlane__00100010000.txt b/internal/help/_glClipPlane__00100010000.txt
deleted file mode 100644
index 7b9c58b58..000000000
--- a/internal/help/_glClipPlane__00100010000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:24}}
-{{DISPLAYTITLE:_glClipPlane}}
-The '''_glClipPlane''' statement specifies a plane against which all geometry is clipped.
-
-
-{{PageSyntax}}
-: '''_glClipPlane''' GLenum {{Parameter|plane}}, const GLdouble {{Parameter|*equation}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glclipplane Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDisable]], [[_glEnable]], [[_glEnd]]
-* [[_glGetClipPlane]], [[_glIsEnabled]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3b__001000030.txt b/internal/help/_glColor3b__001000030.txt
deleted file mode 100644
index 7fb335c59..000000000
--- a/internal/help/_glColor3b__001000030.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:27}}
-{{DISPLAYTITLE:_glColor3b}}
-The '''_glColor3b''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3b''' GLbyte {{Parameter|red}}, GLbyte {{Parameter|green}}, GLbyte {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3b Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3bv__0010000300.txt b/internal/help/_glColor3bv__0010000300.txt
deleted file mode 100644
index 8e7b283cf..000000000
--- a/internal/help/_glColor3bv__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:29}}
-{{DISPLAYTITLE:_glColor3bv}}
-The '''_glColor3bv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3bv''' const GLbyte {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3bv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3d__001000030.txt b/internal/help/_glColor3d__001000030.txt
deleted file mode 100644
index e4117e1c6..000000000
--- a/internal/help/_glColor3d__001000030.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:31}}
-{{DISPLAYTITLE:_glColor3d}}
-The '''_glColor3d''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3d''' GLdouble {{Parameter|red}}, GLdouble {{Parameter|green}}, GLdouble {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3dv__0010000300.txt b/internal/help/_glColor3dv__0010000300.txt
deleted file mode 100644
index 07a141e07..000000000
--- a/internal/help/_glColor3dv__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:33}}
-{{DISPLAYTITLE:_glColor3dv}}
-The '''_glColor3dv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3dv''' const GLdouble {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3dv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3f__001000030.txt b/internal/help/_glColor3f__001000030.txt
deleted file mode 100644
index 27813ca64..000000000
--- a/internal/help/_glColor3f__001000030.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:35}}
-{{DISPLAYTITLE:_glColor3f}}
-The '''_glColor3f''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3f''' GLfloat {{Parameter|red}}, GLfloat {{Parameter|green}}, GLfloat {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3f Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3fv__0010000300.txt b/internal/help/_glColor3fv__0010000300.txt
deleted file mode 100644
index a3ed0a3f1..000000000
--- a/internal/help/_glColor3fv__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:37}}
-{{DISPLAYTITLE:_glColor3fv}}
-The '''_glColor3fv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3fv''' const GLfloat {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3fv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3i__001000030.txt b/internal/help/_glColor3i__001000030.txt
deleted file mode 100644
index 020619b1c..000000000
--- a/internal/help/_glColor3i__001000030.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:40}}
-{{DISPLAYTITLE:_glColor3i}}
-The '''_glColor3i''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3i''' GLint {{Parameter|red}}, GLint {{Parameter|green}}, GLint {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3i Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3iv__0010000300.txt b/internal/help/_glColor3iv__0010000300.txt
deleted file mode 100644
index 96670f942..000000000
--- a/internal/help/_glColor3iv__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:42}}
-{{DISPLAYTITLE:_glColor3iv}}
-The '''_glColor3iv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3iv''' const GLint {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3iv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3s__001000030.txt b/internal/help/_glColor3s__001000030.txt
deleted file mode 100644
index 91f1d67fa..000000000
--- a/internal/help/_glColor3s__001000030.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:44}}
-{{DISPLAYTITLE:_glColor3s}}
-The '''_glColor3s''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3s''' GLshort {{Parameter|red}}, GLshort {{Parameter|green}}, GLshort {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3s Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3sv__0010000300.txt b/internal/help/_glColor3sv__0010000300.txt
deleted file mode 100644
index eee71e67b..000000000
--- a/internal/help/_glColor3sv__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:46}}
-{{DISPLAYTITLE:_glColor3sv}}
-The '''_glColor3sv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3sv''' const GLshort {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3sv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3ub__0010000300.txt b/internal/help/_glColor3ub__0010000300.txt
deleted file mode 100644
index 62516a4fa..000000000
--- a/internal/help/_glColor3ub__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:48}}
-{{DISPLAYTITLE:_glColor3ub}}
-The '''_glColor3ub''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3ub''' GLubyte {{Parameter|red}}, GLubyte {{Parameter|green}}, GLubyte {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3ub Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3ubv__00100003000.txt b/internal/help/_glColor3ubv__00100003000.txt
deleted file mode 100644
index bff55c124..000000000
--- a/internal/help/_glColor3ubv__00100003000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:51}}
-{{DISPLAYTITLE:_glColor3ubv}}
-The '''_glColor3ubv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3ubv''' const GLubyte {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3ubv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3ui__0010000300.txt b/internal/help/_glColor3ui__0010000300.txt
deleted file mode 100644
index 8070c6dbe..000000000
--- a/internal/help/_glColor3ui__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:53}}
-{{DISPLAYTITLE:_glColor3ui}}
-The '''_glColor3ui''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3ui''' GLuint {{Parameter|red}}, GLuint {{Parameter|green}}, GLuint {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3ui Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3uiv__00100003000.txt b/internal/help/_glColor3uiv__00100003000.txt
deleted file mode 100644
index a6a94b308..000000000
--- a/internal/help/_glColor3uiv__00100003000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:56}}
-{{DISPLAYTITLE:_glColor3uiv}}
-The '''_glColor3uiv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3uiv''' const GLuint {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3uiv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3us__0010000300.txt b/internal/help/_glColor3us__0010000300.txt
deleted file mode 100644
index 918ac6b8d..000000000
--- a/internal/help/_glColor3us__0010000300.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:46:58}}
-{{DISPLAYTITLE:_glColor3us}}
-The '''_glColor3us''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor3us''' GLushort {{Parameter|red}}, GLushort {{Parameter|green}}, GLushort {{Parameter|blue}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3us Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor3usv__00100003000.txt b/internal/help/_glColor3usv__00100003000.txt
deleted file mode 100644
index eec4e5572..000000000
--- a/internal/help/_glColor3usv__00100003000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:00}}
-{{DISPLAYTITLE:_glColor3usv}}
-The '''_glColor3usv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor3usv''' const GLushort {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor3usv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4b__001000040.txt b/internal/help/_glColor4b__001000040.txt
deleted file mode 100644
index cd1893bbc..000000000
--- a/internal/help/_glColor4b__001000040.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:02}}
-{{DISPLAYTITLE:_glColor4b}}
-The '''_glColor4b''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4b''' GLbyte {{Parameter|red}}, GLbyte {{Parameter|green}}, GLbyte {{Parameter|blue}}, GLbyte {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4b Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4bv__0010000400.txt b/internal/help/_glColor4bv__0010000400.txt
deleted file mode 100644
index 359feb240..000000000
--- a/internal/help/_glColor4bv__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:05}}
-{{DISPLAYTITLE:_glColor4bv}}
-The '''_glColor4bv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4bv''' const GLbyte {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4bv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4d__001000040.txt b/internal/help/_glColor4d__001000040.txt
deleted file mode 100644
index 276aa7c4f..000000000
--- a/internal/help/_glColor4d__001000040.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:07}}
-{{DISPLAYTITLE:_glColor4d}}
-The '''_glColor4d''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4d''' GLdouble {{Parameter|red}}, GLdouble {{Parameter|green}}, GLdouble {{Parameter|blue}}, GLdouble {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4dv__0010000400.txt b/internal/help/_glColor4dv__0010000400.txt
deleted file mode 100644
index 44eb701f5..000000000
--- a/internal/help/_glColor4dv__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:09}}
-{{DISPLAYTITLE:_glColor4dv}}
-The '''_glColor4dv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4dv''' const GLdouble {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4dv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4f__001000040.txt b/internal/help/_glColor4f__001000040.txt
deleted file mode 100644
index 99d686ef5..000000000
--- a/internal/help/_glColor4f__001000040.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:11}}
-{{DISPLAYTITLE:_glColor4f}}
-The '''_glColor4f''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4f''' GLfloat {{Parameter|red}}, GLfloat {{Parameter|green}}, GLfloat {{Parameter|blue}}, GLfloat {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4f Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4fv__0010000400.txt b/internal/help/_glColor4fv__0010000400.txt
deleted file mode 100644
index e823eaf94..000000000
--- a/internal/help/_glColor4fv__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:13}}
-{{DISPLAYTITLE:_glColor4fv}}
-The '''_glColor4fv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4fv''' const GLfloat {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4fv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4i__001000040.txt b/internal/help/_glColor4i__001000040.txt
deleted file mode 100644
index d64cc4328..000000000
--- a/internal/help/_glColor4i__001000040.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:15}}
-{{DISPLAYTITLE:_glColor4i}}
-The '''_glColor4i''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4i''' GLint {{Parameter|red}}, GLint {{Parameter|green}}, GLint {{Parameter|blue}}, GLint {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4i Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4iv__0010000400.txt b/internal/help/_glColor4iv__0010000400.txt
deleted file mode 100644
index c8804866c..000000000
--- a/internal/help/_glColor4iv__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:18}}
-{{DISPLAYTITLE:_glColor4iv}}
-The '''_glColor4iv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4iv''' const GLint {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4iv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4s__001000040.txt b/internal/help/_glColor4s__001000040.txt
deleted file mode 100644
index d7bc6cea1..000000000
--- a/internal/help/_glColor4s__001000040.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:20}}
-{{DISPLAYTITLE:_glColor4s}}
-The '''_glColor4s''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4s''' GLshort {{Parameter|red}}, GLshort {{Parameter|green}}, GLshort {{Parameter|blue}}, GLshort {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4s Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4sv__0010000400.txt b/internal/help/_glColor4sv__0010000400.txt
deleted file mode 100644
index cddacc61a..000000000
--- a/internal/help/_glColor4sv__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:22}}
-{{DISPLAYTITLE:_glColor4sv}}
-The '''_glColor4sv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4sv''' const GLshort {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4sv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4ub__0010000400.txt b/internal/help/_glColor4ub__0010000400.txt
deleted file mode 100644
index fb95ee5f4..000000000
--- a/internal/help/_glColor4ub__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:24}}
-{{DISPLAYTITLE:_glColor4ub}}
-The '''_glColor4ub''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4ub''' GLubyte {{Parameter|red}}, GLubyte {{Parameter|green}}, GLubyte {{Parameter|blue}}, GLubyte {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4ub Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4ubv__00100004000.txt b/internal/help/_glColor4ubv__00100004000.txt
deleted file mode 100644
index 999ae9f22..000000000
--- a/internal/help/_glColor4ubv__00100004000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:26}}
-{{DISPLAYTITLE:_glColor4ubv}}
-The '''_glColor4ubv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4ubv''' const GLubyte {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4ubv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4ui__0010000400.txt b/internal/help/_glColor4ui__0010000400.txt
deleted file mode 100644
index eaf571bd2..000000000
--- a/internal/help/_glColor4ui__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:29}}
-{{DISPLAYTITLE:_glColor4ui}}
-The '''_glColor4ui''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4ui''' GLuint {{Parameter|red}}, GLuint {{Parameter|green}}, GLuint {{Parameter|blue}}, GLuint {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4ui Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4uiv__00100004000.txt b/internal/help/_glColor4uiv__00100004000.txt
deleted file mode 100644
index 57c50ee51..000000000
--- a/internal/help/_glColor4uiv__00100004000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:31}}
-{{DISPLAYTITLE:_glColor4uiv}}
-The '''_glColor4uiv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4uiv''' const GLuint {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4uiv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4us__0010000400.txt b/internal/help/_glColor4us__0010000400.txt
deleted file mode 100644
index 2f6445559..000000000
--- a/internal/help/_glColor4us__0010000400.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:33}}
-{{DISPLAYTITLE:_glColor4us}}
-The '''_glColor4us''' statement sets the current color.
-
-
-{{PageSyntax}}
-: '''_glColor4us''' GLushort {{Parameter|red}}, GLushort {{Parameter|green}}, GLushort {{Parameter|blue}}, GLushort {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4us Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColor4usv__00100004000.txt b/internal/help/_glColor4usv__00100004000.txt
deleted file mode 100644
index 857bd712c..000000000
--- a/internal/help/_glColor4usv__00100004000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:36}}
-{{DISPLAYTITLE:_glColor4usv}}
-The '''_glColor4usv''' statement sets the current color from an already existing array of color values.
-
-
-{{PageSyntax}}
-: '''_glColor4usv''' const GLushort {{Parameter|*v}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor4usv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColorMask__00100001000.txt b/internal/help/_glColorMask__00100001000.txt
deleted file mode 100644
index 5acf6f851..000000000
--- a/internal/help/_glColorMask__00100001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:38}}
-{{DISPLAYTITLE:_glColorMask}}
-The '''_glColorMask''' statement enables and disables writing of frame-buffer color components.
-
-
-{{PageSyntax}}
-: '''_glColorMask''' GLboolean {{Parameter|red}}, GLboolean {{Parameter|green}}, GLboolean {{Parameter|blue}}, GLboolean {{Parameter|alpha}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolormask Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor-functions _glColor], [[_glDepthMask]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex], [[_glIndexMask]], [[_glStencilMask]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColorMaterial__001000010000000.txt b/internal/help/_glColorMaterial__001000010000000.txt
deleted file mode 100644
index 68f6dba47..000000000
--- a/internal/help/_glColorMaterial__001000010000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:40}}
-{{DISPLAYTITLE:_glColorMaterial}}
-The '''_glColorMaterial''' statement causes a material color to track the current color.
-
-
-{{PageSyntax}}
-: '''_glColorMaterial''' GLenum {{Parameter|face}}, GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolormaterial Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor-functions _glColor], [[_glDisable]], [[_glEnable]]
-* [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gllight-functions _glLight]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gllightmodel-functions _glLightModel], [https://docs.microsoft.com/en-us/windows/win32/opengl/glmaterial-functions _glMaterial]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glColorPointer__00100001000000.txt b/internal/help/_glColorPointer__00100001000000.txt
deleted file mode 100644
index affad35b7..000000000
--- a/internal/help/_glColorPointer__00100001000000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:42}}
-{{DISPLAYTITLE:_glColorPointer}}
-The '''_glColorPointer''' statement defines an array of colors.
-
-
-{{PageSyntax}}
-: '''_glColorPointer''' GLint {{Parameter|size}}, GLenum {{Parameter|type}}, GLsizei {{Parameter|stride}}, const GLvoid {{Parameter|*pointer}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolorpointer Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glArrayElement]], [[_glBegin]], [[_glDrawArrays]], [[_glEdgeFlagPointer]]
-* [[_glEnableClientState]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glGetString]]
-* [[_glGetPointerv]], [[_glIndexPointer]], [[_glIsEnabled]], [[_glNormalPointer]]
-* [[_glPopAttrib]], [[_glPushAttrib]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCopyPixels__001000100000.txt b/internal/help/_glCopyPixels__001000100000.txt
deleted file mode 100644
index dcdd3ff39..000000000
--- a/internal/help/_glCopyPixels__001000100000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:44}}
-{{DISPLAYTITLE:_glCopyPixels}}
-The '''_glCopyPixels''' statement copies pixels in the framebuffer.
-
-
-{{PageSyntax}}
-: '''_glCopyPixels''' GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}, GLenum {{Parameter|type}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcopypixels Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDepthFunc]], [[_glDrawBuffer]], [[_glDrawPixels]]
-* [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelmap _glPixelMap], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [[_glPixelZoom]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glrasterpos-functions _glRasterPos], [[_glReadBuffer]]
-* [[_glReadPixels]], [[_glStencilFunc]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCopyTexImage1D__0010001001000011.txt b/internal/help/_glCopyTexImage1D__0010001001000011.txt
deleted file mode 100644
index cdfaae23b..000000000
--- a/internal/help/_glCopyTexImage1D__0010001001000011.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:47}}
-{{DISPLAYTITLE:_glCopyTexImage1D}}
-The '''_glCopyTexImage1D''' statement copies pixels from the framebuffer into a one-dimensional texture image.
-
-
-{{PageSyntax}}
-: '''_glCopyTexImage1D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLenum {{Parameter|internalFormat}}, GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLint {{Parameter|border}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcopyteximage1d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glCopyPixels]], [[_glCopyTexImage2D]], [[_glDrawPixels]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen]
-* [[_glTexImage1D]], [[_glTexImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCopyTexImage2D__0010001001000021.txt b/internal/help/_glCopyTexImage2D__0010001001000021.txt
deleted file mode 100644
index 54441bb3f..000000000
--- a/internal/help/_glCopyTexImage2D__0010001001000021.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:49}}
-{{DISPLAYTITLE:_glCopyTexImage2D}}
-The '''_glCopyTexImage2D''' statement copies pixels from the framebuffer into a two-dimensional texture image.
-
-
-{{PageSyntax}}
-: '''_glCopyTexImage2D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLenum {{Parameter|internalFormat}}, GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}, GLint {{Parameter|border}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcopyteximage2d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCopyTexImage1D]], [[_glDrawPixels]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]], [[_glTexImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCopyTexSubImage1D__0010001001001000011.txt b/internal/help/_glCopyTexSubImage1D__0010001001001000011.txt
deleted file mode 100644
index 11b62e94a..000000000
--- a/internal/help/_glCopyTexSubImage1D__0010001001001000011.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:51}}
-{{DISPLAYTITLE:_glCopyTexSubImage1D}}
-The '''_glCopyTexSubImage1D''' statement copies a sub-image of a one-dimensional texture image from the framebuffer.
-
-
-{{PageSyntax}}
-: '''_glCopyTexSubImage1D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLint {{Parameter|xoffset}}, GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcopytexsubimage1d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCopyTexSubImage2D]], [[_glDrawPixels]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]], [[_glTexImage2D]], [[_glTexSubImage1D]]
-* [[_glTexSubImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCopyTexSubImage2D__0010001001001000021.txt b/internal/help/_glCopyTexSubImage2D__0010001001001000021.txt
deleted file mode 100644
index 0b56d084b..000000000
--- a/internal/help/_glCopyTexSubImage2D__0010001001001000021.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:54}}
-{{DISPLAYTITLE:_glCopyTexSubImage2D}}
-The '''_glCopyTexSubImage2D''' statement copies a sub-image of a two-dimensional texture image from the framebuffer.
-
-
-{{PageSyntax}}
-: '''_glCopyTexSubImage2D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLint {{Parameter|xoffset}}, GLint {{Parameter|yoffset}}, GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcopytexsubimage2d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCopyPixels]], [[_glCopyTexSubImage1D]], [[_glDrawPixels]]
-* [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage2D]], [[_glTexSubImage2D]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glCullFace__0010001000.txt b/internal/help/_glCullFace__0010001000.txt
deleted file mode 100644
index dc04a126a..000000000
--- a/internal/help/_glCullFace__0010001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:56}}
-{{DISPLAYTITLE:_glCullFace}}
-The '''_glCullFace''' statement specifies whether front-facing or back-facing facets can be culled.
-
-
-{{PageSyntax}}
-: '''_glCullFace''' GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcullface Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDisable]], [[_glEnable]], [[_glEnd]]
-* [[_glFrontFace]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsEnabled]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDeleteLists__0010000010000.txt b/internal/help/_glDeleteLists__0010000010000.txt
deleted file mode 100644
index 58fe44f76..000000000
--- a/internal/help/_glDeleteLists__0010000010000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:47:58}}
-{{DISPLAYTITLE:_glDeleteLists}}
-The '''_glDeleteLists''' statement deletes a contiguous group of display lists.
-
-
-{{PageSyntax}}
-: '''_glDeleteLists''' GLuint {{Parameter|list}}, GLsizei {{Parameter|range}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldeletelists Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCallList]], [[_glCallLists]], [[_glEnd]]
-* [[_glGenLists]], [[_glIsList]], [[_glNewList]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDeleteTextures__0010000010000000.txt b/internal/help/_glDeleteTextures__0010000010000000.txt
deleted file mode 100644
index 344c39411..000000000
--- a/internal/help/_glDeleteTextures__0010000010000000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:00}}
-{{DISPLAYTITLE:_glDeleteTextures}}
-The '''_glDeleteTextures''' statement deletes named textures.
-
-
-{{PageSyntax}}
-: '''_glDeleteTextures''' GLsizei {{Parameter|n}}, const GLuint {{Parameter|*textures}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldeletetextures Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAreTexturesResident]], [[_glBegin]], [[_glBindTexture]], [[_glEnd]]
-* [[_glGenTextures]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgettexparameter _glGetTexParameter], [[_glIsTexture]]
-* [[_glPrioritizeTextures]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]], [[_glTexImage2D]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDepthFunc__00100001000.txt b/internal/help/_glDepthFunc__00100001000.txt
deleted file mode 100644
index 597912675..000000000
--- a/internal/help/_glDepthFunc__00100001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:02}}
-{{DISPLAYTITLE:_glDepthFunc}}
-The '''_glDepthFunc''' statement specifies the value used for depth-buffer comparisons.
-
-
-{{PageSyntax}}
-: '''_glDepthFunc''' GLenum {{Parameter|func}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldepthfunc Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDepthRange]], [[_glEnable]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIsEnabled]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDepthMask__00100001000.txt b/internal/help/_glDepthMask__00100001000.txt
deleted file mode 100644
index 6389d57ac..000000000
--- a/internal/help/_glDepthMask__00100001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:05}}
-{{DISPLAYTITLE:_glDepthMask}}
-The '''_glDepthMask''' statement enables or disables writing into the depth buffer.
-
-
-{{PageSyntax}}
-: '''_glDepthMask''' GLboolean {{Parameter|flag}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldepthmask Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glColorMask]], [[_glDepthFunc]], [[_glDepthRange]]
-* [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIndexMask]], [[_glStencilMask]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDepthRange__001000010000.txt b/internal/help/_glDepthRange__001000010000.txt
deleted file mode 100644
index 0ff3e597a..000000000
--- a/internal/help/_glDepthRange__001000010000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:07}}
-{{DISPLAYTITLE:_glDepthRange}}
-The '''_glDepthRange''' statement specifies the mapping of z values from normalized device coordinates to window coordinates.
-
-
-{{PageSyntax}}
-: '''_glDepthRange''' GLclampd {{Parameter|zNear}}, GLclampd {{Parameter|zFar}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldepthrange Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDepthFunc]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-* [[_glViewport]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDisableClientState__00100000010000010000.txt b/internal/help/_glDisableClientState__00100000010000010000.txt
deleted file mode 100644
index dfdce673c..000000000
--- a/internal/help/_glDisableClientState__00100000010000010000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:11}}
-{{DISPLAYTITLE:_glDisableClientState}}
-The '''_glEnableClientState''' and '''_glDisableClientState''' statements enable and disable arrays respectively.
-
-
-{{PageSyntax}}
-: '''_glDisableClientState''' GLenum {{Parameter|array}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldisableclientstate Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glArrayElement]], [[_glBegin]], [[_glColorPointer]], [[_glDrawArrays]]
-* [[_glDrawElements]], [[_glEdgeFlagPointer]], [[_glEnable]], [[_glEnableClientState]]
-* [[_glEnd]], [[_glGetPointerv]], [[_glIndexPointer]], [[_glInterleavedArrays]]
-* [[_glNormalPointer]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDisable__001000000.txt b/internal/help/_glDisable__001000000.txt
deleted file mode 100644
index b33d690a0..000000000
--- a/internal/help/_glDisable__001000000.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:09}}
-{{DISPLAYTITLE:_glDisable}}
-The '''_glEnable''' and '''_glDisable''' statements enable or disable OpenGL capabilities.
-
-
-{{PageSyntax}}
-: '''_glDisable''' GLenum {{Parameter|cap}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldisable Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glArrayElement]], [[_glBegin]], [[_glBlendFunc]]
-* [[_glClipPlane]], [[_glColorMaterial]], [[_glColorPointer]], [[_glCullFace]]
-* [[_glDepthFunc]], [[_glDepthRange]], [[_glDrawArrays]], [[_glEdgeFlagPointer]]
-* [[_glEnable]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalcoord-functions _glEvalCoord], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalmesh-functions _glEvalMesh]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalpoint _glEvalPoint], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIndexPointer]]
-* [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gllight-functions _glLight], [https://docs.microsoft.com/en-us/windows/win32/opengl/gllightmodel-functions _glLightModel], [[_glLineWidth]]
-* [[_glLineStipple]], [[_glLogicOp]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glmap1 _glMap1], [https://docs.microsoft.com/en-us/windows/win32/opengl/glmap2 _glMap2]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glmaterial-functions _glMaterial], [https://docs.microsoft.com/en-us/windows/win32/opengl/glnormal-functions _glNormal], [[_glNormalPointer]], [[_glPointSize]]
-* [[_glPolygonMode]], [[_glPolygonStipple]], [[_glScissor]], [[_glStencilFunc]]
-* [[_glStencilOp]], [[_glTexCoordPointer]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]]
-* [[_glTexImage2D]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDrawArrays__001000100000.txt b/internal/help/_glDrawArrays__001000100000.txt
deleted file mode 100644
index 6f9ef0553..000000000
--- a/internal/help/_glDrawArrays__001000100000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:14}}
-{{DISPLAYTITLE:_glDrawArrays}}
-The '''_glDrawArrays''' statement specifies multiple primitives to render.
-
-
-{{PageSyntax}}
-: '''_glDrawArrays''' GLenum {{Parameter|mode}}, GLint {{Parameter|first}}, GLsizei {{Parameter|count}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldrawarrays Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glArrayElement]], [[_glBegin]], [[_glColorPointer]], [[_glEdgeFlagPointer]]
-* [[_glEnd]], [[_glGetPointerv]], [[_glGetString]], [[_glIndexPointer]]
-* [[_glNormalPointer]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDrawBuffer__001000100000.txt b/internal/help/_glDrawBuffer__001000100000.txt
deleted file mode 100644
index 40f50381f..000000000
--- a/internal/help/_glDrawBuffer__001000100000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:16}}
-{{DISPLAYTITLE:_glDrawBuffer}}
-The '''_glDrawBuffer''' statement specifies which color buffers are to be drawn into.
-
-
-{{PageSyntax}}
-: '''_glDrawBuffer''' GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldrawbuffer Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glBlendFunc]], [[_glColorMask]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIndexMask]], [[_glLogicOp]], [[_glReadBuffer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDrawElements__00100010000000.txt b/internal/help/_glDrawElements__00100010000000.txt
deleted file mode 100644
index 18c6752c2..000000000
--- a/internal/help/_glDrawElements__00100010000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:19}}
-{{DISPLAYTITLE:_glDrawElements}}
-The '''_glDrawElements''' statement renders primitives from array data.
-
-
-{{PageSyntax}}
-: '''_glDrawElements''' GLenum {{Parameter|mode}}, GLsizei {{Parameter|count}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*indices}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldrawelements Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glArrayElement]], [[_glBegin]], [[_glColorPointer]], [[_glDrawArrays]]
-* [[_glEdgeFlagPointer]], [[_glEnd]], [[_glGetPointerv]], [[_glIndexPointer]]
-* [[_glNormalPointer]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glDrawPixels__001000100000.txt b/internal/help/_glDrawPixels__001000100000.txt
deleted file mode 100644
index 489aec868..000000000
--- a/internal/help/_glDrawPixels__001000100000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:21}}
-{{DISPLAYTITLE:_glDrawPixels}}
-The '''_glDrawPixels''' statement writes a block of pixels to the framebuffer.
-
-
-{{PageSyntax}}
-: '''_glDrawPixels''' GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}, GLenum {{Parameter|format}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gldrawpixels Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glBegin]], [[_glBlendFunc]], [[_glCopyPixels]]
-* [[_glDepthFunc]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glLogicOp]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelmap _glPixelMap], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [[_glPixelZoom]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glrasterpos-functions _glRasterPos], [[_glReadPixels]], [[_glScissor]], [[_glStencilFunc]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEdgeFlagPointer__00100010001000000.txt b/internal/help/_glEdgeFlagPointer__00100010001000000.txt
deleted file mode 100644
index cf6628889..000000000
--- a/internal/help/_glEdgeFlagPointer__00100010001000000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:28}}
-{{DISPLAYTITLE:_glEdgeFlagPointer}}
-The '''_glEdgeFlagPointer''' statement defines an array of edge flags.
-
-
-{{PageSyntax}}
-: '''_glEdgeFlagPointer''' GLsizei {{Parameter|stride}}, const GLvoid {{Parameter|*pointer}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gledgeflagpointer Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glArrayElement]], [[_glBegin]], [[_glColorPointer]], [[_glDrawArrays]]
-* [[_glEnableClientState]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glGetPointerv]]
-* [[_glGetString]], [[_glIndexPointer]], [[_glIsEnabled]], [[_glNormalPointer]]
-* [[_glPopAttrib]], [[_glPushAttrib]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEdgeFlag__0010001000.txt b/internal/help/_glEdgeFlag__0010001000.txt
deleted file mode 100644
index 4a1df4768..000000000
--- a/internal/help/_glEdgeFlag__0010001000.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:23}}
-{{DISPLAYTITLE:_glEdgeFlag}}
-The '''_glEdgeFlag''' statement flags edges as either boundary or nonboundary.
-
-
-{{PageSyntax}}
-: '''_glEdgeFlag''' GLboolean {{Parameter|flag}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gledgeflag Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEdgeFlagv__00100010000.txt b/internal/help/_glEdgeFlagv__00100010000.txt
deleted file mode 100644
index d7f75bd5c..000000000
--- a/internal/help/_glEdgeFlagv__00100010000.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:26}}
-{{DISPLAYTITLE:_glEdgeFlagv}}
-The '''_glEdgeFlagv''' statement flags edges as either boundary or nonboundary.
-
-
-{{PageSyntax}}
-: '''_glEdgeFlagv''' const GLboolean {{Parameter|*flag}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gledgeflagv Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEnableClientState__0010000010000010000.txt b/internal/help/_glEnableClientState__0010000010000010000.txt
deleted file mode 100644
index ad13a8c35..000000000
--- a/internal/help/_glEnableClientState__0010000010000010000.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:32}}
-{{DISPLAYTITLE:_glEnableClientState}}
-The '''_glEnableClientState''' and '''_glDisableClientState''' statements enable and disable arrays respectively.
-
-
-{{PageSyntax}}
-: '''_glEnableClientState''' GLenum {{Parameter|array}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glenableclientstate Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glArrayElement]], [[_glBegin]], [[_glColorPointer]], [[_glDisableClientState]]
-* [[_glDrawArrays]], [[_glDrawElements]], [[_glEdgeFlagPointer]], [[_glEnable]]
-* [[_glEnd]], [[_glGetPointerv]], [[_glIndexPointer]], [[_glInterleavedArrays]]
-* [[_glNormalPointer]], [[_glTexCoordPointer]], [[_glVertexPointer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEnable__00100000.txt b/internal/help/_glEnable__00100000.txt
deleted file mode 100644
index ba8aa4fd3..000000000
--- a/internal/help/_glEnable__00100000.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:30}}
-{{DISPLAYTITLE:_glEnable}}
-The '''_glEnable''' and '''_glDisable''' statements enable or disable OpenGL capabilities.
-
-
-{{PageSyntax}}
-: '''_glEnable''' GLenum {{Parameter|cap}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glenable Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glArrayElement]], [[_glBegin]], [[_glBlendFunc]]
-* [[_glClipPlane]], [[_glColorMaterial]], [[_glColorPointer]], [[_glCullFace]]
-* [[_glDepthFunc]], [[_glDepthRange]], [[_glDisable]], [[_glDrawArrays]]
-* [[_glEdgeFlagPointer]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalcoord-functions _glEvalCoord], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalmesh-functions _glEvalMesh]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalpoint _glEvalPoint], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glIndexPointer]]
-* [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gllight-functions _glLight], [https://docs.microsoft.com/en-us/windows/win32/opengl/gllightmodel-functions _glLightModel], [[_glLineWidth]]
-* [[_glLineStipple]], [[_glLogicOp]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glmap1 _glMap1], [https://docs.microsoft.com/en-us/windows/win32/opengl/glmap2 _glMap2]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glmaterial-functions _glMaterial], [https://docs.microsoft.com/en-us/windows/win32/opengl/glnormal-functions _glNormal], [[_glNormalPointer]], [[_glPointSize]]
-* [[_glPolygonMode]], [[_glPolygonStipple]], [[_glScissor]], [[_glStencilFunc]]
-* [[_glStencilOp]], [[_glTexCoordPointer]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]]
-* [[_glTexImage2D]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEndList__001001000.txt b/internal/help/_glEndList__001001000.txt
deleted file mode 100644
index a13351ba7..000000000
--- a/internal/help/_glEndList__001001000.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:36}}
-{{DISPLAYTITLE:_glEndList}}
-The '''_glNewList''' and '''_glEndList''' statements create or replace a display list.
-
-
-{{PageSyntax}}
-: '''_glEndList'''
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glendlist Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCallList]], [[_glCallLists]], [[_glDeleteLists]]
-* [[_glEnd]], [[_glGenLists]], [[_glIsList]], [[_glNewList]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glEnd__00100.txt b/internal/help/_glEnd__00100.txt
deleted file mode 100644
index 2f4493ca4..000000000
--- a/internal/help/_glEnd__00100.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:35}}
-{{DISPLAYTITLE:_glEnd}}
-The '''_glBegin''' and '''_glEnd''' statements delimit the vertices of a primitive or a group of like primitives.
-
-
-{{PageSyntax}}
-: '''_glEnd'''
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glend Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCallLists]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glcolor-functions _glColor], [https://docs.microsoft.com/en-us/windows/win32/opengl/gledgeflag-functions _glEdgeFlag]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalcoord-functions _glEvalCoord], [https://docs.microsoft.com/en-us/windows/win32/opengl/glevalpoint _glEvalPoint], [https://docs.microsoft.com/en-us/windows/win32/opengl/glindex-functions _glIndex], [https://docs.microsoft.com/en-us/windows/win32/opengl/glmaterial-functions _glMaterial]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glnormal-functions _glNormal], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexcoord-functions _glTexCoord], [https://docs.microsoft.com/en-us/windows/win32/opengl/glvertex-functions _glVertex]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glFeedbackBuffer__0010000000100000.txt b/internal/help/_glFeedbackBuffer__0010000000100000.txt
deleted file mode 100644
index dc9d2502c..000000000
--- a/internal/help/_glFeedbackBuffer__0010000000100000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:50}}
-{{DISPLAYTITLE:_glFeedbackBuffer}}
-The '''_glFeedbackBuffer''' statement controls feedback mode.
-
-
-{{PageSyntax}}
-: '''_glFeedbackBuffer''' GLsizei {{Parameter|size}}, GLenum {{Parameter|type}}, GLfloat {{Parameter|*buffer}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glfeedbackbuffer Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glLineStipple]]
-* [[_glPassThrough]], [[_glPolygonMode]], [[_glRenderMode]], [[_glSelectBuffer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glFinish__00100000.txt b/internal/help/_glFinish__00100000.txt
deleted file mode 100644
index ddd2879c6..000000000
--- a/internal/help/_glFinish__00100000.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:52}}
-{{DISPLAYTITLE:_glFinish}}
-The '''_glFinish''' statement blocks until all OpenGL execution is complete.
-
-
-{{PageSyntax}}
-: '''_glFinish'''
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glfinish Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [[_glFlush]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glFlush__0010000.txt b/internal/help/_glFlush__0010000.txt
deleted file mode 100644
index 35abb8033..000000000
--- a/internal/help/_glFlush__0010000.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:53}}
-{{DISPLAYTITLE:_glFlush}}
-The '''_glFlush''' statement forces execution of OpenGL functions in finite time.
-
-
-{{PageSyntax}}
-: '''_glFlush'''
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glflush Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [[_glFinish]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glFrontFace__00100001000.txt b/internal/help/_glFrontFace__00100001000.txt
deleted file mode 100644
index 1c70d8dab..000000000
--- a/internal/help/_glFrontFace__00100001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:48:59}}
-{{DISPLAYTITLE:_glFrontFace}}
-The '''_glFrontFace''' statement defines front-facing and back-facing polygons.
-
-
-{{PageSyntax}}
-: '''_glFrontFace''' GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glfrontface Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCullFace]], [[_glDisable]], [[_glEnable]]
-* [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/gllightmodel-functions _glLightModel]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glFrustum__001000000.txt b/internal/help/_glFrustum__001000000.txt
deleted file mode 100644
index 048a85b5e..000000000
--- a/internal/help/_glFrustum__001000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:49:01}}
-{{DISPLAYTITLE:_glFrustum}}
-The '''_glFrustum''' statement multiplies the current matrix by a perspective matrix.
-
-
-{{PageSyntax}}
-: '''_glFrustum''' GLdouble {{Parameter|left}}, GLdouble {{Parameter|right}}, GLdouble {{Parameter|bottom}}, GLdouble {{Parameter|top}}, GLdouble {{Parameter|zNear}}, GLdouble {{Parameter|zFar}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glfrustum Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [[_glMatrixMode]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glmultmatrix _glMultMatrix], [[_glOrtho]], [[_glPopMatrix]], [[_glPushMatrix]]
-* [[_glViewport]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glGenTextures__0010010000000.txt b/internal/help/_glGenTextures__0010010000000.txt
deleted file mode 100644
index 23d366a2a..000000000
--- a/internal/help/_glGenTextures__0010010000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:49:04}}
-{{DISPLAYTITLE:_glGenTextures}}
-The '''_glGenTextures''' statement generates texture names.
-
-
-{{PageSyntax}}
-: '''_glGenTextures''' GLsizei {{Parameter|n}}, GLuint {{Parameter|*textures}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glgentextures Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glBindTexture]], [[_glDeleteTextures]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgettexparameter _glGetTexParameter], [[_glIsTexture]], [[_glTexImage1D]]
-* [[_glTexImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glGetError__0010010000.txt b/internal/help/_glGetError__0010010000.txt
deleted file mode 100644
index b750cfbf4..000000000
--- a/internal/help/_glGetError__0010010000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:49:10}}
-{{DISPLAYTITLE:_glGetError}}
-The '''_glGetError''' function returns error information.
-
-
-{{PageSyntax}}
-: GLenum {{Parameter|result}} = '''_glGetError'''
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glgeterror Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glGetString__00100100000.txt b/internal/help/_glGetString__00100100000.txt
deleted file mode 100644
index 5dc3ff9f0..000000000
--- a/internal/help/_glGetString__00100100000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:49:29}}
-{{DISPLAYTITLE:_glGetString}}
-The '''_glGetString''' function returns a string describing the current OpenGL connection.
-
-
-{{PageSyntax}}
-: const GLubyte {{Parameter|*result}} = '''_glGetString''' (GLenum {{Parameter|name}})
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetstring Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glGetTexImage__0010010010000.txt b/internal/help/_glGetTexImage__0010010010000.txt
deleted file mode 100644
index 8313a8d67..000000000
--- a/internal/help/_glGetTexImage__0010010010000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:49:36}}
-{{DISPLAYTITLE:_glGetTexImage}}
-The '''_glGetTexImage''' statement returns a texture image.
-
-
-{{PageSyntax}}
-: '''_glGetTexImage''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLenum {{Parameter|format}}, GLenum {{Parameter|type}}, GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetteximage Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDrawPixels]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgettexlevelparameter _glGetTexLevelParameter]
-* [[_glReadPixels]], [[_glTexImage1D]], [[_glTexImage2D]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glHint__001000.txt b/internal/help/_glHint__001000.txt
deleted file mode 100644
index 2fc6317f3..000000000
--- a/internal/help/_glHint__001000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:49:43}}
-{{DISPLAYTITLE:_glHint}}
-The '''_glHint''' statement specifies implementation-specific hints.
-
-
-{{PageSyntax}}
-: '''_glHint''' GLenum {{Parameter|target}}, GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glhint Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnd]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glIsEnabled__00101000000.txt b/internal/help/_glIsEnabled__00101000000.txt
deleted file mode 100644
index 2de55cbb2..000000000
--- a/internal/help/_glIsEnabled__00101000000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:50:00}}
-{{DISPLAYTITLE:_glIsEnabled}}
-The '''_glIsEnabled''' function tests whether a capability is enabled.
-
-
-{{PageSyntax}}
-: GLboolean {{Parameter|result}} = '''_glIsEnabled''' (GLenum {{Parameter|cap}})
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glisenabled Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnable]], [[_glEnd]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glIsTexture__00101000000.txt b/internal/help/_glIsTexture__00101000000.txt
deleted file mode 100644
index 9164596fe..000000000
--- a/internal/help/_glIsTexture__00101000000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:50:03}}
-{{DISPLAYTITLE:_glIsTexture}}
-The '''_glIsTexture''' function determines if a name corresponds to a texture.
-
-
-{{PageSyntax}}
-: GLboolean {{Parameter|result}} = '''_glIsTexture''' (GLuint {{Parameter|texture}})
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glistexture Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glBindTexture]], [[_glEnd]], [[_glGenTextures]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgettexparameter _glGetTexParameter], [[_glTexImage1D]], [[_glTexImage2D]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glLineWidth__00100010000.txt b/internal/help/_glLineWidth__00100010000.txt
deleted file mode 100644
index 929b438da..000000000
--- a/internal/help/_glLineWidth__00100010000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:50:16}}
-{{DISPLAYTITLE:_glLineWidth}}
-The '''_glLineWidth''' statement specifies the width of rasterized lines.
-
-
-{{PageSyntax}}
-: '''_glLineWidth''' GLfloat {{Parameter|width}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gllinewidth Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnable]], [[_glEnd]], [[_glIsEnabled]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glLogicOp__001000010.txt b/internal/help/_glLogicOp__001000010.txt
deleted file mode 100644
index 85a0b9aff..000000000
--- a/internal/help/_glLogicOp__001000010.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:50:23}}
-{{DISPLAYTITLE:_glLogicOp}}
-The '''_glLogicOp''' statement specifies a logical pixel operation for color index rendering.
-
-
-{{PageSyntax}}
-: '''_glLogicOp''' GLenum {{Parameter|opcode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gllogicop Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glBegin]], [[_glBlendFunc]], [[_glDrawBuffer]]
-* [[_glEnable]], [[_glEnd]], [[_glIsEnabled]], [[_glStencilOp]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glPointSize__00100001000.txt b/internal/help/_glPointSize__00100001000.txt
deleted file mode 100644
index f967cebb0..000000000
--- a/internal/help/_glPointSize__00100001000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:51:05}}
-{{DISPLAYTITLE:_glPointSize}}
-The '''_glPointSize''' statement specifies the diameter of rasterized points.
-
-
-{{PageSyntax}}
-: '''_glPointSize''' GLfloat {{Parameter|size}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glpointsize Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnable]], [[_glEnd]], [[_glIsEnabled]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glPolygonMode__0010000001000.txt b/internal/help/_glPolygonMode__0010000001000.txt
deleted file mode 100644
index 067ec2f2b..000000000
--- a/internal/help/_glPolygonMode__0010000001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:51:07}}
-{{DISPLAYTITLE:_glPolygonMode}}
-The '''_glPolygonMode''' statement selects a polygon rasterization mode.
-
-
-{{PageSyntax}}
-: '''_glPolygonMode''' GLenum {{Parameter|face}}, GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glpolygonmode Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gledgeflag-functions _glEdgeFlag], [[_glEnd]], [[_glLineStipple]]
-* [[_glLineWidth]], [[_glPointSize]], [[_glPolygonStipple]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glPolygonOffset__001000000100000.txt b/internal/help/_glPolygonOffset__001000000100000.txt
deleted file mode 100644
index 5cd012817..000000000
--- a/internal/help/_glPolygonOffset__001000000100000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:51:10}}
-{{DISPLAYTITLE:_glPolygonOffset}}
-The '''_glPolygonOffset''' statement sets the scale and units OpenGL uses to calculate depth values.
-
-
-{{PageSyntax}}
-: '''_glPolygonOffset''' GLfloat {{Parameter|factor}}, GLfloat {{Parameter|units}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glpolygonoffset Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glDepthFunc]], [[_glDisable]], [[_glEnable]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glgetbooleanv--glgetdoublev--glgetfloatv--glgetintegerv _glGet]
-* [[_glIsEnabled]], [[_glLineWidth]], [[_glStencilOp]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glReadBuffer__001000100000.txt b/internal/help/_glReadBuffer__001000100000.txt
deleted file mode 100644
index 49164eeeb..000000000
--- a/internal/help/_glReadBuffer__001000100000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:51:50}}
-{{DISPLAYTITLE:_glReadBuffer}}
-The '''_glReadBuffer''' statement selects a color buffer source for pixels.
-
-
-{{PageSyntax}}
-: '''_glReadBuffer''' GLenum {{Parameter|mode}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glreadbuffer Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCopyPixels]], [[_glDrawBuffer]], [[_glEnd]]
-* [[_glReadPixels]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glReadPixels__001000100000.txt b/internal/help/_glReadPixels__001000100000.txt
deleted file mode 100644
index e86f1d9bb..000000000
--- a/internal/help/_glReadPixels__001000100000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:51:52}}
-{{DISPLAYTITLE:_glReadPixels}}
-The '''_glReadPixels''' statement reads a block of pixels from the framebuffer.
-
-
-{{PageSyntax}}
-: '''_glReadPixels''' GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}, GLenum {{Parameter|format}}, GLenum {{Parameter|type}}, GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glreadpixels Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCopyPixels]], [[_glDrawPixels]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelmap _glPixelMap], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [[_glReadBuffer]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glScissor__001000000.txt b/internal/help/_glScissor__001000000.txt
deleted file mode 100644
index 654f63a72..000000000
--- a/internal/help/_glScissor__001000000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:52:09}}
-{{DISPLAYTITLE:_glScissor}}
-The '''_glScissor''' statement defines the scissor box.
-
-
-{{PageSyntax}}
-: '''_glScissor''' GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glscissor Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glEnable]], [[_glEnd]], [[_glIsEnabled]]
-* [[_glViewport]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glStencilFunc__0010000001000.txt b/internal/help/_glStencilFunc__0010000001000.txt
deleted file mode 100644
index 240a7d2fe..000000000
--- a/internal/help/_glStencilFunc__0010000001000.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:52:14}}
-{{DISPLAYTITLE:_glStencilFunc}}
-The '''_glStencilFunc''' statement sets the statement and reference value for stencil testing.
-
-
-{{PageSyntax}}
-: '''_glStencilFunc''' GLenum {{Parameter|func}}, GLint {{Parameter|ref}}, GLuint {{Parameter|mask}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glstencilfunc Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glBegin]], [[_glBlendFunc]], [[_glDepthFunc]]
-* [[_glEnable]], [[_glEnd]], [[_glIsEnabled]], [[_glLogicOp]]
-* [[_glStencilOp]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glStencilMask__0010000001000.txt b/internal/help/_glStencilMask__0010000001000.txt
deleted file mode 100644
index ddcb329b6..000000000
--- a/internal/help/_glStencilMask__0010000001000.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:52:16}}
-{{DISPLAYTITLE:_glStencilMask}}
-The '''_glStencilMask''' statement controls the writing of individual bits in the stencil planes.
-
-
-{{PageSyntax}}
-: '''_glStencilMask''' GLuint {{Parameter|mask}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glstencilmask Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glColorMask]], [[_glDepthMask]], [[_glEnd]]
-* [[_glIndexMask]], [[_glStencilFunc]], [[_glStencilOp]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glStencilOp__00100000010.txt b/internal/help/_glStencilOp__00100000010.txt
deleted file mode 100644
index 71be2fd5e..000000000
--- a/internal/help/_glStencilOp__00100000010.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:52:18}}
-{{DISPLAYTITLE:_glStencilOp}}
-The '''_glStencilOp''' statement sets the stencil test actions.
-
-
-{{PageSyntax}}
-: '''_glStencilOp''' GLenum {{Parameter|fail}}, GLenum {{Parameter|zfail}}, GLenum {{Parameter|zpass}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glstencilop Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glAlphaFunc]], [[_glBegin]], [[_glBlendFunc]], [[_glDepthFunc]]
-* [[_glEnable]], [[_glEnd]], [[_glIsEnabled]], [[_glLogicOp]]
-* [[_glStencilFunc]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glTexImage1D__001001000011.txt b/internal/help/_glTexImage1D__001001000011.txt
deleted file mode 100644
index f6663fbcc..000000000
--- a/internal/help/_glTexImage1D__001001000011.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:07}}
-{{DISPLAYTITLE:_glTexImage1D}}
-The '''_glTexImage1D''' statement specifies a one-dimensional texture image.
-
-
-{{PageSyntax}}
-: '''_glTexImage1D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLint {{Parameter|internalformat}}, GLsizei {{Parameter|width}}, GLint {{Parameter|border}}, GLint {{Parameter|format}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glteximage1d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glCopyPixels]], [[_glCopyTexImage1D]], [[_glCopyTexImage2D]]
-* [[_glCopyTexSubImage1D]], [[_glCopyTexSubImage2D]], [[_glDrawPixels]], [[_glEnd]]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [[_glGetTexImage]], [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage2D]]
-* [[_glTexSubImage1D]], [[_glTexSubImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glTexImage2D__001001000021.txt b/internal/help/_glTexImage2D__001001000021.txt
deleted file mode 100644
index 7ef1ac521..000000000
--- a/internal/help/_glTexImage2D__001001000021.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:10}}
-{{DISPLAYTITLE:_glTexImage2D}}
-The '''_glTexImage2D''' statement specifies a two-dimensional texture image.
-
-
-{{PageSyntax}}
-: '''_glTexImage2D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLint {{Parameter|internalformat}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}, GLint {{Parameter|border}}, GLint {{Parameter|format}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glteximage2d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDrawPixels]], [[_glEnd]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog]
-* [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glTexSubImage1D__001001001000011.txt b/internal/help/_glTexSubImage1D__001001001000011.txt
deleted file mode 100644
index 10e0cfa5e..000000000
--- a/internal/help/_glTexSubImage1D__001001001000011.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:16}}
-{{DISPLAYTITLE:_glTexSubImage1D}}
-The '''_glTexSubImage1D''' statement specifies a portion of an existing one-dimensional texture image. You cannot define a new texture with '''_glTexSubImage1D'''.
-
-
-{{PageSyntax}}
-: '''_glTexSubImage1D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLint {{Parameter|xoffset}}, GLsizei {{Parameter|width}}, GLenum {{Parameter|format}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexsubimage1d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glCopyTexImage1D]], [[_glCopyTexImage2D]], [[_glCopyTexSubImage1D]], [[_glCopyTexSubImage2D]]
-* [[_glDrawPixels]], [[_glEnable]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [[_glGetTexImage]]
-* [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]], [[_glTexImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-* [[_glTexSubImage2D]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glTexSubImage2D__001001001000021.txt b/internal/help/_glTexSubImage2D__001001001000021.txt
deleted file mode 100644
index 1be7648db..000000000
--- a/internal/help/_glTexSubImage2D__001001001000021.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:18}}
-{{DISPLAYTITLE:_glTexSubImage2D}}
-The '''_glTexSubImage2D''' statement specifies a portion of an existing one-dimensional texture image. You cannot define a new texture with '''_glTexSubImage2D'''.
-
-
-{{PageSyntax}}
-: '''_glTexSubImage2D''' GLenum {{Parameter|target}}, GLint {{Parameter|level}}, GLint {{Parameter|xoffset}}, GLint {{Parameter|yoffset}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}, GLenum {{Parameter|format}}, GLenum {{Parameter|type}}, const GLvoid {{Parameter|*pixels}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexsubimage2d Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glCopyTexImage1D]], [[_glCopyTexImage2D]], [[_glCopyTexSubImage1D]], [[_glCopyTexSubImage2D]]
-* [[_glDrawPixels]], [[_glEnable]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glfog _glFog], [[_glGetTexImage]]
-* [[_glIsEnabled]], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixelstore-functions _glPixelStore], [https://docs.microsoft.com/en-us/windows/win32/opengl/glpixeltransfer _glPixelTransfer], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexenv-functions _glTexEnv]
-* [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexgen-functions _glTexGen], [[_glTexImage1D]], [[_glTexImage2D]], [[_glTexSubImage1D]]
-* [[_glTexImage2D]], [https://docs.microsoft.com/en-us/windows/win32/opengl/gltexparameter-functions _glTexParameter]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/_glViewport__0010000000.txt b/internal/help/_glViewport__0010000000.txt
deleted file mode 100644
index 03aa0e2e5..000000000
--- a/internal/help/_glViewport__0010000000.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{{QBDLDATE:07-31-2022}}
-{{QBDLTIME:23:53:50}}
-{{DISPLAYTITLE:_glViewport}}
-The '''_glViewport''' statement sets the viewport.
-
-
-{{PageSyntax}}
-: '''_glViewport''' GLint {{Parameter|x}}, GLint {{Parameter|y}}, GLsizei {{Parameter|width}}, GLsizei {{Parameter|height}}
-
-
-{{PageParameters}}
-* OpenGL is using its own set of variable types to describe its command parameters.
-* Use the following table to find the respective QB64 [[Variable Types]].
-{{OpenGLTypesPlugin}}
-
-
-{{PageDescription}}
-* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
-* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glviewport Microsoft Docs] and is also valid for QB64 usage.
-
-
-{{PageSeeAlso}}
-* [[_GL|SUB _GL]]
-* [[_glBegin]], [[_glDepthRange]]
-
-
-{{PageNavigation}}
-
-[[Category:Final]]
diff --git a/internal/help/links.bin b/internal/help/links.bin
deleted file mode 100644
index 89af81ffc..000000000
--- a/internal/help/links.bin
+++ /dev/null
@@ -1,922 +0,0 @@
-_ACCEPTFILEDROP,_ACCEPTFILEDROP
-_ACOS,_ACOS
-_ACOSH,_ACOSH
-_ALLOWFULLSCREEN,_ALLOWFULLSCREEN
-_ALPHA,_ALPHA
-_ALPHA32,_ALPHA32
-_ARCCOT,Mathematical Operations
-_ARCCSC,Mathematical Operations
-_ARCSEC,Mathematical Operations
-_ASIN,_ASIN
-_ASINH,_ASINH
-_ASSERT,_ASSERT
-$ASSERTS,$ASSERTS
-_ATAN2,_ATAN2
-_ATANH,_ATANH
-_AUTODISPLAY,_AUTODISPLAY
-_AUTODISPLAY,_AUTODISPLAY (function)
-_AXIS,_AXIS
-_BACKGROUNDCOLOR,_BACKGROUNDCOLOR
-_BIT,_BIT
-_BIN$,_BIN$
-_BLEND,_BLEND
-_BLEND,_BLEND (function)
-_BLINK,_BLINK
-_BLINK,_BLINK (function)
-_BLUE,_BLUE
-_BLUE32,_BLUE32
-_BUTTON,_BUTTON
-_BUTTONCHANGE,_BUTTONCHANGE
-_BYTE,_BYTE
-_CAPSLOCK,_CAPSLOCK (function)
-_CAPSLOCK,_CAPSLOCK
-$CHECKING,$CHECKING
-_CEIL,_CEIL
-_CINP,_CINP
-_CLEARCOLOR,_CLEARCOLOR (function)
-_CLEARCOLOR,_CLEARCOLOR
-_CLIP,_CLIP
-_CLIPBOARD$,_CLIPBOARD$
-_CLIPBOARD$,_CLIPBOARD$ (statement)
-_CLIPBOARDIMAGE,_CLIPBOARDIMAGE (function)
-_CLIPBOARDIMAGE,_CLIPBOARDIMAGE
-$COLOR,$COLOR
-_COMMANDCOUNT,_COMMANDCOUNT
-_CONNECTED,_CONNECTED
-_CONNECTIONADDRESS$,_CONNECTIONADDRESS$
-$CONSOLE,$CONSOLE
-_CONSOLE,_CONSOLE
-_CONSOLEINPUT,_CONSOLEINPUT
-_CONSOLETITLE,_CONSOLETITLE
-_CONTINUE,_CONTINUE
-_CONTROLCHR,_CONTROLCHR
-_CONTROLCHR,_CONTROLCHR (function)
-_COPYIMAGE,_COPYIMAGE
-_COPYPALETTE,_COPYPALETTE
-_COT,Mathematical Operations
-_COTH,Mathematical Operations
-_COSH,Mathematical Operations
-_CSC,Mathematical Operations
-_CSCH,Mathematical Operations
-_CV,_CV
-_CWD$,_CWD$
-_D2G,_D2G
-_D2R,_D2R
-$DEBUG,$DEBUG
-DECLARE,DECLARE LIBRARY
-DECLARE,DECLARE DYNAMIC LIBRARY
-_DEFAULTCOLOR,_DEFAULTCOLOR
-_DEFINE,_DEFINE
-_DEFLATE$,_DEFLATE$
-_DELAY,_DELAY
-_DEPTHBUFFER,_DEPTHBUFFER
-_DESKTOPHEIGHT,_DESKTOPHEIGHT
-_DESKTOPWIDTH,_DESKTOPWIDTH
-_DEST,_DEST
-_DEST,_DEST (function)
-_DEVICE$,_DEVICE$
-_DEVICEINPUT,_DEVICEINPUT
-_DEVICES,_DEVICES
-_DIR$,_DIR$
-_DIREXISTS,_DIREXISTS
-_DISPLAY,_DISPLAY
-_DISPLAY,_DISPLAY (function)
-_DISPLAYORDER,_DISPLAYORDER
-_DONTBLEND,_DONTBLEND
-_DONTWAIT,_DONTWAIT
-_DROPPEDFILE,_DROPPEDFILE
-_ECHO,_ECHO
-$ELSE,$ELSE
-$ELSEIF,$ELSEIF
-$END,$END IF
-_ENVIRONCOUNT,_ENVIRONCOUNT
-$ERROR,$ERROR
-_ERRORLINE,_ERRORLINE
-_ERRORMESSAGE$,_ERRORMESSAGE$
-$EXEICON,$EXEICON
-_EXIT,_EXIT (function)
-_FILEEXISTS,_FILEEXISTS
-_FINISHDROP,_FINISHDROP
-_FLOAT,_FLOAT
-_FONT,_FONT
-_FONT,_FONT (function)
-_FONTHEIGHT,_FONTHEIGHT
-_FONTWIDTH,_FONTWIDTH
-_FREEFONT,_FREEFONT
-_FREEIMAGE,_FREEIMAGE
-_FREETIMER,_FREETIMER
-_FULLSCREEN,_FULLSCREEN
-_FULLSCREEN,_FULLSCREEN (function)
-_G2D,_G2D
-_G2R,_G2R
-_GLRENDER,_GLRENDER
-_GREEN,_GREEN
-_GREEN32,_GREEN32
-_HEIGHT,_HEIGHT
-_HIDE,_HIDE
-_HYPOT,_HYPOT
-$IF,$IF
-_ICON,_ICON
-_INCLERRORFILE$,_INCLERRORFILE$
-_INCLERRORLINE,_INCLERRORLINE
-_INFLATE$,_INFLATE$
-_INSTRREV,_INSTRREV
-_INTEGER64,_INTEGER64
-_KEYCLEAR,_KEYCLEAR
-_KEYHIT,_KEYHIT
-_KEYDOWN,_KEYDOWN
-$LET,$LET
-_LASTAXIS,_LASTAXIS
-_LASTBUTTON,_LASTBUTTON
-_LASTWHEEL,_LASTWHEEL
-_LIMIT,_LIMIT
-_LOADFONT,_LOADFONT
-_LOADIMAGE,_LOADIMAGE
-_MAPTRIANGLE,_MAPTRIANGLE
-_MAPUNICODE,_MAPUNICODE
-_MAPUNICODE,_MAPUNICODE (function)
-_MEM,_MEM (function)
-_MEM,_MEM
-_MEMCOPY,_MEMCOPY
-_MEMELEMENT,_MEMELEMENT
-_MEMEXISTS,_MEMEXISTS
-_MEMFILL,_MEMFILL
-_MEMFREE,_MEMFREE
-_MEMGET,_MEMGET
-_MEMGET,_MEMGET (function)
-_MEMIMAGE,_MEMIMAGE
-_MEMNEW,_MEMNEW
-_MEMPUT,_MEMPUT
-_MEMSOUND,_MEMSOUND
-_MIDDLE,_SCREENMOVE
-_SCREENMOVE,_SCREENMOVE
-_MK$,_MK$
-_MOUSEBUTTON,_MOUSEBUTTON
-_MOUSEHIDE,_MOUSEHIDE
-_MOUSEINPUT,_MOUSEINPUT
-_MOUSEMOVE,_MOUSEMOVE
-_MOUSEMOVEMENTX,_MOUSEMOVEMENTX
-_MOUSEMOVEMENTY,_MOUSEMOVEMENTY
-_MOUSESHOW,_MOUSESHOW
-_MOUSEWHEEL,_MOUSEWHEEL
-_MOUSEX,_MOUSEX
-_MOUSEY,_MOUSEY
-_NEWIMAGE,_NEWIMAGE
-$NOPREFIX,$NOPREFIX
-_NUMLOCK,_NUMLOCK (function)
-_NUMLOCK,_NUMLOCK
-_OFFSET,_OFFSET (function)
-_OFFSET,_OFFSET
-_OPENCLIENT,_OPENCLIENT
-_OPENCONNECTION,_OPENCONNECTION
-_OPENHOST,_OPENHOST
-OPTION,OPTION _EXPLICIT
-OPTION,OPTION _EXPLICITARRAY
-_OS$,_OS$
-_PALETTECOLOR,_PALETTECOLOR
-_PALETTECOLOR,_PALETTECOLOR (function)
-_PI,_PI
-_PIXELSIZE,_PIXELSIZE
-_PRESERVE,_PRESERVE
-_PRINTIMAGE,_PRINTIMAGE
-_PRINTMODE,_PRINTMODE
-_PRINTMODE,_PRINTMODE (function)
-_PRINTSTRING,_PRINTSTRING
-_PRINTWIDTH,_PRINTWIDTH
-_PUTIMAGE,_PUTIMAGE
-_R2D,_R2D
-_R2G,_R2G
-_RED,_RED
-_RED32,_RED32
-_READBIT,_READBIT
-_RESETBIT,_RESETBIT
-$RESIZE,$RESIZE
-_RESIZE,_RESIZE
-_RESIZE,_RESIZE (function)
-_RESIZEHEIGHT,_RESIZEHEIGHT
-_RESIZEWIDTH,_RESIZEWIDTH
-_RGB,_RGB
-_RGB32,_RGB32
-_RGBA,_RGBA
-_RGBA32,_RGBA32
-_ROUND,_ROUND
-_SEC,Mathematical Operations
-_SECH,Mathematical Operations
-_SCREENCLICK,_SCREENCLICK
-_SCREENEXISTS,_SCREENEXISTS
-$SCREENHIDE,$SCREENHIDE
-_SCREENHIDE,_SCREENHIDE
-_SCREENICON,_SCREENICON (function)
-_SCREENICON,_SCREENICON
-_SCREENIMAGE,_SCREENIMAGE
-_SCREENMOVE,_SCREENMOVE
-_SCREENPRINT,_SCREENPRINT
-$SCREENSHOW,$SCREENSHOW
-_SCREENSHOW,_SCREENSHOW
-_SCREENX,_SCREENX
-_SCREENY,_SCREENY
-_SCROLLLOCK,_SCROLLLOCK (function)
-_SCROLLLOCK,_SCROLLLOCK
-_SETALPHA,_SETALPHA
-_SETBIT,_SETBIT
-_SHELLHIDE,_SHELLHIDE
-_SHL,_SHL
-_SHR,_SHR
-_SINH,Mathematical Operations
-_SNDBAL,_SNDBAL
-_SNDCLOSE,_SNDCLOSE
-_SNDCOPY,_SNDCOPY
-_SNDGETPOS,_SNDGETPOS
-_SNDLEN,_SNDLEN
-_SNDLIMIT,_SNDLIMIT
-_SNDLOOP,_SNDLOOP
-_SNDOPEN,_SNDOPEN
-_SNDOPENRAW,_SNDOPENRAW
-_SNDPAUSE,_SNDPAUSE
-_SNDPAUSED,_SNDPAUSED
-_SNDPLAY,_SNDPLAY
-_SNDPLAYCOPY,_SNDPLAYCOPY
-_SNDPLAYFILE,_SNDPLAYFILE
-_SNDPLAYING,_SNDPLAYING
-_SNDRATE,_SNDRATE
-_SNDRAW,_SNDRAW
-_SNDRAWDONE,_SNDRAWDONE
-_SNDRAWLEN,_SNDRAWLEN
-_SNDSETPOS,_SNDSETPOS
-_SNDSTOP,_SNDSTOP
-_SNDVOL,_SNDVOL
-_SOURCE,_SOURCE
-_SOURCE,_SOURCE (function)
-_STARTDIR$,_STARTDIR$
-_STRCMP,_STRCMP
-_STRICMP,_STRICMP
-_TANH,Mathematical Operations
-_TITLE,_TITLE
-_TITLE$,_TITLE$
-_TOGGLEBIT,_TOGGLEBIT
-_TOTALDROPPEDFILES,_TOTALDROPPEDFILES
-_TRIM$,_TRIM$
-_UNSIGNED,_UNSIGNED
-$VERSIONINFO,$VERSIONINFO
-$VIRTUALKEYBOARD,$VIRTUALKEYBOARD
-_WHEEL,_WHEEL
-_WIDTH,_WIDTH (function)
-_WINDOWHANDLE,_WINDOWHANDLE
-_WINDOWHASFOCUS,_WINDOWHASFOCUS
-ABS,ABS
-ABSOLUTE,CALL ABSOLUTE
-CALL,CALL ABSOLUTE
-ACCESS,ACCESS
-ALIAS,ALIAS
-AND,AND
-AND,AND (boolean)
-APPEND,APPEND
-AS,AS
-ASC,ASC
-ASC,ASC (statement)
-ATN,ATN
-BEEP,BEEP
-BINARY,BINARY
-BLOAD,BLOAD
-BSAVE,BSAVE
-BYVAL,BYVAL
-CALL,CALL
-CALL,CALL ABSOLUTE
-CASE,CASE
-CASE,CASE ELSE
-CASE,CASE IS
-CDBL,CDBL
-CHAIN,CHAIN
-CHDIR,CHDIR
-CHR$,CHR$
-CINT,CINT
-CIRCLE,CIRCLE
-CLEAR,CLEAR
-CLNG,CLNG
-CLOSE,CLOSE
-CLS,CLS
-COLOR,COLOR
-COMMAND$,COMMAND$
-COMMON,COMMON
-CONST,CONST
-COS,COS
-CSNG,CSNG
-CSRLIN,CSRLIN
-CVD,CVD
-CVDMBF,CVDMBF
-CVI,CVI
-CVL,CVL
-CVS,CVS
-CVSMBF,CVSMBF
-DATA,DATA
-DATE$,DATE$
-DECLARE,DECLARE LIBRARY
-DECLARE,DECLARE DYNAMIC LIBRARY
-DEF,DEF SEG
-DEFDBL,DEFDBL
-DEFINT,DEFINT
-DEFLNG,DEFLNG
-DEFSNG,DEFSNG
-DEFSTR,DEFSTR
-DIM,DIM
-LOOP,DO...LOOP
-DO,DO...LOOP
-LOOP,DO...LOOP
-DOUBLE,DOUBLE
-DRAW,DRAW
-$DYNAMIC,$DYNAMIC
-ELSE,ELSE
-ELSEIF,ELSEIF
-END,END
-END,IF...THEN
-THEN,IF...THEN
-IF,IF...THEN
-ENVIRON,ENVIRON
-ENVIRON$,ENVIRON$
-EOF,EOF
-EQV,EQV
-ERASE,ERASE
-ERL,ERL
-ERR,ERR
-ERROR,ERROR
-EXIT,EXIT
-EXP,EXP
-FIELD,FIELD
-FILES,FILES
-FIX,FIX
-NEXT,FOR...NEXT
-FOR,FOR...NEXT
-NEXT,FOR...NEXT
-FOR,FOR (file statement)
-FREE,TIMER (statement)
-TIMER,TIMER (statement)
-FREEFILE,FREEFILE
-FUNCTION,FUNCTION
-GET,GET
-GET,GET (TCP/IP statement)
-GET,GET (graphics statement)
-GOSUB,GOSUB
-GOTO,GOTO
-HEX$,HEX$
-THEN,IF...THEN
-IF,IF...THEN
-THEN,IF...THEN
-IMP,IMP
-$INCLUDE,$INCLUDE
-INKEY$,INKEY$
-INP,INP
-INPUT,INPUT
-INPUT,INPUT (file mode)
-INPUT,INPUT (file statement)
-INPUT$,INPUT$
-INSTR,INSTR
-INT,INT
-INTEGER,INTEGER
-INTERRUPT,INTERRUPT
-INTERRUPTX,INTERRUPTX
-KEY,KEY n
-KEY,KEY(n)
-KEY,KEY LIST
-KILL,KILL
-LBOUND,LBOUND
-LCASE$,LCASE$
-LEFT$,LEFT$
-LEN,LEN
-LET,LET
-LINE,LINE
-LINE,LINE INPUT
-LINE,LINE INPUT (file statement)
-LIST,KEY LIST
-KEY,KEY LIST
-LOC,LOC
-LOCATE,LOCATE
-LOCK,LOCK
-LOF,LOF
-LOG,LOG
-LONG,LONG
-LOOP,DO...LOOP
-LOOP,DO...LOOP
-DO,DO...LOOP
-LPOS,LPOS
-LPRINT,LPRINT
-LPRINT,LPRINT USING
-LSET,LSET
-LTRIM$,LTRIM$
-MID$,MID$
-MID$,MID$ (statement)
-MKD$,MKD$
-MKDIR,MKDIR
-MKDMBF$,MKDMBF$
-MKI$,MKI$
-MKL$,MKL$
-MKS$,MKS$
-MKSMBF$,MKSMBF$
-MOD,MOD
-NAME,NAME
-NEXT,NEXT
-NOT,NOT
-OCT$,OCT$
-OFF,OFF
-ON,ON COM(n)
-ON,ON ERROR
-ON,ON KEY(n)
-ON,ON PEN
-ON,ON PLAY(n)
-ON,ON STRIG(n)
-ON,ON TIMER(n)
-ON,ON UEVENT
-GOSUB,ON...GOSUB
-ON,ON...GOSUB
-GOSUB,ON...GOSUB
-GOTO,ON...GOTO
-ON,ON...GOTO
-GOTO,ON...GOTO
-OPEN,OPEN
-OPEN,OPEN COM
-OPTION,OPTION BASE
-OR,OR
-OR,OR (boolean)
-OUT,OUT
-OUTPUT,OUTPUT
-PAINT,PAINT
-PALETTE,PALETTE
-PALETTE,PALETTE USING
-PCOPY,PCOPY
-PEEK,PEEK
-PEN,PEN
-PEN,PEN (statement)
-PLAY,PLAY(n)
-PLAY,PLAY
-PMAP,PMAP
-POINT,POINT
-POKE,POKE
-POS,POS
-PRESET,PRESET
-PRINT,PRINT
-PRINT,PRINT (file statement)
-PRINT,PRINT USING
-PRINT,PRINT USING (file statement)
-PSET,PSET
-PUT,PUT
-PUT,PUT (TCP/IP statement)
-PUT,PUT (graphics statement)
-RANDOM,RANDOM
-RANDOMIZE,RANDOMIZE
-RANDOMIZE,RANDOMIZE
-READ,READ
-REDIM,REDIM
-REM,REM
-RESET,RESET
-RESTORE,RESTORE
-RESUME,RESUME
-RETURN,RETURN
-RIGHT$,RIGHT$
-RMDIR,RMDIR
-RND,RND
-RSET,RSET
-RTRIM$,RTRIM$
-RUN,RUN
-SADD,SADD
-SCREEN,SCREEN (function)
-SCREEN,SCREEN
-SEEK,SEEK
-SEEK,SEEK (statement)
-SELECT,SELECT CASE
-SGN,SGN
-SHARED,SHARED
-SHELL,SHELL
-SHELL,SHELL (function)
-SIN,SIN
-SINGLE,SINGLE
-SLEEP,SLEEP
-SOUND,SOUND
-SPACE$,SPACE$
-SPC,SPC
-SQR,SQR
-STATIC,STATIC
-$STATIC,$STATIC
-STEP,STEP
-STICK,STICK
-STOP,STOP
-STR$,STR$
-STRIG,STRIG
-STRIG,STRIG(n)
-STRING,STRING
-STRING$,STRING$
-SUB,SUB
-SWAP,SWAP
-SYSTEM,SYSTEM
-TAB,TAB
-TAN,TAN
-THEN,THEN
-TIME$,TIME$
-TIMER,TIMER
-TIMER,TIMER (statement)
-TO,TO
-TYPE,TYPE
-UBOUND,UBOUND
-UCASE$,UCASE$
-UEVENT,UEVENT
-UNLOCK,UNLOCK
-UNTIL,UNTIL
-VAL,VAL
-VARPTR,VARPTR
-VARPTR$,VARPTR$
-VARSEG,VARSEG
-VIEW,VIEW
-VIEW,VIEW PRINT
-WAIT,WAIT
-WEND,WEND
-WHILE,WHILE
-WEND,WHILE...WEND
-WHILE,WHILE...WEND
-WEND,WHILE...WEND
-WIDTH,WIDTH
-WINDOW,WINDOW
-WRITE,WRITE
-WRITE,WRITE (file statement)
-XOR,XOR
-_glAccum,_glAccum
-_glAlphaFunc,_glAlphaFunc
-_glAreTexturesResident,_glAreTexturesResident
-_glArrayElement,_glArrayElement
-_glBegin,_glBegin
-_glBindTexture,_glBindTexture
-_glBitmap,_glBitmap
-_glBlendFunc,_glBlendFunc
-_glCallList,_glCallList
-_glCallLists,_glCallLists
-_glClear,_glClear
-_glClearAccum,_glClearAccum
-_glClearColor,_glClearColor
-_glClearDepth,_glClearDepth
-_glClearIndex,_glClearIndex
-_glClearStencil,_glClearStencil
-_glClipPlane,_glClipPlane
-_glColor3b,_glColor3b
-_glColor3bv,_glColor3bv
-_glColor3d,_glColor3d
-_glColor3dv,_glColor3dv
-_glColor3f,_glColor3f
-_glColor3fv,_glColor3fv
-_glColor3i,_glColor3i
-_glColor3iv,_glColor3iv
-_glColor3s,_glColor3s
-_glColor3sv,_glColor3sv
-_glColor3ub,_glColor3ub
-_glColor3ubv,_glColor3ubv
-_glColor3ui,_glColor3ui
-_glColor3uiv,_glColor3uiv
-_glColor3us,_glColor3us
-_glColor3usv,_glColor3usv
-_glColor4b,_glColor4b
-_glColor4bv,_glColor4bv
-_glColor4d,_glColor4d
-_glColor4dv,_glColor4dv
-_glColor4f,_glColor4f
-_glColor4fv,_glColor4fv
-_glColor4i,_glColor4i
-_glColor4iv,_glColor4iv
-_glColor4s,_glColor4s
-_glColor4sv,_glColor4sv
-_glColor4ub,_glColor4ub
-_glColor4ubv,_glColor4ubv
-_glColor4ui,_glColor4ui
-_glColor4uiv,_glColor4uiv
-_glColor4us,_glColor4us
-_glColor4usv,_glColor4usv
-_glColorMask,_glColorMask
-_glColorMaterial,_glColorMaterial
-_glColorPointer,_glColorPointer
-_glCopyPixels,_glCopyPixels
-_glCopyTexImage1D,_glCopyTexImage1D
-_glCopyTexImage2D,_glCopyTexImage2D
-_glCopyTexSubImage1D,_glCopyTexSubImage1D
-_glCopyTexSubImage2D,_glCopyTexSubImage2D
-_glCullFace,_glCullFace
-_glDeleteLists,_glDeleteLists
-_glDeleteTextures,_glDeleteTextures
-_glDepthFunc,_glDepthFunc
-_glDepthMask,_glDepthMask
-_glDepthRange,_glDepthRange
-_glDisable,_glDisable
-_glDisableClientState,_glDisableClientState
-_glDrawArrays,_glDrawArrays
-_glDrawBuffer,_glDrawBuffer
-_glDrawElements,_glDrawElements
-_glDrawPixels,_glDrawPixels
-_glEdgeFlag,_glEdgeFlag
-_glEdgeFlagv,_glEdgeFlagv
-_glEdgeFlagPointer,_glEdgeFlagPointer
-_glEnable,_glEnable
-_glEnableClientState,_glEnableClientState
-_glEnd,_glEnd
-_glEndList,_glEndList
-_glEvalCoord1d,_glEvalCoord1d
-_glEvalCoord1dv,_glEvalCoord1dv
-_glEvalCoord1f,_glEvalCoord1f
-_glEvalCoord1fv,_glEvalCoord1fv
-_glEvalCoord2d,_glEvalCoord2d
-_glEvalCoord2dv,_glEvalCoord2dv
-_glEvalCoord2f,_glEvalCoord2f
-_glEvalCoord2fv,_glEvalCoord2fv
-_glEvalMesh1,_glEvalMesh1
-_glEvalMesh2,_glEvalMesh2
-_glEvalPoint1,_glEvalPoint1
-_glEvalPoint2,_glEvalPoint2
-_glFeedbackBuffer,_glFeedbackBuffer
-_glFinish,_glFinish
-_glFlush,_glFlush
-_glFogf,_glFogf
-_glFogfv,_glFogfv
-_glFogi,_glFogi
-_glFogiv,_glFogiv
-_glFrontFace,_glFrontFace
-_glFrustum,_glFrustum
-_glGenLists,_glGenLists
-_glGenTextures,_glGenTextures
-_glGetBooleanv,_glGetBooleanv
-_glGetClipPlane,_glGetClipPlane
-_glGetDoublev,_glGetDoublev
-_glGetError,_glGetError
-_glGetFloatv,_glGetFloatv
-_glGetIntegerv,_glGetIntegerv
-_glGetLightfv,_glGetLightfv
-_glGetLightiv,_glGetLightiv
-_glGetMapdv,_glGetMapdv
-_glGetMapfv,_glGetMapfv
-_glGetMapiv,_glGetMapiv
-_glGetMaterialfv,_glGetMaterialfv
-_glGetMaterialiv,_glGetMaterialiv
-_glGetPixelMapfv,_glGetPixelMapfv
-_glGetPixelMapuiv,_glGetPixelMapuiv
-_glGetPixelMapusv,_glGetPixelMapusv
-_glGetPointerv,_glGetPointerv
-_glGetPolygonStipple,_glGetPolygonStipple
-_glGetString,_glGetString
-_glGetTexEnvfv,_glGetTexEnvfv
-_glGetTexEnviv,_glGetTexEnviv
-_glGetTexGendv,_glGetTexGendv
-_glGetTexGenfv,_glGetTexGenfv
-_glGetTexGeniv,_glGetTexGeniv
-_glGetTexImage,_glGetTexImage
-_glGetTexLevelParameterfv,_glGetTexLevelParameterfv
-_glGetTexLevelParameteriv,_glGetTexLevelParameteriv
-_glGetTexParameterfv,_glGetTexParameterfv
-_glGetTexParameteriv,_glGetTexParameteriv
-_glHint,_glHint
-_glIndexMask,_glIndexMask
-_glIndexPointer,_glIndexPointer
-_glIndexd,_glIndexd
-_glIndexdv,_glIndexdv
-_glIndexf,_glIndexf
-_glIndexfv,_glIndexfv
-_glIndexi,_glIndexi
-_glIndexiv,_glIndexiv
-_glIndexs,_glIndexs
-_glIndexsv,_glIndexsv
-_glIndexub,_glIndexub
-_glIndexubv,_glIndexubv
-_glInitNames,_glInitNames
-_glInterleavedArrays,_glInterleavedArrays
-_glIsEnabled,_glIsEnabled
-_glIsList,_glIsList
-_glIsTexture,_glIsTexture
-_glLightModelf,_glLightModelf
-_glLightModelfv,_glLightModelfv
-_glLightModeli,_glLightModeli
-_glLightModeliv,_glLightModeliv
-_glLightf,_glLightf
-_glLightfv,_glLightfv
-_glLighti,_glLighti
-_glLightiv,_glLightiv
-_glLineStipple,_glLineStipple
-_glLineWidth,_glLineWidth
-_glListBase,_glListBase
-_glLoadIdentity,_glLoadIdentity
-_glLoadMatrixd,_glLoadMatrixd
-_glLoadMatrixf,_glLoadMatrixf
-_glLoadName,_glLoadName
-_glLogicOp,_glLogicOp
-_glMap1d,_glMap1d
-_glMap1f,_glMap1f
-_glMap2d,_glMap2d
-_glMap2f,_glMap2f
-_glMapGrid1d,_glMapGrid1d
-_glMapGrid1f,_glMapGrid1f
-_glMapGrid2d,_glMapGrid2d
-_glMapGrid2f,_glMapGrid2f
-_glMaterialf,_glMaterialf
-_glMaterialfv,_glMaterialfv
-_glMateriali,_glMateriali
-_glMaterialiv,_glMaterialiv
-_glMatrixMode,_glMatrixMode
-_glMultMatrixd,_glMultMatrixd
-_glMultMatrixf,_glMultMatrixf
-_glNewList,_glNewList
-_glNormal3b,_glNormal3b
-_glNormal3bv,_glNormal3bv
-_glNormal3d,_glNormal3d
-_glNormal3dv,_glNormal3dv
-_glNormal3f,_glNormal3f
-_glNormal3fv,_glNormal3fv
-_glNormal3i,_glNormal3i
-_glNormal3iv,_glNormal3iv
-_glNormal3s,_glNormal3s
-_glNormal3sv,_glNormal3sv
-_glNormalPointer,_glNormalPointer
-_glOrtho,_glOrtho
-_glPassThrough,_glPassThrough
-_glPixelMapfv,_glPixelMapfv
-_glPixelMapuiv,_glPixelMapuiv
-_glPixelMapusv,_glPixelMapusv
-_glPixelStoref,_glPixelStoref
-_glPixelStorei,_glPixelStorei
-_glPixelTransferf,_glPixelTransferf
-_glPixelTransferi,_glPixelTransferi
-_glPixelZoom,_glPixelZoom
-_glPointSize,_glPointSize
-_glPolygonMode,_glPolygonMode
-_glPolygonOffset,_glPolygonOffset
-_glPolygonStipple,_glPolygonStipple
-_glPopAttrib,_glPopAttrib
-_glPopClientAttrib,_glPopClientAttrib
-_glPopMatrix,_glPopMatrix
-_glPopName,_glPopName
-_glPrioritizeTextures,_glPrioritizeTextures
-_glPushAttrib,_glPushAttrib
-_glPushClientAttrib,_glPushClientAttrib
-_glPushMatrix,_glPushMatrix
-_glPushName,_glPushName
-_glRasterPos2d,_glRasterPos2d
-_glRasterPos2dv,_glRasterPos2dv
-_glRasterPos2f,_glRasterPos2f
-_glRasterPos2fv,_glRasterPos2fv
-_glRasterPos2i,_glRasterPos2i
-_glRasterPos2iv,_glRasterPos2iv
-_glRasterPos2s,_glRasterPos2s
-_glRasterPos2sv,_glRasterPos2sv
-_glRasterPos3d,_glRasterPos3d
-_glRasterPos3dv,_glRasterPos3dv
-_glRasterPos3f,_glRasterPos3f
-_glRasterPos3fv,_glRasterPos3fv
-_glRasterPos3i,_glRasterPos3i
-_glRasterPos3iv,_glRasterPos3iv
-_glRasterPos3s,_glRasterPos3s
-_glRasterPos3sv,_glRasterPos3sv
-_glRasterPos4d,_glRasterPos4d
-_glRasterPos4dv,_glRasterPos4dv
-_glRasterPos4f,_glRasterPos4f
-_glRasterPos4fv,_glRasterPos4fv
-_glRasterPos4i,_glRasterPos4i
-_glRasterPos4iv,_glRasterPos4iv
-_glRasterPos4s,_glRasterPos4s
-_glRasterPos4sv,_glRasterPos4sv
-_glReadBuffer,_glReadBuffer
-_glReadPixels,_glReadPixels
-_glRectd,_glRectd
-_glRectdv,_glRectdv
-_glRectf,_glRectf
-_glRectfv,_glRectfv
-_glRecti,_glRecti
-_glRectiv,_glRectiv
-_glRects,_glRects
-_glRectsv,_glRectsv
-_glRenderMode,_glRenderMode
-_glRotated,_glRotated
-_glRotatef,_glRotatef
-_glScaled,_glScaled
-_glScalef,_glScalef
-_glScissor,_glScissor
-_glSelectBuffer,_glSelectBuffer
-_glShadeModel,_glShadeModel
-_glStencilFunc,_glStencilFunc
-_glStencilMask,_glStencilMask
-_glStencilOp,_glStencilOp
-_glTexCoord1d,_glTexCoord1d
-_glTexCoord1dv,_glTexCoord1dv
-_glTexCoord1f,_glTexCoord1f
-_glTexCoord1fv,_glTexCoord1fv
-_glTexCoord1i,_glTexCoord1i
-_glTexCoord1iv,_glTexCoord1iv
-_glTexCoord1s,_glTexCoord1s
-_glTexCoord1sv,_glTexCoord1sv
-_glTexCoord2d,_glTexCoord2d
-_glTexCoord2dv,_glTexCoord2dv
-_glTexCoord2f,_glTexCoord2f
-_glTexCoord2fv,_glTexCoord2fv
-_glTexCoord2i,_glTexCoord2i
-_glTexCoord2iv,_glTexCoord2iv
-_glTexCoord2s,_glTexCoord2s
-_glTexCoord2sv,_glTexCoord2sv
-_glTexCoord3d,_glTexCoord3d
-_glTexCoord3dv,_glTexCoord3dv
-_glTexCoord3f,_glTexCoord3f
-_glTexCoord3fv,_glTexCoord3fv
-_glTexCoord3i,_glTexCoord3i
-_glTexCoord3iv,_glTexCoord3iv
-_glTexCoord3s,_glTexCoord3s
-_glTexCoord3sv,_glTexCoord3sv
-_glTexCoord4d,_glTexCoord4d
-_glTexCoord4dv,_glTexCoord4dv
-_glTexCoord4f,_glTexCoord4f
-_glTexCoord4fv,_glTexCoord4fv
-_glTexCoord4i,_glTexCoord4i
-_glTexCoord4iv,_glTexCoord4iv
-_glTexCoord4s,_glTexCoord4s
-_glTexCoord4sv,_glTexCoord4sv
-_glTexCoordPointer,_glTexCoordPointer
-_glTexEnvf,_glTexEnvf
-_glTexEnvfv,_glTexEnvfv
-_glTexEnvi,_glTexEnvi
-_glTexEnviv,_glTexEnviv
-_glTexGend,_glTexGend
-_glTexGendv,_glTexGendv
-_glTexGenf,_glTexGenf
-_glTexGenfv,_glTexGenfv
-_glTexGeni,_glTexGeni
-_glTexGeniv,_glTexGeniv
-_glTexImage1D,_glTexImage1D
-_glTexImage2D,_glTexImage2D
-_glTexParameterf,_glTexParameterf
-_glTexParameterfv,_glTexParameterfv
-_glTexParameteri,_glTexParameteri
-_glTexParameteriv,_glTexParameteriv
-_glTexSubImage1D,_glTexSubImage1D
-_glTexSubImage2D,_glTexSubImage2D
-_glTranslated,_glTranslated
-_glTranslatef,_glTranslatef
-_glVertex2d,_glVertex2d
-_glVertex2dv,_glVertex2dv
-_glVertex2f,_glVertex2f
-_glVertex2fv,_glVertex2fv
-_glVertex2i,_glVertex2i
-_glVertex2iv,_glVertex2iv
-_glVertex2s,_glVertex2s
-_glVertex2sv,_glVertex2sv
-_glVertex3d,_glVertex3d
-_glVertex3dv,_glVertex3dv
-_glVertex3f,_glVertex3f
-_glVertex3fv,_glVertex3fv
-_glVertex3i,_glVertex3i
-_glVertex3iv,_glVertex3iv
-_glVertex3s,_glVertex3s
-_glVertex3sv,_glVertex3sv
-_glVertex4d,_glVertex4d
-_glVertex4dv,_glVertex4dv
-_glVertex4f,_glVertex4f
-_glVertex4fv,_glVertex4fv
-_glVertex4i,_glVertex4i
-_glVertex4iv,_glVertex4iv
-_glVertex4s,_glVertex4s
-_glVertex4sv,_glVertex4sv
-_glVertexPointer,_glVertexPointer
-_glViewport,_glViewport
-;,Semicolon
-",Quotation mark
-?,Question mark
-',Apostrophe
-:,Colon
-$,Dollar_Sign
-,Parenthesis
-+,+
-",Quotation mark
-_,Underscore
-$,STRING
-STRING,STRING
-!,SINGLE
-SINGLE,SINGLE
-#,DOUBLE
-DOUBLE,DOUBLE
-##,_FLOAT
-_FLOAT,_FLOAT
-~,_UNSIGNED
-_UNSIGNED,_UNSIGNED
-%,INTEGER
-INTEGER,INTEGER
-&,LONG
-LONG,LONG
-&&,_INTEGER64
-_INTEGER64,_INTEGER64
-`,_BIT
-_BIT,_BIT
-%%,_BYTE
-_BYTE,_BYTE
-%&,_OFFSET
-_OFFSET,_OFFSET
-&B,&B
-&O,&O
-&H,&H
-+,+
--,-
-*,*
-/,/
-\,\
-^,^
-MOD,MOD
-=,Equal
-<>,Not_Equal
->,Greater_Than
-<,Less_Than
->=,Greater_Than_Or_Equal
-<=,Less_Than_Or_Equal
diff --git a/internal/source/icon.ico b/internal/source/icon.ico
index ca26aacfd..541e29c47 100644
Binary files a/internal/source/icon.ico and b/internal/source/icon.ico differ
diff --git a/internal/source/icon.rc b/internal/source/icon.rc
index 2cebf6c44..4089c2158 100644
--- a/internal/source/icon.rc
+++ b/internal/source/icon.rc
@@ -12,14 +12,14 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
- VALUE "CompanyName","QB64\0"
- VALUE "FileDescription","QB64 Compiler\0"
+ VALUE "CompanyName","QB64 Phoenix Edition\0"
+ VALUE "FileDescription","QB64 IDE and Compiler\0"
VALUE "FileVersion","0,8,2,0\0"
- VALUE "InternalName","qb64.bas\0"
+ VALUE "InternalName","qb64pe.bas\0"
VALUE "LegalCopyright","MIT\0"
VALUE "LegalTrademarks","\0"
- VALUE "OriginalFilename","qb64.exe\0"
- VALUE "ProductName","QB64\0"
+ VALUE "OriginalFilename","qb64pe.exe\0"
+ VALUE "ProductName","QB64-PE\0"
VALUE "ProductVersion","0,8,2,0\0"
VALUE "Comments","QB64 is a modern extended BASIC programming language that retains QB4.5/QBasic compatibility and compiles native binaries for Windows, Linux and macOS.\0"
VALUE "Web","\0"
diff --git a/internal/source/qb64.ico b/internal/source/qb64.ico
deleted file mode 100644
index ca26aacfd..000000000
Binary files a/internal/source/qb64.ico and /dev/null differ
diff --git a/internal/source/qb64icon32.png b/internal/source/qb64icon32.png
deleted file mode 100644
index d081eb23e..000000000
Binary files a/internal/source/qb64icon32.png and /dev/null differ
diff --git a/internal/source/qbicon16.png b/internal/source/qbicon16.png
deleted file mode 100644
index 45f05ed5b..000000000
Binary files a/internal/source/qbicon16.png and /dev/null differ
diff --git a/internal/source/qbicon32.png b/internal/source/qbicon32.png
deleted file mode 100644
index e7e33e290..000000000
Binary files a/internal/source/qbicon32.png and /dev/null differ
diff --git a/qb64.1 b/qb64pe.1
similarity index 80%
rename from qb64.1
rename to qb64pe.1
index 68b86863d..0adcc3a11 100644
--- a/qb64.1
+++ b/qb64pe.1
@@ -1,10 +1,10 @@
-.TH qb64 "1" "November 2018" "QB64 IDE AND COMPILER" "User Commands"
+.TH qb64pe "1" "August 2022" "QB64 IDE AND COMPILER (Phoenix Edition)" "User Commands"
.SH NAME
-qb64 \- manual page for QB64
+qb64pe \- manual page for QB64-PE
.SH DESCRIPTION
-QB64 COMPILER
+QB64 COMPILER (Phoenix Edition)
.PP
-USAGE: qb64 [switches]
+USAGE: qb64pe [switches]
.SS "OPTIONS:"
.TP
diff --git a/setup_lnx.sh b/setup_lnx.sh
index 2a22568c7..a594b8079 100755
--- a/setup_lnx.sh
+++ b/setup_lnx.sh
@@ -1,10 +1,10 @@
#!/bin/bash
-# QB64 Installer
-# Argument 1: If not blank, qb64 will not be started after compilation
+# QB64-PE Installer
+# Argument 1: If not blank, qb64pe will not be started after compilation
dont_run="$1"
-#This checks the currently installed packages for the one's QB64 needs
+#This checks the currently installed packages for the one's QB64-PE needs
#And runs the package manager to install them if that is the case
pkg_install() {
#Search
@@ -33,10 +33,10 @@ fi
GET_WGET=
#Path to Icon
#Relative Path to icon -- Don't include beginning or trailing '/'
-QB64_ICON_PATH="internal/source"
+QB64_ICON_PATH="source"
#Name of the Icon picture
-QB64_ICON_NAME="qb64icon32.png"
+QB64_ICON_NAME="qb64pe.png"
DISTRO=
@@ -100,7 +100,7 @@ elif [ "$DISTRO" == "voidlinux" ]; then
elif [ -z "$DISTRO" ]; then
echo "Unable to detect distro, skipping package installation"
- echo "Please be aware that for QB64 to compile, you will need the following installed:"
+ echo "Please be aware that for QB64-PE to compile, you will need the following installed:"
echo " OpenGL developement libraries"
echo " ALSA development libraries"
echo " GNU C++ Compiler (g++)"
@@ -108,27 +108,27 @@ elif [ -z "$DISTRO" ]; then
echo " zlib"
fi
-echo "Compiling and installing QB64..."
+echo "Compiling and installing QB64-PE..."
make clean OS=lnx
make OS=lnx BUILD_QB64=y -j3
-if [ -e "./qb64" ]; then
+if [ -e "./qb64pe" ]; then
echo "Done compiling!!"
- echo "Creating ./run_qb64.sh script..."
+ echo "Creating ./run_qb64pe.sh script..."
_pwd=`pwd`
- echo "#!/bin/sh" > ./run_qb64.sh
- echo "cd $_pwd" >> ./run_qb64.sh
- echo "./qb64 &" >> ./run_qb64.sh
+ echo "#!/bin/sh" > ./run_qb64pe.sh
+ echo "cd $_pwd" >> ./run_qb64pe.sh
+ echo "./qb64pe &" >> ./run_qb64pe.sh
- chmod +x ./run_qb64.sh
+ chmod +x ./run_qb64pe.sh
#chmod -R 777 ./
- echo "Adding QB64 menu entry..."
- cat > ~/.local/share/applications/qb64.desktop < ~/.local/share/applications/qb64pe.desktop </dev/null
stty $OLDCONFIG
}
-echo "QB64 Setup"
+echo "QB64-PE Setup"
echo ""
find . -name "*.command" -exec chmod +x {} \;
@@ -25,23 +25,23 @@ if [ -z "$(which clang++)" ]; then
exit 1
fi
-echo "Building 'QB64'"
+echo "Building 'QB64-PE'"
make OS=osx clean
make OS=osx BUILD_QB64=y -j3
echo ""
-if [ -f ./qb64 ]; then
+if [ -f ./qb64pe ]; then
if [ -z "$dont_run" ]; then
- echo "Launching 'QB64'"
- ./qb64
+ echo "Launching 'QB64-PE'"
+ ./qb64pe
fi
echo ""
- echo "Note: 'qb64' is located in same folder as this setup program."
+ echo "Note: 'qb64pe' is located in same folder as this setup program."
echo "Press any key to continue..."
[ -z "$dont_run" ] && Pause
exit 0
else
- echo "Compilation of QB64 failed!"
+ echo "Compilation of QB64-PE failed!"
[ -z "$dont_run" ] && Pause
exit 1
fi
diff --git a/setup_win.bat b/setup_win.bat
index bf1f7086b..bde392405 100644
--- a/setup_win.bat
+++ b/setup_win.bat
@@ -1,6 +1,6 @@
@echo off
setlocal
-echo QB64 Setup
+echo QB64-PE Setup
echo.
mkdir internal\c\c_compiler
@@ -23,12 +23,12 @@ del %MINGW%
echo Cleaning...
internal\c\c_compiler\bin\mingw32-make.exe OS=win clean >NUL 2>NUL
-echo Building QB64...
+echo Building QB64-PE...
internal\c\c_compiler\bin\mingw32-make.exe OS=win BUILD_QB64=y || goto report_error
echo.
-echo Launching 'QB64'
-qb64
+echo Launching 'QB64-PE'
+qb64pe
echo.
pause
@@ -36,6 +36,6 @@ pause
exit 0
report_error:
-echo "Error compiling QB64."
+echo "Error compiling QB64-PE."
echo "Please review above steps and report to https://github.com/QB64-Phoenix-Edition/QB64pe/issues if you can't get it to work"
exit 1
diff --git a/source/icon.rc b/source/icon.rc
deleted file mode 100644
index 1791fe5c9..000000000
--- a/source/icon.rc
+++ /dev/null
@@ -1,28 +0,0 @@
-0 ICON "qb64.ico"
-
-1 VERSIONINFO
-FILEVERSION 2,1,0,0
-PRODUCTVERSION 2,1,0,0
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904E4"
- BEGIN
- VALUE "CompanyName","QB64\0"
- VALUE "FileDescription","QB64 Compiler\0"
- VALUE "FileVersion","2.1\0"
- VALUE "InternalName","qb64.bas\0"
- VALUE "LegalCopyright","LGPL\0"
- VALUE "LegalTrademarks","\0"
- VALUE "OriginalFilename","qb64.exe\0"
- VALUE "ProductName","QB64\0"
- VALUE "ProductVersion","2.1\0"
- VALUE "Comments","QB64 is a modern extended BASIC programming language that retains QB4.5/QBasic compatibility and compiles native binaries for Windows, Linux and macOS.\0"
- END
- END
-
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 0x04E4
- END
-END
diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas
index 2b33be969..036740177 100644
--- a/source/ide/ide_methods.bas
+++ b/source/ide/ide_methods.bas
@@ -339,7 +339,7 @@ FUNCTION ide2 (ignore)
RunMenuSaveExeWithSource = i
menu$(m, i) = "Output EXE to Source #Folder": i = i + 1
- menuDesc$(m, i - 1) = "Toggles compiling program to QB64's folder or to source folder"
+ menuDesc$(m, i - 1) = "Toggles compiling program to QB64-PE's folder or to source folder"
IF SaveExeWithSource THEN
menu$(RunMenuID, RunMenuSaveExeWithSource) = CHR$(7) + menu$(RunMenuID, RunMenuSaveExeWithSource)
END IF
@@ -479,9 +479,9 @@ FUNCTION ide2 (ignore)
menuDesc$(m, i - 1) = "Launches the default browser and navigates to the current article on the wiki"
menu$(m, i) = "-": i = i + 1
'menu$(m, i) = "Check for #Newer Version...": i = i + 1
- 'menuDesc$(m, i - 1) = "Displays the current version of QB64"
+ 'menuDesc$(m, i - 1) = "Displays the current version of QB64-PE"
menu$(m, i) = "#About...": i = i + 1
- menuDesc$(m, i - 1) = "Displays the current version of QB64"
+ menuDesc$(m, i - 1) = "Displays the current version of QB64-PE"
menusize(m) = i - 1
menus = m
@@ -1167,12 +1167,12 @@ FUNCTION ide2 (ignore)
END IF 'skipdisplay
IF WhiteListQB64FirstTimeMsg = 0 THEN
- IF INSTR(_OS$, "WIN") THEN whiteListProcess$ = "and the process 'qb64.exe' " ELSE whiteListProcess$ = ""
- result = idemessagebox("Welcome to QB64", "QB64 is an independently distributed program, and as such" + CHR$(10) + _
- "both 'qb64" + extension$ + "' and the programs you create with it may" + CHR$(10) + _
+ IF INSTR(_OS$, "WIN") THEN whiteListProcess$ = "and the process 'qb64pe.exe' " ELSE whiteListProcess$ = ""
+ result = idemessagebox("Welcome to QB64-PE", "QB64-PE is an independently distributed program, and as such" + CHR$(10) + _
+ "both 'qb64pe" + extension$ + "' and the programs you create with it may" + CHR$(10) + _
"eventually be flagged as false positives by your" + CHR$(10) + _
"antivirus/antimalware software." + CHR$(10) + CHR$(10) + _
- "It is advisable to whitelist your whole QB64 folder" + CHR$(10) + _
+ "It is advisable to whitelist your whole 'qb64pe' folder" + CHR$(10) + _
whiteListProcess$ + "to avoid operation errors.", "#OK;#Don't show this again")
PCOPY 3, 0: SCREEN , , 3, 0
@@ -1684,7 +1684,7 @@ FUNCTION ide2 (ignore)
"source code is saved. You can change that by unchecking the" + CHR$(10) + _
"option 'Output EXE to Source Folder' in the Run menu.", "#OK;#Don't show this again;#Cancel")
ELSE
- result = idemessagebox("Run", "Your program will be compiled to your QB64 folder. You can" + CHR$(10) + _
+ result = idemessagebox("Run", "Your program will be compiled to your 'qb64pe' folder. You can" + CHR$(10) + _
"change that by checking the option 'Output EXE to Source" + CHR$(10) + _
"Folder' in the Run menu.", "#OK;#Don't show this again;#Cancel")
END IF
@@ -2980,7 +2980,7 @@ FUNCTION ide2 (ignore)
GOTO regularTextBox_click
ELSEIF ActiveINCLUDELink > 0 THEN
'Double-click on an $INCLUDE statement launches that file in
- 'a separate instance of QB64:
+ 'a separate instance of QB64-PE:
p$ = idepath$ + pathsep$
f$ = p$ + ActiveINCLUDELinkFile
IF _FILEEXISTS(f$) = 0 THEN f$ = ActiveINCLUDELinkFile
@@ -12842,6 +12842,7 @@ SUB ideshowtext
'Restore BG color in case a matching bracket was printed with different BG
IF l = idecy THEN COLOR , 6
IF isKeyword > 0 THEN isKeyword = isKeyword - 1
+ IF isKeyword = 0 AND checkKeyword$ = "REM" THEN comment = -1
IF isKeyword = 0 THEN checkKeyword$ = "": metacommand = 0: is_Number = 0: isCustomKeyword = 0
NEXT m
@@ -18198,7 +18199,7 @@ SUB IdeMakeFileMenu
END IF
menu$(m, i) = "-": i = i + 1
menu$(m, i) = "E#xit": i = i + 1
- menuDesc$(m, i - 1) = "Exits QB64"
+ menuDesc$(m, i - 1) = "Exits QB64-PE"
menusize(m) = i - 1
END SUB
@@ -18838,8 +18839,12 @@ FUNCTION ideupdatehelpbox
SELECT CASE UpdateStep
CASE 1
'Create a list of all files to be recached
- f$ = CHR$(0) + idezfilelist$("internal/help", 2, "*.txt") + CHR$(0)
- IF LEN(f$) = 2 THEN f$ = CHR$(0)
+ IF Help_Recaching < 2 THEN
+ f$ = CHR$(0) + idezfilelist$("internal/help", 2, "*.txt") + CHR$(0)
+ IF LEN(f$) = 2 THEN f$ = CHR$(0)
+ ELSE
+ f$ = CHR$(0) 'no dir scan for 'qb64pe -u' (build time update)
+ END IF
'Prepend core pages to list
f$ = CHR$(0) + "Keyword_Reference_-_By_usage.txt" + f$
@@ -18863,22 +18868,24 @@ FUNCTION ideupdatehelpbox
LINE INPUT #fh, l$
IF LEN(l$) THEN
c = INSTR(l$, ","): l$ = RIGHT$(l$, LEN(l$) - c)
- 'Escape all invalid and other critical chars in filenames
- PageName2$ = ""
- FOR i = 1 TO LEN(l$)
- c = ASC(l$, i)
- SELECT CASE c
- CASE 32 ' '(space)
- PageName2$ = PageName2$ + "_"
- CASE 34, 38, 42, 43, 47, 58, 60, 62, 63, 92, 124 '("&*+/:<>?\|)
- PageName2$ = PageName2$ + "%" + HEX$(c)
- CASE ELSE
- PageName2$ = PageName2$ + CHR$(c)
- END SELECT
- NEXT
- PageName2$ = PageName2$ + ".txt"
- IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN
- f$ = f$ + PageName2$ + CHR$(0)
+ IF Help_Recaching < 2 OR LEFT$(l$, 3) <> "_gl" THEN 'ignore _GL pages for 'qb64pe -u' (build time update)
+ 'Escape all invalid and other critical chars in filenames
+ PageName2$ = ""
+ FOR i = 1 TO LEN(l$)
+ c = ASC(l$, i)
+ SELECT CASE c
+ CASE 32 ' '(space)
+ PageName2$ = PageName2$ + "_"
+ CASE 34, 36, 38, 42, 43, 47, 58, 60, 62, 63, 92, 124 '("$&*+/:<>?\|)
+ PageName2$ = PageName2$ + "%" + HEX$(c)
+ CASE ELSE
+ PageName2$ = PageName2$ + CHR$(c)
+ END SELECT
+ NEXT
+ PageName2$ = PageName2$ + ".txt"
+ IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN
+ f$ = f$ + PageName2$ + CHR$(0)
+ END IF
END IF
END IF
LOOP
@@ -19718,9 +19725,9 @@ FUNCTION BinaryFormatCheck% (pathToCheck$, pathSepToCheck$, fileToCheck$)
_PRINTSTRING (2, idewy - 3), "Preparing to convert..."
PCOPY 3, 0
IF INSTR(_OS$, "WIN") THEN
- SHELL _HIDE "qb64 -x internal/support/converter/QB45BIN.bas -o internal/utilities/QB45BIN"
+ SHELL _HIDE "qb64pe -x internal/support/converter/QB45BIN.bas -o internal/utilities/QB45BIN"
ELSE
- SHELL _HIDE "./qb64 -x ./internal/support/converter/QB45BIN.bas -o ./internal/utilities/QB45BIN"
+ SHELL _HIDE "./qb64pe -x ./internal/support/converter/QB45BIN.bas -o ./internal/utilities/QB45BIN"
END IF
IF _FILEEXISTS(convertUtility$) THEN GOTO ConvertIt
clearStatusWindow 0
diff --git a/source/ide/wiki/wiki_methods.bas b/source/ide/wiki/wiki_methods.bas
index aa470ba51..e9eb1f0bc 100644
--- a/source/ide/wiki/wiki_methods.bas
+++ b/source/ide/wiki/wiki_methods.bas
@@ -14,9 +14,9 @@ FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
FOR i = 1 TO LEN(PageName$)
c = ASC(PageName$, i)
SELECT CASE c
- CASE 32 ' '(space)
+ CASE 32 ' '(space)
PageName2$ = PageName2$ + "_"
- CASE 34, 38, 42, 43, 47, 58, 60, 62, 63, 92, 124 '("&*+/:<>?\|)
+ CASE 34, 36, 38, 42, 43, 47, 58, 60, 62, 63, 92, 124 '("$&*+/:<>?\|)
PageName2$ = PageName2$ + "%" + HEX$(c)
CASE ELSE
PageName2$ = PageName2$ + CHR$(c)
@@ -38,7 +38,7 @@ FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
END IF
'Check for curl
- IF _SHELLHIDE("curl --version") <> 0 THEN
+ IF _SHELLHIDE("curl --version >NUL") <> 0 THEN
a$ = CHR$(10) + "{{PageInternalError}}" + CHR$(10)
IF PageName$ = "Initialize" THEN
a$ = a$ + "To be able to initialize the help system, "
@@ -50,8 +50,8 @@ FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
a$ = a$ + "a tool called ''curl'' is required, but it wasn't found on your system." + CHR$(10) + CHR$(10)
a$ = a$ + "* To get ''curl'', visit the official [https://curl.se/download.html download page]." + CHR$(10)
a$ = a$ + "** Grab the latest ''binary'' archive available for your system." + CHR$(10)
- a$ = a$ + "** Unpack and drop the ''curl'' executable into the QB64 folder." + CHR$(10)
- a$ = a$ + "** If there's a file named ''curl-ca-bundle.crt'' or similar, drop it into the QB64 folder too." + CHR$(10)
+ a$ = a$ + "** Unpack and drop the ''curl'' executable into the '''qb64pe''' folder." + CHR$(10)
+ a$ = a$ + "** If there's a file named ''curl-ca-bundle.crt'' or similar, drop it into the '''qb64pe''' folder too." + CHR$(10)
Wiki$ = a$: EXIT FUNCTION
END IF
@@ -75,7 +75,7 @@ FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
s2$ = ""
'Download page using curl
- SHELL _HIDE "curl -o " + CHR$(34) + outputFile$ + CHR$(34) + " " + url$
+ SHELL _HIDE "curl --silent -o " + CHR$(34) + outputFile$ + CHR$(34) + " " + url$
fh = FREEFILE
OPEN outputFile$ FOR BINARY AS #fh 'get new content
a$ = SPACE$(LOF(fh))
@@ -321,12 +321,13 @@ SUB WikiParse (a$) 'Wiki page interpret
t$ = MID$(t$, 5)
END IF
i = LEN(d$): ii = LEN(t$)
- Help_AddTxt " Ú" + STRING$(ii + 2, "Ä") + "¿", 14, 0: Help_NewLine
- Help_AddTxt " ³ ", 14, 0: Help_AddTxt t$, 12, 0: Help_AddTxt " ³", 14, 0
- Help_AddTxt SPACE$(Help_ww - i - 2 - Help_Pos) + CHR$(4), 14, 0
+ Help_AddTxt " Ú" + STRING$(ii + 2, "Ä") + "¿", 14, 0: Help_NewLine
+ Help_AddTxt " ³ ", 14, 0: Help_AddTxt t$, 12, 0: Help_AddTxt " ³", 14, 0
+ i = Help_ww - i - 2 - Help_Pos: IF i < 2 THEN i = 2
+ Help_AddTxt SPACE$(i) + CHR$(4), 14, 0
IF LEFT$(d$, 4) = "Page" THEN i = 8: ELSE i = 7
- Help_AddTxt " " + d$, i, 0: Help_NewLine
- Help_AddTxt "ÄÄÄÁ" + STRING$(ii + 2, "Ä") + "Á" + STRING$(Help_ww - ii - 7, "Ä"), 14, 0: Help_NewLine
+ Help_LockWrap = 1: Help_AddTxt " " + d$, i, 0: Help_NewLine: Help_LockWrap = 0
+ Help_AddTxt "ÄÄÁ" + STRING$(ii + 2, "Ä") + "Á" + STRING$(Help_ww - ii - 6, "Ä"), 14, 0: Help_NewLine
'Init prefetch array
prefetch = 20
diff --git a/source/peLogo.png b/source/peLogo.png
new file mode 100644
index 000000000..03033cfe7
Binary files /dev/null and b/source/peLogo.png differ
diff --git a/source/qb64.ico b/source/qb64.ico
deleted file mode 100644
index ca26aacfd..000000000
Binary files a/source/qb64.ico and /dev/null differ
diff --git a/source/qb64.bas b/source/qb64pe.bas
similarity index 97%
rename from source/qb64.bas
rename to source/qb64pe.bas
index 9d4b9449d..1243355d8 100644
--- a/source/qb64.bas
+++ b/source/qb64pe.bas
@@ -1,25838 +1,25838 @@
-'All variables will be of type LONG unless explicitly defined
-DEFLNG A-Z
-
-'All arrays will be dynamically allocated so they can be REDIM-ed
-'$DYNAMIC
-
-'We need console access to support command-line compilation via the -x command line compile option
-$CONSOLE
-
-'Initially the "SCREEN" will be hidden, if the -x option is used it will never be created
-$SCREENHIDE
-
-$EXEICON:'./qb64.ico'
-
-$VERSIONINFO:CompanyName=QB64
-$VERSIONINFO:FileDescription=QB64 Compiler
-$VERSIONINFO:InternalName=qb64.bas
-$VERSIONINFO:LegalCopyright=MIT
-$VERSIONINFO:LegalTrademarks=
-$VERSIONINFO:OriginalFilename=qb64.exe
-$VERSIONINFO:ProductName=QB64
-$VERSIONINFO:Comments=QB64 is a modern extended BASIC programming language that retains QB4.5/QBasic compatibility and compiles native binaries for Windows, Linux and macOS.
-
-'$INCLUDE:'global\version.bas'
-'$INCLUDE:'global\settings.bas'
-'$INCLUDE:'global\constants.bas'
-'$INCLUDE:'subs_functions\extensions\opengl\opengl_global.bas'
-'$INCLUDE:'utilities\ini-manager\ini.bi'
-
-DEFLNG A-Z
-
-'-------- Optional IDE Component (1/2) --------
-'$INCLUDE:'ide\ide_global.bas'
-
-REDIM SHARED OName(1000) AS STRING 'Operation Name
-REDIM SHARED PL(1000) AS INTEGER 'Priority Level
-REDIM SHARED PP_TypeMod(0) AS STRING, PP_ConvertedMod(0) AS STRING 'Prepass Name Conversion variables.
-Set_OrderOfOperations
-
-DIM SHARED NoExeSaved AS INTEGER
-
-DIM SHARED vWatchOn, vWatchRecompileAttempts, vWatchDesiredState, vWatchErrorCall$
-DIM SHARED vWatchNewVariable$, vWatchVariableExclusions$
-vWatchErrorCall$ = "if (stop_program) {*__LONG_VWATCH_LINENUMBER=0; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);};if(new_error){bkp_new_error=new_error;new_error=0;*__LONG_VWATCH_LINENUMBER=-1; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);new_error=bkp_new_error;};"
-vWatchVariableExclusions$ = "@__LONG_VWATCH_LINENUMBER@__LONG_VWATCH_SUBLEVEL@__LONG_VWATCH_GOTO@" + _
- "@__STRING_VWATCH_SUBNAME@__STRING_VWATCH_CALLSTACK@__ARRAY_BYTE_VWATCH_BREAKPOINTS" + _
- "@__ARRAY_BYTE_VWATCH_SKIPLINES@__STRING_VWATCH_INTERNALSUBNAME@__ARRAY_STRING_VWATCH_STACK@"
-
-DIM SHARED nativeDataTypes$
-nativeDataTypes$ = "@_OFFSET@OFFSET@_UNSIGNED _OFFSET@UNSIGNED OFFSET@_BIT@BIT@_UNSIGNED _BIT@UNSIGNED BIT@_BYTE@_UNSIGNED _BYTE@BYTE@UNSIGNED BYTE@INTEGER@_UNSIGNED INTEGER@UNSIGNED INTEGER@LONG@_UNSIGNED LONG@UNSIGNED LONG@_INTEGER64@INTEGER64@_UNSIGNED _INTEGER64@UNSIGNED INTEGER64@SINGLE@DOUBLE@_FLOAT@FLOAT@STRING@"
-
-DIM SHARED qb64prefix_set_recompileAttempts, qb64prefix_set_desiredState
-DIM SHARED opex_recompileAttempts, opex_desiredState
-DIM SHARED opexarray_recompileAttempts, opexarray_desiredState
-
-REDIM EveryCaseSet(100), SelectCaseCounter AS _UNSIGNED LONG
-REDIM SelectCaseHasCaseBlock(100)
-DIM ExecLevel(255), ExecCounter AS INTEGER
-REDIM SHARED UserDefine(1, 100) AS STRING '0 element is the name, 1 element is the string value
-REDIM SHARED InValidLine(10000) AS _BYTE
-DIM DefineElse(255) AS _BYTE
-DIM SHARED UserDefineCount AS INTEGER, UserDefineList$
-UserDefineList$ = "@DEFINED@UNDEFINED@WINDOWS@WIN@LINUX@MAC@MACOSX@32BIT@64BIT@VERSION@"
-UserDefine(0, 0) = "WINDOWS": UserDefine(0, 1) = "WIN"
-UserDefine(0, 2) = "LINUX"
-UserDefine(0, 3) = "MAC": UserDefine(0, 4) = "MACOSX"
-UserDefine(0, 5) = "32BIT": UserDefine(0, 6) = "64BIT"
-UserDefine(0, 7) = "VERSION"
-IF INSTR(_OS$, "WIN") THEN UserDefine(1, 0) = "-1": UserDefine(1, 1) = "-1" ELSE UserDefine(1, 0) = "0": UserDefine(1, 1) = "0"
-IF INSTR(_OS$, "LINUX") THEN UserDefine(1, 2) = "-1" ELSE UserDefine(1, 2) = "0"
-IF INSTR(_OS$, "MAC") THEN UserDefine(1, 3) = "-1": UserDefine(1, 4) = "-1" ELSE UserDefine(1, 3) = "0": UserDefine(1, 4) = "0"
-IF INSTR(_OS$, "32BIT") THEN UserDefine(1, 5) = "-1": UserDefine(1, 6) = "0" ELSE UserDefine(1, 5) = "0": UserDefine(1, 6) = "-1"
-UserDefine(1, 7) = Version$
-
-DIM SHARED QB64_uptime!
-
-QB64_uptime! = TIMER
-
-NoInternalFolder:
-IF _DIREXISTS("internal") = 0 THEN
- _SCREENSHOW
- PRINT "QB64 cannot locate the 'internal' folder"
- PRINT
- PRINT "Check that QB64 has been extracted properly."
- PRINT "For MacOSX, launch 'qb64_start.command' or enter './qb64' in Terminal."
- PRINT "For Linux, in the console enter './qb64'."
- DO
- _LIMIT 1
- LOOP UNTIL INKEY$ <> ""
- SYSTEM 1
-END IF
-
-DIM SHARED Include_GDB_Debugging_Info 'set using "options.bin"
-
-DIM SHARED DEPENDENCY_LAST
-CONST DEPENDENCY_LOADFONT = 1: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_AUDIO_CONVERSION = 2: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_AUDIO_DECODE = 3: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_AUDIO_OUT = 4: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_GL = 5: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_IMAGE_CODEC = 6: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_CONSOLE_ONLY = 7: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 '=2 if via -g switch, =1 if via metacommand $CONSOLE:ONLY
-CONST DEPENDENCY_SOCKETS = 8: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_PRINTER = 9: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_ICON = 10: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_SCREENIMAGE = 11: DEPENDENCY_LAST = DEPENDENCY_LAST + 1
-CONST DEPENDENCY_DEVICEINPUT = 12: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 'removes support for gamepad input if not present
-CONST DEPENDENCY_ZLIB = 13: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 'ZLIB library linkage, if desired, for compression/decompression.
-
-
-
-DIM SHARED DEPENDENCY(1 TO DEPENDENCY_LAST)
-
-DIM SHARED UseGL 'declared SUB _GL (no params)
-
-
-DIM SHARED OS_BITS AS LONG, WindowTitle AS STRING
-OS_BITS = 64: IF INSTR(_OS$, "[32BIT]") THEN OS_BITS = 32
-
-IF OS_BITS = 32 THEN WindowTitle = "QB64 x32" ELSE WindowTitle = "QB64 x64"
-_TITLE WindowTitle
-
-DIM SHARED ConsoleMode, No_C_Compile_Mode, NoIDEMode
-DIM SHARED ShowWarnings AS _BYTE, QuietMode AS _BYTE, CMDLineFile AS STRING
-DIM SHARED MonochromeLoggingMode AS _BYTE
-
-TYPE usedVarList
- AS LONG id, linenumber, includeLevel, includedLine, scope, localIndex
- AS LONG arrayElementSize
- AS _BYTE used, watch, isarray, displayFormat 'displayFormat: 0=DEC;1=HEX;2=BIN;3=OCT
- AS STRING name, cname, varType, includedFile, subfunc
- AS STRING watchRange, indexes, elements, elementTypes 'for Arrays and UDTs
- AS STRING elementOffset, storage
-END TYPE
-
-REDIM SHARED backupUsedVariableList(1000) AS usedVarList
-DIM SHARED typeDefinitions$, backupTypeDefinitions$
-DIM SHARED totalVariablesCreated AS LONG, totalMainVariablesCreated AS LONG
-DIM SHARED bypassNextVariable AS _BYTE
-DIM SHARED totalWarnings AS LONG, warningListItems AS LONG, lastWarningHeader AS STRING
-DIM SHARED duplicateConstWarning AS _BYTE, warningsissued AS _BYTE
-DIM SHARED emptySCWarning AS _BYTE, maxLineNumber AS LONG
-DIM SHARED ExeIconSet AS LONG, qb64prefix$, qb64prefix_set
-DIM SHARED VersionInfoSet AS _BYTE
-
-'Variables to handle $VERSIONINFO metacommand:
-DIM SHARED viFileVersionNum$, viProductVersionNum$, viCompanyName$
-DIM SHARED viFileDescription$, viFileVersion$, viInternalName$
-DIM SHARED viLegalCopyright$, viLegalTrademarks$, viOriginalFilename$
-DIM SHARED viProductName$, viProductVersion$, viComments$, viWeb$
-
-DIM SHARED NoChecks
-
-DIM SHARED Console
-DIM SHARED ScreenHide
-DIM SHARED Asserts
-DIM SHARED OptMax AS LONG
-OptMax = 256
-REDIM SHARED Opt(1 TO OptMax, 1 TO 10) AS STRING * 256
-' (1,1)="READ"
-' (1,2)="WRITE"
-' (1,3)="READ WRITE"
-REDIM SHARED OptWords(1 TO OptMax, 1 TO 10) AS INTEGER 'The number of words of each opt () element
-' (1,1)=1 '"READ"
-' (1,2)=1 '"WRITE"
-' (1,3)=2 '"READ WRITE"
-REDIM SHARED T(1 TO OptMax) AS INTEGER 'The type of the entry
-' t is 0 for ? opts
-' ---------- 0 means ? , 1+ means a symbol or {}block ----------
-' t is 1 for symbol opts
-' t is the number of rhs opt () index enteries for {READ|WRITE|READ WRITE} like opts
-REDIM SHARED Lev(1 TO OptMax) AS INTEGER 'The indwelling level of each opt () element (the lowest is 0)
-REDIM SHARED EntryLev(1 TO OptMax) AS INTEGER 'The level required from which this opt () can be validly be entered/checked-for
-REDIM SHARED DitchLev(1 TO OptMax) AS INTEGER 'The lowest level recorded between the previous Opt and this Opt
-REDIM SHARED DontPass(1 TO OptMax) AS INTEGER 'Set to 1 or 0, with 1 meaning don't pass
-'Determines whether the opt () entry needs to actually be passed to the C++ sub/function
-REDIM SHARED TempList(1 TO OptMax) AS INTEGER
-REDIM SHARED PassRule(1 TO OptMax) AS LONG
-'0 means no pass rule
-'negative values refer to an opt () element
-'positive values refer to a flag value
-REDIM SHARED LevelEntered(OptMax) 'up to 64 levels supported
-REDIM SHARED separgs(OptMax + 1) AS STRING
-REDIM SHARED separgslayout(OptMax + 1) AS STRING
-REDIM SHARED separgs2(OptMax + 1) AS STRING
-REDIM SHARED separgslayout2(OptMax + 1) AS STRING
-
-
-
-
-
-DIM SHARED E
-
-
-
-
-
-
-
-
-
-
-DIM SHARED ResolveStaticFunctions
-REDIM SHARED ResolveStaticFunction_File(1 TO 100) AS STRING
-REDIM SHARED ResolveStaticFunction_Name(1 TO 100) AS STRING
-REDIM SHARED ResolveStaticFunction_Method(1 TO 100) AS LONG
-
-
-
-
-
-DIM SHARED Error_Happened AS LONG
-DIM SHARED Error_Message AS STRING
-
-DIM SHARED os AS STRING
-os$ = "WIN"
-IF INSTR(_OS$, "[LINUX]") THEN os$ = "LNX"
-
-DIM SHARED MacOSX AS LONG
-IF INSTR(_OS$, "[MACOSX]") THEN MacOSX = 1
-
-DIM SHARED inline_DATA
-IF MacOSX THEN inline_DATA = 1
-
-DIM SHARED BATCHFILE_EXTENSION AS STRING
-BATCHFILE_EXTENSION = ".bat"
-IF os$ = "LNX" THEN BATCHFILE_EXTENSION = ".sh"
-IF MacOSX THEN BATCHFILE_EXTENSION = ".command"
-
-
-DIM inlinedatastr(255) AS STRING
-FOR i = 0 TO 255
- inlinedatastr(i) = str2$(i) + ","
-NEXT
-
-
-DIM SHARED extension AS STRING
-DIM SHARED path.exe$, path.source$, lastBinaryGenerated$
-extension$ = ".exe"
-IF os$ = "LNX" THEN extension$ = "" 'no extension under Linux
-
-DIM SHARED pathsep AS STRING * 1
-pathsep$ = "\"
-IF os$ = "LNX" THEN pathsep$ = "/"
-'note: QB64 handles OS specific path separators automatically except under SHELL calls
-
-ON ERROR GOTO qberror_test
-
-DIM SHARED tmpdir AS STRING, tmpdir2 AS STRING
-IF os$ = "WIN" THEN tmpdir$ = ".\internal\temp\": tmpdir2$ = "..\\temp\\"
-IF os$ = "LNX" THEN tmpdir$ = "./internal/temp/": tmpdir2$ = "../temp/"
-
-IF NOT _DIREXISTS(tmpdir$) THEN MKDIR tmpdir$
-
-DECLARE LIBRARY
- FUNCTION getpid& ()
-END DECLARE
-
-thisinstancepid = getpid&
-DIM SHARED tempfolderindex
-
-IF INSTR(_OS$, "LINUX") THEN
- fh = FREEFILE
- OPEN ".\internal\temp\tempfoldersearch.bin" FOR RANDOM AS #fh LEN = LEN(tempfolderindex)
- tempfolderrecords = LOF(fh) / LEN(tempfolderindex)
- i = 1
- IF tempfolderrecords = 0 THEN
- 'first run ever?
- PUT #fh, 1, thisinstancepid
- ELSE
- FOR i = 1 TO tempfolderrecords
- 'check if any of the temp folders is being used = pid still active
- GET #fh, i, tempfoldersearch
-
- SHELL _HIDE "ps -p " + STR$(tempfoldersearch) + " > /dev/null 2>&1; echo $? > internal/temp/checkpid.bin"
- fh2 = FREEFILE
- OPEN "internal/temp/checkpid.bin" FOR BINARY AS #fh2
- LINE INPUT #fh2, checkpid$
- CLOSE #fh2
- IF VAL(checkpid$) = 1 THEN
- 'This temp folder was locked by an instance that's no longer active, so
- 'this will be our temp folder
- PUT #fh, i, thisinstancepid
- EXIT FOR
- END IF
- NEXT
- IF i > tempfolderrecords THEN
- 'All indexes were busy. Let's initiate a new one:
- PUT #fh, i, thisinstancepid
- END IF
- END IF
- CLOSE #fh
- IF i > 1 THEN
- tmpdir$ = "./internal/temp" + str2$(i) + "/": tmpdir2$ = "../temp" + str2$(i) + "/"
- IF _DIREXISTS(tmpdir$) = 0 THEN
- MKDIR tmpdir$
- END IF
- END IF
- OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26
-ELSE
- ON ERROR GOTO qberror_test
- E = 0
- i = 1
- OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26
- DO WHILE E
- i = i + 1
- IF i = 1000 THEN PRINT "Unable to locate the 'internal' folder": END 1
- MKDIR ".\internal\temp" + str2$(i)
- IF os$ = "WIN" THEN tmpdir$ = ".\internal\temp" + str2$(i) + "\": tmpdir2$ = "..\\temp" + str2$(i) + "\\"
- IF os$ = "LNX" THEN tmpdir$ = "./internal/temp" + str2$(i) + "/": tmpdir2$ = "../temp" + str2$(i) + "/"
- E = 0
- OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26
- LOOP
-END IF
-
-
-'temp folder established
-tempfolderindex = i
-IF i > 1 THEN
- 'create modified version of qbx.cpp
- OPEN ".\internal\c\qbx" + str2$(i) + ".cpp" FOR OUTPUT AS #2
- OPEN ".\internal\c\qbx.cpp" FOR BINARY AS #1
- DO UNTIL EOF(1)
- LINE INPUT #1, a$
- x = INSTR(a$, "..\\temp\\"): IF x THEN a$ = LEFT$(a$, x - 1) + "..\\temp" + str2$(i) + "\\" + RIGHT$(a$, LEN(a$) - (x + 9))
- x = INSTR(a$, "../temp/"): IF x THEN a$ = LEFT$(a$, x - 1) + "../temp" + str2$(i) + "/" + RIGHT$(a$, LEN(a$) - (x + 7))
- PRINT #2, a$
- LOOP
- CLOSE #1, #2
-END IF
-
-IF Debug THEN OPEN tmpdir$ + "debug.txt" FOR OUTPUT AS #9
-
-ON ERROR GOTO qberror
-
-
-
-DIM SHARED tempfolderindexstr AS STRING 'appended to "Untitled"
-DIM SHARED tempfolderindexstr2 AS STRING
-IF tempfolderindex <> 1 THEN tempfolderindexstr$ = "(" + str2$(tempfolderindex) + ")": tempfolderindexstr2$ = str2$(tempfolderindex)
-
-
-DIM SHARED idedebuginfo
-DIM SHARED seperateargs_error
-DIM SHARED seperateargs_error_message AS STRING
-
-DIM SHARED compfailed
-
-DIM SHARED reginternalsubfunc
-DIM SHARED reginternalvariable
-
-
-DIM SHARED symboltype_size
-symboltype_size = 0
-
-DIM SHARED use_global_byte_elements
-use_global_byte_elements = 0
-
-'compiler-side IDE data & definitions
-'SHARED variables "passed" to/from the compiler & IDE
-DIM SHARED idecommand AS STRING 'a 1 byte message-type code, followed by optional string data
-DIM SHARED idereturn AS STRING 'used to pass formatted-lines and return information back to the IDE
-DIM SHARED ideerror AS LONG
-DIM SHARED idecompiled AS LONG
-DIM SHARED idemode '1 if using the IDE to compile
-DIM SHARED ideerrorline AS LONG 'set by qb64-error(...) to the line number it would have reported, this number
-'is later passed to the ide in message #8
-DIM SHARED idemessage AS STRING 'set by qb64-error(...) to the error message to be reported, this
-'is later passed to the ide in message #8
-
-DIM SHARED optionexplicit AS _BYTE
-DIM SHARED optionexplicitarray AS _BYTE
-DIM SHARED optionexplicit_cmd AS _BYTE
-DIM SHARED ideStartAtLine AS LONG, errorLineInInclude AS LONG
-DIM SHARED warningInInclude AS LONG, warningInIncludeLine AS LONG
-DIM SHARED outputfile_cmd$
-DIM SHARED compilelog$
-
-'$INCLUDE:'global\IDEsettings.bas'
-
-CMDLineFile = ParseCMDLineArgs$
-
-IF ConsoleMode THEN
- _DEST _CONSOLE
-ELSE
- _CONSOLE OFF
- _SCREENSHOW
- _ICON
-END IF
-
-'the function ?=ide(?) should always be passed 0, it returns a message code number, any further information
-'is passed back in idereturn
-
-'message code numbers:
-'0 no ide present (auto defined array ide() return 0)
-
-'1 launch ide & with passed filename (compiler->ide)
-
-'2 begin new compilation with returned line of code (compiler<-ide)
-' [2][line of code]
-
-'3 request next line (compiler->ide)
-' [3]
-
-'4 next line of code returned (compiler<-ide)
-' [4][line of code]
-
-'5 no more lines of code exist (compiler<-ide)
-' [5]
-
-'6 code is OK/ready (compiler->ide)
-' [6]
-
-'7 repass the code from the beginning (compiler->ide)
-' [7]
-
-'8 an error has occurred with 'this' message on 'this' line(compiler->ide)
-' [8][error message][line as LONG]
-
-'9 C++ compile (if necessary) and run with 'this' name (compiler<-ide)
-' [9][name(no path, no .bas)]
-
-'10 The line requires more time to process
-' Pass-back 'line of code' using method [4] when ready
-' [10][line of code]
-
-'11 ".EXE file created" message
-
-'12 The name of the exe I'll create is '...' (compiler->ide)
-' [12][exe name without .exe]
-
-'255 A qb error happened in the IDE (compiler->ide)
-' note: detected by the fact that ideerror was not set to 0
-' [255]
-
-'hash table data
-TYPE HashListItem
- Flags AS LONG
- Reference AS LONG
- NextItem AS LONG
- PrevItem AS LONG
- LastItem AS LONG 'note: this value is only valid on the first item in the list
- 'note: name is stored in a seperate array of strings
-END TYPE
-DIM SHARED HashFind_NextListItem AS LONG
-DIM SHARED HashFind_Reverse AS LONG
-DIM SHARED HashFind_SearchFlags AS LONG
-DIM SHARED HashFind_Name AS STRING
-DIM SHARED HashRemove_LastFound AS LONG
-DIM SHARED HashListSize AS LONG
-DIM SHARED HashListNext AS LONG
-DIM SHARED HashListFreeSize AS LONG
-DIM SHARED HashListFreeLast AS LONG
-'hash lookup tables
-DIM SHARED hash1char(255) AS INTEGER
-DIM SHARED hash2char(65535) AS INTEGER
-FOR x = 1 TO 26
- hash1char(64 + x) = x
- hash1char(96 + x) = x
-NEXT
-hash1char(95) = 27 '_
-hash1char(48) = 28 '0
-hash1char(49) = 29 '1
-hash1char(50) = 30 '2
-hash1char(51) = 31 '3
-hash1char(52) = 23 '4 'note: x, y, z and beginning alphabet letters avoided because of common usage (eg. a2, y3)
-hash1char(53) = 22 '5
-hash1char(54) = 20 '6
-hash1char(55) = 19 '7
-hash1char(56) = 18 '8
-hash1char(57) = 17 '9
-FOR c1 = 0 TO 255
- FOR c2 = 0 TO 255
- hash2char(c1 + c2 * 256) = hash1char(c1) + hash1char(c2) * 32
- NEXT
-NEXT
-'init
-HashListSize = 65536
-HashListNext = 1
-HashListFreeSize = 1024
-HashListFreeLast = 0
-REDIM SHARED HashList(1 TO HashListSize) AS HashListItem
-REDIM SHARED HashListName(1 TO HashListSize) AS STRING * 256
-REDIM SHARED HashListFree(1 TO HashListFreeSize) AS LONG
-REDIM SHARED HashTable(16777215) AS LONG '64MB lookup table with indexes to the hashlist
-
-CONST HASHFLAG_LABEL = 2
-CONST HASHFLAG_TYPE = 4
-CONST HASHFLAG_RESERVED = 8
-CONST HASHFLAG_OPERATOR = 16
-CONST HASHFLAG_CUSTOMSYNTAX = 32
-CONST HASHFLAG_SUB = 64
-CONST HASHFLAG_FUNCTION = 128
-CONST HASHFLAG_UDT = 256
-CONST HASHFLAG_UDTELEMENT = 512
-CONST HASHFLAG_CONSTANT = 1024
-CONST HASHFLAG_VARIABLE = 2048
-CONST HASHFLAG_ARRAY = 4096
-CONST HASHFLAG_XELEMENTNAME = 8192
-CONST HASHFLAG_XTYPENAME = 16384
-
-TYPE Label_Type
- State AS _UNSIGNED _BYTE '0=label referenced, 1=label created
- cn AS STRING * 256
- Scope AS LONG
- Data_Offset AS _INTEGER64 'offset within data
- Data_Referenced AS _UNSIGNED _BYTE 'set to 1 if data is referenced (data_offset will be used to create the data offset variable)
- Error_Line AS LONG 'the line number to reference on errors
- Scope_Restriction AS LONG 'cannot exist inside this scope (post checked)
- SourceLineNumber AS LONG
-END TYPE
-DIM SHARED nLabels, Labels_Ubound
-Labels_Ubound = 100
-REDIM SHARED Labels(1 TO Labels_Ubound) AS Label_Type
-DIM SHARED Empty_Label AS Label_Type
-
-DIM SHARED PossibleSubNameLabels AS STRING 'format: name+sp+name+sp+name <-ucase$'d
-DIM SHARED SubNameLabels AS STRING 'format: name+sp+name+sp+name <-ucase$'d
-DIM SHARED CreatingLabel AS LONG
-
-DIM SHARED AllowLocalName AS LONG
-
-DIM SHARED DataOffset
-
-DIM SHARED prepass
-
-
-DIM SHARED autoarray
-
-DIM SHARED ontimerid, onkeyid, onstrigid
-
-DIM SHARED revertmaymusthave(1 TO 10000)
-DIM SHARED revertmaymusthaven
-
-DIM SHARED linecontinuation
-
-DIM SHARED dim2typepassback AS STRING 'passes back correct case sensitive version of type
-
-
-DIM SHARED inclevel
-DIM SHARED incname(100) AS STRING 'must be full path as given
-DIM SHARED inclinenumber(100) AS LONG
-DIM SHARED incerror AS STRING
-
-
-DIM SHARED fix046 AS STRING
-fix046$ = "__" + "ASCII" + "_" + "CHR" + "_" + "046" + "__" 'broken up to avoid detection for layout reversion
-
-DIM SHARED layout AS STRING 'passed to IDE
-DIM SHARED layoutok AS LONG 'tracks status of entire line
-
-DIM SHARED layoutcomment AS STRING
-
-DIM SHARED tlayout AS STRING 'temporary layout string set by supporting functions
-DIM SHARED layoutdone AS LONG 'tracks status of single command
-
-
-DIM SHARED fooindwel
-
-DIM SHARED alphanumeric(255)
-FOR i = 48 TO 57
- alphanumeric(i) = -1
-NEXT
-FOR i = 65 TO 90
- alphanumeric(i) = -1
-NEXT
-FOR i = 97 TO 122
- alphanumeric(i) = -1
-NEXT
-'_ is treated as an alphabet letter
-alphanumeric(95) = -1
-
-DIM SHARED isalpha(255)
-FOR i = 65 TO 90
- isalpha(i) = -1
-NEXT
-FOR i = 97 TO 122
- isalpha(i) = -1
-NEXT
-'_ is treated as an alphabet letter
-isalpha(95) = -1
-
-DIM SHARED isnumeric(255)
-FOR i = 48 TO 57
- isnumeric(i) = -1
-NEXT
-
-
-DIM SHARED lfsinglechar(255)
-lfsinglechar(40) = 1 '(
-lfsinglechar(41) = 1 ')
-lfsinglechar(42) = 1 '*
-lfsinglechar(43) = 1 '+
-lfsinglechar(45) = 1 '-
-lfsinglechar(47) = 1 '/
-lfsinglechar(60) = 1 '<
-lfsinglechar(61) = 1 '=
-lfsinglechar(62) = 1 '>
-lfsinglechar(92) = 1 '\
-lfsinglechar(94) = 1 '^
-
-lfsinglechar(44) = 1 ',
-lfsinglechar(46) = 1 '.
-lfsinglechar(58) = 1 ':
-lfsinglechar(59) = 1 ';
-
-lfsinglechar(35) = 1 '# (file no only)
-lfsinglechar(36) = 1 '$ (metacommand only)
-lfsinglechar(63) = 1 '? (print macro)
-lfsinglechar(95) = 1 '_
-
-
-
-
-
-
-
-
-
-
-DIM SHARED nextrunlineindex AS LONG
-
-DIM SHARED lineinput3buffer AS STRING
-DIM SHARED lineinput3index AS LONG
-
-DIM SHARED dimstatic AS LONG
-
-DIM SHARED staticarraylist AS STRING
-DIM SHARED staticarraylistn AS LONG
-DIM SHARED commonarraylist AS STRING
-DIM SHARED commonarraylistn AS LONG
-
-'CONST support
-DIM SHARED constmax AS LONG
-constmax = 100
-DIM SHARED constlast AS LONG
-constlast = -1
-REDIM SHARED constname(constmax) AS STRING
-REDIM SHARED constcname(constmax) AS STRING
-REDIM SHARED constnamesymbol(constmax) AS STRING 'optional name symbol
-' `1 and `no-number must be handled correctly
-'DIM SHARED constlastshared AS LONG 'so any defined inside a sub/function after this index can be "forgotten" when sub/function exits
-'constlastshared = -1
-REDIM SHARED consttype(constmax) AS LONG 'variable type number
-'consttype determines storage
-REDIM SHARED constinteger(constmax) AS _INTEGER64
-REDIM SHARED constuinteger(constmax) AS _UNSIGNED _INTEGER64
-REDIM SHARED constfloat(constmax) AS _FLOAT
-REDIM SHARED conststring(constmax) AS STRING
-REDIM SHARED constsubfunc(constmax) AS LONG
-REDIM SHARED constdefined(constmax) AS LONG
-
-'UDT
-'names
-DIM SHARED lasttype AS LONG
-DIM SHARED lasttypeelement AS LONG
-
-TYPE idstruct
-
- n AS STRING * 256 'name
- cn AS STRING * 256 'case sensitive version of n
-
- arraytype AS LONG 'similar to t
- arrayelements AS INTEGER
- staticarray AS INTEGER 'set for arrays declared in the main module with static elements
-
- mayhave AS STRING * 8 'mayhave and musthave are exclusive of each other
- musthave AS STRING * 8
- t AS LONG 'type
-
- tsize AS LONG
-
-
- subfunc AS INTEGER 'if function=1, sub=2 (max 100 arguments)
- Dependency AS INTEGER
- internal_subfunc AS INTEGER
-
- callname AS STRING * 256
- ccall AS INTEGER
- overloaded AS _BYTE
- args AS INTEGER
- minargs AS INTEGER
- arg AS STRING * 400 'similar to t
- argsize AS STRING * 400 'similar to tsize (used for fixed length strings)
- specialformat AS STRING * 256
- secondargmustbe AS STRING * 256
- secondargcantbe AS STRING * 256
- ret AS LONG 'the value it returns if it is a function (again like t)
-
- insubfunc AS STRING * 256
- insubfuncn AS LONG
-
- share AS INTEGER
- nele AS STRING * 100
- nelereq AS STRING * 100
- linkid AS LONG
- linkarg AS INTEGER
- staticscope AS INTEGER
- 'For variables which are arguments passed to a sub/function
- sfid AS LONG 'id number of variable's parent sub/function
- sfarg AS INTEGER 'argument/parameter # within call (1=first)
-
- hr_syntax AS STRING
-END TYPE
-
-DIM SHARED id AS idstruct
-
-DIM SHARED idn AS LONG
-DIM SHARED ids_max AS LONG
-ids_max = 1024
-REDIM SHARED ids(1 TO ids_max) AS idstruct
-REDIM SHARED cmemlist(1 TO ids_max + 1) AS INTEGER 'variables that must be in cmem
-REDIM SHARED sfcmemargs(1 TO ids_max + 1) AS STRING * 100 's/f arg that must be in cmem
-REDIM SHARED arrayelementslist(1 TO ids_max + 1) AS INTEGER 'arrayelementslist (like cmemlist) helps to resolve the number of elements in arrays with an unknown number of elements. Note: arrays with an unknown number of elements have .arrayelements=-1
-
-
-'create blank id template for idclear to copy (stops strings being set to chr$(0))
-DIM SHARED cleariddata AS idstruct
-cleariddata.cn = ""
-cleariddata.n = ""
-cleariddata.mayhave = ""
-cleariddata.musthave = ""
-cleariddata.callname = ""
-cleariddata.arg = ""
-cleariddata.argsize = ""
-cleariddata.specialformat = ""
-cleariddata.secondargmustbe = ""
-cleariddata.secondargcantbe = ""
-cleariddata.insubfunc = ""
-cleariddata.nele = ""
-cleariddata.nelereq = ""
-
-DIM SHARED ISSTRING AS LONG
-DIM SHARED ISFLOAT AS LONG
-DIM SHARED ISUNSIGNED AS LONG
-DIM SHARED ISPOINTER AS LONG
-DIM SHARED ISFIXEDLENGTH AS LONG
-DIM SHARED ISINCONVENTIONALMEMORY AS LONG
-DIM SHARED ISOFFSETINBITS AS LONG
-DIM SHARED ISARRAY AS LONG
-DIM SHARED ISREFERENCE AS LONG
-DIM SHARED ISUDT AS LONG
-DIM SHARED ISOFFSET AS LONG
-
-DIM SHARED STRINGTYPE AS LONG
-DIM SHARED BITTYPE AS LONG
-DIM SHARED UBITTYPE AS LONG
-DIM SHARED BYTETYPE AS LONG
-DIM SHARED UBYTETYPE AS LONG
-DIM SHARED INTEGERTYPE AS LONG
-DIM SHARED UINTEGERTYPE AS LONG
-DIM SHARED LONGTYPE AS LONG
-DIM SHARED ULONGTYPE AS LONG
-DIM SHARED INTEGER64TYPE AS LONG
-DIM SHARED UINTEGER64TYPE AS LONG
-DIM SHARED SINGLETYPE AS LONG
-DIM SHARED DOUBLETYPE AS LONG
-DIM SHARED FLOATTYPE AS LONG
-DIM SHARED OFFSETTYPE AS LONG
-DIM SHARED UOFFSETTYPE AS LONG
-DIM SHARED UDTTYPE AS LONG
-
-DIM SHARED gosubid AS LONG
-DIM SHARED redimoption AS INTEGER
-DIM SHARED dimoption AS INTEGER
-DIM SHARED arraydesc AS INTEGER
-DIM SHARED qberrorhappened AS INTEGER
-DIM SHARED qberrorcode AS INTEGER
-DIM SHARED qberrorline AS INTEGER
-'COMMON SHARED defineaz() AS STRING
-'COMMON SHARED defineextaz() AS STRING
-
-DIM SHARED sourcefile AS STRING 'the full path and filename
-DIM SHARED file AS STRING 'name of the file (without .bas or path)
-
-'COMMON SHARED separgs() AS STRING
-
-DIM SHARED constequation AS INTEGER
-DIM SHARED DynamicMode AS INTEGER
-DIM SHARED findidsecondarg AS STRING
-DIM SHARED findanotherid AS INTEGER
-DIM SHARED findidinternal AS LONG
-DIM SHARED currentid AS LONG 'is the index of the last ID accessed
-DIM SHARED linenumber AS LONG, reallinenumber AS LONG, totallinenumber AS LONG, definingtypeerror AS LONG
-DIM SHARED wholeline AS STRING
-DIM SHARED firstLineNumberLabelvWatch AS LONG, lastLineNumberLabelvWatch AS LONG
-DIM SHARED vWatchUsedLabels AS STRING, vWatchUsedSkipLabels AS STRING
-DIM SHARED linefragment AS STRING
-'COMMON SHARED bitmask() AS _INTEGER64
-'COMMON SHARED bitmaskinv() AS _INTEGER64
-
-DIM SHARED arrayprocessinghappened AS INTEGER
-DIM SHARED stringprocessinghappened AS INTEGER
-DIM SHARED cleanupstringprocessingcall AS STRING
-DIM SHARED inputfunctioncalled AS _BYTE
-DIM SHARED recompile AS INTEGER 'forces recompilation
-'COMMON SHARED cmemlist() AS INTEGER
-DIM SHARED optionbase AS INTEGER
-
-DIM SHARED addmetastatic AS INTEGER
-DIM SHARED addmetadynamic AS INTEGER
-DIM SHARED addmetainclude AS STRING
-
-DIM SHARED closedmain AS INTEGER
-DIM SHARED module AS STRING
-
-DIM SHARED subfunc AS STRING
-DIM SHARED subfuncn AS LONG
-DIM SHARED closedsubfunc AS _BYTE
-DIM SHARED subfuncid AS LONG
-
-DIM SHARED defdatahandle AS INTEGER
-DIM SHARED dimsfarray AS INTEGER
-DIM SHARED dimshared AS INTEGER
-
-'Allows passing of known elements to recompilation
-DIM SHARED sflistn AS INTEGER
-'COMMON SHARED sfidlist() AS LONG
-'COMMON SHARED sfarglist() AS INTEGER
-'COMMON SHARED sfelelist() AS INTEGER
-DIM SHARED glinkid AS LONG
-DIM SHARED glinkarg AS INTEGER
-DIM SHARED typname2typsize AS LONG
-DIM SHARED uniquenumbern AS LONG
-
-'CLEAR , , 16384
-
-
-DIM SHARED bitmask(1 TO 64) AS _INTEGER64
-DIM SHARED bitmaskinv(1 TO 64) AS _INTEGER64
-
-DIM SHARED defineextaz(1 TO 27) AS STRING
-DIM SHARED defineaz(1 TO 27) AS STRING '27 is an underscore
-
-ISSTRING = 1073741824
-ISFLOAT = 536870912
-ISUNSIGNED = 268435456
-ISPOINTER = 134217728
-ISFIXEDLENGTH = 67108864 'only set for strings with pointer flag
-ISINCONVENTIONALMEMORY = 33554432
-ISOFFSETINBITS = 16777216
-ISARRAY = 8388608
-ISREFERENCE = 4194304
-ISUDT = 2097152
-ISOFFSET = 1048576
-
-STRINGTYPE = ISSTRING + ISPOINTER
-BITTYPE = 1& + ISPOINTER + ISOFFSETINBITS
-UBITTYPE = 1& + ISPOINTER + ISUNSIGNED + ISOFFSETINBITS 'QB64 will also support BIT*n, eg. DIM bitarray[10] AS _UNSIGNED _BIT*10
-BYTETYPE = 8& + ISPOINTER
-UBYTETYPE = 8& + ISPOINTER + ISUNSIGNED
-INTEGERTYPE = 16& + ISPOINTER
-UINTEGERTYPE = 16& + ISPOINTER + ISUNSIGNED
-LONGTYPE = 32& + ISPOINTER
-ULONGTYPE = 32& + ISPOINTER + ISUNSIGNED
-INTEGER64TYPE = 64& + ISPOINTER
-UINTEGER64TYPE = 64& + ISPOINTER + ISUNSIGNED
-SINGLETYPE = 32& + ISFLOAT + ISPOINTER
-DOUBLETYPE = 64& + ISFLOAT + ISPOINTER
-FLOATTYPE = 256& + ISFLOAT + ISPOINTER '8-32 bytes
-OFFSETTYPE = 64& + ISOFFSET + ISPOINTER: IF OS_BITS = 32 THEN OFFSETTYPE = 32& + ISOFFSET + ISPOINTER
-UOFFSETTYPE = 64& + ISOFFSET + ISUNSIGNED + ISPOINTER: IF OS_BITS = 32 THEN UOFFSETTYPE = 32& + ISOFFSET + ISUNSIGNED + ISPOINTER
-UDTTYPE = ISUDT + ISPOINTER
-
-
-
-
-
-
-DIM SHARED statementn AS LONG
-DIM SHARED everycasenewcase AS LONG
-
-
-
-
-DIM SHARED controllevel AS INTEGER '0=not in a control block
-DIM SHARED controltype(1000) AS INTEGER
-'1=IF (awaiting END IF)
-'2=FOR (awaiting NEXT)
-'3=DO (awaiting LOOP [UNTIL|WHILE param])
-'4=DO WHILE/UNTIL (awaiting LOOP)
-'5=WHILE (awaiting WEND)
-'6=$IF (precompiler)
-'10=SELECT CASE qbs (awaiting END SELECT/CASE)
-'11=SELECT CASE int64 (awaiting END SELECT/CASE)
-'12=SELECT CASE uint64 (awaiting END SELECT/CASE)
-'13=SELECT CASE LONG double (awaiting END SELECT/CASE/CASE ELSE)
-'14=SELECT CASE float ...
-'15=SELECT CASE double
-'16=SELECT CASE int32
-'17=SELECT CASE uint32
-'18=CASE (awaiting END SELECT/CASE/CASE ELSE)
-'19=CASE ELSE (awaiting END SELECT)
-'32=SUB/FUNCTION (awaiting END SUB/FUNCTION)
-DIM controlid(1000) AS LONG
-DIM controlvalue(1000) AS LONG
-DIM controlstate(1000) AS INTEGER
-DIM SHARED controlref(1000) AS LONG 'the line number the control was created on
-
-
-
-
-
-ON ERROR GOTO qberror
-
-i2&& = 1
-FOR i&& = 1 TO 64
- bitmask(i&&) = i2&&
- bitmaskinv(i&&) = NOT i2&&
- i2&& = i2&& + 2 ^ i&&
-NEXT
-
-DIM id2 AS idstruct
-
-cleanupstringprocessingcall$ = "qbs_cleanup(qbs_tmp_base,"
-
-DIM SHARED sfidlist(1000) AS LONG
-DIM SHARED sfarglist(1000) AS INTEGER
-DIM SHARED sfelelist(1000) AS INTEGER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-'----------------ripgl.bas--------------------------------------------------------------------------------
-gl_scan_header
-'----------------ripgl.bas--------------------------------------------------------------------------------
-
-
-
-
-
-
-
-'-----------------------QB64 COMPILER ONCE ONLY SETUP CODE ENDS HERE---------------------------------------
-
-IF NoIDEMode THEN IDE_AutoPosition = 0: GOTO noide
-DIM FileDropEnabled AS _BYTE
-IF FileDropEnabled = 0 THEN FileDropEnabled = -1: _ACCEPTFILEDROP
-
-IF IDE_AutoPosition AND NOT IDE_BypassAutoPosition THEN _SCREENMOVE IDE_LeftPosition, IDE_TopPosition
-idemode = 1
-sendc$ = "" 'no initial message
-IF CMDLineFile <> "" THEN sendc$ = CHR$(1) + CMDLineFile
-sendcommand:
-idecommand$ = sendc$
-C = ide(0)
-ideerror = 0
-IF C = 0 THEN idemode = 0: GOTO noide
-c$ = idereturn$
-
-IF C = 2 THEN 'begin
- ideerrorline = 0 'addresses invalid prepass error line numbers being reported
- idepass = 1
- GOTO fullrecompile
- ideret1:
- wholeline$ = c$
- GOTO ideprepass
- ideret2:
- IF lastLineReturn THEN GOTO lastLineReturn
- sendc$ = CHR$(3) 'request next line
- GOTO sendcommand
-END IF
-
-IF C = 4 THEN 'next line
- IF idepass = 1 THEN
- wholeline$ = c$
- GOTO ideprepass
- '(returns to ideret2: above)
- END IF
- 'assume idepass>1
- a3$ = c$
- continuelinefrom = 0
- GOTO ide4
- ideret4:
- IF lastLineReturn THEN GOTO lastLineReturn
- sendc$ = CHR$(3) 'request next line
- GOTO sendcommand
-END IF
-
-IF C = 5 THEN 'end of program reached
-
- lastLine = 1
- lastLineReturn = 1
- IF idepass = 1 THEN
- wholeline$ = ""
- GOTO ideprepass
- '(returns to ideret2: above, then to lastLinePrepassReturn below)
- END IF
- 'idepass>1
- a3$ = ""
- continuelinefrom = 0
- GOTO ide4 'returns to ideret4, then to lastLinePrepassReturn below
- lastLineReturn:
- lastLineReturn = 0
- lastLine = 0
-
- IF idepass = 1 THEN
- 'prepass complete
- idepass = 2
- GOTO ide3
- ideret3:
- sendc$ = CHR$(7) 'repass request
- firstLine = 1
- GOTO sendcommand
- END IF
- 'assume idepass=2
- 'finalize program
- GOTO ide5
- ideret5: 'note: won't return here if a recompile was required!
- sendc$ = CHR$(6) 'ready
- idecompiled = 0
- GOTO sendcommand
-END IF
-
-IF C = 9 THEN 'run
-
- IF idecompiled = 0 THEN 'exe needs to be compiled
- file$ = c$
-
- 'locate accessible file and truncate
- f$ = file$
-
- path.exe$ = ""
- IF SaveExeWithSource THEN
- IF LEN(ideprogname) THEN path.exe$ = idepath$ + pathsep$
- END IF
-
- i = 1
- nextexeindex:
- IF _FILEEXISTS(path.exe$ + file$ + extension$) THEN
- E = 0
- ON ERROR GOTO qberror_test
- KILL path.exe$ + file$ + extension$
- ON ERROR GOTO qberror
- IF E = 1 THEN
- i = i + 1
- file$ = f$ + "(" + str2$(i) + ")"
- GOTO nextexeindex
- END IF
- END IF
-
- 'inform IDE of name change if necessary (IDE will respond with message 9 and corrected name)
- IF i <> 1 THEN
- sendc$ = CHR$(12) + file$
- GOTO sendcommand
- END IF
-
- ideerrorline = 0 'addresses C++ comp. error's line number
- GOTO ide6
- ideret6:
- idecompiled = 1
- END IF
-
- IF iderunmode = 2 THEN
- sendc$ = CHR$(11) '.EXE file created
- GOTO sendcommand
- END IF
-
- 'execute program
-
-
-
-
- IF iderunmode = 1 THEN
- IF NoExeSaved THEN
- 'This is the section which deals with if the user selected to run the program without
- 'saving an EXE file to the disk.
- 'We start off by first running the EXE, and then we delete it from the drive.
- 'making it a temporary file when all is said and done.
- IF os$ = "WIN" THEN
- SHELL QuotedFilename$(CHR$(34) + lastBinaryGenerated$ + CHR$(34)) + ModifyCOMMAND$ 'run the newly created program
- SHELL _HIDE _DONTWAIT "del " + QuotedFilename$(CHR$(34) + lastBinaryGenerated$ + CHR$(34)) 'kill it
- END IF
- IF path.exe$ = "" THEN path.exe$ = "./"
- IF os$ = "LNX" THEN
- IF LEFT$(lastBinaryGenerated$, LEN(path.exe$)) = path.exe$ THEN
- SHELL QuotedFilename$(lastBinaryGenerated$) + ModifyCOMMAND$
- KILL lastBinaryGenerated$
- ELSE
- SHELL QuotedFilename$(path.exe$ + lastBinaryGenerated$) + ModifyCOMMAND$
- KILL path.exe$ + lastBinaryGenerated$
- END IF
- END IF
- IF path.exe$ = "./" THEN path.exe$ = ""
- NoExeSaved = 0 'reset the flag for a temp EXE
- sendc$ = CHR$(6) 'ready
- GOTO sendcommand
- END IF
-
-
-
- IF os$ = "WIN" THEN SHELL _DONTWAIT QuotedFilename$(CHR$(34) + lastBinaryGenerated$ + CHR$(34)) + ModifyCOMMAND$
- IF path.exe$ = "" THEN path.exe$ = "./"
- IF os$ = "LNX" THEN
- IF LEFT$(lastBinaryGenerated$, LEN(path.exe$)) = path.exe$ THEN
- SHELL _DONTWAIT QuotedFilename$(lastBinaryGenerated$) + ModifyCOMMAND$
- ELSE
- SHELL _DONTWAIT QuotedFilename$(path.exe$ + lastBinaryGenerated$) + ModifyCOMMAND$
- END IF
- END IF
- IF path.exe$ = "./" THEN path.exe$ = ""
- ELSE
- IF os$ = "WIN" THEN SHELL QuotedFilename$(CHR$(34) + lastBinaryGenerated$ + CHR$(34)) + ModifyCOMMAND$
- IF path.exe$ = "" THEN path.exe$ = "./"
- IF os$ = "LNX" THEN
- IF LEFT$(lastBinaryGenerated$, LEN(path.exe$)) = path.exe$ THEN
- SHELL QuotedFilename$(lastBinaryGenerated$) + ModifyCOMMAND$
- ELSE
- SHELL QuotedFilename$(path.exe$ + lastBinaryGenerated$) + ModifyCOMMAND$
- END IF
- END IF
- IF path.exe$ = "./" THEN path.exe$ = ""
- DO: LOOP UNTIL INKEY$ = ""
- DO: LOOP UNTIL _KEYHIT = 0
- END IF
-
- IF idemode THEN
- 'Darken fg/bg colors
- dummy = DarkenFGBG(0)
- END IF
-
- IF vWatchOn THEN
- sendc$ = CHR$(254) 'launch debug interface
- ELSE
- sendc$ = CHR$(6) 'ready
- END IF
- GOTO sendcommand
-END IF
-
-PRINT "Invalid IDE message": END
-
-ideerror:
-IF INSTR(idemessage$, sp$) THEN
- 'Something went wrong here, so let's give a generic error message to the user.
- '(No error message should contain sp$ - that is, CHR$(13), when not in Debug mode)
- terrmsg$ = _ERRORMESSAGE$
- IF terrmsg$ = "No error" THEN terrmsg$ = "Internal error"
- idemessage$ = "Compiler error (check for syntax errors) (" + terrmsg$ + ":"
- IF ERR THEN idemessage$ = idemessage$ + str2$(ERR) + "-"
- IF _ERRORLINE THEN idemessage$ = idemessage$ + str2$(_ERRORLINE)
- IF _INCLERRORLINE THEN idemessage$ = idemessage$ + "-" + _INCLERRORFILE$ + "-" + str2$(_INCLERRORLINE)
- idemessage$ = idemessage$ + ")"
- IF inclevel > 0 THEN idemessage$ = idemessage$ + incerror$
-END IF
-
-sendc$ = CHR$(8) + idemessage$ + MKL$(ideerrorline)
-GOTO sendcommand
-
-
-noide:
-IF (qb64versionprinted = 0 OR ConsoleMode = 0) AND NOT QuietMode THEN
- qb64versionprinted = -1
- PRINT "QB64 Compiler V" + Version$
-END IF
-
-IF CMDLineFile = "" THEN
- LINE INPUT ; "COMPILE (.bas)>", f$
-ELSE
- f$ = CMDLineFile
-END IF
-
-f$ = LTRIM$(RTRIM$(f$))
-
-IF FileHasExtension(f$) = 0 THEN f$ = f$ + ".bas"
-
-sourcefile$ = f$
-CMDLineFile = sourcefile$
-'derive name from sourcefile
-f$ = RemoveFileExtension$(f$)
-
-path.exe$ = ""
-currentdir$ = _CWD$
-path.source$ = getfilepath$(sourcefile$)
-IF LEN(path.source$) THEN
- IF _DIREXISTS(path.source$) = 0 THEN
- PRINT
- PRINT "Cannot locate source file: " + sourcefile$
- IF ConsoleMode THEN SYSTEM 1
- END 1
- END IF
- CHDIR path.source$
- path.source$ = _CWD$
- IF RIGHT$(path.source$, 1) <> pathsep$ THEN path.source$ = path.source$ + pathsep$
- CHDIR currentdir$
-END IF
-IF SaveExeWithSource THEN path.exe$ = path.source$
-
-FOR x = LEN(f$) TO 1 STEP -1
- a$ = MID$(f$, x, 1)
- IF a$ = "/" OR a$ = "\" THEN
- f$ = RIGHT$(f$, LEN(f$) - x)
- EXIT FOR
- END IF
-NEXT
-file$ = f$
-
-'if cmemlist(currentid+1)<>0 before calling regid the variable
-'MUST be defined in cmem!
-
-fullrecompile:
-
-BU_DEPENDENCY_CONSOLE_ONLY = DEPENDENCY(DEPENDENCY_CONSOLE_ONLY)
-FOR i = 1 TO UBOUND(DEPENDENCY): DEPENDENCY(i) = 0: NEXT
-DEPENDENCY(DEPENDENCY_CONSOLE_ONLY) = BU_DEPENDENCY_CONSOLE_ONLY AND 2 'Restore -g switch if used
-
-Error_Happened = 0
-
-FOR closeall = 1 TO 255: CLOSE closeall: NEXT
-
-OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26 'relock
-
-fh = FREEFILE: OPEN tmpdir$ + "dyninfo.txt" FOR OUTPUT AS #fh: CLOSE #fh
-
-IF Debug THEN CLOSE #9: OPEN tmpdir$ + "debug.txt" FOR OUTPUT AS #9
-
-FOR i = 1 TO ids_max + 1
- arrayelementslist(i) = 0
- cmemlist(i) = 0
- sfcmemargs(i) = ""
-NEXT
-
-'erase cmemlist
-'erase sfcmemargs
-
-lastunresolved = -1 'first pass
-sflistn = -1 'no entries
-
-SubNameLabels = sp 'QB64 will perform a repass to resolve sub names used as labels
-
-vWatchDesiredState = 0
-vWatchRecompileAttempts = 0
-
-qb64prefix_set_desiredState = 0
-qb64prefix_set_recompileAttempts = 0
-
-opex_desiredState = 0
-opex_recompileAttempts = 0
-
-opexarray_desiredState = 0
-opexarray_recompileAttempts = 0
-
-recompile:
-vWatchOn = vWatchDesiredState
-vWatchVariable "", -1 'reset internal variables list
-
-qb64prefix_set = qb64prefix_set_desiredState
-qb64prefix$ = "_"
-
-optionexplicit = opex_desiredState
-IF optionexplicit_cmd = -1 AND NoIDEMode = 1 THEN optionexplicit = -1
-optionexplicitarray = opexarray_desiredState
-
-lastLineReturn = 0
-lastLine = 0
-firstLine = 1
-
-Resize = 0
-Resize_Scale = 0
-
-UseGL = 0
-
-Error_Happened = 0
-
-HashClear 'clear the hash table
-
-'add reserved words to hashtable
-
-f = HASHFLAG_TYPE + HASHFLAG_RESERVED
-HashAdd "_UNSIGNED", f, 0
-HashAdd "_BIT", f, 0
-HashAdd "_BYTE", f, 0
-HashAdd "INTEGER", f, 0
-HashAdd "LONG", f, 0
-HashAdd "_INTEGER64", f, 0
-HashAdd "_OFFSET", f, 0
-HashAdd "SINGLE", f, 0
-HashAdd "DOUBLE", f, 0
-HashAdd "_FLOAT", f, 0
-HashAdd "STRING", f, 0
-HashAdd "ANY", f, 0
-
-f = HASHFLAG_OPERATOR + HASHFLAG_RESERVED
-HashAdd "NOT", f, 0
-HashAdd "IMP", f, 0
-HashAdd "EQV", f, 0
-HashAdd "AND", f, 0
-HashAdd "OR", f, 0
-HashAdd "XOR", f, 0
-HashAdd "MOD", f, 0
-
-f = HASHFLAG_RESERVED + HASHFLAG_CUSTOMSYNTAX
-HashAdd "LIST", f, 0
-HashAdd "BASE", f, 0
-HashAdd "_EXPLICIT", f, 0
-HashAdd "AS", f, 0
-HashAdd "IS", f, 0
-HashAdd "OFF", f, 0
-HashAdd "ON", f, 0
-HashAdd "STOP", f, 0
-HashAdd "TO", f, 0
-HashAdd "USING", f, 0
-'PUT(graphics) statement:
-HashAdd "PRESET", f, 0
-HashAdd "PSET", f, 0
-'OPEN statement:
-HashAdd "FOR", f, 0
-HashAdd "OUTPUT", f, 0
-HashAdd "RANDOM", f, 0
-HashAdd "BINARY", f, 0
-HashAdd "APPEND", f, 0
-HashAdd "SHARED", f, 0
-HashAdd "ACCESS", f, 0
-HashAdd "LOCK", f, 0
-HashAdd "READ", f, 0
-HashAdd "WRITE", f, 0
-'LINE statement:
-HashAdd "STEP", f, 0
-'WIDTH statement:
-HashAdd "LPRINT", f, 0
-'VIEW statement:
-HashAdd "PRINT", f, 0
-
-f = HASHFLAG_RESERVED + HASHFLAG_XELEMENTNAME + HASHFLAG_XTYPENAME
-'A
-'B
-'C
-HashAdd "COMMON", f, 0
-HashAdd "CALL", f, 0
-HashAdd "CASE", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "COM", f, 0 '(ON...)
-HashAdd "CONST", f, 0
-'D
-HashAdd "DATA", f, 0
-HashAdd "DECLARE", f, 0
-HashAdd "DEF", f, 0
-HashAdd "DEFDBL", f, 0
-HashAdd "DEFINT", f, 0
-HashAdd "DEFLNG", f, 0
-HashAdd "DEFSNG", f, 0
-HashAdd "DEFSTR", f, 0
-HashAdd "DIM", f, 0
-HashAdd "DO", f - HASHFLAG_XELEMENTNAME, 0
-'E
-HashAdd "ERROR", f - HASHFLAG_XELEMENTNAME, 0 '(ON ...)
-HashAdd "ELSE", f, 0
-HashAdd "ELSEIF", f, 0
-HashAdd "ENDIF", f, 0
-HashAdd "EXIT", f - HASHFLAG_XELEMENTNAME, 0
-'F
-HashAdd "FIELD", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "FUNCTION", f, 0
-'G
-HashAdd "GOSUB", f, 0
-HashAdd "GOTO", f, 0
-'H
-'I
-HashAdd "INPUT", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0 '(INPUT$ function exists, so conflicts if allowed as custom syntax)
-HashAdd "IF", f, 0
-'K
-HashAdd "KEY", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0 '(ON...)
-'L
-HashAdd "LET", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "LOOP", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "LEN", f - HASHFLAG_XELEMENTNAME, 0 '(LEN function exists, so conflicts if allowed as custom syntax)
-'M
-'N
-HashAdd "NEXT", f - HASHFLAG_XELEMENTNAME, 0
-'O
-'P
-HashAdd "PLAY", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0 '(ON...)
-HashAdd "PEN", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0 '(ON...)
-'Q
-'R
-HashAdd "REDIM", f, 0
-HashAdd "REM", f, 0
-HashAdd "RESTORE", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "RESUME", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "RETURN", f - HASHFLAG_XELEMENTNAME, 0
-HashAdd "RUN", f - HASHFLAG_XELEMENTNAME, 0
-'S
-HashAdd "STATIC", f, 0
-HashAdd "STRIG", f, 0 '(ON...)
-HashAdd "SEG", f, 0
-HashAdd "SELECT", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0
-HashAdd "SUB", f, 0
-HashAdd "SCREEN", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0
-'T
-HashAdd "THEN", f, 0
-HashAdd "TIMER", f - HASHFLAG_XELEMENTNAME - HASHFLAG_XTYPENAME, 0 '(ON...)
-HashAdd "TYPE", f - HASHFLAG_XELEMENTNAME, 0
-'U
-HashAdd "UNTIL", f, 0
-HashAdd "UEVENT", f, 0
-'V
-'W
-HashAdd "WEND", f, 0
-HashAdd "WHILE", f, 0
-'X
-'Y
-'Z
-
-
-
-
-
-
-
-'clear/init variables
-Console = 0
-ScreenHide = 0
-Asserts = 0
-ResolveStaticFunctions = 0
-dynamiclibrary = 0
-dimsfarray = 0
-dimstatic = 0
-AllowLocalName = 0
-PossibleSubNameLabels = sp 'QB64 will perform a repass to resolve sub names used as labels
-use_global_byte_elements = 0
-dimshared = 0: dimmethod = 0: dimoption = 0: redimoption = 0: commonoption = 0
-mylib$ = "": mylibopt$ = ""
-declaringlibrary = 0
-nLabels = 0
-dynscope = 0
-elsefollowup = 0
-ontimerid = 0: onkeyid = 0: onstrigid = 0
-commonarraylist = "": commonarraylistn = 0
-staticarraylist = "": staticarraylistn = 0
-fooindwel = 0
-layout = ""
-layoutok = 0
-NoChecks = 0
-inclevel = 0
-errorLineInInclude = 0
-addmetainclude$ = ""
-nextrunlineindex = 1
-lasttype = 0
-lasttypeelement = 0
-REDIM SHARED udtxname(1000) AS STRING * 256
-REDIM SHARED udtxcname(1000) AS STRING * 256
-REDIM SHARED udtxsize(1000) AS LONG
-REDIM SHARED udtxbytealign(1000) AS INTEGER 'first element MUST be on a byte alignment & size is a multiple of 8
-REDIM SHARED udtxnext(1000) AS LONG
-REDIM SHARED udtxvariable(1000) AS INTEGER 'true if the udt contains variable length elements
-'elements
-REDIM SHARED udtename(1000) AS STRING * 256
-REDIM SHARED udtecname(1000) AS STRING * 256
-REDIM SHARED udtebytealign(1000) AS INTEGER
-REDIM SHARED udtesize(1000) AS LONG
-REDIM SHARED udtetype(1000) AS LONG
-REDIM SHARED udtetypesize(1000) AS LONG
-REDIM SHARED udtearrayelements(1000) AS LONG
-REDIM SHARED udtenext(1000) AS LONG
-definingtype = 0
-definingtypeerror = 0
-constlast = -1
-'constlastshared = -1
-defdatahandle = 18
-closedmain = 0
-addmetastatic = 0
-addmetadynamic = 0
-DynamicMode = 0
-optionbase = 0
-ExeIconSet = 0
-VersionInfoSet = 0
-viFileVersionNum$ = "": viProductVersionNum$ = "": viCompanyName$ = ""
-viFileDescription$ = "": viFileVersion$ = "": viInternalName$ = ""
-viLegalCopyright$ = "": viLegalTrademarks$ = "": viOriginalFilename$ = ""
-viProductName$ = "": viProductVersion$ = "": viComments$ = "": viWeb$ = ""
-DataOffset = 0
-statementn = 0
-everycasenewcase = 0
-qberrorhappened = 0: qberrorcode = 0: qberrorline = 0
-FOR i = 1 TO 27: defineaz(i) = "SINGLE": defineextaz(i) = "!": NEXT
-controllevel = 0
-findidsecondarg$ = "": findanotherid = 0: findidinternal = 0: currentid = 0
-linenumber = 0
-wholeline$ = ""
-linefragment$ = ""
-idn = 0
-arrayprocessinghappened = 0
-stringprocessinghappened = 0
-inputfunctioncalled = 0
-subfuncn = 0
-closedsubfunc = 0
-subfunc = ""
-SelectCaseCounter = 0
-ExecCounter = 0
-UserDefineCount = 7
-totalVariablesCreated = 0
-typeDefinitions$ = ""
-totalMainVariablesCreated = 0
-REDIM SHARED usedVariableList(1000) AS usedVarList
-totalWarnings = 0
-duplicateConstWarning = 0
-emptySCWarning = 0
-warningListItems = 0
-lastWarningHeader = ""
-vWatchUsedLabels = SPACE$(1000)
-vWatchUsedSkipLabels = SPACE$(1000)
-firstLineNumberLabelvWatch = 0
-REDIM SHARED warning$(1000)
-REDIM SHARED warningLines(1000) AS LONG
-REDIM SHARED warningIncLines(1000) AS LONG
-REDIM SHARED warningIncFiles(1000) AS STRING
-maxLineNumber = 0
-uniquenumbern = 0
-
-
-''create a type for storing memory blocks
-''UDT
-''names
-'DIM SHARED lasttype AS LONG
-'DIM SHARED udtxname(1000) AS STRING * 256
-'DIM SHARED udtxcname(1000) AS STRING * 256
-'DIM SHARED udtxsize(1000) AS LONG
-'DIM SHARED udtxbytealign(1000) AS INTEGER 'first element MUST be on a byte alignment & size is a multiple of 8
-'DIM SHARED udtxnext(1000) AS LONG
-''elements
-'DIM SHARED lasttypeelement AS LONG
-'DIM SHARED udtename(1000) AS STRING * 256
-'DIM SHARED udtecname(1000) AS STRING * 256
-'DIM SHARED udtebytealign(1000) AS INTEGER
-'DIM SHARED udtesize(1000) AS LONG
-'DIM SHARED udtetype(1000) AS LONG
-'DIM SHARED udtetypesize(1000) AS LONG
-'DIM SHARED udtearrayelements(1000) AS LONG
-'DIM SHARED udtenext(1000) AS LONG
-
-'import _MEM type
-ptrsz = OS_BITS \ 8
-
-lasttype = lasttype + 1: i = lasttype
-udtxname(i) = "_MEM"
-udtxcname(i) = "_MEM"
-udtxsize(i) = ((ptrsz) * 5 + (4) * 2 + (8) * 1) * 8
-udtxbytealign(i) = 1
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "OFFSET"
-udtecname(i2) = "OFFSET"
-udtebytealign(i2) = 1
-udtetype(i2) = OFFSETTYPE: udtesize(i2) = ptrsz * 8
-udtetypesize(i2) = 0 'tsize
-udtxnext(i) = i2
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "SIZE"
-udtecname(i2) = "SIZE"
-udtebytealign(i2) = 1
-udtetype(i2) = OFFSETTYPE: udtesize(i2) = ptrsz * 8
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "$_LOCK_ID"
-udtecname(i2) = "$_LOCK_ID"
-udtebytealign(i2) = 1
-udtetype(i2) = INTEGER64TYPE: udtesize(i2) = 64
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "$_LOCK_OFFSET"
-udtecname(i2) = "$_LOCK_OFFSET"
-udtebytealign(i2) = 1
-udtetype(i2) = OFFSETTYPE: udtesize(i2) = ptrsz * 8
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "TYPE"
-udtecname(i2) = "TYPE"
-udtebytealign(i2) = 1
-udtetype(i2) = OFFSETTYPE: udtesize(i2) = ptrsz * 8
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "ELEMENTSIZE"
-udtecname(i2) = "ELEMENTSIZE"
-udtebytealign(i2) = 1
-udtetype(i2) = OFFSETTYPE: udtesize(i2) = ptrsz * 8
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-udtenext(i2) = 0
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "IMAGE"
-udtecname(i2) = "IMAGE"
-udtebytealign(i2) = 1
-udtetype(i2) = LONGTYPE: udtesize(i2) = 32
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-udtenext(i2) = 0
-i3 = i2
-lasttypeelement = lasttypeelement + 1: i2 = lasttypeelement
-udtename(i2) = "SOUND"
-udtecname(i2) = "SOUND"
-udtebytealign(i2) = 1
-udtetype(i2) = LONGTYPE: udtesize(i2) = 32
-udtetypesize(i2) = 0 'tsize
-udtenext(i3) = i2
-udtenext(i2) = 0
-
-
-
-
-
-
-
-
-
-
-'begin compilation
-FOR closeall = 1 TO 255: CLOSE closeall: NEXT
-OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26 'relock
-
-ff = FREEFILE: OPEN tmpdir$ + "icon.rc" FOR OUTPUT AS #ff: CLOSE #ff
-
-IF Debug THEN CLOSE #9: OPEN tmpdir$ + "debug.txt" FOR APPEND AS #9
-
-IF idemode = 0 THEN
- qberrorhappened = -1
- OPEN sourcefile$ FOR INPUT AS #1
- qberrorhappened1:
- IF qberrorhappened = 1 THEN
- PRINT
- PRINT "Cannot locate source file: " + sourcefile$
- IF ConsoleMode THEN SYSTEM 1
- END 1
- ELSE
- CLOSE #1
- END IF
- qberrorhappened = 0
-END IF
-
-reginternal
-
-IF qb64prefix_set THEN
- qb64prefix$ = ""
-
- 're-add internal keywords without the "_" prefix
- reginternal
-
- f = HASHFLAG_TYPE + HASHFLAG_RESERVED
- HashAdd "UNSIGNED", f, 0
- HashAdd "BIT", f, 0
- HashAdd "BYTE", f, 0
- HashAdd "INTEGER64", f, 0
- HashAdd "OFFSET", f, 0
- HashAdd "FLOAT", f, 0
-
- f = HASHFLAG_RESERVED + HASHFLAG_CUSTOMSYNTAX
- HashAdd "EXPLICIT", f, 0
-END IF
-
-OPEN tmpdir$ + "global.txt" FOR OUTPUT AS #18
-
-IF iderecompile THEN
- iderecompile = 0
- idepass = 1 'prepass must be done again
- sendc$ = CHR$(7) 'repass request
- GOTO sendcommand
-END IF
-
-IF idemode THEN GOTO ideret1
-
-IF NOT QuietMode THEN
- PRINT
- PRINT "Beginning C++ output from QB64 code... "
-END IF
-
-lineinput3load sourcefile$
-
-DO
-
- '### STEVE EDIT FOR CONST EXPANSION 10/11/2013
-
- wholeline$ = lineinput3$
- IF wholeline$ = CHR$(13) THEN EXIT DO
-
- ideprepass:
- prepassLastLine:
-
- IF lastLine <> 0 OR firstLine <> 0 THEN
- lineBackup$ = wholeline$ 'backup the real line (will be blank when lastline is set)
- forceIncludeFromRoot$ = ""
- IF vWatchOn THEN
- addingvWatch = 1
- IF firstLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch.bi"
- IF lastLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch.bm"
- ELSE
- 'IF firstLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch_stub.bi"
- IF lastLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch_stub.bm"
- END IF
- firstLine = 0: lastLine = 0
- IF LEN(forceIncludeFromRoot$) THEN GOTO forceInclude_prepass
- forceIncludeCompleted_prepass:
- addingvWatch = 0
- wholeline$ = lineBackup$
- END IF
-
- wholestv$ = wholeline$ '### STEVE EDIT FOR CONST EXPANSION 10/11/2013
-
- prepass = 1
- layout = ""
- layoutok = 0
-
- linenumber = linenumber + 1
- reallinenumber = reallinenumber + 1
-
- DO UNTIL linenumber < UBOUND(InValidLine) 'color information flag for each line
- REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BYTE
- LOOP
- InValidLine(linenumber) = 0
-
- IF LEN(wholeline$) THEN
-
- IF UCASE$(_TRIM$(wholeline$)) = "$NOPREFIX" THEN
- qb64prefix_set_desiredState = 1
- IF qb64prefix_set = 0 THEN
- IF qb64prefix_set_recompileAttempts = 0 THEN
- qb64prefix_set_recompileAttempts = qb64prefix_set_recompileAttempts + 1
- GOTO do_recompile
- END IF
- END IF
- END IF
-
- wholeline$ = lineformat(wholeline$)
- IF Error_Happened THEN GOTO errmes
-
-
- temp$ = LTRIM$(RTRIM$(UCASE$(wholestv$)))
-
- IF temp$ = "$COLOR:0" THEN
- IF qb64prefix_set THEN
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color0_noprefix.bi"
- ELSE
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color0.bi"
- END IF
- GOTO finishedlinepp
- END IF
-
- IF temp$ = "$COLOR:32" THEN
- IF qb64prefix_set THEN
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color32_noprefix.bi"
- ELSE
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color32.bi"
- END IF
- GOTO finishedlinepp
- END IF
-
- IF temp$ = "$DEBUG" THEN
- vWatchDesiredState = 1
- IF vWatchOn = 0 THEN
- IF vWatchRecompileAttempts = 0 THEN
- 'this is the first time a conflict has occurred, so react immediately with a full recompilation using the desired state
- vWatchRecompileAttempts = vWatchRecompileAttempts + 1
- GOTO do_recompile
- ELSE
- 'continue compilation to retrieve the final state requested and act on that as required
- END IF
- END IF
- END IF
-
- IF LEFT$(temp$, 4) = "$IF " THEN
- IF RIGHT$(temp$, 5) <> " THEN" THEN a$ = "$IF without THEN": GOTO errmes
- temp$ = LTRIM$(MID$(temp$, 4)) 'strip off the $IF and extra spaces
- temp$ = RTRIM$(LEFT$(temp$, LEN(temp$) - 4)) 'and strip off the THEN and extra spaces
- temp = INSTR(temp$, "=")
- ExecCounter = ExecCounter + 1
- ExecLevel(ExecCounter) = -1 'default to a skip value
- DefineElse(ExecCounter) = 1 '1 says we have an $IF statement at this level
- result = EvalPreIF(temp$, a$)
- IF a$ <> "" THEN GOTO errmes
- IF result <> 0 THEN
- ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above
- IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found
- END IF
- GOTO finishedlinepp 'and then we're finished -- and at this point we didn't make a match so we exit with a DONT READ type flag on our code.
- END IF
-
- IF temp$ = "$ELSE" THEN
- IF DefineElse(ExecCounter) = 0 THEN a$ = "$ELSE without $IF": GOTO errmes
- IF DefineElse(ExecCounter) AND 2 THEN a$ = "$IF block already has $ELSE statement in it": GOTO errmes
- DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 2 'set the flag to declare an $ELSE already in this block
- IF DefineElse(ExecCounter) AND 4 THEN 'If we executed code in a previous IF or ELSE IF statement, we can't do it here
- ExecLevel(ExecCounter) = -1 'So we inherit the execlevel from above
- ELSE
- ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'If we were processing code before, code after this segment is going to be SKIPPED
- END IF
- GOTO finishedlinepp
- END IF
-
- IF LEFT$(temp$, 5) = "$ELSE" THEN 'looking for $ELSE IF
- temp$ = LTRIM$(MID$(temp$, 6))
- IF LEFT$(temp$, 3) = "IF " THEN
- IF DefineElse(ExecCounter) = 0 THEN a$ = "$ELSE IF without $IF": GOTO errmes
- IF DefineElse(ExecCounter) AND 2 THEN a$ = "$ELSE IF cannot follow $ELSE": GOTO errmes
- IF RIGHT$(temp$, 5) <> " THEN" THEN a$ = "$ELSE IF without THEN": GOTO errmes
- IF DefineElse(ExecCounter) AND 4 THEN 'If we executed code in a previous IF or ELSE IF statement, we can't do it here
- ExecLevel(ExecCounter) = -1
- GOTO finishedlinepp
- END IF
- temp$ = LTRIM$(MID$(temp$, 3)) 'strip off the IF and extra spaces
- temp$ = RTRIM$(LEFT$(temp$, LEN(temp$) - 4)) 'and strip off the THEN and extra spaces
- result = EvalPreIF(temp$, a$)
- IF a$ <> "" THEN GOTO errmes
- IF result <> 0 THEN
- ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above
- IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found
- END IF
- GOTO finishedlinepp 'and then we're finished -- and at this point we didn't make a match so we exit with a DONT READ type flag on our code.
- END IF
- END IF
-
- IF temp$ = "$END IF" OR temp$ = "$ENDIF" THEN
- IF DefineElse(ExecCounter) = 0 THEN a$ = "$END IF without $IF": GOTO errmes
- DefineElse(ExecCounter) = 0 'We no longer have an $IF block at this level
- ExecCounter = ExecCounter - 1
- GOTO finishedlinepp
- END IF
-
- IF ExecLevel(ExecCounter) THEN
- DO UNTIL linenumber < UBOUND(InValidLine)
- REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BYTE
- LOOP
-
- InValidLine(linenumber) = -1
- GOTO finishedlinepp 'we don't check for anything inside lines that we've marked for skipping
- END IF
-
- IF LEFT$(temp$, 7) = "$ERROR " THEN
- temp$ = LTRIM$(MID$(temp$, 7))
- a$ = "Compilation check failed: " + temp$
- GOTO errmes
- END IF
-
- IF LEFT$(temp$, 5) = "$LET " THEN
- temp$ = LTRIM$(MID$(temp$, 5)) 'simply shorten our string to parse
- 'For starters, let's make certain that we have 3 elements to deal with
- temp = INSTR(temp$, "=") 'without an = in there, we can't get a value from the left and right side
- IF temp = 0 THEN a$ = "Invalid Syntax. $LET = ": GOTO errmes
- l$ = RTRIM$(LEFT$(temp$, temp - 1)): r$ = LTRIM$(MID$(temp$, temp + 1))
- 'then validate to make certain the left side looks proper
- IF validname(l$) = 0 THEN a$ = "Invalid flag name": GOTO errmes
- IF LEFT$(r$, 1) = CHR$(34) THEN r$ = LTRIM$(MID$(r$, 2))
- IF RIGHT$(r$, 1) = CHR$(34) THEN r$ = RTRIM$(LEFT$(r$, LEN(r$) - 1))
- IF LEFT$(r$, 1) = "-" THEN
- r1$ = "-"
- r$ = LTRIM$(MID$(r$, 2))
- ELSE
- r1$ = ""
- END IF
- 'then validate to make certain the left side looks proper
- FOR i = 1 TO LEN(r$)
- a = ASC(r$, i)
- SELECT CASE a
- CASE 32
- CASE 46 'periods are fine.
- r1$ = r1$ + "."
- CASE IS < 48, IS > 90
- a$ = "Invalid value": GOTO errmes
- CASE ELSE
- r1$ = r1$ + CHR$(a)
- END SELECT
- NEXT
- r$ = r1$
- 'First look to see if we have an existing setting like this and if so, update it
- FOR i = 8 TO UserDefineCount 'UserDefineCount 1-7 are reserved for automatic OS/BIT detection & version
- IF UserDefine(0, i) = l$ THEN UserDefine(1, i) = r$: GOTO finishedlinepp
- NEXT
- 'Otherwise create a new setting and set the initial value for it
- UserDefineCount = UserDefineCount + 1
- IF UserDefineCount > UBOUND(UserDefine, 2) THEN
- REDIM _PRESERVE UserDefine(1, UBOUND(UserDefine, 2) + 10) 'Add another 10 elements to the array so it'll expand as the user adds to it
- END IF
- UserDefine(0, UserDefineCount) = l$
- UserDefine(1, UserDefineCount) = r$
- GOTO finishedlinepp
- END IF
-
-
- cwholeline$ = wholeline$
- wholeline$ = eleucase$(wholeline$) '********REMOVE THIS LINE LATER********
-
-
- addmetadynamic = 0: addmetastatic = 0
- wholelinen = numelements(wholeline$)
-
- IF wholelinen THEN
-
- wholelinei = 1
-
- 'skip line number?
- e$ = getelement$(wholeline$, 1)
- IF (ASC(e$) >= 48 AND ASC(e$) <= 59) OR ASC(e$) = 46 THEN wholelinei = 2: GOTO ppskpl
-
- 'skip 'POSSIBLE' line label?
- IF wholelinen >= 2 THEN
- x2 = INSTR(wholeline$, sp + ":" + sp): x3 = x2 + 2
- IF x2 = 0 THEN
- IF RIGHT$(wholeline$, 2) = sp + ":" THEN x2 = LEN(wholeline$) - 1: x3 = x2 + 1
- END IF
-
- IF x2 THEN
- e$ = LEFT$(wholeline$, x2 - 1)
- IF validlabel(e$) THEN
- wholeline$ = RIGHT$(wholeline$, LEN(wholeline$) - x3)
- cwholeline$ = RIGHT$(cwholeline$, LEN(wholeline$) - x3)
- wholelinen = numelements(wholeline$)
- GOTO ppskpl
- END IF 'valid
- END IF 'includes ":"
- END IF 'wholelinen>=2
-
- ppskpl:
- IF wholelinei <= wholelinen THEN
- '----------------------------------------
- a$ = ""
- ca$ = ""
- ppblda:
- e$ = getelement$(wholeline$, wholelinei)
- ce$ = getelement$(cwholeline$, wholelinei)
- IF e$ = ":" OR e$ = "ELSE" OR e$ = "THEN" OR e$ = "" THEN
- IF LEN(a$) THEN
- IF Debug THEN PRINT #9, "PP[" + a$ + "]"
- n = numelements(a$)
- firstelement$ = getelement(a$, 1)
- secondelement$ = getelement(a$, 2)
- thirdelement$ = getelement(a$, 3)
- '========================================
-
- IF n = 2 AND firstelement$ = "END" AND (secondelement$ = "SUB" OR secondelement$ = "FUNCTION") THEN
- closedsubfunc = -1
- END IF
-
- 'declare library
- IF declaringlibrary THEN
-
- IF firstelement$ = "END" THEN
- IF n <> 2 OR secondelement$ <> "DECLARE" THEN a$ = "Expected END DECLARE": GOTO errmes
- declaringlibrary = 0
- GOTO finishedlinepp
- END IF 'end declare
-
- declaringlibrary = 2
-
- IF firstelement$ = "SUB" OR firstelement$ = "FUNCTION" THEN subfuncn = subfuncn - 1: GOTO declaresubfunc
-
- a$ = "Expected SUB/FUNCTION definition or END DECLARE (#2)": GOTO errmes
- END IF
-
- 'UDT TYPE definition
- IF definingtype THEN
- i = definingtype
-
- IF n >= 1 THEN
- IF firstelement$ = "END" THEN
- IF n <> 2 OR secondelement$ <> "TYPE" THEN a$ = "Expected END TYPE": GOTO errmes
- IF udtxnext(i) = 0 THEN a$ = "No elements defined in TYPE": GOTO errmes
- definingtype = 0
-
- 'create global buffer for SWAP space
- siz$ = str2$(udtxsize(i) \ 8)
- PRINT #18, "char *g_tmp_udt_" + RTRIM$(udtxname(i)) + "=(char*)malloc(" + siz$ + ");"
-
- 'print "END TYPE";udtxsize(i);udtxbytealign(i)
- GOTO finishedlinepp
- END IF
- END IF
-
- IF n < 3 THEN a$ = "Expected element-name AS type, AS type element-list, or END TYPE": GOTO errmes
- n$ = firstelement$
-
- IF n$ <> "AS" THEN
- 'traditional variable-name AS type syntax, single-element
- lasttypeelement = lasttypeelement + 1
- i2 = lasttypeelement
- WHILE i2 > UBOUND(udtenext): increaseUDTArrays: WEND
- udtenext(i2) = 0
-
- ii = 2
-
- udtearrayelements(i2) = 0
-
- IF ii >= n OR getelement$(a$, ii) <> "AS" THEN a$ = "Expected element-name AS type, AS type element-list, or END TYPE": GOTO errmes
- t$ = getelements$(a$, ii + 1, n)
-
- IF t$ = RTRIM$(udtxname(definingtype)) THEN a$ = "Invalid self-reference": GOTO errmes
- typ = typname2typ(t$)
- IF Error_Happened THEN GOTO errmes
- IF typ = 0 THEN a$ = "Undefined type": GOTO errmes
- typsize = typname2typsize
-
- IF validname(n$) = 0 THEN a$ = "Invalid name": GOTO errmes
- udtename(i2) = n$
- udtecname(i2) = getelement$(ca$, 1)
- NormalTypeBlock:
- typeDefinitions$ = typeDefinitions$ + MKL$(i2) + MKL$(LEN(n$)) + n$
- udtetype(i2) = typ
- udtetypesize(i2) = typsize
-
- hashname$ = n$
-
- 'check for name conflicts (any similar reserved or element from current UDT)
- hashchkflags = HASHFLAG_RESERVED + HASHFLAG_UDTELEMENT
- hashres = HashFind(hashname$, hashchkflags, hashresflags, hashresref)
- DO WHILE hashres
- IF hashresflags AND HASHFLAG_UDTELEMENT THEN
- IF hashresref = i THEN a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- END IF
- IF hashresflags AND HASHFLAG_RESERVED THEN
- IF hashresflags AND (HASHFLAG_TYPE + HASHFLAG_CUSTOMSYNTAX + HASHFLAG_OPERATOR + HASHFLAG_XELEMENTNAME) THEN a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- END IF
- IF hashres <> 1 THEN hashres = HashFindCont(hashresflags, hashresref) ELSE hashres = 0
- LOOP
- 'add to hash table
- HashAdd hashname$, HASHFLAG_UDTELEMENT, i
-
- 'Calculate element's size
- IF typ AND ISUDT THEN
- u = typ AND 511
- udtesize(i2) = udtxsize(u)
- IF udtxbytealign(u) THEN udtxbytealign(i) = 1: udtebytealign(i2) = 1
- IF udtxvariable(u) THEN udtxvariable(i) = -1
- ELSE
- IF (typ AND ISSTRING) THEN
- IF (typ AND ISFIXEDLENGTH) = 0 THEN
- udtesize(i2) = OFFSETTYPE AND 511
- udtxvariable(i) = -1
- ELSE
- udtesize(i2) = typsize * 8
- END IF
- udtxbytealign(i) = 1: udtebytealign(i2) = 1
- ELSE
- udtesize(i2) = typ AND 511
- IF (typ AND ISOFFSETINBITS) = 0 THEN udtxbytealign(i) = 1: udtebytealign(i2) = 1
- END IF
- END IF
-
- 'Increase block size
- IF udtebytealign(i2) THEN
- IF udtxsize(i) MOD 8 THEN
- udtxsize(i) = udtxsize(i) + (8 - (udtxsize(i) MOD 8))
- END IF
- END IF
- udtxsize(i) = udtxsize(i) + udtesize(i2)
-
- 'Link element to previous element
- IF udtxnext(i) = 0 THEN
- udtxnext(i) = i2
- ELSE
- udtenext(i2 - 1) = i2
- END IF
-
- 'print "+"+rtrim$(udtename(i2));udtetype(i2);udtesize(i2);udtebytealign(i2);udtxsize(i)
- IF newAsTypeBlockSyntax THEN RETURN
- GOTO finishedlinepp
- ELSE
- 'new AS type variable-list syntax, multiple elements
- ii = 2
-
- IF ii >= n THEN a$ = "Expected element-name AS type, AS type element-list, or END TYPE": GOTO errmes
- previousElement$ = ""
- t$ = ""
- lastElement$ = ""
- buildTypeName:
- lastElement$ = getelement$(a$, ii)
- IF lastElement$ <> "," AND lastElement$ <> "" THEN
- n$ = lastElement$
- cn$ = getelement$(ca$, ii)
- IF LEN(previousElement$) THEN t$ = t$ + previousElement$ + " "
- previousElement$ = n$
- lastElement$ = ""
- ii = ii + 1
- GOTO buildTypeName
- END IF
-
- t$ = RTRIM$(t$)
- IF t$ = RTRIM$(udtxname(definingtype)) THEN a$ = "Invalid self-reference": GOTO errmes
- typ = typname2typ(t$)
- IF Error_Happened THEN GOTO errmes
- IF typ = 0 THEN a$ = "Undefined type": GOTO errmes
- typsize = typname2typsize
-
- previousElement$ = lastElement$
- nexttypeelement:
- lasttypeelement = lasttypeelement + 1
- i2 = lasttypeelement
- WHILE i2 > UBOUND(udtenext): increaseUDTArrays: WEND
- udtenext(i2) = 0
- udtearrayelements(i2) = 0
-
- udtename(i2) = n$
- udtecname(i2) = cn$
-
- IF validname(n$) = 0 THEN a$ = "Invalid name": GOTO errmes
-
- newAsTypeBlockSyntax = -1
- GOSUB NormalTypeBlock
- newAsTypeBlockSyntax = 0
-
- getNextElement:
- ii = ii + 1
- lastElement$ = getelement$(a$, ii)
- IF lastElement$ = "" THEN GOTO finishedlinepp
- IF ii = n AND lastElement$ = "," THEN a$ = "Expected element-name": GOTO errmes
- IF lastElement$ = "," THEN
- IF previousElement$ = "," THEN a$ = "Expected element-name": GOTO errmes
- previousElement$ = lastElement$
- GOTO getNextElement
- END IF
- n$ = lastElement$
- IF previousElement$ <> "," THEN a$ = "Expected ,": GOTO errmes
- previousElement$ = lastElement$
- cn$ = getelement$(ca$, ii)
- GOTO nexttypeelement
- END IF
- END IF 'definingtype
-
- IF definingtype AND n >= 1 THEN a$ = "Expected END TYPE": GOTO errmes
-
- IF n >= 1 THEN
- IF firstelement$ = "TYPE" THEN
- IF n <> 2 THEN a$ = "Expected TYPE typename": GOTO errmes
- lasttype = lasttype + 1
- typeDefinitions$ = typeDefinitions$ + MKL$(-1) + MKL$(lasttype)
- definingtype = lasttype
- i = definingtype
- WHILE i > UBOUND(udtenext): increaseUDTArrays: WEND
- IF validname(secondelement$) = 0 THEN a$ = "Invalid name": GOTO errmes
- typeDefinitions$ = typeDefinitions$ + MKL$(LEN(secondelement$)) + secondelement$
- udtxname(i) = secondelement$
- udtxcname(i) = getelement(ca$, 2)
- udtxnext(i) = 0
- udtxsize(i) = 0
- udtxvariable(i) = 0
-
- hashname$ = secondelement$
- hashflags = HASHFLAG_UDT
- 'check for name conflicts (any similar reserved/sub/function/UDT name)
- hashchkflags = HASHFLAG_RESERVED + HASHFLAG_SUB + HASHFLAG_FUNCTION + HASHFLAG_UDT
- hashres = HashFind(hashname$, hashchkflags, hashresflags, hashresref)
- DO WHILE hashres
- allow = 0
- IF hashresflags AND (HASHFLAG_SUB + HASHFLAG_FUNCTION) THEN
- allow = 1
- END IF
- IF hashresflags AND HASHFLAG_RESERVED THEN
- IF (hashresflags AND (HASHFLAG_TYPE + HASHFLAG_OPERATOR + HASHFLAG_CUSTOMSYNTAX + HASHFLAG_XTYPENAME)) = 0 THEN allow = 1
- END IF
- IF allow = 0 THEN a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- IF hashres <> 1 THEN hashres = HashFindCont(hashresflags, hashresref) ELSE hashres = 0
- LOOP
-
- 'add to hash table
- HashAdd hashname$, hashflags, i
-
- GOTO finishedlinepp
- END IF
- END IF
-
-
-
-
-
- IF n >= 1 AND firstelement$ = "CONST" THEN
- 'l$ = "CONST"
- 'DEF... do not change type, the expression is stored in a suitable type
- 'based on its value if type isn't forced/specified
-
- IF subfuncn > 0 AND closedsubfunc <> 0 THEN a$ = "Statement cannot be placed between SUB/FUNCTIONs": GOTO errmes
-
- 'convert periods to _046_
- i2 = INSTR(a$, sp + "." + sp)
- IF i2 THEN
- DO
- a$ = LEFT$(a$, i2 - 1) + fix046$ + RIGHT$(a$, LEN(a$) - i2 - 2)
- ca$ = LEFT$(ca$, i2 - 1) + fix046$ + RIGHT$(ca$, LEN(ca$) - i2 - 2)
- i2 = INSTR(a$, sp + "." + sp)
- LOOP UNTIL i2 = 0
- n = numelements(a$)
- firstelement$ = getelement(a$, 1): secondelement$ = getelement(a$, 2): thirdelement$ = getelement(a$, 3)
- END IF
-
- IF n < 3 THEN a$ = "Expected CONST name = value/expression": GOTO errmes
- i = 2
- constdefpendingpp:
- pending = 0
-
- n$ = getelement$(ca$, i): i = i + 1
- typeoverride = 0
- s$ = removesymbol$(n$)
- IF Error_Happened THEN GOTO errmes
- IF s$ <> "" THEN
- typeoverride = typname2typ(s$)
- IF Error_Happened THEN GOTO errmes
- IF typeoverride AND ISFIXEDLENGTH THEN a$ = "Invalid constant type": GOTO errmes
- IF typeoverride = 0 THEN a$ = "Invalid constant type": GOTO errmes
- END IF
-
- IF getelement$(a$, i) <> "=" THEN a$ = "Expected =": GOTO errmes
- i = i + 1
-
- 'get expression
- e$ = ""
- readable_e$ = ""
- B = 0
- FOR i2 = i TO n
- e2$ = getelement$(ca$, i2)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF e2$ = "," AND B = 0 THEN
- pending = 1
- i = i2 + 1
- IF i > n - 2 THEN a$ = "Expected CONST ... , name = value/expression": GOTO errmes
- EXIT FOR
- END IF
- IF LEN(e$) = 0 THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
-
- e3$ = e2$
- IF LEN(e2$) > 1 THEN
- IF ASC(e2$, 1) = 34 THEN
- removeComma = _INSTRREV(e2$, ",")
- e3$ = LEFT$(e2$, removeComma - 1)
- ELSE
- removeComma = INSTR(e2$, ",")
- e3$ = MID$(e2$, removeComma + 1)
- END IF
- END IF
-
- IF LEN(readable_e$) = 0 THEN
- readable_e$ = e3$
- ELSE
- readable_e$ = readable_e$ + " " + e3$
- END IF
- NEXT
-
- 'intercept current expression and pass it through Evaluate_Expression$
- '(unless it is a literal string)
- IF LEFT$(readable_e$, 1) <> CHR$(34) THEN
- temp1$ = _TRIM$(Evaluate_Expression$(readable_e$))
- IF LEFT$(temp1$, 5) <> "ERROR" AND e$ <> temp1$ THEN
- e$ = lineformat(temp1$) 'retrieve parseable format
- ELSE
- IF temp1$ = "ERROR - Division By Zero" THEN a$ = temp1$: GOTO errmes
- IF INSTR(temp1$, "Improper operations") THEN
- a$ = "Invalid CONST expression.14": GOTO errmes
- END IF
- END IF
- END IF
-
- 'Proceed as usual
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
-
- e$ = evaluateconst(e$, t)
- IF Error_Happened THEN GOTO errmes
-
- IF t AND ISSTRING THEN 'string type
-
- IF typeoverride THEN
- IF (typeoverride AND ISSTRING) = 0 THEN a$ = "Type mismatch": GOTO errmes
- END IF
-
- ELSE 'not a string type
-
- IF typeoverride THEN
- IF typeoverride AND ISSTRING THEN a$ = "Type mismatch": GOTO errmes
- END IF
-
- IF t AND ISFLOAT THEN
- constval## = _CV(_FLOAT, e$)
- constval&& = constval##
- constval~&& = constval&&
- ELSE
- IF (t AND ISUNSIGNED) AND (t AND 511) = 64 THEN
- constval~&& = _CV(_UNSIGNED _INTEGER64, e$)
- constval&& = constval~&&
- constval## = constval&&
- ELSE
- constval&& = _CV(_INTEGER64, e$)
- constval## = constval&&
- constval~&& = constval&&
- END IF
- END IF
-
- 'override type?
- IF typeoverride THEN
- 'range check required here (noted in todo)
- t = typeoverride
- END IF
-
- END IF 'not a string type
-
- constlast = constlast + 1
- IF constlast > constmax THEN
- constmax = constmax * 2
- REDIM _PRESERVE constname(constmax) AS STRING
- REDIM _PRESERVE constcname(constmax) AS STRING
- REDIM _PRESERVE constnamesymbol(constmax) AS STRING 'optional name symbol
- REDIM _PRESERVE consttype(constmax) AS LONG 'variable type number
- REDIM _PRESERVE constinteger(constmax) AS _INTEGER64
- REDIM _PRESERVE constuinteger(constmax) AS _UNSIGNED _INTEGER64
- REDIM _PRESERVE constfloat(constmax) AS _FLOAT
- REDIM _PRESERVE conststring(constmax) AS STRING
- REDIM _PRESERVE constsubfunc(constmax) AS LONG
- REDIM _PRESERVE constdefined(constmax) AS LONG
- END IF
-
- i2 = constlast
-
- constsubfunc(i2) = subfuncn
- 'IF subfunc = "" THEN constlastshared = i2
-
- IF validname(n$) = 0 THEN a$ = "Invalid name": GOTO errmes
- constname(i2) = UCASE$(n$)
-
- hashname$ = n$
- 'check for name conflicts (any similar: reserved, sub, function, constant)
-
- allow = 0
- const_recheck:
- hashchkflags = HASHFLAG_RESERVED + HASHFLAG_SUB + HASHFLAG_FUNCTION + HASHFLAG_CONSTANT
- hashres = HashFind(hashname$, hashchkflags, hashresflags, hashresref)
- DO WHILE hashres
- IF hashresflags AND HASHFLAG_CONSTANT THEN
- IF constsubfunc(hashresref) = subfuncn THEN
- 'If merely redefining a CONST with same value
- 'just issue a warning instead of an error
- issueWarning = 0
- IF t AND ISSTRING THEN
- IF conststring(hashresref) = e$ THEN issueWarning = -1: thisconstval$ = e$
- ELSE
- IF t AND ISFLOAT THEN
- IF constfloat(hashresref) = constval## THEN issueWarning = -1: thisconstval$ = STR$(constval##)
- ELSE
- IF t AND ISUNSIGNED THEN
- IF constuinteger(hashresref) = constval~&& THEN issueWarning = -1: thisconstval$ = STR$(constval~&&)
- ELSE
- IF constinteger(hashresref) = constval&& THEN issueWarning = -1: thisconstval$ = STR$(constval&&)
- END IF
- END IF
- END IF
- IF issueWarning THEN
- IF NOT IgnoreWarnings THEN
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "duplicate constant definition", n$ + " =" + thisconstval$
- END IF
- GOTO constAddDone
- ELSE
- a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- END IF
- END IF
- END IF
- IF hashresflags AND HASHFLAG_RESERVED THEN
- a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- END IF
- IF hashresflags AND (HASHFLAG_SUB + HASHFLAG_FUNCTION) THEN
- IF ids(hashresref).internal_subfunc = 0 OR RTRIM$(ids(hashresref).musthave) <> "$" THEN a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- IF t AND ISSTRING THEN a$ = "Name already in use (" + hashname$ + ")": GOTO errmes
- END IF
- IF hashres <> 1 THEN hashres = HashFindCont(hashresflags, hashresref) ELSE hashres = 0
- LOOP
-
- 'add to hash table
- HashAdd hashname$, HASHFLAG_CONSTANT, i2
-
-
-
-
-
- constdefined(i2) = 1
- constcname(i2) = n$
- constnamesymbol(i2) = typevalue2symbol$(t)
- IF Error_Happened THEN GOTO errmes
- consttype(i2) = t
- IF t AND ISSTRING THEN
- conststring(i2) = e$
- ELSE
- IF t AND ISFLOAT THEN
- constfloat(i2) = constval##
- ELSE
- IF t AND ISUNSIGNED THEN
- constuinteger(i2) = constval~&&
- ELSE
- constinteger(i2) = constval&&
- END IF
- END IF
- END IF
-
- constAddDone:
-
- IF pending THEN
- 'l$ = l$ + sp2 + ","
- GOTO constdefpendingpp
- END IF
-
- 'layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedlinepp
- END IF
-
-
-
- 'DEFINE
- d = 0
- IF firstelement$ = "DEFINT" THEN d = 1
- IF firstelement$ = "DEFLNG" THEN d = 1
- IF firstelement$ = "DEFSNG" THEN d = 1
- IF firstelement$ = "DEFDBL" THEN d = 1
- IF firstelement$ = "DEFSTR" THEN d = 1
- IF firstelement$ = "_DEFINE" OR (firstelement$ = "DEFINE" AND qb64prefix_set = 1) THEN d = 1
- IF d THEN
- predefining = 1: GOTO predefine
- predefined: predefining = 0
- GOTO finishedlinepp
- END IF
-
- 'declare library
- IF firstelement$ = "DECLARE" THEN
- IF secondelement$ = "LIBRARY" OR secondelement$ = "DYNAMIC" OR secondelement$ = "CUSTOMTYPE" OR secondelement$ = "STATIC" THEN
- declaringlibrary = 1
- indirectlibrary = 0
- IF secondelement$ = "CUSTOMTYPE" OR secondelement$ = "DYNAMIC" THEN indirectlibrary = 1
- GOTO finishedlinepp
- END IF
- END IF
-
- 'SUB/FUNCTION
- dynamiclibrary = 0
- declaresubfunc:
- firstelement$ = getelement$(a$, 1)
- sf = 0
- IF firstelement$ = "FUNCTION" THEN sf = 1
- IF firstelement$ = "SUB" THEN sf = 2
- IF sf THEN
-
- subfuncn = subfuncn + 1
- closedsubfunc = 0
-
- IF n = 1 THEN a$ = "Expected name after SUB/FUNCTION": GOTO errmes
-
- 'convert periods to _046_
- i2 = INSTR(a$, sp + "." + sp)
- IF i2 THEN
- DO
- a$ = LEFT$(a$, i2 - 1) + fix046$ + RIGHT$(a$, LEN(a$) - i2 - 2)
- ca$ = LEFT$(ca$, i2 - 1) + fix046$ + RIGHT$(ca$, LEN(ca$) - i2 - 2)
- i2 = INSTR(a$, sp + "." + sp)
- LOOP UNTIL i2 = 0
- n = numelements(a$)
- firstelement$ = getelement(a$, 1): secondelement$ = getelement(a$, 2): thirdelement$ = getelement(a$, 3)
- END IF
-
- n$ = getelement$(ca$, 2)
- symbol$ = removesymbol$(n$)
- IF Error_Happened THEN GOTO errmes
- IF sf = 2 AND symbol$ <> "" THEN a$ = "Type symbols after a SUB name are invalid": GOTO errmes
-
- 'remove STATIC (which is ignored)
- e$ = getelement$(a$, n): IF e$ = "STATIC" THEN a$ = LEFT$(a$, LEN(a$) - 7): ca$ = LEFT$(ca$, LEN(ca$) - 7): n = n - 1
-
- 'check for ALIAS
- aliasname$ = n$ 'use given name by default
- IF n > 2 THEN
- e$ = getelement$(a$, 3)
- IF e$ = "ALIAS" THEN
- IF declaringlibrary = 0 THEN a$ = "ALIAS can only be used with DECLARE LIBRARY": GOTO errmes
- IF n = 3 THEN a$ = "Expected ALIAS name-in-library": GOTO errmes
- e$ = getelement$(ca$, 4)
- 'strip string content (optional)
- IF LEFT$(e$, 1) = CHR$(34) THEN
- e$ = RIGHT$(e$, LEN(e$) - 1)
- x = INSTR(e$, CHR$(34)): IF x = 0 THEN a$ = "Expected " + CHR$(34): GOTO errmes
- e$ = LEFT$(e$, x - 1)
- END IF
- 'strip fix046$ (created by unquoted periods)
- DO WHILE INSTR(e$, fix046$)
- x = INSTR(e$, fix046$): e$ = LEFT$(e$, x - 1) + "." + RIGHT$(e$, LEN(e$) - x + 1 - LEN(fix046$))
- LOOP
- 'validate alias name
- IF LEN(e$) = 0 THEN a$ = "Expected ALIAS name-in-library": GOTO errmes
- FOR x = 1 TO LEN(e$)
- a = ASC(e$, x)
- IF alphanumeric(a) = 0 AND a <> ASC_FULLSTOP AND a <> ASC_COLON THEN a$ = "Expected ALIAS name-in-library": GOTO errmes
- NEXT
- aliasname$ = e$
- 'remove ALIAS section from line
- IF n <= 4 THEN a$ = getelements(a$, 1, 2)
- IF n >= 5 THEN a$ = getelements(a$, 1, 2) + sp + getelements(a$, 5, n)
- IF n <= 4 THEN ca$ = getelements(ca$, 1, 2)
- IF n >= 5 THEN ca$ = getelements(ca$, 1, 2) + sp + getelements(ca$, 5, n)
- n = n - 2
- END IF
- END IF
-
- IF declaringlibrary THEN
- IF indirectlibrary THEN
- aliasname$ = n$ 'override the alias name
- END IF
- END IF
-
- params = 0
- params$ = ""
- paramsize$ = ""
- nele$ = ""
- nelereq$ = ""
- IF n > 2 THEN
- e$ = getelement$(a$, 3)
- IF e$ <> "(" THEN a$ = "Expected (": GOTO errmes
- e$ = getelement$(a$, n)
- IF e$ <> ")" THEN a$ = "Expected )": GOTO errmes
- IF n < 4 THEN a$ = "Expected ( ... )": GOTO errmes
- IF n = 4 THEN GOTO nosfparams
- B = 0
- a2$ = ""
- FOR i = 4 TO n - 1
- e$ = getelement$(a$, i)
- IF e$ = "(" THEN B = B + 1
- IF e$ = ")" THEN B = B - 1
- IF e$ = "," AND B = 0 THEN
- IF i = n - 1 THEN a$ = "Expected , ... )": GOTO errmes
- getlastparam:
- IF a2$ = "" THEN a$ = "Expected ... ,": GOTO errmes
- a2$ = LEFT$(a2$, LEN(a2$) - 1)
- 'possible format: [BYVAL]a[%][(1)][AS][type]
- n2 = numelements(a2$)
- array = 0
- t2$ = ""
-
- i2 = 1
- e$ = getelement$(a2$, i2): i2 = i2 + 1
-
- byvalue = 0
- IF e$ = "BYVAL" THEN
- IF declaringlibrary = 0 THEN a$ = "BYVAL can currently only be used with DECLARE LIBRARY": GOTO errmes
- e$ = getelement$(a2$, i2): i2 = i2 + 1: byvalue = 1
- END IF
-
- n2$ = e$
- symbol2$ = removesymbol$(n2$)
- IF validname(n2$) = 0 THEN a$ = "Invalid name": GOTO errmes
-
- IF Error_Happened THEN GOTO errmes
- m = 0
- FOR i2 = i2 TO n2
- e$ = getelement$(a2$, i2)
- IF e$ = "(" THEN
- IF m <> 0 THEN a$ = "Syntax error - too many opening brackets": GOTO errmes
- m = 1
- array = 1
- GOTO gotaa
- END IF
- IF e$ = ")" THEN
- IF m <> 1 THEN a$ = "Syntax error - closing bracket without opening bracket": GOTO errmes
- m = 2
- GOTO gotaa
- END IF
- IF e$ = "AS" THEN
- IF m <> 0 AND m <> 2 THEN a$ = "Syntax error - check your brackets": GOTO errmes
- m = 3
- GOTO gotaa
- END IF
- IF m = 1 THEN GOTO gotaa 'ignore contents of bracket
- IF m <> 3 THEN a$ = "Syntax error - check your brackets": GOTO errmes
- IF t2$ = "" THEN t2$ = e$ ELSE t2$ = t2$ + " " + e$
- gotaa:
- NEXT i2
-
- params = params + 1: IF params > 100 THEN a$ = "SUB/FUNCTION exceeds 100 parameter limit": GOTO errmes
-
- argnelereq = 0
-
- IF symbol2$ <> "" AND t2$ <> "" THEN a$ = "Syntax error - check parameter types": GOTO errmes
- IF t2$ = "" AND e$ = "AS" THEN a$ = "Expected AS type": GOTO errmes
- IF t2$ = "" THEN t2$ = symbol2$
- IF t2$ = "" THEN
- IF LEFT$(n2$, 1) = "_" THEN v = 27 ELSE v = ASC(UCASE$(n2$)) - 64
- t2$ = defineaz(v)
- END IF
-
- paramsize = 0
- IF array = 1 THEN
- t = typname2typ(t2$)
- IF Error_Happened THEN GOTO errmes
- IF t = 0 THEN a$ = "Illegal SUB/FUNCTION parameter": GOTO errmes
- IF (t AND ISFIXEDLENGTH) THEN paramsize = typname2typsize
- t = t + ISARRAY
- 'check for recompilation override
- FOR i10 = 0 TO sflistn
- IF sfidlist(i10) = idn + 1 THEN
- IF sfarglist(i10) = params THEN
- argnelereq = sfelelist(i10)
- END IF
- END IF
- NEXT
- ELSE
- t = typname2typ(t2$)
- IF Error_Happened THEN GOTO errmes
- IF t = 0 THEN a$ = "Illegal SUB/FUNCTION parameter": GOTO errmes
- IF (t AND ISFIXEDLENGTH) THEN paramsize = typname2typsize
-
- IF byvalue THEN
- IF t AND ISPOINTER THEN t = t - ISPOINTER
- END IF
-
- END IF
- nelereq$ = nelereq$ + CHR$(argnelereq)
-
- 'consider changing 0 in following line too!
- nele$ = nele$ + CHR$(0)
-
- paramsize$ = paramsize$ + MKL$(paramsize)
- params$ = params$ + MKL$(t)
- a2$ = ""
- ELSE
- a2$ = a2$ + e$ + sp
- IF i = n - 1 THEN GOTO getlastparam
- END IF
- NEXT i
- END IF 'n>2
- nosfparams:
-
- IF sf = 1 THEN
- 'function
- clearid
- id.n = n$
- id.subfunc = 1
-
- id.callname = "FUNC_" + UCASE$(n$)
- IF declaringlibrary THEN
- id.ccall = 1
- IF indirectlibrary = 0 THEN id.callname = aliasname$
- END IF
- id.args = params
- id.arg = params$
- id.argsize = paramsize$
- id.nele = nele$
- id.nelereq = nelereq$
- IF symbol$ <> "" THEN
- id.ret = typname2typ(symbol$)
- IF Error_Happened THEN GOTO errmes
- ELSE
- IF LEFT$(n$, 1) = "_" THEN v = 27 ELSE v = ASC(UCASE$(n$)) - 64
- symbol$ = defineaz(v)
- id.ret = typname2typ(symbol$)
- IF Error_Happened THEN GOTO errmes
- END IF
- IF id.ret = 0 THEN a$ = "Invalid FUNCTION return type": GOTO errmes
-
- IF declaringlibrary THEN
-
- ctype$ = typ2ctyp$(id.ret, "")
- IF Error_Happened THEN GOTO errmes
- IF ctype$ = "qbs" THEN ctype$ = "char*"
- id.callname = "( " + ctype$ + " )" + RTRIM$(id.callname)
-
- END IF
-
- s$ = LEFT$(symbol$, 1)
- IF s$ <> "~" AND s$ <> "`" AND s$ <> "%" AND s$ <> "&" AND s$ <> "!" AND s$ <> "#" AND s$ <> "$" THEN
- symbol$ = type2symbol$(symbol$)
- IF Error_Happened THEN GOTO errmes
- END IF
- id.mayhave = symbol$
- IF id.ret AND ISPOINTER THEN
- IF (id.ret AND ISSTRING) = 0 THEN id.ret = id.ret - ISPOINTER
- END IF
- regid
- IF Error_Happened THEN GOTO errmes
- ELSE
- 'sub
- clearid
- id.n = n$
- id.subfunc = 2
- id.callname = "SUB_" + UCASE$(n$)
- IF declaringlibrary THEN
- id.ccall = 1
- IF indirectlibrary = 0 THEN id.callname = aliasname$
- END IF
- id.args = params
- id.arg = params$
- id.argsize = paramsize$
- id.nele = nele$
- id.nelereq = nelereq$
-
- IF UCASE$(n$) = "_GL" AND params = 0 AND UseGL = 0 THEN reginternalsubfunc = 1: UseGL = 1: id.n = "_GL": DEPENDENCY(DEPENDENCY_GL) = 1
- regid
- reginternalsubfunc = 0
-
- IF Error_Happened THEN GOTO errmes
- END IF
-
-
- END IF
-
- '========================================
- finishedlinepp:
- firstLine = 0
- END IF
- a$ = ""
- ca$ = ""
- ELSE
- IF a$ = "" THEN a$ = e$: ca$ = ce$ ELSE a$ = a$ + sp + e$: ca$ = ca$ + sp + ce$
- END IF
- IF wholelinei <= wholelinen THEN wholelinei = wholelinei + 1: GOTO ppblda
- '----------------------------------------
- END IF 'wholelinei<=wholelinen
- END IF 'wholelinen
- END IF 'len(wholeline$)
-
- 'Include Manager #1
-
-
-
- IF LEN(addmetainclude$) THEN
- IF Debug THEN PRINT #9, "Pre-pass:INCLUDE$-ing file:'" + addmetainclude$ + "':On line"; linenumber
- a$ = addmetainclude$: addmetainclude$ = "" 'read/clear message
-
- IF inclevel = 0 THEN
- includingFromRoot = 0
- forceIncludingFile = 0
- forceInclude_prepass:
- IF forceIncludeFromRoot$ <> "" THEN
- a$ = forceIncludeFromRoot$
- forceIncludeFromRoot$ = ""
- forceIncludingFile = 1
- includingFromRoot = 1
- END IF
- END IF
-
- IF inclevel = 100 THEN a$ = "Too many indwelling INCLUDE files": GOTO errmes
- '1. Verify file exists (location is either (a)relative to source file or (b)absolute)
- fh = 99 + inclevel + 1
-
- firstTryMethod = 1
- IF includingFromRoot <> 0 AND inclevel = 0 THEN firstTryMethod = 2
- FOR try = firstTryMethod TO 2 'if including file from root, do not attempt including from relative location
- IF try = 1 THEN
- IF inclevel = 0 THEN
- IF idemode THEN p$ = idepath$ + pathsep$ ELSE p$ = getfilepath$(sourcefile$)
- ELSE
- p$ = getfilepath$(incname(inclevel))
- END IF
- f$ = p$ + a$
- END IF
- IF try = 2 THEN f$ = a$
- IF _FILEEXISTS(f$) THEN
- qberrorhappened = -3
- 'We're using the faster LINE INPUT, which requires a BINARY open.
- OPEN f$ FOR BINARY AS #fh
- 'And another line below edited
- qberrorhappened3:
- IF qberrorhappened = -3 THEN EXIT FOR
- END IF
- qberrorhappened = 0
- NEXT
- IF qberrorhappened <> -3 THEN qberrorhappened = 0: a$ = "File " + a$ + " not found": GOTO errmes
- inclevel = inclevel + 1: incname$(inclevel) = f$: inclinenumber(inclevel) = 0
- END IF 'fall through to next section...
- '--------------------
- DO WHILE inclevel
-
- fh = 99 + inclevel
- '2. Feed next line
- IF EOF(fh) = 0 THEN
- LINE INPUT #fh, x$
-
- wholeline$ = x$
- inclinenumber(inclevel) = inclinenumber(inclevel) + 1
- 'create extended error string 'incerror$'
- errorLineInInclude = inclinenumber(inclevel)
- e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
- IF inclevel > 1 THEN
- e$ = e$ + " (through "
- FOR x = 1 TO inclevel - 1 STEP 1
- e$ = e$ + incname$(x)
- IF x < inclevel - 1 THEN 'a sep is req
- IF x = inclevel - 2 THEN
- e$ = e$ + " then "
- ELSE
- e$ = e$ + ", "
- END IF
- END IF
- NEXT
- e$ = e$ + ")"
- END IF
- incerror$ = e$
- linenumber = linenumber - 1 'lower official linenumber to counter later increment
-
- IF Debug THEN PRINT #9, "Pre-pass:Feeding INCLUDE$ line:[" + wholeline$ + "]"
-
- IF idemode THEN sendc$ = CHR$(10) + wholeline$: GOTO sendcommand 'passback
- GOTO ideprepass
- END IF
- '3. Close & return control
- CLOSE #fh
- inclevel = inclevel - 1
- IF forceIncludingFile = 1 AND inclevel = 0 THEN
- forceIncludingFile = 0
- GOTO forceIncludeCompleted_prepass
- END IF
- LOOP
- '(end manager)
-
- IF idemode THEN GOTO ideret2
-LOOP
-
-'add final line
-IF lastLineReturn = 0 THEN
- lastLineReturn = 1
- lastLine = 1
- wholeline$ = ""
- GOTO prepassLastLine
-END IF
-
-IF definingtype THEN definingtype = 0 'ignore this error so that auto-formatting can be performed and catch it again later
-IF declaringlibrary THEN declaringlibrary = 0 'ignore this error so that auto-formatting can be performed and catch it again later
-
-totallinenumber = reallinenumber
-
-'IF idemode = 0 AND NOT QuietMode THEN PRINT "first pass finished.": PRINT "Translating code... "
-
-'prepass finished
-
-lineinput3index = 1 'reset input line
-
-'ide specific
-ide3:
-
-addmetainclude$ = "" 'reset stray meta-includes
-
-'reset altered variables
-DataOffset = 0
-inclevel = 0
-subfuncn = 0
-lastLineReturn = 0
-lastLine = 0
-firstLine = 1
-UserDefineCount = 7
-
-FOR i = 0 TO constlast: constdefined(i) = 0: NEXT 'undefine constants
-
-FOR i = 1 TO 27: defineaz(i) = "SINGLE": defineextaz(i) = "!": NEXT
-
-OPEN tmpdir$ + "data.bin" FOR OUTPUT AS #16: CLOSE #16
-OPEN tmpdir$ + "data.bin" FOR BINARY AS #16
-
-
-OPEN tmpdir$ + "main.txt" FOR OUTPUT AS #12
-OPEN tmpdir$ + "maindata.txt" FOR OUTPUT AS #13
-
-OPEN tmpdir$ + "regsf.txt" FOR OUTPUT AS #17
-
-OPEN tmpdir$ + "mainfree.txt" FOR OUTPUT AS #19
-OPEN tmpdir$ + "runline.txt" FOR OUTPUT AS #21
-
-OPEN tmpdir$ + "mainerr.txt" FOR OUTPUT AS #14 'main error handler
-'i. check the value of error_line
-'ii. jump to the appropriate label
-errorlabels = 0
-PRINT #14, "if (error_occurred){ error_occurred=0;"
-
-OPEN tmpdir$ + "chain.txt" FOR OUTPUT AS #22: CLOSE #22 'will be appended to as necessary
-OPEN tmpdir$ + "inpchain.txt" FOR OUTPUT AS #23: CLOSE #23 'will be appended to as necessary
-'*** #22 & #23 are reserved for usage by chain & inpchain ***
-
-OPEN tmpdir$ + "ontimer.txt" FOR OUTPUT AS #24
-OPEN tmpdir$ + "ontimerj.txt" FOR OUTPUT AS #25
-
-'*****#26 used for locking qb64
-
-OPEN tmpdir$ + "onkey.txt" FOR OUTPUT AS #27
-OPEN tmpdir$ + "onkeyj.txt" FOR OUTPUT AS #28
-
-OPEN tmpdir$ + "onstrig.txt" FOR OUTPUT AS #29
-OPEN tmpdir$ + "onstrigj.txt" FOR OUTPUT AS #30
-
-gosubid = 1
-'to be included whenever return without a label is called
-
-'return [label] in QBASIC was not possible in a sub/function, but QB64 will support this
-'special codes will represent special return conditions:
-'0=return from main to calling sub/function/proc by return [NULL];
-'1... a global number representing a return point after a gosub
-'note: RETURN [label] should fail if a "return [NULL];" type return is required
-OPEN tmpdir$ + "ret0.txt" FOR OUTPUT AS #15
-PRINT #15, "if (next_return_point){"
-PRINT #15, "next_return_point--;"
-PRINT #15, "switch(return_point[next_return_point]){"
-PRINT #15, "case 0:"
-
-PRINT #15, "return;"
-
-PRINT #15, "break;"
-
-continueline = 0
-endifs = 0
-lineelseused = 0
-continuelinefrom = 0
-linenumber = 0
-reallinenumber = 0
-declaringlibrary = 0
-
-PRINT #12, "S_0:;" 'note: REQUIRED by run statement
-
-IF UseGL THEN gl_include_content
-
-
-'ide specific
-IF idemode THEN GOTO ideret3
-
-DO
- ide4:
- includeline:
- mainpassLastLine:
-
- IF lastLine <> 0 OR firstLine <> 0 THEN
- lineBackup$ = a3$ 'backup the real first line (will be blank when lastline is set)
- forceIncludeFromRoot$ = ""
- IF vWatchOn THEN
- addingvWatch = 1
- IF firstLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch.bi"
- IF lastLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch.bm"
- ELSE
- 'IF firstLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch_stub.bi"
- IF lastLine <> 0 THEN forceIncludeFromRoot$ = "internal\support\vwatch\vwatch_stub.bm"
- END IF
- firstLine = 0: lastLine = 0
- IF LEN(forceIncludeFromRoot$) THEN GOTO forceInclude
- forceIncludeCompleted:
- addingvWatch = 0
- a3$ = lineBackup$
- END IF
-
- prepass = 0
-
- stringprocessinghappened = 0
-
- IF continuelinefrom THEN
- start = continuelinefrom
- continuelinefrom = 0
- GOTO contline
- END IF
-
- 'begin a new line
-
- impliedendif = 0
- THENGOTO = 0
- continueline = 0
- endifs = 0
- lineelseused = 0
- newif = 0
-
- 'apply metacommands from previous line
- IF addmetadynamic = 1 THEN addmetadynamic = 0: DynamicMode = 1
- IF addmetastatic = 1 THEN addmetastatic = 0: DynamicMode = 0
-
- 'a3$ is passed in idemode and when using $include
- IF idemode = 0 AND inclevel = 0 THEN a3$ = lineinput3$
- IF a3$ = CHR$(13) THEN EXIT DO
- linenumber = linenumber + 1
- reallinenumber = reallinenumber + 1
-
- IF InValidLine(linenumber) THEN
- layoutok = 1
- layout$ = SPACE$(controllevel + 1) + LTRIM$(RTRIM$(a3$))
- IF idemode GOTO ideret4 ELSE GOTO skipide4
- END IF
-
- layout = ""
- layoutok = 1
-
- IF idemode = 0 AND NOT QuietMode THEN
- 'IF LEN(a3$) THEN
- ' dotlinecount = dotlinecount + 1: IF dotlinecount >= 100 THEN dotlinecount = 0: PRINT ".";
- 'END IF
- maxprogresswidth = 50 'arbitrary
- percentage = INT(reallinenumber / totallinenumber * 100)
- percentagechars = INT(maxprogresswidth * reallinenumber / totallinenumber)
- IF percentage <> prevpercentage AND percentagechars <> prevpercentagechars THEN
- prevpercentage = percentage
- prevpercentagechars = percentagechars
- IF ConsoleMode THEN
- PRINT "[" + STRING$(percentagechars, ".") + SPACE$(maxprogresswidth - percentagechars) + "]" + STR$(percentage) + "%";
- IF os$ = "LNX" THEN
- PRINT CHR$(27) + "[A"
- ELSE
- PRINT CHR$(13);
- END IF
- ELSE
- LOCATE , 1
- PRINT STRING$(percentagechars, 219) + STRING$(maxprogresswidth - percentagechars, 176) + STR$(percentage) + "%";
- END IF
- END IF
- END IF
-
- a3$ = LTRIM$(RTRIM$(a3$))
- wholeline = a3$
-
- layoutoriginal$ = a3$
- layoutcomment$ = "" 'clear any previous layout comment
- lhscontrollevel = controllevel
-
- linefragment = "[INFORMATION UNAVAILABLE]"
- IF LEN(a3$) = 0 THEN GOTO finishednonexec
- IF Debug THEN PRINT #9, "########" + a3$ + "########"
-
- layoutdone = 1 'validates layout of any following goto finishednonexec/finishedline
-
- 'We've already figured out in the prepass which lines are invalidated by the precompiler
- 'No need to go over those lines again.
- 'IF InValidLine(linenumber) THEN goto skipide4 'layoutdone = 0: GOTO finishednonexec
-
- a3u$ = UCASE$(a3$)
-
- 'QB64 Metacommands
- IF ASC(a3$) = 36 THEN '$
-
- 'precompiler commands should always be executed FIRST.
- IF a3u$ = "$END IF" OR a3u$ = "$ENDIF" THEN
- IF DefineElse(ExecCounter) = 0 THEN a$ = "$END IF without $IF": GOTO errmes
- DefineElse(ExecCounter) = 0 'We no longer have an $IF block at this level
- ExecCounter = ExecCounter - 1
- layout$ = SCase$("$End If")
- controltype(controllevel) = 0
- controllevel = controllevel - 1
- GOTO finishednonexec
- END IF
-
- IF LEFT$(a3u$, 4) = "$IF " THEN
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
- temp$ = LTRIM$(MID$(a3u$, 4)) 'strip off the $IF and extra spaces
- temp$ = RTRIM$(LEFT$(temp$, LEN(temp$) - 4)) 'and strip off the THEN and extra spaces
- temp = 0
- IF temp = 0 THEN tempOp$ = "<=": temp = INSTR(temp$, tempOp$)
- IF temp = 0 THEN tempOp$ = "=<": temp = INSTR(temp$, tempOp$): tempOp$ = "<="
- IF temp = 0 THEN tempOp$ = ">=": temp = INSTR(temp$, tempOp$)
- IF temp = 0 THEN tempOp$ = "=>": temp = INSTR(temp$, tempOp$): tempOp$ = ">="
- IF temp = 0 THEN tempOp$ = "<>": temp = INSTR(temp$, tempOp$)
- IF temp = 0 THEN tempOp$ = "><": temp = INSTR(temp$, tempOp$): tempOp$ = "<>"
- IF temp = 0 THEN tempOp$ = "=": temp = INSTR(temp$, tempOp$)
- IF temp = 0 THEN tempOp$ = ">": temp = INSTR(temp$, tempOp$)
- IF temp = 0 THEN tempOp$ = "<": temp = INSTR(temp$, tempOp$)
-
- ExecCounter = ExecCounter + 1
- ExecLevel(ExecCounter) = -1 'default to a skip value
- DefineElse(ExecCounter) = 1 '1 says we have an $IF statement at this level
- result = EvalPreIF(temp$, a$)
- IF a$ <> "" THEN GOTO errmes
- IF result <> 0 THEN
- ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above
- IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found
- END IF
-
- controllevel = controllevel + 1
- controltype(controllevel) = 6
- IF temp = 0 THEN layout$ = SCase$("$If ") + temp$ + SCase$(" Then"): GOTO finishednonexec 'no = sign in the $IF statement, so we're going to assume the user is doing something like $IF flag
- l$ = RTRIM$(LEFT$(temp$, temp - 1)): r$ = LTRIM$(MID$(temp$, temp + LEN(tempOp$)))
- layout$ = SCase$("$If ") + l$ + " " + tempOp$ + " " + r$ + SCase$(" Then")
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$ELSE" THEN
- IF DefineElse(ExecCounter) = 0 THEN a$ = "$ELSE without $IF": GOTO errmes
- IF DefineElse(ExecCounter) AND 2 THEN a$ = "$IF block already has $ELSE statement in it": GOTO errmes
- DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 2 'set the flag to declare an $ELSE already in this block
- IF DefineElse(ExecCounter) AND 4 THEN 'If we executed code in a previous IF or ELSE IF statement, we can't do it here
- ExecLevel(ExecCounter) = -1 'So we inherit the execlevel from above
- ELSE
- ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'If we were processing code before, code after this segment is going to be SKIPPED
- END IF
- layout$ = SCase$("$Else")
- lhscontrollevel = lhscontrollevel - 1
- GOTO finishednonexec
- END IF
-
- IF LEFT$(a3u$, 5) = "$ELSE" THEN
- temp$ = LTRIM$(MID$(a3u$, 6))
- IF LEFT$(temp$, 3) = "IF " THEN
- IF DefineElse(ExecCounter) = 0 THEN a$ = "$ELSE IF without $IF": GOTO errmes
- IF DefineElse(ExecCounter) AND 2 THEN a$ = "$ELSE IF cannot follow $ELSE": GOTO errmes
- IF RIGHT$(temp$, 5) <> " THEN" THEN a$ = "$ELSE IF without THEN": GOTO errmes
- temp$ = LTRIM$(MID$(temp$, 3)) 'strip off the IF and extra spaces
- temp$ = RTRIM$(LEFT$(temp$, LEN(temp$) - 4)) 'and strip off the THEN and extra spaces
- IF DefineElse(ExecCounter) AND 4 THEN 'If we executed code in a previous IF or ELSE IF statement, we can't do it here
- ExecLevel(ExecCounter) = -1
- ELSE
- result = EvalPreIF(temp$, a$)
- IF a$ <> "" THEN GOTO errmes
- IF result <> 0 THEN
- ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above
- IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found
- END IF
- END IF
-
-
- lhscontrollevel = lhscontrollevel - 1
- temp = INSTR(temp$, "=")
- IF temp = 0 THEN layout$ = SCase$("$ElseIf ") + temp$ + SCase$(" Then"): GOTO finishednonexec 'no = sign in the $IF statement, so we're going to assume the user is doing something like $IF flag
- l$ = RTRIM$(LEFT$(temp$, temp - 1)): r$ = LTRIM$(MID$(temp$, temp + 1))
- layout$ = SCase$("$ElseIf ") + l$ + " = " + r$ + SCase$(" Then")
- GOTO finishednonexec
- END IF
- END IF
-
- IF ExecLevel(ExecCounter) THEN 'don't check for any more metacommands except the one's which worth with the precompiler
- layoutdone = 0
- GOTO finishednonexec 'we don't check for anything inside lines that we've marked for skipping
- END IF
-
- IF LEFT$(a3u$, 5) = "$LET " THEN
- temp$ = a3u$
- temp$ = LTRIM$(MID$(temp$, 5)) 'simply shorten our string to parse
- 'For starters, let's make certain that we have 3 elements to deal with
- temp = INSTR(temp$, "=") 'without an = in there, we can't get a value from the left and right side
- l$ = RTRIM$(LEFT$(temp$, temp - 1)): r$ = LTRIM$(MID$(temp$, temp + 1))
- layout$ = SCase$("$Let ") + l$ + " = " + r$
- 'First look to see if we have an existing setting like this and if so, update it
- FOR i = 7 TO UserDefineCount 'UserDefineCount 1-7 are reserved for automatic OS/BIT detection & version
- IF UserDefine(0, i) = l$ THEN UserDefine(1, i) = r$: GOTO finishednonexec
- NEXT
- 'Otherwise create a new setting and set the initial value for it
- UserDefineCount = UserDefineCount + 1
- IF UserDefineCount > UBOUND(UserDefine, 2) THEN
- REDIM _PRESERVE UserDefine(1, UBOUND(UserDefine, 2) + 10) 'Add another 10 elements to the array so it'll expand as the user adds to it
- END IF
- UserDefine(0, UserDefineCount) = l$
- UserDefine(1, UserDefineCount) = r$
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$COLOR:0" THEN
- layout$ = SCase$("$Color:0")
- IF qb64prefix_set THEN
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color0_noprefix.bi"
- ELSE
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color0.bi"
- END IF
- layoutdone = 1
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$COLOR:32" THEN
- layout$ = SCase$("$Color:32")
- IF qb64prefix_set THEN
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color32_noprefix.bi"
- ELSE
- addmetainclude$ = getfilepath$(COMMAND$(0)) + "internal" + pathsep$ + "support" + pathsep$ + "color" + pathsep$ + "color32.bi"
- END IF
- layoutdone = 1
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$NOPREFIX" THEN
- 'already set in prepass
- layout$ = SCase$("$NoPrefix")
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$VIRTUALKEYBOARD:ON" THEN
- 'Deprecated; does nothing.
- layout$ = SCase$("$VirtualKeyboard:On")
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature", "$VirtualKeyboard"
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$VIRTUALKEYBOARD:OFF" THEN
- 'Deprecated; does nothing.
- layout$ = SCase$("$VirtualKeyboard:Off")
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature", "$VirtualKeyboard"
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$DEBUG" THEN
- layout$ = SCase$("$Debug")
- IF NoIDEMode THEN
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "$Debug", "$Debug features only work from the IDE"
- END IF
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$CHECKING:OFF" THEN
- layout$ = SCase$("$Checking:Off")
- NoChecks = 1
- IF vWatchOn <> 0 AND NoIDEMode = 0 AND inclevel = 0 THEN
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "$Debug", "$Debug features won't work in $Checking:Off blocks"
- END IF
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$CHECKING:ON" THEN
- layout$ = SCase$("$Checking:On")
- NoChecks = 0
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$CONSOLE" THEN
- layout$ = SCase$("$Console")
- Console = 1
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$CONSOLE:ONLY" THEN
- layout$ = SCase$("$Console:Only")
- DEPENDENCY(DEPENDENCY_CONSOLE_ONLY) = DEPENDENCY(DEPENDENCY_CONSOLE_ONLY) OR 1
- Console = 1
- IF prepass = 0 THEN
- IF NoChecks = 0 THEN PRINT #12, "do{"
- PRINT #12, "sub__dest(func__console());"
- PRINT #12, "sub__source(func__console());"
- GOTO finishedline2
- ELSE
- GOTO finishednonexec
- END IF
- END IF
-
- IF a3u$ = "$ASSERTS" THEN
- layout$ = SCase$("$Asserts")
- Asserts = 1
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$ASSERTS:CONSOLE" THEN
- layout$ = SCase$("$Asserts:Console")
- Asserts = 1
- Console = 1
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$SCREENHIDE" THEN
- layout$ = SCase$("$ScreenHide")
- ScreenHide = 1
- GOTO finishednonexec
- END IF
- IF a3u$ = "$SCREENSHOW" THEN
- layout$ = SCase$("$ScreenShow")
- ScreenHide = 0
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$RESIZE:OFF" THEN
- layout$ = SCase$("$Resize:Off")
- Resize = 0: Resize_Scale = 0
- GOTO finishednonexec
- END IF
- IF a3u$ = "$RESIZE:ON" THEN
- layout$ = SCase$("$Resize:On")
- Resize = 1: Resize_Scale = 0
- GOTO finishednonexec
- END IF
-
- IF a3u$ = "$RESIZE:STRETCH" THEN
- layout$ = SCase$("$Resize:Stretch")
- Resize = 1: Resize_Scale = 1
- GOTO finishednonexec
- END IF
- IF a3u$ = "$RESIZE:SMOOTH" THEN
- layout$ = SCase$("$Resize:Smooth")
- Resize = 1: Resize_Scale = 2
- GOTO finishednonexec
- END IF
-
- IF LEFT$(a3u$, 12) = "$VERSIONINFO" THEN
- 'Embed version info into the final binary (Windows only)
- FirstDelimiter = INSTR(a3u$, ":")
- SecondDelimiter = INSTR(FirstDelimiter + 1, a3u$, "=")
- IF FirstDelimiter = 0 OR SecondDelimiter = 0 OR SecondDelimiter = FirstDelimiter + 1 THEN
- a$ = "Expected $VERSIONINFO:key=value": GOTO errmes
- END IF
-
- VersionInfoKey$ = LTRIM$(RTRIM$(MID$(a3u$, FirstDelimiter + 1, SecondDelimiter - FirstDelimiter - 1)))
- VersionInfoValue$ = StrReplace$(LTRIM$(RTRIM$(MID$(a3$, SecondDelimiter + 1))), CHR$(34), "'")
-
- SELECT CASE VersionInfoKey$
- CASE "FILEVERSION#"
- GOSUB ValidateVersion
- viFileVersionNum$ = VersionInfoValue$
- IF viFileVersion$ = "" THEN viFileVersion$ = viFileVersionNum$
- layout$ = SCase$("$VersionInfo:FILEVERSION#=") + VersionInfoValue$
- CASE "PRODUCTVERSION#"
- GOSUB ValidateVersion
- viProductVersionNum$ = VersionInfoValue$
- IF viProductVersion$ = "" THEN viProductVersion$ = viProductVersionNum$
- layout$ = SCase$("$VersionInfo:PRODUCTVERSION#=") + VersionInfoValue$
- CASE "COMPANYNAME"
- viCompanyName$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "CompanyName=" + VersionInfoValue$
- CASE "FILEDESCRIPTION"
- viFileDescription$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "FileDescription=" + VersionInfoValue$
- CASE "FILEVERSION"
- viFileVersion$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "FileVersion=" + VersionInfoValue$
- CASE "INTERNALNAME"
- viInternalName$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "InternalName=" + VersionInfoValue$
- CASE "LEGALCOPYRIGHT"
- viLegalCopyright$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "LegalCopyright=" + VersionInfoValue$
- CASE "LEGALTRADEMARKS"
- viLegalTrademarks$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "LegalTrademarks=" + VersionInfoValue$
- CASE "ORIGINALFILENAME"
- viOriginalFilename$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "OriginalFilename=" + VersionInfoValue$
- CASE "PRODUCTNAME"
- viProductName$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "ProductName=" + VersionInfoValue$
- CASE "PRODUCTVERSION"
- viProductVersion$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "ProductVersion=" + VersionInfoValue$
- CASE "COMMENTS"
- viComments$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "Comments=" + VersionInfoValue$
- CASE "WEB"
- viWeb$ = VersionInfoValue$
- layout$ = SCase$("$VersionInfo:") + "Web=" + VersionInfoValue$
- CASE ELSE
- a$ = "Invalid key. (Use FILEVERSION#, PRODUCTVERSION#, CompanyName, FileDescription, FileVersion, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, ProductVersion, Comments or Web)"
- GOTO errmes
- END SELECT
-
- VersionInfoSet = -1
-
- GOTO finishednonexec
-
- ValidateVersion:
- 'Check if only numbers and commas (4 comma-separated values)
- IF LEN(VersionInfoValue$) = 0 THEN a$ = "Expected $VERSIONINFO:" + VersionInfoKey$ + "=#,#,#,# (4 comma-separated numeric values: major, minor, revision and build)": GOTO errmes
- viCommas = 0
- FOR i = 1 TO LEN(VersionInfoValue$)
- IF ASC(VersionInfoValue$, i) = 44 THEN viCommas = viCommas + 1
- IF INSTR("0123456789,", MID$(VersionInfoValue$, i, 1)) = 0 OR (i = LEN(VersionInfoValue$) AND viCommas <> 3) OR RIGHT$(VersionInfoValue$, 1) = "," THEN
- a$ = "Expected $VERSIONINFO:" + VersionInfoKey$ + "=#,#,#,# (4 comma-separated numeric values: major, minor, revision and build)": GOTO errmes
- END IF
- NEXT
- RETURN
- END IF
-
- IF LEFT$(a3u$, 8) = "$EXEICON" THEN
- 'Basic syntax check. Multi-platform.
- IF ExeIconSet THEN a$ = "$EXEICON already defined": GOTO errmes
- FirstDelimiter = INSTR(a3u$, "'")
- IF FirstDelimiter = 0 THEN
- a$ = "Expected $EXEICON:'filename'": GOTO errmes
- ELSE
- SecondDelimiter = INSTR(FirstDelimiter + 1, a3u$, "'")
- IF SecondDelimiter = 0 THEN a$ = "Expected $EXEICON:'filename'": GOTO errmes
- END IF
- ExeIconFile$ = RTRIM$(LTRIM$(MID$(a3$, FirstDelimiter + 1, SecondDelimiter - FirstDelimiter - 1)))
- IF LEN(ExeIconFile$) = 0 THEN a$ = "Expected $EXEICON:'filename'": GOTO errmes
- layout$ = SCase$("$ExeIcon:'") + ExeIconFile$ + "'" + MID$(a3$, SecondDelimiter + 1)
-
- IconPath$ = ""
- IF LEFT$(ExeIconFile$, 2) = "./" OR LEFT$(ExeIconFile$, 2) = ".\" THEN
- 'Relative to source file's folder
- IF NoIDEMode THEN
- IconPath$ = path.source$
- IF LEN(IconPath$) > 0 AND RIGHT$(IconPath$, 1) <> pathsep$ THEN IconPath$ = IconPath$ + pathsep$
- ELSE
- IF LEN(ideprogname) THEN IconPath$ = idepath$ + pathsep$
- END IF
-
- ExeIconFile$ = IconPath$ + MID$(ExeIconFile$, 3)
- ELSEIF INSTR(ExeIconFile$, "/") OR INSTR(ExeIconFile$, "\") THEN
- FOR i = LEN(ExeIconFile$) TO 1 STEP -1
- IF MID$(ExeIconFile$, i, 1) = "/" OR MID$(ExeIconFile$, i, 1) = "\" THEN
- IconPath$ = LEFT$(ExeIconFile$, i)
- ExeIconFileOnly$ = MID$(ExeIconFile$, i + 1)
-
- IF _DIREXISTS(IconPath$) = 0 THEN a$ = "File '" + ExeIconFileOnly$ + "' not found": GOTO errmes
-
- currentdir$ = _CWD$
- CHDIR IconPath$
- IconPath$ = _CWD$
- CHDIR currentdir$
-
- ExeIconFile$ = IconPath$ + pathsep$ + ExeIconFileOnly$
- EXIT FOR
- END IF
- NEXT
- END IF
-
- IF _FILEEXISTS(ExeIconFile$) = 0 THEN a$ = "File '" + ExeIconFile$ + "' not found": GOTO errmes
-
- ExeIconSet = linenumber
- SetDependency DEPENDENCY_ICON
- IF NoChecks = 0 THEN PRINT #12, "do{"
- PRINT #12, "sub__icon(NULL,NULL,0);"
- GOTO finishedline2
- END IF
-
- END IF 'QB64 Metacommands
-
- IF ExecLevel(ExecCounter) THEN
- layoutdone = 0
- GOTO finishednonexec 'we don't check for anything inside lines that we've marked for skipping
- END IF
-
-
- linedataoffset = DataOffset
-
- entireline$ = lineformat(a3$): IF LEN(entireline$) = 0 THEN GOTO finishednonexec
- IF Error_Happened THEN GOTO errmes
- u$ = UCASE$(entireline$)
-
- newif = 0
-
- 'Convert "CASE ELSE" to "CASE C-EL" to avoid confusing compiler
- 'note: CASE does not have to begin on a new line
- s = 1
- i = INSTR(s, u$, "CASE" + sp + "ELSE")
- DO WHILE i
- skip = 0
- IF i <> 1 THEN
- IF MID$(u$, i - 1, 1) <> sp THEN skip = 1
- END IF
- IF i <> LEN(u$) - 8 THEN
- IF MID$(u$, i + 9, 1) <> sp THEN skip = 1
- END IF
- IF skip = 0 THEN
- MID$(entireline$, i) = "CASE" + sp + "C-EL"
- u$ = UCASE$(entireline$)
- END IF
- s = i + 9
- i = INSTR(s, u$, "CASE" + sp + "ELSE")
- LOOP
-
- n = numelements(entireline$)
-
- 'line number?
- a = ASC(entireline$)
- IF (a >= 48 AND a <= 57) OR a = 46 THEN 'numeric
- label$ = getelement(entireline$, 1)
- IF validlabel(label$) THEN
-
- IF closedmain <> 0 AND subfunc = "" THEN a$ = "Labels cannot be placed between SUB/FUNCTIONs": GOTO errmes
-
- v = HashFind(label$, HASHFLAG_LABEL, ignore, r)
- addlabchk100:
- IF v THEN
- s = Labels(r).Scope
- IF s = subfuncn OR s = -1 THEN 'same scope?
- IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
- IF Labels(r).State = 1 THEN a$ = "Duplicate label (" + RTRIM$(Labels(r).cn) + ")": GOTO errmes
- 'aquire state 0 types
- tlayout$ = RTRIM$(Labels(r).cn)
- GOTO addlabaq100
- END IF 'same scope
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO addlabchk100
- END IF
-
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd label$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).cn = tlayout$
- Labels(r).Scope = subfuncn
- addlabaq100:
- Labels(r).State = 1
- Labels(r).Data_Offset = linedataoffset
-
- layout$ = tlayout$
- PRINT #12, "LABEL_" + label$ + ":;"
-
-
- IF INSTR(label$, "p") THEN MID$(label$, INSTR(label$, "p"), 1) = "."
- IF RIGHT$(label$, 1) = "d" OR RIGHT$(label$, 1) = "s" THEN label$ = LEFT$(label$, LEN(label$) - 1)
- PRINT #12, "last_line=" + label$ + ";"
- inclinenump$ = ""
- IF inclinenumber(inclevel) THEN
- inclinenump$ = "," + str2$(inclinenumber(inclevel))
- thisincname$ = getfilepath$(incname$(inclevel))
- thisincname$ = MID$(incname$(inclevel), LEN(thisincname$) + 1)
- inclinenump$ = inclinenump$ + "," + CHR$(34) + thisincname$ + CHR$(34)
- END IF
- IF NoChecks = 0 THEN
- IF vWatchOn AND inclinenumber(inclevel) = 0 THEN temp$ = vWatchErrorCall$ ELSE temp$ = ""
- PRINT #12, "if(qbevent){" + temp$ + "evnt(" + str2$(linenumber) + inclinenump$ + ");r=0;}"
- END IF
- IF n = 1 THEN GOTO finishednonexec
- entireline$ = getelements(entireline$, 2, n): u$ = UCASE$(entireline$): n = n - 1
- 'note: fall through, numeric labels can be followed by alphanumeric label
- END IF 'validlabel
- END IF 'numeric
- 'it wasn't a line number
-
- 'label?
- 'note: ignores possibility that this could be a single command SUB/FUNCTION (as in QBASIC?)
- IF n >= 2 THEN
- x2 = INSTR(entireline$, sp + ":")
- IF x2 THEN
- IF x2 = LEN(entireline$) - 1 THEN x3 = x2 + 1 ELSE x3 = x2 + 2
- a$ = LEFT$(entireline$, x2 - 1)
-
- CreatingLabel = 1
- IF validlabel(a$) THEN
-
- IF validname(a$) = 0 THEN a$ = "Invalid name": GOTO errmes
-
- IF closedmain <> 0 AND subfunc = "" THEN a$ = "Labels cannot be placed between SUB/FUNCTIONs": GOTO errmes
-
- v = HashFind(a$, HASHFLAG_LABEL, ignore, r)
- addlabchk:
- IF v THEN
- s = Labels(r).Scope
- IF s = subfuncn OR s = -1 THEN 'same scope?
- IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
- IF Labels(r).State = 1 THEN a$ = "Duplicate label (" + RTRIM$(Labels(r).cn) + ")": GOTO errmes
- 'aquire state 0 types
- tlayout$ = RTRIM$(Labels(r).cn)
- GOTO addlabaq
- END IF 'same scope
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO addlabchk
- END IF
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd a$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).cn = tlayout$
- Labels(r).Scope = subfuncn
- addlabaq:
- Labels(r).State = 1
- Labels(r).Data_Offset = linedataoffset
- Labels(r).SourceLineNumber = linenumber
-
- IF LEN(layout$) THEN layout$ = layout$ + sp + tlayout$ + ":" ELSE layout$ = tlayout$ + ":"
-
- PRINT #12, "LABEL_" + a$ + ":;"
- inclinenump$ = ""
- IF inclinenumber(inclevel) THEN
- inclinenump$ = "," + str2$(inclinenumber(inclevel))
- thisincname$ = getfilepath$(incname$(inclevel))
- thisincname$ = MID$(incname$(inclevel), LEN(thisincname$) + 1)
- inclinenump$ = inclinenump$ + "," + CHR$(34) + thisincname$ + CHR$(34)
- END IF
- IF NoChecks = 0 THEN
- IF vWatchOn AND inclinenumber(inclevel) = 0 THEN temp$ = vWatchErrorCall$ ELSE temp$ = ""
- PRINT #12, "if(qbevent){" + temp$ + "evnt(" + str2$(linenumber) + inclinenump$ + ");r=0;}"
- END IF
- entireline$ = RIGHT$(entireline$, LEN(entireline$) - x3): u$ = UCASE$(entireline$)
- n = numelements(entireline$): IF n = 0 THEN GOTO finishednonexec
- END IF 'valid
- END IF 'includes sp+":"
- END IF 'n>=2
-
- 'remove leading ":"
- DO WHILE ASC(u$) = 58 '":"
- IF LEN(layout$) THEN layout$ = layout$ + sp2 + ":" ELSE layout$ = ":"
- IF LEN(u$) = 1 THEN GOTO finishednonexec
- entireline$ = getelements(entireline$, 2, n): u$ = UCASE$(entireline$): n = n - 1
- LOOP
-
- 'ELSE at the beginning of a line
- IF ASC(u$) = 69 THEN '"E"
-
- e1$ = getelement(u$, 1)
-
- IF e1$ = "ELSE" THEN
- a$ = "ELSE"
- IF n > 1 THEN continuelinefrom = 2
- GOTO gotcommand
- END IF
-
- IF e1$ = "ELSEIF" THEN
- IF n < 3 THEN a$ = "Expected ... THEN": GOTO errmes
- IF getelement(u$, n) = "THEN" THEN a$ = entireline$: GOTO gotcommand
- FOR i = 3 TO n - 1
- IF getelement(u$, i) = "THEN" THEN
- a$ = getelements(entireline$, 1, i)
- continuelinefrom = i + 1
- GOTO gotcommand
- END IF
- NEXT
- a$ = "Expected THEN": GOTO errmes
- END IF
-
- END IF '"E"
-
- start = 1
-
- GOTO skipcontinit
-
- contline:
-
- n = numelements(entireline$)
- u$ = UCASE$(entireline$)
-
- skipcontinit:
-
- 'jargon:
- 'lineelseused - counts how many line ELSEs can POSSIBLY follow
- 'endifs - how many C++ endifs "}" need to be added at the end of the line
- 'lineelseused - counts the number of indwelling ELSE statements on a line
- 'impliedendif - stops autoformat from adding "END IF"
-
- a$ = ""
-
- FOR i = start TO n
- e$ = getelement(u$, i)
-
-
- IF e$ = ":" THEN
- IF i = start THEN
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp2 + ":" ELSE layout$ = ":"
- IF i <> n THEN continuelinefrom = i + 1
- GOTO finishednonexec
- END IF
- IF i <> n THEN continuelinefrom = i
- GOTO gotcommand
- END IF
-
-
- 'begin scanning an 'IF' statement
- IF e$ = "IF" AND a$ = "" THEN newif = 1
-
-
- IF e$ = "THEN" OR (e$ = "GOTO" AND newif = 1) THEN
- IF newif = 0 THEN a$ = "THEN without IF": GOTO errmes
- newif = 0
- IF lineelseused > 0 THEN lineelseused = lineelseused - 1
- IF e$ = "GOTO" THEN
- IF i = n THEN a$ = "Expected IF expression GOTO label": GOTO errmes
- i = i - 1
- END IF
- a$ = a$ + sp + e$ '+"THEN"/"GOTO"
- IF i <> n THEN continuelinefrom = i + 1: endifs = endifs + 1
- GOTO gotcommand
- END IF
-
-
- IF e$ = "ELSE" THEN
-
- IF start = i THEN
- IF lineelseused >= 1 THEN
- 'note: more than one else used (in a row) on this line, so close first if with an 'END IF' first
- 'note: parses 'END IF' then (after continuelinefrom) parses 'ELSE'
- 'consider the following: (square brackets make reading easier)
- 'eg. if a=1 then [if b=2 then c=2 else d=2] else e=3
- impliedendif = 1: a$ = "END" + sp + "IF"
- endifs = endifs - 1
- continuelinefrom = i
- lineelseused = lineelseused - 1
- GOTO gotcommand
- END IF
- 'follow up previously encountered 'ELSE' by applying 'ELSE'
- a$ = "ELSE": continuelinefrom = i + 1
- lineelseused = lineelseused + 1
- GOTO gotcommand
- END IF 'start=i
-
- 'apply everything up to (but not including) 'ELSE'
- continuelinefrom = i
- GOTO gotcommand
- END IF '"ELSE"
-
-
- e$ = getelement(entireline$, i): IF a$ = "" THEN a$ = e$ ELSE a$ = a$ + sp + e$
- NEXT
-
-
- 'we're reached the end of the line
- IF endifs > 0 THEN
- endifs = endifs - 1
- impliedendif = 1: entireline$ = entireline$ + sp + ":" + sp + "END" + sp + "IF": n = n + 3
- i = i + 1 'skip the ":" (i is now equal to n+2)
- continuelinefrom = i
- GOTO gotcommand
- END IF
-
-
- gotcommand:
-
- dynscope = 0
-
- ca$ = a$
- a$ = eleucase$(ca$) '***REVISE THIS SECTION LATER***
-
-
- layoutdone = 0
-
- linefragment = a$
- IF Debug THEN PRINT #9, a$
- n = numelements(a$)
- IF n = 0 THEN GOTO finishednonexec
-
- 'convert non-UDT dimensioned periods to _046_
- IF INSTR(ca$, sp + "." + sp) THEN
- a3$ = getelement(ca$, 1)
- except = 0
- aa$ = a3$ + sp 'rebuilt a$ (always has a trailing spacer)
- lastfuse = -1
- FOR x = 2 TO n
- a2$ = getelement(ca$, x)
- IF except = 1 THEN except = 2: GOTO udtperiod 'skip element name
- IF a2$ = "." AND x <> n THEN
- IF except = 2 THEN except = 1: GOTO udtperiod 'sub-element of UDT
-
- IF a3$ = ")" THEN
- 'assume it was something like typevar(???).x and treat as a UDT
- except = 1
- GOTO udtperiod
- END IF
-
- 'find an ID of that type
- try = findid(UCASE$(a3$))
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF ((id.t AND ISUDT) <> 0) OR ((id.arraytype AND ISUDT) <> 0) THEN
- except = 1
- GOTO udtperiod
- END IF
- IF try = 2 THEN findanotherid = 1: try = findid(UCASE$(a3$)) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- 'not a udt; fuse lhs & rhs with _046_
- IF isalpha(ASC(a3$)) = 0 AND lastfuse <> x - 2 THEN a$ = "Invalid '.'": GOTO errmes
- aa$ = LEFT$(aa$, LEN(aa$) - 1) + fix046$
- lastfuse = x
- GOTO periodfused
- END IF '"."
- except = 0
- udtperiod:
- aa$ = aa$ + a2$ + sp
- periodfused:
- a3$ = a2$
- NEXT
- a$ = LEFT$(aa$, LEN(aa$) - 1)
- ca$ = a$
- a$ = eleucase$(ca$)
- n = numelements(a$)
- END IF
-
- arrayprocessinghappened = 0
-
- firstelement$ = getelement(a$, 1)
- secondelement$ = getelement(a$, 2)
- thirdelement$ = getelement(a$, 3)
-
- 'non-executable section
-
- IF n = 1 THEN
- IF firstelement$ = "'" THEN layoutdone = 1: GOTO finishednonexec 'nop
- END IF
-
- IF n <= 2 THEN
- IF firstelement$ = "DATA" THEN
- l$ = SCase$("Data")
- IF n = 2 THEN
-
- e$ = SPACE$((LEN(secondelement$) - 1) \ 2)
- FOR x = 1 TO LEN(e$)
- v1 = ASC(secondelement$, x * 2)
- v2 = ASC(secondelement$, x * 2 + 1)
- IF v1 < 65 THEN v1 = v1 - 48 ELSE v1 = v1 - 55
- IF v2 < 65 THEN v2 = v2 - 48 ELSE v2 = v2 - 55
- ASC(e$, x) = v1 + v2 * 16
- NEXT
- l$ = l$ + sp + e$
- END IF 'n=2
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
-
- GOTO finishednonexec
- END IF
- END IF
-
-
-
- 'declare library
- IF declaringlibrary THEN
-
- IF firstelement$ = "END" THEN
- IF n <> 2 OR secondelement$ <> "DECLARE" THEN a$ = "Expected END DECLARE": GOTO errmes
- declaringlibrary = 0
- l$ = SCase$("End" + sp + "Declare")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec
- END IF 'end declare
-
- declaringlibrary = 2
-
- IF firstelement$ = "SUB" OR firstelement$ = "FUNCTION" THEN
- GOTO declaresubfunc2
- END IF
-
- a$ = "Expected SUB/FUNCTION definition or END DECLARE": GOTO errmes
- END IF 'declaringlibrary
-
- 'check TYPE declarations (created on prepass)
- IF definingtype THEN
-
- IF firstelement$ = "END" THEN
- IF n <> 2 OR secondelement$ <> "TYPE" THEN a$ = "Expected END TYPE": GOTO errmes
- definingtype = 0
- l$ = SCase$("End" + sp + "Type")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec
- END IF
-
- 'IF n < 3 THEN definingtypeerror = linenumber: a$ = "Expected element-name AS type or AS type element-list": GOTO errmes
- IF n < 3 THEN a$ = "Expected element-name AS type or AS type element-list": GOTO errmes
- definingtype = 2
- IF firstelement$ = "AS" THEN
- l$ = SCase$("As")
- t$ = ""
- wordsInTypeName = 0
- DO
- nextElement$ = getelement$(a$, 2 + wordsInTypeName)
- IF nextElement$ = "," THEN
- 'element-list
- wordsInTypeName = wordsInTypeName - 2
- EXIT DO
- END IF
-
- wordsInTypeName = wordsInTypeName + 1
- IF wordsInTypeName = n - 2 THEN
- 'single element in line
- wordsInTypeName = wordsInTypeName - 1
- EXIT DO
- END IF
- LOOP
-
- t$ = getelements$(a$, 2, 2 + wordsInTypeName)
- typ = typname2typ(t$)
- IF Error_Happened THEN GOTO errmes
- IF typ = 0 THEN a$ = "Undefined type": GOTO errmes
- IF typ AND ISUDT THEN
- IF UCASE$(RTRIM$(t$)) = "MEM" AND RTRIM$(udtxcname(typ AND 511)) = "_MEM" AND qb64prefix_set = 1 THEN
- t$ = MID$(RTRIM$(udtxcname(typ AND 511)), 2)
- ELSE
- t$ = RTRIM$(udtxcname(typ AND 511))
- END IF
- l$ = l$ + sp + t$
- ELSE
- l$ = l$ + sp + SCase2$(t$)
- END IF
-
- 'Now add each variable:
- FOR i = 3 + wordsInTypeName TO n
- thisElement$ = getelement$(ca$, i)
- IF thisElement$ = "," THEN
- l$ = l$ + thisElement$
- ELSE
- l$ = l$ + sp + thisElement$
- END IF
- NEXT
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- ELSE
- l$ = getelement(ca$, 1) + sp + SCase$("As")
- t$ = getelements$(a$, 3, n)
- typ = typname2typ(t$)
- IF Error_Happened THEN GOTO errmes
- IF typ = 0 THEN a$ = "Undefined type": GOTO errmes
- IF typ AND ISUDT THEN
- IF UCASE$(RTRIM$(t$)) = "MEM" AND RTRIM$(udtxcname(typ AND 511)) = "_MEM" AND qb64prefix_set = 1 THEN
- t$ = MID$(RTRIM$(udtxcname(typ AND 511)), 2)
- ELSE
- t$ = RTRIM$(udtxcname(typ AND 511))
- END IF
- l$ = l$ + sp + t$
- ELSE
- l$ = l$ + sp + SCase2$(t$)
- END IF
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- END IF
- GOTO finishednonexec
-
- END IF 'defining type
-
- IF firstelement$ = "TYPE" THEN
- IF n <> 2 THEN a$ = "Expected TYPE type-name": GOTO errmes
- l$ = SCase$("Type") + sp + getelement(ca$, 2)
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- definingtype = 1
- definingtypeerror = linenumber
- GOTO finishednonexec
- END IF
-
- 'skip DECLARE SUB/FUNCTION
- IF n >= 1 THEN
- IF firstelement$ = "DECLARE" THEN
-
- IF secondelement$ = "LIBRARY" OR secondelement$ = "DYNAMIC" OR secondelement$ = "CUSTOMTYPE" OR secondelement$ = "STATIC" THEN
-
- declaringlibrary = 1
- dynamiclibrary = 0
- customtypelibrary = 0
- indirectlibrary = 0
- staticlinkedlibrary = 0
-
- x = 3
- l$ = SCase$("Declare" + sp + "Library")
-
- IF secondelement$ = "DYNAMIC" THEN
- e$ = getelement$(a$, 3): IF e$ <> "LIBRARY" THEN a$ = "Expected DYNAMIC LIBRARY " + CHR$(34) + "..." + CHR$(34): GOTO errmes
- dynamiclibrary = 1
- x = 4
- l$ = SCase$("Declare" + sp + "Dynamic" + sp + "Library")
- IF n = 3 THEN a$ = "Expected DECLARE DYNAMIC LIBRARY " + CHR$(34) + "..." + CHR$(34): GOTO errmes
- indirectlibrary = 1
- END IF
-
- IF secondelement$ = "CUSTOMTYPE" THEN
- e$ = getelement$(a$, 3): IF e$ <> "LIBRARY" THEN a$ = "Expected CUSTOMTYPE LIBRARY": GOTO errmes
- customtypelibrary = 1
- x = 4
- l$ = SCase$("Declare" + sp + "CustomType" + sp + "Library")
- indirectlibrary = 1
- END IF
-
- IF secondelement$ = "STATIC" THEN
- e$ = getelement$(a$, 3): IF e$ <> "LIBRARY" THEN a$ = "Expected STATIC LIBRARY": GOTO errmes
- x = 4
- l$ = SCase$("Declare" + sp + "Static" + sp + "Library")
- staticlinkedlibrary = 1
- END IF
-
- sfdeclare = 0: sfheader = 0
-
- IF n >= x THEN
-
- sfdeclare = 1
-
- addlibrary:
-
- libname$ = ""
- headername$ = ""
-
-
- 'assume library name in double quotes follows
- 'assume library is in main qb64 folder
- x$ = getelement$(ca$, x)
- IF ASC(x$) <> 34 THEN a$ = "Expected LIBRARY " + CHR$(34) + "..." + CHR$(34): GOTO errmes
- x$ = RIGHT$(x$, LEN(x$) - 1)
- z = INSTR(x$, CHR$(34))
- IF z = 0 THEN a$ = "Expected LIBRARY " + CHR$(34) + "..." + CHR$(34): GOTO errmes
- x$ = LEFT$(x$, z - 1)
-
- IF dynamiclibrary <> 0 AND LEN(x$) = 0 THEN a$ = "Expected DECLARE DYNAMIC LIBRARY " + CHR$(34) + "..." + CHR$(34): GOTO errmes
- IF customtypelibrary <> 0 AND LEN(x$) = 0 THEN a$ = "Expected DECLARE CUSTOMTYPE LIBRARY " + CHR$(34) + "..." + CHR$(34): GOTO errmes
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'convert '\\' to '\'
- WHILE INSTR(x$, "\\")
- z = INSTR(x$, "\\")
- x$ = LEFT$(x$, z - 1) + RIGHT$(x$, LEN(x$) - z)
- WEND
-
- autoformat_x$ = x$ 'used for autolayout purposes
-
- 'Remove version number from library name
- 'Eg. libname:1.0 becomes libname <-> 1.0 which later becomes libname.so.1.0
- v$ = ""
- striplibver:
- FOR z = LEN(x$) TO 1 STEP -1
- a = ASC(x$, z)
- IF a = ASC_BACKSLASH OR a = ASC_FORWARDSLASH THEN EXIT FOR
- IF a = ASC_FULLSTOP OR a = ASC_COLON THEN
- IF isuinteger(RIGHT$(x$, LEN(x$) - z)) THEN
- IF LEN(v$) THEN v$ = RIGHT$(x$, LEN(x$) - z) + "." + v$ ELSE v$ = RIGHT$(x$, LEN(x$) - z)
- x$ = LEFT$(x$, z - 1)
- IF a = ASC_COLON THEN EXIT FOR
- GOTO striplibver
- ELSE
- EXIT FOR
- END IF
- END IF
- NEXT
- libver$ = v$
-
-
- IF os$ = "WIN" THEN
- 'convert forward-slashes to back-slashes
- DO WHILE INSTR(x$, "/")
- z = INSTR(x$, "/")
- x$ = LEFT$(x$, z - 1) + "\" + RIGHT$(x$, LEN(x$) - z)
- LOOP
- END IF
-
- IF os$ = "LNX" THEN
- 'convert any back-slashes to forward-slashes
- DO WHILE INSTR(x$, "\")
- z = INSTR(x$, "\")
- x$ = LEFT$(x$, z - 1) + "/" + RIGHT$(x$, LEN(x$) - z)
- LOOP
- END IF
-
- 'Separate path from name
- libpath$ = ""
- FOR z = LEN(x$) TO 1 STEP -1
- a = ASC(x$, z)
- IF a = 47 OR a = 92 THEN '\ or /
- libpath$ = LEFT$(x$, z)
- x$ = RIGHT$(x$, LEN(x$) - z)
- EXIT FOR
- END IF
- NEXT
-
- 'Accept ./ and .\ as a reference to the source file
- 'folder, replacing it with the actual full path, if available
- IF libpath$ = "./" OR libpath$ = ".\" THEN
- libpath$ = ""
- IF NoIDEMode THEN
- libpath$ = path.source$
- IF LEN(libpath$) > 0 AND RIGHT$(libpath$, 1) <> pathsep$ THEN libpath$ = libpath$ + pathsep$
- ELSE
- IF LEN(ideprogname) THEN libpath$ = idepath$ + pathsep$
- END IF
- END IF
-
- 'Create a path which can be used for inline code (uses \\ instead of \)
- libpath_inline$ = ""
- FOR z = 1 TO LEN(libpath$)
- a = ASC(libpath$, z)
- libpath_inline$ = libpath_inline$ + CHR$(a)
- IF a = 92 THEN libpath_inline$ = libpath_inline$ + "\"
- NEXT
-
- IF LEN(x$) THEN
- IF dynamiclibrary = 0 THEN
- 'Static library
-
- IF os$ = "WIN" THEN
- 'check for .lib
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + x$ + ".lib") THEN
- libname$ = libpath$ + x$ + ".lib"
- inlinelibname$ = libpath_inline$ + x$ + ".lib"
- END IF
- END IF
- 'check for .a
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + x$ + ".a") THEN
- libname$ = libpath$ + x$ + ".a"
- inlinelibname$ = libpath_inline$ + x$ + ".a"
- END IF
- END IF
- 'check for .o
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + x$ + ".o") THEN
- libname$ = libpath$ + x$ + ".o"
- inlinelibname$ = libpath_inline$ + x$ + ".o"
- END IF
- END IF
- 'check for .lib
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(x$ + ".lib") THEN
- libname$ = x$ + ".lib"
- inlinelibname$ = x$ + ".lib"
- END IF
- END IF
- 'check for .a
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(x$ + ".a") THEN
- libname$ = x$ + ".a"
- inlinelibname$ = x$ + ".a"
- END IF
- END IF
- 'check for .o
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(x$ + ".o") THEN
- libname$ = x$ + ".o"
- inlinelibname$ = x$ + ".o"
- END IF
- END IF
- END IF 'Windows
-
- IF os$ = "LNX" THEN
- IF staticlinkedlibrary = 0 THEN
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = libpath$ + "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + "." + libver$ + ".dylib"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath " + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".dylib") THEN
- libname$ = libpath$ + "lib" + x$ + ".dylib"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".dylib"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath " + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- END IF
-
- 'check for .so (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".so." + libver$) THEN
- libname$ = libpath$ + "lib" + x$ + ".so." + libver$
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".so." + libver$
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath " + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".so") THEN
- libname$ = libpath$ + "lib" + x$ + ".so"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".so"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath " + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- END IF
- 'check for .a (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".a") THEN
- libname$ = libpath$ + "lib" + x$ + ".a"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".a"
- END IF
- END IF
- 'check for .o (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".o") THEN
- libname$ = libpath$ + "lib" + x$ + ".o"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".o"
- END IF
- END IF
- IF staticlinkedlibrary = 0 THEN
- 'check for .so (usr/lib64)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + libpath$ + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib64/" + libpath$ + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib64/" + libpath_inline$ + "lib" + x$ + ".so." + libver$
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib64/" + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib64/ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + libpath$ + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib64/" + libpath$ + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib64/" + libpath_inline$ + "lib" + x$ + ".so"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib64/" + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib64/ "
- END IF
- END IF
- END IF
- 'check for .a (usr/lib64)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + libpath$ + "lib" + x$ + ".a") THEN
- libname$ = "/usr/lib64/" + libpath$ + "lib" + x$ + ".a"
- inlinelibname$ = "/usr/lib64/" + libpath_inline$ + "lib" + x$ + ".a"
- END IF
- END IF
- IF staticlinkedlibrary = 0 THEN
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + "." + libver$ + ".dylib"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/" + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".dylib") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".dylib"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/" + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- END IF
-
- 'check for .so (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".so." + libver$
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/" + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".so"
- IF LEN(libpath$) THEN mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/" + libpath$ + " " ELSE mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- END IF
- 'check for .a (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".a") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".a"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".a"
- END IF
- END IF
- '--------------------------(without path)------------------------------
- IF staticlinkedlibrary = 0 THEN
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = "lib" + x$ + "." + libver$ + ".dylib"
- mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".dylib") THEN
- libname$ = "lib" + x$ + ".dylib"
- inlinelibname$ = "lib" + x$ + ".dylib"
- mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- END IF
-
- 'check for .so (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".so." + libver$) THEN
- libname$ = "lib" + x$ + ".so." + libver$
- inlinelibname$ = "lib" + x$ + ".so." + libver$
- mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".so") THEN
- libname$ = "lib" + x$ + ".so"
- inlinelibname$ = "lib" + x$ + ".so"
- mylibopt$ = mylibopt$ + " -Wl,-rpath ./ "
- END IF
- END IF
- END IF
- 'check for .a (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".a") THEN
- libname$ = "lib" + x$ + ".a"
- inlinelibname$ = "lib" + x$ + ".a"
- END IF
- END IF
- 'check for .o (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".o") THEN
- libname$ = "lib" + x$ + ".o"
- inlinelibname$ = "lib" + x$ + ".o"
- END IF
- END IF
- IF staticlinkedlibrary = 0 THEN
- 'check for .so (usr/lib64)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib64/" + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib64/" + "lib" + x$ + ".so." + libver$
- mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib64/ "
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib64/" + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib64/" + "lib" + x$ + ".so"
- mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib64/ "
- END IF
- END IF
- END IF
- 'check for .a (usr/lib64)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + "lib" + x$ + ".a") THEN
- libname$ = "/usr/lib64/" + "lib" + x$ + ".a"
- inlinelibname$ = "/usr/lib64/" + "lib" + x$ + ".a"
- END IF
- END IF
- IF staticlinkedlibrary = 0 THEN
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + "." + libver$ + ".dylib"
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".dylib") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".dylib"
- mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- END IF
-
- 'check for .so (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".so." + libver$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".so"
- mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- END IF
- 'check for .a (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".a") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".a"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".a"
- mylibopt$ = mylibopt$ + " -Wl,-rpath /usr/lib/ "
- END IF
- END IF
- END IF 'Linux
-
-
- 'check for header
- IF LEN(headername$) = 0 THEN
- IF os$ = "WIN" THEN
- IF _FILEEXISTS(libpath$ + x$ + ".h") THEN
- headername$ = libpath_inline$ + x$ + ".h"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS(libpath$ + x$ + ".hpp") THEN
- headername$ = libpath_inline$ + x$ + ".hpp"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- '--------------------------(without path)------------------------------
- IF _FILEEXISTS(x$ + ".h") THEN
- headername$ = x$ + ".h"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS(x$ + ".hpp") THEN
- headername$ = x$ + ".hpp"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- END IF 'Windows
-
- IF os$ = "LNX" THEN
- IF _FILEEXISTS(libpath$ + x$ + ".h") THEN
- headername$ = libpath_inline$ + x$ + ".h"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS(libpath$ + x$ + ".hpp") THEN
- headername$ = libpath_inline$ + x$ + ".hpp"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS("/usr/include/" + libpath$ + x$ + ".h") THEN
- headername$ = "/usr/include/" + libpath_inline$ + x$ + ".h"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS("/usr/include/" + libpath$ + x$ + ".hpp") THEN
- headername$ = "/usr/include/" + libpath_inline$ + x$ + ".hpp"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- '--------------------------(without path)------------------------------
- IF _FILEEXISTS(x$ + ".h") THEN
- headername$ = x$ + ".h"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS(x$ + ".hpp") THEN
- headername$ = x$ + ".hpp"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS("/usr/include/" + x$ + ".h") THEN
- headername$ = "/usr/include/" + x$ + ".h"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- IF _FILEEXISTS("/usr/include/" + x$ + ".hpp") THEN
- headername$ = "/usr/include/" + x$ + ".hpp"
- IF customtypelibrary = 0 THEN sfdeclare = 0
- sfheader = 1
- GOTO GotHeader
- END IF
- END IF 'Linux
-
- GotHeader:
- END IF
-
- ELSE
- 'dynamic library
-
- IF os$ = "WIN" THEN
- 'check for .dll (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + x$ + ".dll") THEN
- libname$ = libpath$ + x$ + ".dll"
- inlinelibname$ = libpath_inline$ + x$ + ".dll"
- END IF
- END IF
- 'check for .dll (system32)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(ENVIRON$("SYSTEMROOT") + "\System32\" + libpath$ + x$ + ".dll") THEN
- libname$ = libpath$ + x$ + ".dll"
- inlinelibname$ = libpath_inline$ + x$ + ".dll"
- END IF
- END IF
- '--------------------------(without path)------------------------------
- 'check for .dll (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(x$ + ".dll") THEN
- libname$ = x$ + ".dll"
- inlinelibname$ = x$ + ".dll"
- END IF
- END IF
- 'check for .dll (system32)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(ENVIRON$("SYSTEMROOT") + "\System32\" + x$ + ".dll") THEN
- libname$ = x$ + ".dll"
- inlinelibname$ = x$ + ".dll"
- END IF
- END IF
- END IF 'Windows
-
- IF os$ = "LNX" THEN
- 'Note: STATIC libraries (.a/.o) cannot be loaded as dynamic objects
-
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = libpath$ + "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + "." + libver$ + ".dylib"
- IF LEFT$(libpath$, 1) <> "/" THEN libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".dylib") THEN
- libname$ = libpath$ + "lib" + x$ + ".dylib"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".dylib"
- IF LEFT$(libpath$, 1) <> "/" THEN libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- END IF
-
- 'check for .so (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".so." + libver$) THEN
- libname$ = libpath$ + "lib" + x$ + ".so." + libver$
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".so." + libver$
- IF LEFT$(libpath$, 1) <> "/" THEN libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS(libpath$ + "lib" + x$ + ".so") THEN
- libname$ = libpath$ + "lib" + x$ + ".so"
- inlinelibname$ = libpath_inline$ + "lib" + x$ + ".so"
- IF LEFT$(libpath$, 1) <> "/" THEN libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- 'check for .so (usr/lib64)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + libpath$ + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib64/" + libpath$ + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib64/" + libpath_inline$ + "lib" + x$ + ".so." + libver$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + libpath$ + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib64/" + libpath$ + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib64/" + libpath_inline$ + "lib" + x$ + ".so"
- END IF
- END IF
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + "." + libver$ + ".dylib"
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".dylib") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".dylib"
- END IF
- END IF
- END IF
-
- 'check for .so (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".so." + libver$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + libpath$ + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib/" + libpath$ + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib/" + libpath_inline$ + "lib" + x$ + ".so"
- END IF
- END IF
- '--------------------------(without path)------------------------------
- IF MacOSX THEN 'dylib support
- 'check for .dylib (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = "lib" + x$ + "." + libver$ + ".dylib"
- libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".dylib") THEN
- libname$ = "lib" + x$ + ".dylib"
- inlinelibname$ = "lib" + x$ + ".dylib"
- libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- END IF
-
- 'check for .so (direct)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".so." + libver$) THEN
- libname$ = "lib" + x$ + ".so." + libver$
- inlinelibname$ = "lib" + x$ + ".so." + libver$
- libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("lib" + x$ + ".so") THEN
- libname$ = "lib" + x$ + ".so"
- inlinelibname$ = "lib" + x$ + ".so"
- libname$ = "./" + libname$: inlinelibname$ = "./" + inlinelibname$
- END IF
- END IF
- 'check for .so (usr/lib64)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib64/" + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib64/" + "lib" + x$ + ".so." + libver$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib64/" + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib64/" + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib64/" + "lib" + x$ + ".so"
- END IF
- END IF
-
- IF MacOSX THEN 'dylib support
- 'check for .dylib (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + "." + libver$ + ".dylib") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + "." + libver$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + "." + libver$ + ".dylib"
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".dylib") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".dylib"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".dylib"
- END IF
- END IF
- END IF
-
- 'check for .so (usr/lib)
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".so." + libver$) THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".so." + libver$
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".so." + libver$
- END IF
- END IF
- IF LEN(libname$) = 0 THEN
- IF _FILEEXISTS("/usr/lib/" + "lib" + x$ + ".so") THEN
- libname$ = "/usr/lib/" + "lib" + x$ + ".so"
- inlinelibname$ = "/usr/lib/" + "lib" + x$ + ".so"
- END IF
- END IF
- END IF 'Linux
-
- END IF 'Dynamic
-
- 'library found?
- IF dynamiclibrary <> 0 AND LEN(libname$) = 0 THEN a$ = "DYNAMIC LIBRARY not found": GOTO errmes
- IF LEN(libname$) = 0 AND LEN(headername$) = 0 THEN a$ = "LIBRARY not found": GOTO errmes
-
- '***actual method should cull redundant header and library entries***
-
- IF dynamiclibrary = 0 THEN
-
- 'static
- IF LEN(libname$) THEN
- IF os$ = "WIN" THEN
- IF MID$(libname$, 2, 1) = ":" OR LEFT$(libname$, 1) = "\" THEN
- mylib$ = mylib$ + " " + libname$ + " "
- ELSE
- mylib$ = mylib$ + " ..\..\" + libname$ + " "
- END IF
- END IF
- IF os$ = "LNX" THEN
- IF LEFT$(libname$, 1) = "/" THEN
- mylib$ = mylib$ + " " + libname$ + " "
- ELSE
- mylib$ = mylib$ + " ../../" + libname$ + " "
- END IF
- END IF
-
- END IF
-
- ELSE
-
- 'dynamic
- IF LEN(headername$) = 0 THEN 'no header
-
- IF subfuncn THEN
- f = FREEFILE
- OPEN tmpdir$ + "maindata.txt" FOR APPEND AS #f
- ELSE
- f = 13
- END IF
-
- 'make name a C-appropriate variable name
- 'by converting everything except numbers and
- 'letters to underscores
- x2$ = x$
- FOR x2 = 1 TO LEN(x2$)
- IF ASC(x2$, x2) < 48 THEN ASC(x2$, x2) = 95
- IF ASC(x2$, x2) > 57 AND ASC(x2$, x2) < 65 THEN ASC(x2$, x2) = 95
- IF ASC(x2$, x2) > 90 AND ASC(x2$, x2) < 97 THEN ASC(x2$, x2) = 95
- IF ASC(x2$, x2) > 122 THEN ASC(x2$, x2) = 95
- NEXT
- DLLname$ = x2$
-
- IF sfdeclare THEN
-
- IF os$ = "WIN" THEN
- PRINT #17, "HINSTANCE DLL_" + x2$ + "=NULL;"
- PRINT #f, "if (!DLL_" + x2$ + "){"
- PRINT #f, "DLL_" + x2$ + "=LoadLibrary(" + CHR$(34) + inlinelibname$ + CHR$(34) + ");"
- PRINT #f, "if (!DLL_" + x2$ + ") error(259);"
- PRINT #f, "}"
- END IF
-
- IF os$ = "LNX" THEN
- PRINT #17, "void *DLL_" + x2$ + "=NULL;"
- PRINT #f, "if (!DLL_" + x2$ + "){"
- PRINT #f, "DLL_" + x2$ + "=dlopen(" + CHR$(34) + inlinelibname$ + CHR$(34) + ",RTLD_LAZY);"
- PRINT #f, "if (!DLL_" + x2$ + ") error(259);"
- PRINT #f, "}"
- END IF
-
-
- END IF
-
- IF subfuncn THEN CLOSE #f
-
- END IF 'no header
-
- END IF 'dynamiclibrary
-
- IF LEN(headername$) THEN
- IF os$ = "WIN" THEN
- IF MID$(headername$, 2, 1) = ":" OR LEFT$(headername$, 1) = "\" THEN
- PRINT #17, "#include " + CHR$(34) + headername$ + CHR$(34)
- ELSE
- PRINT #17, "#include " + CHR$(34) + "..\\..\\" + headername$ + CHR$(34)
- END IF
- END IF
- IF os$ = "LNX" THEN
-
- IF LEFT$(headername$, 1) = "/" THEN
- PRINT #17, "#include " + CHR$(34) + headername$ + CHR$(34)
- ELSE
- PRINT #17, "#include " + CHR$(34) + "../../" + headername$ + CHR$(34)
- END IF
-
- END IF
- END IF
-
- END IF
-
- l$ = l$ + sp + CHR$(34) + autoformat_x$ + CHR$(34)
-
- IF n > x THEN
- IF dynamiclibrary THEN a$ = "Cannot specify multiple DYNAMIC LIBRARY names in a single DECLARE statement": GOTO errmes
- x = x + 1: x2$ = getelement$(a$, x): IF x2$ <> "," THEN a$ = "Expected ,": GOTO errmes
- l$ = l$ + sp2 + ","
- x = x + 1: IF x > n THEN a$ = "Expected , ...": GOTO errmes
- GOTO addlibrary
- END IF
-
- END IF 'n>=x
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec
- END IF
-
- GOTO finishednonexec 'note: no layout required
- END IF
- END IF
-
- 'begin SUB/FUNCTION
- IF n >= 1 THEN
- dynamiclibrary = 0
- declaresubfunc2:
- sf = 0
- IF firstelement$ = "FUNCTION" THEN sf = 1
- IF firstelement$ = "SUB" THEN sf = 2
- IF sf THEN
-
- IF declaringlibrary = 0 THEN
- IF LEN(subfunc) THEN a$ = "Expected END SUB/FUNCTION before " + firstelement$: GOTO errmes
- END IF
-
- IF n = 1 THEN a$ = "Expected name after SUB/FUNCTION": GOTO errmes
- e$ = getelement$(ca$, 2)
- symbol$ = removesymbol$(e$) '$,%,etc.
- IF Error_Happened THEN GOTO errmes
- IF sf = 2 AND symbol$ <> "" THEN a$ = "Type symbols after a SUB name are invalid": GOTO errmes
- try = findid(e$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.subfunc = sf THEN GOTO createsf
- IF try = 2 THEN findanotherid = 1: try = findid(e$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- a$ = "Unregistered SUB/FUNCTION encountered": GOTO errmes
- createsf:
- IF UCASE$(e$) = "_GL" THEN e$ = "_GL"
- IF firstelement$ = "SUB" THEN
- l$ = SCase$("Sub") + sp + e$ + symbol$
- ELSE
- l$ = SCase$("Function") + sp + e$ + symbol$
- END IF
- id2 = id
- targetid = currentid
-
- 'check for ALIAS
- aliasname$ = RTRIM$(id.cn)
- IF n > 2 THEN
- ee$ = getelement$(a$, 3)
- IF ee$ = "ALIAS" THEN
- IF declaringlibrary = 0 THEN a$ = "ALIAS can only be used with DECLARE LIBRARY": GOTO errmes
- IF n = 3 THEN a$ = "Expected ALIAS name-in-library": GOTO errmes
- ee$ = getelement$(ca$, 4)
-
- 'strip string content (optional)
- IF LEFT$(ee$, 1) = CHR$(34) THEN
- ee$ = RIGHT$(ee$, LEN(ee$) - 1)
- x = INSTR(ee$, CHR$(34)): IF x = 0 THEN a$ = "Expected " + CHR$(34): GOTO errmes
- ee$ = LEFT$(ee$, x - 1)
- l$ = l$ + sp + SCase$("Alias") + sp + CHR_QUOTE + ee$ + CHR_QUOTE
- ELSE
- l$ = l$ + sp + SCase$("Alias") + sp + ee$
- END IF
-
- 'strip fix046$ (created by unquoted periods)
- DO WHILE INSTR(ee$, fix046$)
- x = INSTR(ee$, fix046$): ee$ = LEFT$(ee$, x - 1) + "." + RIGHT$(ee$, LEN(ee$) - x + 1 - LEN(fix046$))
- LOOP
- aliasname$ = ee$
- 'remove ALIAS section from line
- IF n <= 4 THEN a$ = getelements(a$, 1, 2)
- IF n >= 5 THEN a$ = getelements(a$, 1, 2) + sp + getelements(a$, 5, n)
- IF n <= 4 THEN ca$ = getelements(ca$, 1, 2)
- IF n >= 5 THEN ca$ = getelements(ca$, 1, 2) + sp + getelements(ca$, 5, n)
- n = n - 2
- END IF
- END IF
-
- IF declaringlibrary THEN GOTO declibjmp1
-
-
- IF closedmain = 0 THEN closemain
-
- 'check for open controls (copy #2)
- IF controllevel <> 0 AND controltype(controllevel) <> 6 THEN 'It's OK for subs to be inside $IF blocks
- a$ = "Unidentified open control block"
- SELECT CASE controltype(controllevel)
- CASE 1: a$ = "IF without END IF"
- CASE 2: a$ = "FOR without NEXT"
- CASE 3, 4: a$ = "DO without LOOP"
- CASE 5: a$ = "WHILE without WEND"
- CASE 10 TO 19: a$ = "SELECT CASE without END SELECT"
- END SELECT
- linenumber = controlref(controllevel)
- GOTO errmes
- END IF
-
- IF ideindentsubs THEN
- controllevel = controllevel + 1
- controltype(controllevel) = 32
- controlref(controllevel) = linenumber
- END IF
-
- subfunc = RTRIM$(id.callname) 'SUB_..."
- IF id.subfunc = 1 THEN subfuncoriginalname$ = "FUNCTION " ELSE subfuncoriginalname$ = "SUB "
- subfuncoriginalname$ = subfuncoriginalname$ + RTRIM$(id.cn)
- subfuncn = subfuncn + 1
- closedsubfunc = 0
- subfuncid = targetid
-
- subfuncret$ = ""
-
- CLOSE #13: OPEN tmpdir$ + "data" + str2$(subfuncn) + ".txt" FOR OUTPUT AS #13
- CLOSE #19: OPEN tmpdir$ + "free" + str2$(subfuncn) + ".txt" FOR OUTPUT AS #19
- CLOSE #15: OPEN tmpdir$ + "ret" + str2$(subfuncn) + ".txt" FOR OUTPUT AS #15
- PRINT #15, "if (next_return_point){"
- PRINT #15, "next_return_point--;"
- PRINT #15, "switch(return_point[next_return_point]){"
- PRINT #15, "case 0:"
- PRINT #15, "error(3);" 'return without gosub!
- PRINT #15, "break;"
- defdatahandle = 13
-
- declibjmp1:
-
- IF declaringlibrary THEN
- IF sfdeclare = 0 AND indirectlibrary = 0 THEN
- CLOSE #17
- OPEN tmpdir$ + "regsf_ignore.txt" FOR OUTPUT AS #17
- END IF
- IF sfdeclare = 1 AND customtypelibrary = 0 AND dynamiclibrary = 0 AND indirectlibrary = 0 THEN
- PRINT #17, "#include " + CHR$(34) + "externtype" + str2(ResolveStaticFunctions + 1) + ".txt" + CHR$(34)
- fh = FREEFILE: OPEN tmpdir$ + "externtype" + str2(ResolveStaticFunctions + 1) + ".txt" FOR OUTPUT AS #fh: CLOSE #fh
- END IF
- END IF
-
-
-
-
- IF sf = 1 THEN
- rettyp = id.ret
- t$ = typ2ctyp$(id.ret, "")
- IF Error_Happened THEN GOTO errmes
- IF t$ = "qbs" THEN t$ = "qbs*"
-
- IF declaringlibrary THEN
- IF rettyp AND ISSTRING THEN
- t$ = "char*"
- END IF
- END IF
-
- IF declaringlibrary <> 0 AND dynamiclibrary <> 0 THEN
- IF os$ = "WIN" THEN
- PRINT #17, "typedef " + t$ + " (CALLBACK* DLLCALL_" + removecast$(RTRIM$(id.callname)) + ")(";
- END IF
- IF os$ = "LNX" THEN
- PRINT #17, "typedef " + t$ + " (*DLLCALL_" + removecast$(RTRIM$(id.callname)) + ")(";
- END IF
- ELSEIF declaringlibrary <> 0 AND customtypelibrary <> 0 THEN
- PRINT #17, "typedef " + t$ + " CUSTOMCALL_" + removecast$(RTRIM$(id.callname)) + "(";
- ELSE
- PRINT #17, t$ + " " + removecast$(RTRIM$(id.callname)) + "(";
- END IF
- IF declaringlibrary THEN GOTO declibjmp2
- PRINT #12, t$ + " " + removecast$(RTRIM$(id.callname)) + "(";
-
- 'create variable to return result
- 'if type wasn't specified, define it
- IF symbol$ = "" THEN
- a = ASC(UCASE$(e$)): IF a = 95 THEN a = 91
- a = a - 64 'so A=1, Z=27 and _=28
- symbol$ = defineextaz(a)
- END IF
- reginternalvariable = 1
- ignore = dim2(e$, symbol$, 0, "")
- IF Error_Happened THEN GOTO errmes
- reginternalvariable = 0
- 'the following line stops the return variable from being free'd before being returned
- CLOSE #19: OPEN tmpdir$ + "free" + str2$(subfuncn) + ".txt" FOR OUTPUT AS #19
- 'create return
- IF (rettyp AND ISSTRING) THEN
- r$ = refer$(str2$(currentid), id.t, 1)
- IF Error_Happened THEN GOTO errmes
- subfuncret$ = subfuncret$ + "qbs_maketmp(" + r$ + ");"
- subfuncret$ = subfuncret$ + "return " + r$ + ";"
- ELSE
- r$ = refer$(str2$(currentid), id.t, 0)
- IF Error_Happened THEN GOTO errmes
- subfuncret$ = "return " + r$ + ";"
- END IF
- ELSE
-
- IF declaringlibrary <> 0 AND dynamiclibrary <> 0 THEN
- IF os$ = "WIN" THEN
- PRINT #17, "typedef void (CALLBACK* DLLCALL_" + removecast$(RTRIM$(id.callname)) + ")(";
- END IF
- IF os$ = "LNX" THEN
- PRINT #17, "typedef void (*DLLCALL_" + removecast$(RTRIM$(id.callname)) + ")(";
- END IF
- ELSEIF declaringlibrary <> 0 AND customtypelibrary <> 0 THEN
- PRINT #17, "typedef void CUSTOMCALL_" + removecast$(RTRIM$(id.callname)) + "(";
- ELSE
- PRINT #17, "void " + removecast$(RTRIM$(id.callname)) + "(";
- END IF
- IF declaringlibrary THEN GOTO declibjmp2
- PRINT #12, "void " + removecast$(RTRIM$(id.callname)) + "(";
- END IF
- declibjmp2:
-
- addstatic2layout = 0
- staticsf = 0
- e$ = getelement$(a$, n)
- IF e$ = "STATIC" THEN
- IF declaringlibrary THEN a$ = "STATIC cannot be used in a library declaration": GOTO errmes
- addstatic2layout = 1
- staticsf = 2
- a$ = LEFT$(a$, LEN(a$) - 7): n = n - 1 'remove STATIC
- END IF
-
- 'check items to pass
- params = 0
- AllowLocalName = 1
- IF n > 2 THEN
- e$ = getelement$(a$, 3)
- IF e$ <> "(" THEN a$ = "Expected (": GOTO errmes
- e$ = getelement$(a$, n)
- IF e$ <> ")" THEN a$ = "Expected )": GOTO errmes
- l$ = l$ + sp + "("
- IF n = 4 THEN GOTO nosfparams2
- IF n < 4 THEN a$ = "Expected ( ... )": GOTO errmes
- B = 0
- a2$ = ""
- FOR i = 4 TO n - 1
- e$ = getelement$(ca$, i)
- IF e$ = "(" THEN B = B + 1
- IF e$ = ")" THEN B = B - 1
- IF e$ = "," AND B = 0 THEN
- IF i = n - 1 THEN a$ = "Expected , ... )": GOTO errmes
- getlastparam2:
- IF a2$ = "" THEN a$ = "Expected ... ,": GOTO errmes
- a2$ = LEFT$(a2$, LEN(a2$) - 1)
- 'possible format: [BYVAL]a[%][(1)][AS][type]
- params = params + 1
- glinkid = targetid
- glinkarg = params
-
-
-
- IF params > 1 THEN
- PRINT #17, ",";
-
- IF declaringlibrary = 0 THEN
- PRINT #12, ",";
- END IF
-
- END IF
- n2 = numelements(a2$)
- array = 0
- t2$ = ""
- e$ = getelement$(a2$, 1)
-
- byvalue = 0
- IF UCASE$(e$) = "BYVAL" THEN
- IF declaringlibrary = 0 THEN a$ = "BYVAL can only be used with DECLARE LIBRARY": GOTO errmes
- byvalue = 1: a2$ = RIGHT$(a2$, LEN(a2$) - 6)
- IF RIGHT$(l$, 1) = "(" THEN l$ = l$ + sp2 + SCase$("ByVal") ELSE l$ = l$ + sp + SCase$("Byval")
- n2 = numelements(a2$): e$ = getelement$(a2$, 1)
- END IF
-
- IF RIGHT$(l$, 1) = "(" THEN l$ = l$ + sp2 + e$ ELSE l$ = l$ + sp + e$
-
- n2$ = e$
- dimmethod = 0
-
-
- symbol2$ = removesymbol$(n2$)
- IF validname(n2$) = 0 THEN a$ = "Invalid name": GOTO errmes
-
- IF Error_Happened THEN GOTO errmes
- IF symbol2$ <> "" THEN dimmethod = 1
- m = 0
- FOR i2 = 2 TO n2
- e$ = getelement$(a2$, i2)
- IF e$ = "(" THEN
- IF m <> 0 THEN a$ = "Syntax error - too many opening brackets": GOTO errmes
- m = 1
- array = 1
- l$ = l$ + sp2 + "("
- GOTO gotaa2
- END IF
- IF e$ = ")" THEN
- IF m <> 1 THEN a$ = "Syntax error - closing bracket without opening bracket": GOTO errmes
- m = 2
- l$ = l$ + sp2 + ")"
- GOTO gotaa2
- END IF
- IF UCASE$(e$) = "AS" THEN
- IF m <> 0 AND m <> 2 THEN a$ = "Syntax error - check your brackets": GOTO errmes
- m = 3
- l$ = l$ + sp + SCase$("As")
- GOTO gotaa2
- END IF
- IF m = 1 THEN l$ = l$ + sp + e$: GOTO gotaa2 'ignore contents of option bracket telling how many dimensions (add to layout as is)
- IF m <> 3 THEN a$ = "Syntax error - check your brackets": GOTO errmes
- IF t2$ = "" THEN t2$ = e$ ELSE t2$ = t2$ + " " + e$
- gotaa2:
- NEXT i2
- IF m = 1 THEN a$ = "Syntax error - check your brackets": GOTO errmes
- IF symbol2$ <> "" AND t2$ <> "" THEN a$ = "Syntax error - check parameter types": GOTO errmes
-
-
- IF LEN(t2$) THEN 'add type-name after AS
- t2$ = UCASE$(t2$)
- t3$ = t2$
- typ = typname2typ(t3$)
- IF Error_Happened THEN GOTO errmes
- IF typ = 0 THEN a$ = "Undefined type": GOTO errmes
- IF typ AND ISUDT THEN
- IF RTRIM$(udtxcname(typ AND 511)) = "_MEM" AND UCASE$(t3$) = "MEM" AND qb64prefix_set = 1 THEN
- t3$ = MID$(RTRIM$(udtxcname(typ AND 511)), 2)
- ELSE
- t3$ = RTRIM$(udtxcname(typ AND 511))
- END IF
- l$ = l$ + sp + t3$
- ELSE
- FOR t3i = 1 TO LEN(t3$)
- IF ASC(t3$, t3i) = 32 THEN ASC(t3$, t3i) = ASC(sp)
- NEXT
- t3$ = SCase2$(t3$)
- l$ = l$ + sp + t3$
- END IF
- END IF
-
- IF t2$ = "" THEN t2$ = symbol2$
- IF t2$ = "" THEN
- IF LEFT$(n2$, 1) = "_" THEN v = 27 ELSE v = ASC(UCASE$(n2$)) - 64
- t2$ = defineaz(v)
- dimmethod = 1
- END IF
-
-
-
-
- IF array = 1 THEN
- IF declaringlibrary THEN a$ = "Arrays cannot be passed to a library": GOTO errmes
- dimsfarray = 1
- 'note: id2.nele is currently 0
- nelereq = ASC(MID$(id2.nelereq, params, 1))
- IF nelereq THEN
- nele = nelereq
- MID$(id2.nele, params, 1) = CHR$(nele)
-
- ids(targetid) = id2
-
- ignore = dim2(n2$, t2$, dimmethod, str2$(nele))
- IF Error_Happened THEN GOTO errmes
- ELSE
- nele = 1
- MID$(id2.nele, params, 1) = CHR$(nele)
-
- ids(targetid) = id2
-
- ignore = dim2(n2$, t2$, dimmethod, "?")
- IF Error_Happened THEN GOTO errmes
- END IF
-
- dimsfarray = 0
- r$ = refer$(str2$(currentid), id.t, 1)
- IF Error_Happened THEN GOTO errmes
- PRINT #17, "ptrszint*" + r$;
- PRINT #12, "ptrszint*" + r$;
- ELSE
-
- IF declaringlibrary THEN
- 'is it a udt?
- FOR xx = 1 TO lasttype
- IF t2$ = RTRIM$(udtxname(xx)) THEN
- PRINT #17, "void*"
- GOTO decudt
- ELSEIF RTRIM$(udtxname(xx)) = "_MEM" AND t2$ = "MEM" AND qb64prefix_set = 1 THEN
- PRINT #17, "void*"
- GOTO decudt
- END IF
- NEXT
- t$ = typ2ctyp$(0, t2$)
-
- IF Error_Happened THEN GOTO errmes
- IF t$ = "qbs" THEN
- t$ = "char*"
- IF byvalue = 1 THEN a$ = "STRINGs cannot be passed using BYVAL": GOTO errmes
- byvalue = 1 'use t$ as is
- END IF
- IF byvalue THEN PRINT #17, t$; ELSE PRINT #17, t$ + "*";
- decudt:
- GOTO declibjmp3
- END IF
-
- dimsfarray = 1
- ignore = dim2(n2$, t2$, dimmethod, "")
- IF Error_Happened THEN GOTO errmes
-
-
- dimsfarray = 0
- t$ = ""
- typ = id.t 'the typ of the ID created by dim2
-
- t$ = typ2ctyp$(typ, "")
- IF Error_Happened THEN GOTO errmes
-
-
-
- IF t$ = "" THEN a$ = "Cannot find C type to return array data": GOTO errmes
- 'searchpoint
- 'get the name of the variable
- r$ = refer$(str2$(currentid), id.t, 1)
- IF Error_Happened THEN GOTO errmes
- PRINT #17, t$ + "*" + r$;
- PRINT #12, t$ + "*" + r$;
- IF t$ = "qbs" THEN
- u$ = str2$(uniquenumber)
- PRINT #13, "qbs*oldstr" + u$ + "=NULL;"
- PRINT #13, "if(" + r$ + "->tmp||" + r$ + "->fixed||" + r$ + "->readonly){"
- PRINT #13, "oldstr" + u$ + "=" + r$ + ";"
-
- PRINT #13, "if (oldstr" + u$ + "->cmem_descriptor){"
- PRINT #13, r$ + "=qbs_new_cmem(oldstr" + u$ + "->len,0);"
- PRINT #13, "}else{"
- PRINT #13, r$ + "=qbs_new(oldstr" + u$ + "->len,0);"
- PRINT #13, "}"
-
- PRINT #13, "memcpy(" + r$ + "->chr,oldstr" + u$ + "->chr,oldstr" + u$ + "->len);"
- PRINT #13, "}"
-
- PRINT #19, "if(oldstr" + u$ + "){"
- PRINT #19, "if(oldstr" + u$ + "->fixed)qbs_set(oldstr" + u$ + "," + r$ + ");"
- PRINT #19, "qbs_free(" + r$ + ");"
- PRINT #19, "}"
- END IF
- END IF
- declibjmp3:
- IF i <> n - 1 THEN l$ = l$ + sp2 + ","
-
- a2$ = ""
- ELSE
- a2$ = a2$ + e$ + sp
- IF i = n - 1 THEN GOTO getlastparam2
- END IF
- NEXT i
- nosfparams2:
- l$ = l$ + sp2 + ")"
- END IF 'n>2
- AllowLocalName = 0
-
- IF addstatic2layout THEN l$ = l$ + sp + SCase$("Static")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
-
- PRINT #17, ");"
-
- IF declaringlibrary THEN GOTO declibjmp4
-
- PRINT #12, "){"
- PRINT #12, "qbs *tqbs;"
- PRINT #12, "ptrszint tmp_long;"
- PRINT #12, "int32 tmp_fileno;"
- PRINT #12, "uint32 qbs_tmp_base=qbs_tmp_list_nexti;"
- PRINT #12, "uint8 *tmp_mem_static_pointer=mem_static_pointer;"
- PRINT #12, "uint32 tmp_cmem_sp=cmem_sp;"
- PRINT #12, "#include " + CHR$(34) + "data" + str2$(subfuncn) + ".txt" + CHR$(34)
-
- 'create new _MEM lock for this scope
- PRINT #12, "mem_lock *sf_mem_lock;" 'MUST not be static for recursion reasons
- PRINT #12, "new_mem_lock();"
- PRINT #12, "sf_mem_lock=mem_lock_tmp;"
- PRINT #12, "sf_mem_lock->type=3;"
-
- IF vWatchOn = 1 THEN
- PRINT #12, "*__LONG_VWATCH_SUBLEVEL=*__LONG_VWATCH_SUBLEVEL+ 1 ;"
- IF subfunc <> "SUB_VWATCH" THEN
- inclinenump$ = ""
- IF inclinenumber(inclevel) THEN
- thisincname$ = getfilepath$(incname$(inclevel))
- thisincname$ = MID$(incname$(inclevel), LEN(thisincname$) + 1)
- inclinenump$ = "(" + thisincname$ + "," + STR$(inclinenumber(inclevel)) + ") "
- END IF
-
- PRINT #12, "qbs_set(__STRING_VWATCH_SUBNAME,qbs_new_txt_len(" + CHR$(34) + inclinenump$ + subfuncoriginalname$ + CHR$(34) + "," + str2$(LEN(inclinenump$ + subfuncoriginalname$)) + "));"
- PRINT #12, "qbs_cleanup(qbs_tmp_base,0);"
- PRINT #12, "qbs_set(__STRING_VWATCH_INTERNALSUBNAME,qbs_new_txt_len(" + CHR$(34) + subfunc + CHR$(34) + "," + str2$(LEN(subfunc)) + "));"
- PRINT #12, "qbs_cleanup(qbs_tmp_base,0);"
- PRINT #12, "*__LONG_VWATCH_LINENUMBER=-2; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- END IF
-
- PRINT #12, "if (new_error) goto exit_subfunc;"
-
- 'statementn = statementn + 1
- 'if nochecks=0 then PRINT #12, "S_" + str2$(statementn) + ":;"
-
- dimstatic = staticsf
-
- declibjmp4:
-
- IF declaringlibrary THEN
-
- IF customtypelibrary THEN
-
- callname$ = removecast$(RTRIM$(id2.callname))
-
- PRINT #17, "CUSTOMCALL_" + callname$ + " *" + callname$ + "=NULL;"
-
- IF subfuncn THEN
- f = FREEFILE
- OPEN tmpdir$ + "maindata.txt" FOR APPEND AS #f
- ELSE
- f = 13
- END IF
-
-
- PRINT #f, callname$ + "=(CUSTOMCALL_" + callname$ + "*)&" + aliasname$ + ";"
-
- IF subfuncn THEN CLOSE #f
-
- 'if no header exists to make the external function available, the function definition must be found
- IF sfheader = 0 AND sfdeclare <> 0 THEN
- ResolveStaticFunctions = ResolveStaticFunctions + 1
- 'expand array if necessary
- IF ResolveStaticFunctions > UBOUND(ResolveStaticFunction_Name) THEN
- REDIM _PRESERVE ResolveStaticFunction_Name(1 TO ResolveStaticFunctions + 100) AS STRING
- REDIM _PRESERVE ResolveStaticFunction_File(1 TO ResolveStaticFunctions + 100) AS STRING
- REDIM _PRESERVE ResolveStaticFunction_Method(1 TO ResolveStaticFunctions + 100) AS LONG
- END IF
- ResolveStaticFunction_File(ResolveStaticFunctions) = libname$
- ResolveStaticFunction_Name(ResolveStaticFunctions) = aliasname$
- ResolveStaticFunction_Method(ResolveStaticFunctions) = 1
- END IF 'sfheader=0
-
- END IF
-
- IF dynamiclibrary THEN
- IF sfdeclare THEN
-
- PRINT #17, "DLLCALL_" + removecast$(RTRIM$(id2.callname)) + " " + removecast$(RTRIM$(id2.callname)) + "=NULL;"
-
- IF subfuncn THEN
- f = FREEFILE
- OPEN tmpdir$ + "maindata.txt" FOR APPEND AS #f
- ELSE
- f = 13
- END IF
-
- PRINT #f, "if (!" + removecast$(RTRIM$(id2.callname)) + "){"
- IF os$ = "WIN" THEN
- PRINT #f, removecast$(RTRIM$(id2.callname)) + "=(DLLCALL_" + removecast$(RTRIM$(id2.callname)) + ")GetProcAddress(DLL_" + DLLname$ + "," + CHR$(34) + aliasname$ + CHR$(34) + ");"
- PRINT #f, "if (!" + removecast$(RTRIM$(id2.callname)) + ") error(260);"
- END IF
- IF os$ = "LNX" THEN
- PRINT #f, removecast$(RTRIM$(id2.callname)) + "=(DLLCALL_" + removecast$(RTRIM$(id2.callname)) + ")dlsym(DLL_" + DLLname$ + "," + CHR$(34) + aliasname$ + CHR$(34) + ");"
- PRINT #f, "if (dlerror()) error(260);"
- END IF
- PRINT #f, "}"
-
- IF subfuncn THEN CLOSE #f
-
- END IF 'sfdeclare
- END IF 'dynamic
-
- IF sfdeclare = 1 AND customtypelibrary = 0 AND dynamiclibrary = 0 AND indirectlibrary = 0 THEN
- ResolveStaticFunctions = ResolveStaticFunctions + 1
- 'expand array if necessary
- IF ResolveStaticFunctions > UBOUND(ResolveStaticFunction_Name) THEN
- REDIM _PRESERVE ResolveStaticFunction_Name(1 TO ResolveStaticFunctions + 100) AS STRING
- REDIM _PRESERVE ResolveStaticFunction_File(1 TO ResolveStaticFunctions + 100) AS STRING
- REDIM _PRESERVE ResolveStaticFunction_Method(1 TO ResolveStaticFunctions + 100) AS LONG
- END IF
- ResolveStaticFunction_File(ResolveStaticFunctions) = libname$
- ResolveStaticFunction_Name(ResolveStaticFunctions) = aliasname$
- ResolveStaticFunction_Method(ResolveStaticFunctions) = 2
- END IF
-
- IF sfdeclare = 0 AND indirectlibrary = 0 THEN
- CLOSE #17
- OPEN tmpdir$ + "regsf.txt" FOR APPEND AS #17
- END IF
-
- END IF 'declaring library
-
- GOTO finishednonexec
- END IF
- END IF
-
- 'END SUB/FUNCTION
- IF n = 2 THEN
- IF firstelement$ = "END" THEN
- sf = 0
- IF secondelement$ = "FUNCTION" THEN sf = 1
- IF secondelement$ = "SUB" THEN sf = 2
- IF sf THEN
-
- IF LEN(subfunc) = 0 THEN a$ = "END " + secondelement$ + " without " + secondelement$: GOTO errmes
-
- 'check for open controls (copy #3)
- IF controllevel <> 0 AND controltype(controllevel) <> 6 AND controltype(controllevel) <> 32 THEN 'It's OK for subs to be inside $IF blocks
- a$ = "Unidentified open control block"
- SELECT CASE controltype(controllevel)
- CASE 1: a$ = "IF without END IF"
- CASE 2: a$ = "FOR without NEXT"
- CASE 3, 4: a$ = "DO without LOOP"
- CASE 5: a$ = "WHILE without WEND"
- CASE 10 TO 19: a$ = "SELECT CASE without END SELECT"
- END SELECT
- linenumber = controlref(controllevel)
- GOTO errmes
- END IF
-
- IF controltype(controllevel) = 32 AND ideindentsubs THEN
- controltype(controllevel) = 0
- controllevel = controllevel - 1
- END IF
-
- IF LEFT$(subfunc, 4) = "SUB_" THEN secondelement$ = SCase$("Sub") ELSE secondelement$ = SCase$("Function")
- l$ = SCase$("End") + sp + secondelement$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
-
- IF vWatchOn = 1 THEN
- vWatchVariable "", 1
- END IF
-
- staticarraylist = "": staticarraylistn = 0 'remove previously listed arrays
- dimstatic = 0
- PRINT #12, "exit_subfunc:;"
- IF vWatchOn = 1 THEN
- IF NoChecks = 0 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- vWatchAddLabel 0, -1
- END IF
- PRINT #12, "*__LONG_VWATCH_SUBLEVEL=*__LONG_VWATCH_SUBLEVEL- 1 ;"
-
- IF inclinenumber(inclevel) = 0 AND firstLineNumberLabelvWatch > 0 THEN
- PRINT #12, "goto VWATCH_SKIPSETNEXTLINE;"
- PRINT #12, "VWATCH_SETNEXTLINE:;"
- PRINT #12, "switch (*__LONG_VWATCH_GOTO) {"
- FOR i = firstLineNumberLabelvWatch TO lastLineNumberLabelvWatch
- WHILE i > LEN(vWatchUsedLabels)
- vWatchUsedLabels = vWatchUsedLabels + SPACE$(1000)
- vWatchUsedSkipLabels = vWatchUsedSkipLabels + SPACE$(1000)
- WEND
- IF ASC(vWatchUsedLabels, i) = 1 THEN
- PRINT #12, " case " + str2$(i) + ":"
- PRINT #12, " goto VWATCH_LABEL_" + str2$(i) + ";"
- PRINT #12, " break;"
- END IF
- NEXT
- PRINT #12, " default:"
- PRINT #12, " *__LONG_VWATCH_GOTO=*__LONG_VWATCH_LINENUMBER;"
- PRINT #12, " goto VWATCH_SETNEXTLINE;"
- PRINT #12, "}"
-
- PRINT #12, "VWATCH_SKIPLINE:;"
- PRINT #12, "switch (*__LONG_VWATCH_GOTO) {"
- FOR i = firstLineNumberLabelvWatch TO lastLineNumberLabelvWatch
- IF ASC(vWatchUsedSkipLabels, i) = 1 THEN
- PRINT #12, " case -" + str2$(i) + ":"
- PRINT #12, " goto VWATCH_SKIPLABEL_" + str2$(i) + ";"
- PRINT #12, " break;"
- END IF
- NEXT
- PRINT #12, "}"
-
- PRINT #12, "VWATCH_SKIPSETNEXTLINE:;"
- END IF
- firstLineNumberLabelvWatch = 0
- END IF
-
- 'release _MEM lock for this scope
- PRINT #12, "free_mem_lock(sf_mem_lock);"
-
- PRINT #12, "#include " + CHR$(34) + "free" + str2$(subfuncn) + ".txt" + CHR$(34)
- PRINT #12, "if ((tmp_mem_static_pointer>=mem_static)&&(tmp_mem_static_pointer<=mem_static_limit)) mem_static_pointer=tmp_mem_static_pointer; else mem_static_pointer=mem_static;"
- PRINT #12, "cmem_sp=tmp_cmem_sp;"
- IF subfuncret$ <> "" THEN PRINT #12, subfuncret$
-
- PRINT #12, "}" 'skeleton sub
- 'ret???.txt
- PRINT #15, "}" 'end case
- PRINT #15, "}"
- PRINT #15, "error(3);" 'no valid return possible
- subfunc = ""
- closedsubfunc = -1
-
- 'unshare temp. shared variables
- FOR i = 1 TO idn
- IF ids(i).share AND 2 THEN ids(i).share = ids(i).share - 2
- NEXT
-
- FOR i = 1 TO revertmaymusthaven
- x = revertmaymusthave(i)
- SWAP ids(x).musthave, ids(x).mayhave
- NEXT
- revertmaymusthaven = 0
-
- 'undeclare constants in sub/function's scope
- 'constlast = constlastshared
- GOTO finishednonexec
-
- END IF
- END IF
- END IF
-
-
-
- IF n >= 1 AND firstelement$ = "CONST" THEN
- l$ = SCase$("Const")
- 'DEF... do not change type, the expression is stored in a suitable type
- 'based on its value if type isn't forced/specified
- IF n < 3 THEN a$ = "Expected CONST name = value/expression": GOTO errmes
- i = 2
-
- constdefpending:
- pending = 0
-
- n$ = getelement$(ca$, i): i = i + 1
- l$ = l$ + sp + n$ + sp + "="
- typeoverride = 0
- s$ = removesymbol$(n$)
- IF Error_Happened THEN GOTO errmes
- IF s$ <> "" THEN
- typeoverride = typname2typ(s$)
- IF Error_Happened THEN GOTO errmes
- IF typeoverride AND ISFIXEDLENGTH THEN a$ = "Invalid constant type": GOTO errmes
- IF typeoverride = 0 THEN a$ = "Invalid constant type": GOTO errmes
- END IF
-
- IF getelement$(a$, i) <> "=" THEN a$ = "Expected =": GOTO errmes
- i = i + 1
-
- 'get expression
- e$ = ""
- B = 0
- FOR i2 = i TO n
- e2$ = getelement$(ca$, i2)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF e2$ = "," AND B = 0 THEN
- pending = 1
- i = i2 + 1
- IF i > n - 2 THEN a$ = "Expected CONST ... , name = value/expression": GOTO errmes
- EXIT FOR
- END IF
- IF LEN(e$) = 0 THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
- NEXT
-
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
-
- 'Note: Actual CONST definition handled in prepass
-
- 'Set CONST as defined
- hashname$ = n$
- hashchkflags = HASHFLAG_CONSTANT
- hashres = HashFind(hashname$, hashchkflags, hashresflags, hashresref)
- DO WHILE hashres
- IF constsubfunc(hashresref) = subfuncn THEN constdefined(hashresref) = 1: EXIT DO
- IF hashres <> 1 THEN hashres = HashFindCont(hashresflags, hashresref) ELSE hashres = 0
- LOOP
-
- IF pending THEN l$ = l$ + sp2 + ",": GOTO constdefpending
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
-
- GOTO finishednonexec
- END IF
-
- predefine:
- IF n >= 2 THEN
- asreq = 0
- IF firstelement$ = "DEFINT" THEN l$ = SCase$("DefInt"): a$ = a$ + sp + "AS" + sp + "INTEGER": n = n + 2: GOTO definetype
- IF firstelement$ = "DEFLNG" THEN l$ = SCase$("DefLng"): a$ = a$ + sp + "AS" + sp + "LONG": n = n + 2: GOTO definetype
- IF firstelement$ = "DEFSNG" THEN l$ = SCase$("DefSng"): a$ = a$ + sp + "AS" + sp + "SINGLE": n = n + 2: GOTO definetype
- IF firstelement$ = "DEFDBL" THEN l$ = SCase$("DefDbl"): a$ = a$ + sp + "AS" + sp + "DOUBLE": n = n + 2: GOTO definetype
- IF firstelement$ = "DEFSTR" THEN l$ = SCase$("DefStr"): a$ = a$ + sp + "AS" + sp + "STRING": n = n + 2: GOTO definetype
- IF firstelement$ = "_DEFINE" OR (firstelement$ = "DEFINE" AND qb64prefix_set = 1) THEN
- asreq = 1
- IF firstelement$ = "_DEFINE" THEN l$ = SCase$("_Define") ELSE l$ = SCase$("Define")
- definetype:
- 'get type from rhs
- typ$ = ""
- typ2$ = ""
- t$ = ""
- FOR i = n TO 2 STEP -1
- t$ = getelement$(a$, i)
- IF t$ = "AS" THEN EXIT FOR
- typ$ = t$ + " " + typ$
- typ2$ = t$ + sp + typ2$
- NEXT
- typ$ = RTRIM$(typ$)
- IF t$ <> "AS" THEN a$ = qb64prefix$ + "DEFINE: Expected ... AS ...": GOTO errmes
- IF i = n OR i = 2 THEN a$ = qb64prefix$ + "DEFINE: Expected ... AS ...": GOTO errmes
-
-
- n = i - 1
- 'the data is from element 2 to element n
- i = 2 - 1
- definenext:
- 'expects an alphabet letter or underscore
- i = i + 1: e$ = getelement$(a$, i): E = ASC(UCASE$(e$))
- IF LEN(e$) > 1 THEN a$ = qb64prefix$ + "DEFINE: Expected an alphabet letter or the underscore character (_)": GOTO errmes
- IF E <> 95 AND (E > 90 OR E < 65) THEN a$ = qb64prefix$ + "DEFINE: Expected an alphabet letter or the underscore character (_)": GOTO errmes
- IF E = 95 THEN E = 27 ELSE E = E - 64
- defineaz(E) = typ$
- defineextaz(E) = type2symbol(typ$)
- IF Error_Happened THEN GOTO errmes
- firste = E
- l$ = l$ + sp + e$
-
- IF i = n THEN
- IF predefining = 1 THEN GOTO predefined
- IF asreq THEN l$ = l$ + sp + SCase$("As") + sp + typ2$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec
- END IF
-
- 'expects "-" or ","
- i = i + 1: e$ = getelement$(a$, i)
- IF e$ <> "-" AND e$ <> "," THEN a$ = qb64prefix$ + "DEFINE: Expected - or ,": GOTO errmes
- IF e$ = "-" THEN
- l$ = l$ + sp2 + "-"
- IF i = n THEN a$ = qb64prefix$ + "DEFINE: Syntax incomplete": GOTO errmes
- 'expects an alphabet letter or underscore
- i = i + 1: e$ = getelement$(a$, i): E = ASC(UCASE$(e$))
- IF LEN(e$) > 1 THEN a$ = qb64prefix$ + "DEFINE: Expected an alphabet letter or the underscore character (_)": GOTO errmes
- IF E <> 95 AND (E > 90 OR E < 65) THEN a$ = qb64prefix$ + "DEFINE: Expected an alphabet letter or the underscore character (_)": GOTO errmes
- IF E = 95 THEN E = 27 ELSE E = E - 64
- IF firste > E THEN SWAP E, firste
- FOR e2 = firste TO E
- defineaz(e2) = typ$
- defineextaz(e2) = type2symbol(typ$)
- IF Error_Happened THEN GOTO errmes
- NEXT
- l$ = l$ + sp2 + e$
- IF i = n THEN
- IF predefining = 1 THEN GOTO predefined
- IF asreq THEN l$ = l$ + sp + SCase$("As") + sp + typ2$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec
- END IF
- 'expects ","
- i = i + 1: e$ = getelement$(a$, i)
- IF e$ <> "," THEN a$ = qb64prefix$ + "DEFINE: Expected ,": GOTO errmes
- END IF
- l$ = l$ + sp2 + ","
- GOTO definenext
- END IF '_DEFINE
- END IF '2
- IF predefining = 1 THEN GOTO predefined
-
- IF closedmain <> 0 AND subfunc = "" THEN a$ = "Statement cannot be placed between SUB/FUNCTIONs": GOTO errmes
-
- 'executable section:
-
- statementn = statementn + 1
-
-
- IF n >= 1 THEN
- IF firstelement$ = "NEXT" THEN
-
- l$ = SCase$("Next")
- IF n = 1 THEN GOTO simplenext
- v$ = ""
- FOR i = 2 TO n
- a2$ = getelement(ca$, i)
-
- IF a2$ = "," THEN
-
- lastnextele:
- e$ = fixoperationorder(v$)
- IF Error_Happened THEN GOTO errmes
- IF LEN(l$) = 4 THEN l$ = l$ + sp + tlayout$ ELSE l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN
- getid VAL(e$)
- IF Error_Happened THEN GOTO errmes
- IF (id.t AND ISPOINTER) THEN
- IF (id.t AND ISSTRING) = 0 THEN
- IF (id.t AND ISOFFSETINBITS) = 0 THEN
- IF (id.t AND ISARRAY) = 0 THEN
- GOTO fornextfoundvar2
- END IF
- END IF
- END IF
- END IF
- END IF
- a$ = "Unsupported variable after NEXT": GOTO errmes
- fornextfoundvar2:
- simplenext:
- IF controltype(controllevel) <> 2 THEN a$ = "NEXT without FOR": GOTO errmes
- IF n <> 1 AND controlvalue(controllevel) <> currentid THEN a$ = "Incorrect variable after NEXT": GOTO errmes
- PRINT #12, "fornext_continue_" + str2$(controlid(controllevel)) + ":;"
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 AND NoChecks = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- PRINT #12, "}"
- PRINT #12, "fornext_exit_" + str2$(controlid(controllevel)) + ":;"
- controllevel = controllevel - 1
- IF n = 1 THEN EXIT FOR
- v$ = ""
-
- ELSE
-
- IF LEN(v$) THEN v$ = v$ + sp + a2$ ELSE v$ = a2$
- IF i = n THEN GOTO lastnextele
-
- END IF
-
- NEXT
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec '***no error causing code, event checking done by FOR***
- END IF
- END IF
-
-
-
- IF n >= 1 THEN
- IF firstelement$ = "WHILE" THEN
- IF NoChecks = 0 THEN PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
-
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
- controllevel = controllevel + 1
- controlref(controllevel) = linenumber
- controltype(controllevel) = 5
- controlid(controllevel) = uniquenumber
- IF n >= 2 THEN
- e$ = fixoperationorder(getelements$(ca$, 2, n))
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("While") + sp + tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer$(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- IF stringprocessinghappened THEN e$ = cleanupstringprocessingcall$ + e$ + ")"
- IF (typ AND ISSTRING) THEN a$ = "WHILE ERROR! Cannot accept a STRING type.": GOTO errmes
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- PRINT #12, "while((" + e$ + ")||new_error){"
- ELSE
- a$ = "WHILE ERROR! Expected expression after WHILE.": GOTO errmes
- END IF
-
- GOTO finishedline
- END IF
- END IF
-
- IF n = 1 THEN
- IF firstelement$ = "WEND" THEN
-
-
- IF controltype(controllevel) <> 5 THEN a$ = "WEND without WHILE": GOTO errmes
- PRINT #12, "ww_continue_" + str2$(controlid(controllevel)) + ":;"
- PRINT #12, "}"
- PRINT #12, "ww_exit_" + str2$(controlid(controllevel)) + ":;"
- controllevel = controllevel - 1
- l$ = SCase$("Wend")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec '***no error causing code, event checking done by WHILE***
- END IF
- END IF
-
-
-
-
-
- IF n >= 1 THEN
- IF firstelement$ = "DO" THEN
- IF NoChecks = 0 THEN PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
-
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
- controllevel = controllevel + 1
- controlref(controllevel) = linenumber
- l$ = SCase$("Do")
- IF n >= 2 THEN
- whileuntil = 0
- IF secondelement$ = "WHILE" THEN whileuntil = 1: l$ = l$ + sp + SCase$("While")
- IF secondelement$ = "UNTIL" THEN whileuntil = 2: l$ = l$ + sp + SCase$("Until")
- IF whileuntil = 0 THEN a$ = "DO ERROR! Expected WHILE or UNTIL after DO.": GOTO errmes
- IF whileuntil > 0 AND n = 2 THEN a$ = "Condition expected after WHILE/UNTIL": GOTO errmes
- e$ = fixoperationorder(getelements$(ca$, 3, n))
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer$(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- IF stringprocessinghappened THEN e$ = cleanupstringprocessingcall$ + e$ + ")"
- IF (typ AND ISSTRING) THEN a$ = "DO ERROR! Cannot accept a STRING type.": GOTO errmes
- IF whileuntil = 1 THEN PRINT #12, "while((" + e$ + ")||new_error){" ELSE PRINT #12, "while((!(" + e$ + "))||new_error){"
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- controltype(controllevel) = 4
- ELSE
- controltype(controllevel) = 3
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 AND NoChecks = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "do{*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- ELSE
- PRINT #12, "do{"
- END IF
- END IF
- controlid(controllevel) = uniquenumber
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
-
- IF n >= 1 THEN
- IF firstelement$ = "LOOP" THEN
- l$ = SCase$("Loop")
- IF controltype(controllevel) <> 3 AND controltype(controllevel) <> 4 THEN a$ = "PROGRAM FLOW ERROR!": GOTO errmes
- IF n >= 2 THEN
- IF NoChecks = 0 THEN PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
- IF controltype(controllevel) = 4 THEN a$ = "PROGRAM FLOW ERROR!": GOTO errmes
- whileuntil = 0
- IF secondelement$ = "WHILE" THEN whileuntil = 1: l$ = l$ + sp + SCase$("While")
- IF secondelement$ = "UNTIL" THEN whileuntil = 2: l$ = l$ + sp + SCase$("Until")
- IF whileuntil = 0 THEN a$ = "LOOP ERROR! Expected WHILE or UNTIL after LOOP.": GOTO errmes
- IF whileuntil > 0 AND n = 2 THEN a$ = "Condition expected after WHILE/UNTIL": GOTO errmes
- e$ = fixoperationorder(getelements$(ca$, 3, n))
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer$(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- IF stringprocessinghappened THEN e$ = cleanupstringprocessingcall$ + e$ + ")"
- IF (typ AND ISSTRING) THEN a$ = "LOOP ERROR! Cannot accept a STRING type.": GOTO errmes
- PRINT #12, "dl_continue_" + str2$(controlid(controllevel)) + ":;"
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- IF whileuntil = 1 THEN PRINT #12, "}while((" + e$ + ")&&(!new_error));" ELSE PRINT #12, "}while((!(" + e$ + "))&&(!new_error));"
- ELSE
- PRINT #12, "dl_continue_" + str2$(controlid(controllevel)) + ":;"
-
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
-
- IF controltype(controllevel) = 4 THEN
- PRINT #12, "}"
- ELSE
- PRINT #12, "}while(1);" 'infinite loop!
- END IF
- END IF
- PRINT #12, "dl_exit_" + str2$(controlid(controllevel)) + ":;"
- controllevel = controllevel - 1
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- IF n = 1 THEN GOTO finishednonexec '***no error causing code, event checking done by DO***
- GOTO finishedline
- END IF
- END IF
-
-
-
-
-
-
-
-
-
- IF n >= 1 THEN
- IF firstelement$ = "FOR" THEN
- IF NoChecks = 0 THEN PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
-
- l$ = SCase$("For")
-
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
- controllevel = controllevel + 1
- controlref(controllevel) = linenumber
- controltype(controllevel) = 2
- controlid(controllevel) = uniquenumber
-
- v$ = ""
- startvalue$ = ""
- p3$ = "1": stepused = 0
- p2$ = ""
- mode = 0
- E = 0
- FOR i = 2 TO n
- e$ = getelement$(a$, i)
- IF e$ = "=" THEN
- IF mode <> 0 THEN E = 1: EXIT FOR
- mode = 1
- v$ = getelements$(ca$, 2, i - 1)
- equpos = i
- END IF
- IF e$ = "TO" THEN
- IF mode <> 1 THEN E = 1: EXIT FOR
- mode = 2
- startvalue$ = getelements$(ca$, equpos + 1, i - 1)
- topos = i
- END IF
- IF e$ = "STEP" THEN
- IF mode <> 2 THEN E = 1: EXIT FOR
- mode = 3
- stepused = 1
- p2$ = getelements$(ca$, topos + 1, i - 1)
- p3$ = getelements$(ca$, i + 1, n)
- EXIT FOR
- END IF
- NEXT
- IF mode < 2 THEN E = 1
- IF p2$ = "" THEN p2$ = getelements$(ca$, topos + 1, n)
- IF LEN(v$) = 0 OR LEN(startvalue$) = 0 OR LEN(p2$) = 0 THEN E = 1
- IF E <> 0 AND mode < 3 THEN a$ = "Expected FOR name = start TO end": GOTO errmes
- IF E THEN a$ = "Expected FOR name = start TO end STEP increment": GOTO errmes
-
- e$ = fixoperationorder(v$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN
- getid VAL(e$)
- IF Error_Happened THEN GOTO errmes
- IF (id.t AND ISPOINTER) THEN
- IF (id.t AND ISSTRING) = 0 THEN
- IF (id.t AND ISOFFSETINBITS) = 0 THEN
- IF (id.t AND ISARRAY) = 0 THEN
- GOTO fornextfoundvar
- END IF
- END IF
- END IF
- END IF
- END IF
- a$ = "Unsupported variable used in FOR statement": GOTO errmes
- fornextfoundvar:
- controlvalue(controllevel) = currentid
- v$ = e$
-
- 'find C++ datatype to match variable
- 'markup to cater for greater range/accuracy
- ctype$ = ""
- ctyp = typ - ISPOINTER
- bits = typ AND 511
- IF (typ AND ISFLOAT) THEN
- IF bits = 32 THEN ctype$ = "double": ctyp = 64& + ISFLOAT
- IF bits = 64 THEN ctype$ = "long double": ctyp = 256& + ISFLOAT
- IF bits = 256 THEN ctype$ = "long double": ctyp = 256& + ISFLOAT
- ELSE
- IF bits = 8 THEN ctype$ = "int16": ctyp = 16&
- IF bits = 16 THEN ctype$ = "int32": ctyp = 32&
- IF bits = 32 THEN ctype$ = "int64": ctyp = 64&
- IF bits = 64 THEN ctype$ = "int64": ctyp = 64&
- END IF
- IF ctype$ = "" THEN a$ = "Unsupported variable used in FOR statement": GOTO errmes
- u$ = str2(uniquenumber)
-
- IF subfunc = "" THEN
- PRINT #13, "static " + ctype$ + " fornext_value" + u$ + ";"
- PRINT #13, "static " + ctype$ + " fornext_finalvalue" + u$ + ";"
- PRINT #13, "static " + ctype$ + " fornext_step" + u$ + ";"
- PRINT #13, "static uint8 fornext_step_negative" + u$ + ";"
- ELSE
- PRINT #13, ctype$ + " fornext_value" + u$ + ";"
- PRINT #13, ctype$ + " fornext_finalvalue" + u$ + ";"
- PRINT #13, ctype$ + " fornext_step" + u$ + ";"
- PRINT #13, "uint8 fornext_step_negative" + u$ + ";"
- END IF
-
- 'calculate start
- e$ = fixoperationorder$(startvalue$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + "=" + sp + tlayout$
- e$ = evaluatetotyp$(e$, ctyp)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "fornext_value" + u$ + "=" + e$ + ";"
-
- 'final
- e$ = fixoperationorder$(p2$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + SCase$("To") + sp + tlayout$
- e$ = evaluatetotyp(e$, ctyp)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "fornext_finalvalue" + u$ + "=" + e$ + ";"
-
- 'step
- e$ = fixoperationorder$(p3$)
- IF Error_Happened THEN GOTO errmes
- IF stepused = 1 THEN l$ = l$ + sp + SCase$("Step") + sp + tlayout$
- e$ = evaluatetotyp(e$, ctyp)
- IF Error_Happened THEN GOTO errmes
-
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
-
- PRINT #12, "fornext_step" + u$ + "=" + e$ + ";"
- PRINT #12, "if (fornext_step" + u$ + "<0) fornext_step_negative" + u$ + "=1; else fornext_step_negative" + u$ + "=0;"
-
- PRINT #12, "if (new_error) goto fornext_error" + u$ + ";"
- PRINT #12, "goto fornext_entrylabel" + u$ + ";"
- PRINT #12, "while(1){"
- typbak = typ
- PRINT #12, "fornext_value" + u$ + "=fornext_step" + u$ + "+(" + refer$(v$, typ, 0) + ");"
- IF Error_Happened THEN GOTO errmes
- typ = typbak
- PRINT #12, "fornext_entrylabel" + u$ + ":"
- setrefer v$, typ, "fornext_value" + u$, 1
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "if (fornext_step_negative" + u$ + "){"
- PRINT #12, "if (fornext_value" + u$ + "fornext_finalvalue" + u$ + ") break;"
- PRINT #12, "}"
- PRINT #12, "fornext_error" + u$ + ":;"
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
-
- GOTO finishedline
- END IF
- END IF
-
-
- IF n = 1 THEN
- IF firstelement$ = "ELSE" THEN
-
- 'Routine to add error checking for ELSE so we'll no longer be able to do things like the following:
- 'IF x = 1 THEN
- ' SELECT CASE s
- ' CASE 1
- ' END SELECT ELSE y = 2
- 'END IF
- 'Notice the ELSE with the SELECT CASE? Before this patch, commands like those were considered valid QB64 code.
- temp$ = UCASE$(LTRIM$(RTRIM$(wholeline)))
- 'IF NoIDEMode THEN
- DO WHILE INSTR(temp$, CHR$(9))
- ASC(temp$, INSTR(temp$, CHR$(9))) = 32
- LOOP
- 'END IF
- goodelse = 0 'a check to see if it's a good else
- IF LEFT$(temp$, 2) = "IF" THEN goodelse = -1: GOTO skipelsecheck 'If we have an IF, the else is probably good
- IF LEFT$(temp$, 4) = "ELSE" THEN goodelse = -1: GOTO skipelsecheck 'If it's an else by itself,then we'll call it good too at this point and let the rest of the syntax checking check for us
- DO
- spacelocation = INSTR(temp$, " ")
- IF spacelocation THEN temp$ = LEFT$(temp$, spacelocation - 1) + MID$(temp$, spacelocation + 1)
- LOOP UNTIL spacelocation = 0
- IF INSTR(temp$, ":ELSE") OR INSTR(temp$, ":IF") THEN goodelse = -1: GOTO skipelsecheck 'I personally don't like the idea of a :ELSE statement, but this checks for that and validates it as well. YUCK! (I suppose this might be useful if there's a label where the ELSE is, like thisline: ELSE
- count = 0
- DO
- count = count + 1
- SELECT CASE MID$(temp$, count, 1)
- CASE IS = "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ":"
- CASE ELSE: EXIT DO
- END SELECT
- LOOP UNTIL count >= LEN(temp$)
- IF MID$(temp$, count, 4) = "ELSE" OR MID$(temp$, count, 2) = "IF" THEN goodelse = -1 'We only had numbers before our else
- IF NOT goodelse THEN a$ = "Invalid Syntax for ELSE": GOTO errmes
- skipelsecheck:
- 'End of ELSE Error checking
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 1 THEN
- IF controlstate(controllevel) = 2 THEN a$ = "IF-THEN already contains an ELSE statement": GOTO errmes
- PRINT #12, "}else{"
- controlstate(controllevel) = 2
- IF lineelseused = 0 THEN lhscontrollevel = lhscontrollevel - 1
- l$ = SCase$("Else")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec '***no error causing code, event checking done by IF***
- END IF
- NEXT
- a$ = "ELSE without IF": GOTO errmes
- END IF
- END IF
-
- IF n >= 3 THEN
- IF firstelement$ = "ELSEIF" THEN
- IF NoChecks = 0 THEN
- PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- END IF
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 1 THEN
- IF controlstate(controllevel) = 2 THEN a$ = "ELSEIF invalid after ELSE": GOTO errmes
- controlstate(controllevel) = 1
- controlvalue(controllevel) = controlvalue(controllevel) + 1
- e$ = getelement$(a$, n)
- IF e$ <> "THEN" THEN a$ = "Expected ELSEIF expression THEN": GOTO errmes
- PRINT #12, "}else{"
- e$ = fixoperationorder$(getelements$(ca$, 2, n - 1))
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("ElseIf") + sp + tlayout$ + sp + SCase$("Then")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer$(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- IF typ AND ISSTRING THEN
- a$ = "Expected ELSEIF LEN(stringexpression) THEN": GOTO errmes
- END IF
- IF stringprocessinghappened THEN
- PRINT #12, "if (" + cleanupstringprocessingcall$ + e$ + ")){"
- ELSE
- PRINT #12, "if (" + e$ + "){"
- END IF
- lhscontrollevel = lhscontrollevel - 1
- GOTO finishedline
- END IF
- NEXT
- a$ = "ELSEIF without IF": GOTO errmes
- END IF
- END IF
-
- IF n >= 3 THEN
- IF firstelement$ = "IF" THEN
- IF NoChecks = 0 THEN
- PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- END IF
-
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
- e$ = getelement(a$, n)
- iftype = 0
- IF e$ = "THEN" THEN iftype = 1
- IF e$ = "GOTO" THEN iftype = 2
- IF iftype = 0 THEN a$ = "Expected IF expression THEN/GOTO": GOTO errmes
-
- controllevel = controllevel + 1
- controlref(controllevel) = linenumber
- controltype(controllevel) = 1
- controlvalue(controllevel) = 0 'number of extra closing } required at END IF
- controlstate(controllevel) = 0
-
- e$ = fixoperationorder$(getelements(ca$, 2, n - 1))
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("If") + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer$(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
-
- IF typ AND ISSTRING THEN
- a$ = "Expected IF LEN(stringexpression) THEN": GOTO errmes
- END IF
-
- IF stringprocessinghappened THEN
- PRINT #12, "if ((" + cleanupstringprocessingcall$ + e$ + "))||new_error){"
- ELSE
- PRINT #12, "if ((" + e$ + ")||new_error){"
- END IF
-
- IF iftype = 1 THEN l$ = l$ + sp + SCase$("Then") 'note: 'GOTO' will be added when iftype=2
- layoutdone = 1: IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
-
- IF iftype = 2 THEN 'IF ... GOTO
- GOTO finishedline
- END IF
-
- THENGOTO = 1 'possible: IF a=1 THEN 10
- GOTO finishedline2
- END IF
- END IF
-
- 'ENDIF
- IF n = 1 AND getelement(a$, 1) = "ENDIF" THEN
- IF controltype(controllevel) <> 1 THEN a$ = "END IF without IF": GOTO errmes
- layoutdone = 1
- IF impliedendif = 0 THEN
- l$ = SCase$("End If")
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- END IF
-
- PRINT #12, "}"
- FOR i = 1 TO controlvalue(controllevel)
- PRINT #12, "}"
- NEXT
- controllevel = controllevel - 1
- GOTO finishednonexec '***no error causing code, event checking done by IF***
- END IF
-
-
- 'END IF
- IF n = 2 THEN
- IF getelement(a$, 1) = "END" AND getelement(a$, 2) = "IF" THEN
-
-
- IF controltype(controllevel) <> 1 THEN a$ = "END IF without IF": GOTO errmes
- layoutdone = 1
- IF impliedendif = 0 THEN
- l$ = SCase$("End" + sp + "If")
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- END IF
-
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
-
- PRINT #12, "}"
- FOR i = 1 TO controlvalue(controllevel)
- PRINT #12, "}"
- NEXT
- controllevel = controllevel - 1
- GOTO finishednonexec '***no error causing code, event checking done by IF***
- END IF
- END IF
-
-
-
- 'SELECT CASE
- IF n >= 1 THEN
- IF firstelement$ = "SELECT" THEN
- IF NoChecks = 0 THEN
- PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- END IF
-
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
- SelectCaseCounter = SelectCaseCounter + 1
- IF UBOUND(EveryCaseSet) <= SelectCaseCounter THEN REDIM _PRESERVE EveryCaseSet(SelectCaseCounter)
- IF UBOUND(SelectCaseHasCaseBlock) <= SelectCaseCounter THEN REDIM _PRESERVE SelectCaseHasCaseBlock(SelectCaseCounter)
- SelectCaseHasCaseBlock(SelectCaseCounter) = 0
- IF secondelement$ = "EVERYCASE" THEN
- EveryCaseSet(SelectCaseCounter) = -1
- IF n = 2 THEN a$ = "Expected SELECT CASE expression": GOTO errmes
- e$ = fixoperationorder(getelements$(ca$, 3, n))
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("Select EveryCase ") + tlayout$
- ELSE
- EveryCaseSet(SelectCaseCounter) = 0
- IF n = 1 OR secondelement$ <> "CASE" THEN a$ = "Expected CASE or EVERYCASE": GOTO errmes
- IF n = 2 THEN a$ = "Expected SELECT CASE expression": GOTO errmes
- e$ = fixoperationorder(getelements$(ca$, 3, n))
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("Select Case ") + tlayout$
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- u = uniquenumber
-
- controllevel = controllevel + 1
- controlvalue(controllevel) = 0 'id
-
- t$ = ""
- IF (typ AND ISSTRING) THEN
- t = 0
- IF (typ AND ISUDT) = 0 AND (typ AND ISARRAY) = 0 AND (typ AND ISREFERENCE) <> 0 THEN
- controlvalue(controllevel) = VAL(e$)
- ELSE
- IF (typ AND ISREFERENCE) THEN e$ = refer(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- PRINT #13, "static qbs *sc_" + str2$(u) + "=qbs_new(0,0);"
- PRINT #12, "qbs_set(sc_" + str2$(u) + "," + e$ + ");"
- IF stringprocessinghappened THEN PRINT #12, cleanupstringprocessingcall$ + "0);"
- END IF
-
- ELSE
-
- IF (typ AND ISFLOAT) THEN
-
- IF (typ AND 511) > 64 THEN t = 3: t$ = "long double"
- IF (typ AND 511) = 32 THEN t = 4: t$ = "float"
- IF (typ AND 511) = 64 THEN t = 5: t$ = "double"
- IF (typ AND ISUDT) = 0 AND (typ AND ISARRAY) = 0 AND (typ AND ISREFERENCE) <> 0 THEN
- controlvalue(controllevel) = VAL(e$)
- ELSE
- IF (typ AND ISREFERENCE) THEN e$ = refer(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
-
- PRINT #13, "static " + t$ + " sc_" + str2$(u) + ";"
- PRINT #12, "sc_" + str2$(u) + "=" + e$ + ";"
- IF stringprocessinghappened THEN PRINT #12, cleanupstringprocessingcall$ + "0);"
- END IF
-
- ELSE
-
- 'non-float
- t = 1: t$ = "int64"
- IF (typ AND ISUNSIGNED) THEN
- IF (typ AND 511) <= 32 THEN t = 7: t$ = "uint32"
- IF (typ AND 511) > 32 THEN t = 2: t$ = "uint64"
- ELSE
- IF (typ AND 511) <= 32 THEN t = 6: t$ = "int32"
- IF (typ AND 511) > 32 THEN t = 1: t$ = "int64"
- END IF
- IF (typ AND ISUDT) = 0 AND (typ AND ISARRAY) = 0 AND (typ AND ISREFERENCE) <> 0 THEN
- controlvalue(controllevel) = VAL(e$)
- ELSE
- IF (typ AND ISREFERENCE) THEN e$ = refer(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- PRINT #13, "static " + t$ + " sc_" + str2$(u) + ";"
- PRINT #12, "sc_" + str2$(u) + "=" + e$ + ";"
- IF stringprocessinghappened THEN PRINT #12, cleanupstringprocessingcall$ + "0);"
- END IF
-
- END IF
- END IF
-
-
-
- controlref(controllevel) = linenumber
- controltype(controllevel) = 10 + t
- controlid(controllevel) = u
- IF EveryCaseSet(SelectCaseCounter) THEN PRINT #13, "int32 sc_" + str2$(controlid(controllevel)) + "_var;"
- IF EveryCaseSet(SelectCaseCounter) THEN PRINT #12, "sc_" + str2$(controlid(controllevel)) + "_var=0;"
- GOTO finishedline
- END IF
- END IF
-
-
- 'END SELECT
- IF n = 2 THEN
- IF firstelement$ = "END" AND secondelement$ = "SELECT" THEN
- 'complete current case if necessary
- '18=CASE (awaiting END SELECT/CASE/CASE ELSE)
- '19=CASE ELSE (awaiting END SELECT)
- IF controltype(controllevel) = 18 THEN
- everycasenewcase = everycasenewcase + 1
- PRINT #12, "sc_ec_" + str2$(everycasenewcase) + "_end:;"
- controllevel = controllevel - 1
- IF EveryCaseSet(SelectCaseCounter) = 0 THEN PRINT #12, "goto sc_" + str2$(controlid(controllevel)) + "_end;"
- PRINT #12, "}"
- END IF
- IF controltype(controllevel) = 19 THEN
- controllevel = controllevel - 1
- IF EveryCaseSet(SelectCaseCounter) THEN PRINT #12, "} /* End of SELECT EVERYCASE ELSE */"
- END IF
-
- PRINT #12, "sc_" + str2$(controlid(controllevel)) + "_end:;"
- IF controltype(controllevel) < 10 OR controltype(controllevel) > 17 THEN a$ = "END SELECT without SELECT CASE": GOTO errmes
-
- IF NoChecks = 0 AND vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
-
- IF SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- 'warn user of empty SELECT CASE block
- IF NOT IgnoreWarnings THEN
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "empty SELECT CASE block", ""
- END IF
- END IF
-
- controllevel = controllevel - 1
- SelectCaseCounter = SelectCaseCounter - 1
- l$ = SCase$("End" + sp + "Select")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec '***no error causing code, event checking done by SELECT CASE***
- END IF
- END IF
-
- 'prevents code from being placed before 'CASE condition' in a SELECT CASE block
- IF n >= 1 AND firstelement$ <> "CASE" AND SelectCaseCounter > 0 AND SelectCaseHasCaseBlock(SelectCaseCounter) = 0 THEN
- a$ = "Expected CASE expression": GOTO errmes
- END IF
-
-
- 'CASE
- IF n >= 1 THEN
- IF firstelement$ = "CASE" THEN
-
- l$ = SCase$("Case")
- 'complete current case if necessary
- '18=CASE (awaiting END SELECT/CASE/CASE ELSE)
- '19=CASE ELSE (awaiting END SELECT)
- IF controltype(controllevel) = 19 THEN a$ = "Expected END SELECT": GOTO errmes
- IF controltype(controllevel) = 18 THEN
- lhscontrollevel = lhscontrollevel - 1
- controllevel = controllevel - 1
- everycasenewcase = everycasenewcase + 1
- PRINT #12, "sc_ec_" + str2$(everycasenewcase) + "_end:;"
- IF EveryCaseSet(SelectCaseCounter) = 0 THEN
- PRINT #12, "goto sc_" + str2$(controlid(controllevel)) + "_end;"
- ELSE
- PRINT #12, "sc_" + str2$(controlid(controllevel)) + "_var=-1;"
- END IF
- PRINT #12, "}"
- 'following line fixes problem related to RESUME after error
- 'statementn = statementn + 1
- 'if nochecks=0 then PRINT #12, "S_" + str2$(statementn) + ":;"
- END IF
-
- IF controltype(controllevel) <> 6 AND (controltype(controllevel) < 10 OR controltype(controllevel) > 17) THEN a$ = "CASE without SELECT CASE": GOTO errmes
- IF n = 1 THEN a$ = "Expected CASE expression": GOTO errmes
- SelectCaseHasCaseBlock(SelectCaseCounter) = -1
-
-
- 'upgrade:
- '#1: variables can be referred to directly by storing an id in 'controlref'
- ' (but not if part of an array etc.)
- 'DIM controlvalue(1000) AS LONG
- '#2: more types will be available
- ' +SINGLE
- ' +DOUBLE
- ' -LONG DOUBLE
- ' +INT32
- ' +UINT32
- '14=SELECT CASE float ...
- '15=SELECT CASE double
- '16=SELECT CASE int32
- '17=SELECT CASE uint32
-
- '10=SELECT CASE qbs (awaiting END SELECT/CASE)
- '11=SELECT CASE int64 (awaiting END SELECT/CASE)
- '12=SELECT CASE uint64 (awaiting END SELECT/CASE)
- '13=SELECT CASE LONG double (awaiting END SELECT/CASE/CASE ELSE)
- '14=SELECT CASE float ...
- '15=SELECT CASE double
- '16=SELECT CASE int32
- '17=SELECT CASE uint32
-
- ' bits = targettyp AND 511
- ' IF bits <= 16 THEN e$ = "qbr_float_to_long(" + e$ + ")"
- ' IF bits > 16 AND bits < 32 THEN e$ = "qbr_double_to_long(" + e$ + ")"
- ' IF bits >= 32 THEN e$ = "qbr(" + e$ + ")"
-
-
- t = controltype(controllevel) - 10
- 'get required type cast, and float options
- flt = 0
- IF t = 0 THEN tc$ = ""
- IF t = 1 THEN tc$ = ""
- IF t = 2 THEN tc$ = ""
- IF t = 3 THEN tc$ = "": flt = 1
- IF t = 4 THEN tc$ = "(float)": flt = 1
- IF t = 5 THEN tc$ = "(double)": flt = 1
- IF t = 6 THEN tc$ = ""
- IF t = 7 THEN tc$ = ""
-
- n$ = "sc_" + str2$(controlid(controllevel))
- cv = controlvalue(controllevel)
- IF cv THEN
- n$ = refer$(str2$(cv), 0, 0)
- IF Error_Happened THEN GOTO errmes
- END IF
-
- 'CASE ELSE
- IF n = 2 THEN
- IF getelement$(a$, 2) = "C-EL" THEN
- IF EveryCaseSet(SelectCaseCounter) THEN PRINT #12, "if (sc_" + str2$(controlid(controllevel)) + "_var==0) {"
- controllevel = controllevel + 1: controltype(controllevel) = 19
- controlref(controllevel) = controlref(controllevel - 1)
- l$ = l$ + sp + SCase$("Else")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishednonexec '***no error causing code, event checking done by SELECT CASE***
- END IF
- END IF
-
- IF NoChecks = 0 THEN
- PRINT #12, "S_" + str2$(statementn) + ":;": dynscope = 1
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- END IF
- END IF
-
-
-
- f12$ = ""
-
- nexp = 0
- B = 0
- e$ = ""
- FOR i = 2 TO n
- e2$ = getelement$(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF i = n THEN e$ = e$ + sp + e2$
- IF i = n OR (e2$ = "," AND B = 0) THEN
- IF nexp <> 0 THEN l$ = l$ + sp2 + ",": f12$ = f12$ + "||"
- IF e$ = "" THEN a$ = "Expected expression": GOTO errmes
- e$ = RIGHT$(e$, LEN(e$) - 1)
-
-
-
- 'TYPE 1? ... TO ...
- n2 = numelements(e$)
- b2 = 0
- el$ = "": er$ = ""
- usedto = 0
- FOR i2 = 1 TO n2
- e3$ = getelement$(e$, i2)
- IF e3$ = "(" THEN b2 = b2 + 1
- IF e3$ = ")" THEN b2 = b2 - 1
- IF b2 = 0 AND UCASE$(e3$) = "TO" THEN
- usedto = 1
- ELSE
- IF usedto = 0 THEN el$ = el$ + sp + e3$ ELSE er$ = er$ + sp + e3$
- END IF
- NEXT
- IF usedto = 1 THEN
- IF el$ = "" OR er$ = "" THEN a$ = "Expected expression TO expression": GOTO errmes
- el$ = RIGHT$(el$, LEN(el$) - 1): er$ = RIGHT$(er$, LEN(er$) - 1)
- 'evaluate each side
- FOR i2 = 1 TO 2
- IF i2 = 1 THEN e$ = el$ ELSE e$ = er$
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- IF i2 = 1 THEN l$ = l$ + sp + tlayout$ ELSE l$ = l$ + sp + SCase$("To") + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- IF t = 0 THEN
- IF (typ AND ISSTRING) = 0 THEN a$ = "Expected string expression": GOTO errmes
- IF i2 = 1 THEN f12$ = f12$ + "(qbs_greaterorequal(" + n$ + "," + e$ + ")&&qbs_lessorequal(" + n$ + ","
- IF i2 = 2 THEN f12$ = f12$ + e$ + "))"
- ELSE
- IF (typ AND ISSTRING) THEN a$ = "Expected numeric expression": GOTO errmes
- 'round to integer?
- IF (typ AND ISFLOAT) THEN
- IF t = 1 THEN e$ = "qbr(" + e$ + ")"
- IF t = 2 THEN e$ = "qbr_longdouble_to_uint64(" + e$ + ")"
- IF t = 6 OR t = 7 THEN e$ = "qbr_double_to_long(" + e$ + ")"
- END IF
- 'cast result?
- IF LEN(tc$) THEN e$ = tc$ + "(" + e$ + ")"
- IF i2 = 1 THEN f12$ = f12$ + "((" + n$ + ">=(" + e$ + "))&&(" + n$ + "<=("
- IF i2 = 2 THEN f12$ = f12$ + e$ + ")))"
- END IF
- NEXT
- GOTO addedexp
- END IF
-
- '10=SELECT CASE qbs (awaiting END SELECT/CASE)
- '11=SELECT CASE int64 (awaiting END SELECT/CASE)
- '12=SELECT CASE uint64 (awaiting END SELECT/CASE)
- '13=SELECT CASE LONG double (awaiting END SELECT/CASE/CASE ELSE)
- '14=SELECT CASE float ...
- '15=SELECT CASE double
- '16=SELECT CASE int32
- '17=SELECT CASE uint32
-
- ' bits = targettyp AND 511
- ' IF bits <= 16 THEN e$ = "qbr_float_to_long(" + e$ + ")"
- ' IF bits > 16 AND bits < 32 THEN e$ = "qbr_double_to_long(" + e$ + ")"
- ' IF bits >= 32 THEN e$ = "qbr(" + e$ + ")"
-
-
-
-
-
-
- o$ = "==" 'used by type 3
-
- 'TYPE 2?
- x$ = getelement$(e$, 1)
- IF isoperator(x$) THEN 'non-standard usage correction
- IF x$ = "=" OR x$ = "<>" OR x$ = ">" OR x$ = "<" OR x$ = ">=" OR x$ = "<=" THEN
- e$ = "IS" + sp + e$
- x$ = "IS"
- END IF
- END IF
- IF UCASE$(x$) = "IS" THEN
- n2 = numelements(e$)
- IF n2 < 3 THEN a$ = "Expected IS =,<>,>,<,>=,<= expression": GOTO errmes
- o$ = getelement$(e$, 2)
- o2$ = o$
- o = 0
- IF o$ = "=" THEN o$ = "==": o = 1
- IF o$ = "<>" THEN o$ = "!=": o = 1
- IF o$ = ">" THEN o = 1
- IF o$ = "<" THEN o = 1
- IF o$ = ">=" THEN o = 1
- IF o$ = "<=" THEN o = 1
- IF o <> 1 THEN a$ = "Expected IS =,<>,>,<,>=,<= expression": GOTO errmes
- l$ = l$ + sp + SCase$("Is") + sp + o2$
- e$ = getelements$(e$, 3, n2)
- 'fall through to type 3 using modified e$ & o$
- END IF
-
- 'TYPE 3? simple expression
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISREFERENCE) THEN e$ = refer(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- IF t = 0 THEN
- 'string comparison
- IF (typ AND ISSTRING) = 0 THEN a$ = "Expected string expression": GOTO errmes
- IF o$ = "==" THEN o$ = "qbs_equal"
- IF o$ = "!=" THEN o$ = "qbs_notequal"
- IF o$ = ">" THEN o$ = "qbs_greaterthan"
- IF o$ = "<" THEN o$ = "qbs_lessthan"
- IF o$ = ">=" THEN o$ = "qbs_greaterorequal"
- IF o$ = "<=" THEN o$ = "qbs_lessorequal"
- f12$ = f12$ + o$ + "(" + n$ + "," + e$ + ")"
- ELSE
- 'numeric
- IF (typ AND ISSTRING) THEN a$ = "Expected numeric expression": GOTO errmes
- 'round to integer?
- IF (typ AND ISFLOAT) THEN
- IF t = 1 THEN e$ = "qbr(" + e$ + ")"
- IF t = 2 THEN e$ = "qbr_longdouble_to_uint64(" + e$ + ")"
- IF t = 6 OR t = 7 THEN e$ = "qbr_double_to_long(" + e$ + ")"
- END IF
- 'cast result?
- IF LEN(tc$) THEN e$ = tc$ + "(" + e$ + ")"
- f12$ = f12$ + "(" + n$ + o$ + "(" + e$ + "))"
- END IF
-
- addedexp:
- e$ = ""
- nexp = nexp + 1
- ELSE
- e$ = e$ + sp + e2$
- END IF
- NEXT
-
- IF stringprocessinghappened THEN
- PRINT #12, "if ((" + cleanupstringprocessingcall$ + f12$ + "))||new_error){"
- ELSE
- PRINT #12, "if ((" + f12$ + ")||new_error){"
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- controllevel = controllevel + 1
- controlref(controllevel) = controlref(controllevel - 1)
- controltype(controllevel) = 18
- GOTO finishedline
- END IF
- END IF
-
-
-
-
-
-
-
-
-
-
-
-
- 'static scope commands:
-
- IF NoChecks = 0 THEN
- IF vWatchOn = 1 AND inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- PRINT #12, "do{*__LONG_VWATCH_LINENUMBER= " + str2$(linenumber) + "; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- ELSE
- PRINT #12, "do{"
- END IF
- 'PRINT #12, "S_" + str2$(statementn) + ":;"
- END IF
-
-
- IF n > 1 THEN
- IF firstelement$ = "PALETTE" THEN
- IF secondelement$ = "USING" THEN
- l$ = SCase$("Palette" + sp + "Using" + sp)
- IF n < 3 THEN a$ = "Expected PALETTE USING array-name": GOTO errmes
- 'check array
- e$ = getelement$(ca$, 3)
- IF FindArray(e$) THEN
- IF Error_Happened THEN GOTO errmes
- z = 1
- t = id.arraytype
- IF (t AND 511) <> 16 AND (t AND 511) <> 32 THEN z = 0
- IF t AND ISFLOAT THEN z = 0
- IF t AND ISOFFSETINBITS THEN z = 0
- IF t AND ISSTRING THEN z = 0
- IF t AND ISUDT THEN z = 0
- IF t AND ISUNSIGNED THEN z = 0
- IF z = 0 THEN a$ = "Array must be of type INTEGER or LONG": GOTO errmes
- bits = t AND 511
- GOTO pu_gotarray
- END IF
- IF Error_Happened THEN GOTO errmes
- a$ = "Expected PALETTE USING array-name": GOTO errmes
- pu_gotarray:
- 'add () if index not specified
- IF n = 3 THEN
- e$ = e$ + sp + "(" + sp + ")"
- ELSE
- IF n = 4 OR getelement$(a$, 4) <> "(" OR getelement$(a$, n) <> ")" THEN a$ = "Expected PALETTE USING array-name(...)": GOTO errmes
- e$ = e$ + sp + getelements$(ca$, 4, n)
- END IF
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
- e$ = evaluatetotyp(e$, -2)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_paletteusing(" + e$ + "," + str2(bits) + ");"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF 'using
- END IF 'palette
- END IF 'n>1
-
-
- IF firstelement$ = "KEY" THEN
- IF n = 1 THEN a$ = "Expected KEY ...": GOTO errmes
- l$ = SCase$("KEY") + sp
- IF secondelement$ = "OFF" THEN
- IF n > 2 THEN a$ = "Expected KEY OFF only": GOTO errmes
- l$ = l$ + SCase$("Off"): layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- PRINT #12, "key_off();"
- GOTO finishedline
- END IF
- IF secondelement$ = "ON" THEN
- IF n > 2 THEN a$ = "Expected KEY ON only": GOTO errmes
- l$ = l$ + SCase$("On"): layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- PRINT #12, "key_on();"
- GOTO finishedline
- END IF
- IF secondelement$ = "LIST" THEN
- IF n > 2 THEN a$ = "Expected KEY LIST only": GOTO errmes
- l$ = l$ + SCase$("List"): layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- PRINT #12, "key_list();"
- GOTO finishedline
- END IF
- 'search for comma to indicate assignment
- B = 0: e$ = ""
- FOR i = 2 TO n
- e2$ = getelement(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF e2$ = "," AND B = 0 THEN
- i = i + 1: GOTO key_assignment
- END IF
- IF LEN(e$) THEN e$ = e$ + sp + e2$ ELSE e$ = e2$
- NEXT
- 'assume KEY(x) ON/OFF/STOP and handle as a sub
- GOTO key_fallthrough
- key_assignment:
- 'KEY x, "string"
- 'index
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp2 + "," + sp
- e$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "key_assign(" + e$ + ",";
- 'string
- e$ = getelements$(ca$, i, n)
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
- e$ = evaluatetotyp(e$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ");"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF 'KEY
- key_fallthrough:
-
-
-
-
- IF firstelement$ = "FIELD" THEN
-
- 'get filenumber
- B = 0: e$ = ""
- FOR i = 2 TO n
- e2$ = getelement(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF e2$ = "," AND B = 0 THEN
- i = i + 1: GOTO fieldgotfn
- END IF
- IF LEN(e$) THEN e$ = e$ + sp + e2$ ELSE e$ = e2$
- NEXT
- GOTO fielderror
- fieldgotfn:
- IF e$ = "#" OR LEN(e$) = 0 THEN GOTO fielderror
- IF LEFT$(e$, 2) = "#" + sp THEN e$ = RIGHT$(e$, LEN(e$) - 2): l$ = SCase$("Field") + sp + "#" + sp2 ELSE l$ = SCase$("Field") + sp
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp2 + "," + sp
- e$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "field_new(" + e$ + ");"
-
- fieldnext:
-
- 'get fieldwidth
- IF i > n THEN GOTO fielderror
- B = 0: e$ = ""
- FOR i = i TO n
- e2$ = getelement(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF UCASE$(e2$) = "AS" AND B = 0 THEN
- i = i + 1: GOTO fieldgotfw
- END IF
- IF LEN(e$) THEN e$ = e$ + sp + e2$ ELSE e$ = e2$
- NEXT
- GOTO fielderror
- fieldgotfw:
- IF LEN(e$) = 0 THEN GOTO fielderror
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp + SCase$("As") + sp
- sizee$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
-
- 'get variable name
- IF i > n THEN GOTO fielderror
- B = 0: e$ = ""
- FOR i = i TO n
- e2$ = getelement(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF (i = n OR e2$ = ",") AND B = 0 THEN
- IF e2$ = "," THEN i = i - 1
- IF i = n THEN
- IF LEN(e$) THEN e$ = e$ + sp + e2$ ELSE e$ = e2$
- END IF
- GOTO fieldgotfname
- END IF
- IF LEN(e$) THEN e$ = e$ + sp + e2$ ELSE e$ = e2$
- NEXT
- GOTO fielderror
- fieldgotfname:
- IF LEN(e$) = 0 THEN GOTO fielderror
- 'evaluate it to check it is a STRING
- e$ = fixoperationorder(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
- e$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF (typ AND ISSTRING) = 0 THEN GOTO fielderror
- IF typ AND ISFIXEDLENGTH THEN a$ = "Fixed length strings cannot be used in a FIELD statement": GOTO errmes
- IF (typ AND ISREFERENCE) = 0 THEN GOTO fielderror
- e$ = refer(e$, typ, 0)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "field_add(" + e$ + "," + sizee$ + ");"
-
- IF i < n THEN
- i = i + 1
- e$ = getelement(a$, i)
- IF e$ <> "," THEN a$ = "Expected ,": GOTO errmes
- l$ = l$ + sp2 + "," + sp
- i = i + 1
- GOTO fieldnext
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
-
- fielderror: a$ = "Expected FIELD #filenumber, characters AS variable$, ...": GOTO errmes
- END IF
-
-
-
-
-
- '1=IF (awaiting END IF)
- '2=FOR (awaiting NEXT)
- '3=DO (awaiting LOOP [UNTIL|WHILE param])
- '4=DO WHILE/UNTIL (awaiting LOOP)
- '5=WHILE (awaiting WEND)
-
- IF n = 2 THEN
- IF firstelement$ = "EXIT" THEN
-
- l$ = SCase$("Exit") + sp
-
- IF secondelement$ = "DO" THEN
- 'scan backwards until previous control level reached
- l$ = l$ + SCase$("Do")
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 3 OR t = 4 THEN
- PRINT #12, "goto dl_exit_" + str2$(controlid(i)) + ";"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- NEXT
- a$ = "EXIT DO without DO": GOTO errmes
- END IF
-
- IF secondelement$ = "FOR" THEN
- 'scan backwards until previous control level reached
- l$ = l$ + SCase$("For")
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 2 THEN
- PRINT #12, "goto fornext_exit_" + str2$(controlid(i)) + ";"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- NEXT
- a$ = "EXIT FOR without FOR": GOTO errmes
- END IF
-
- IF secondelement$ = "WHILE" THEN
- 'scan backwards until previous control level reached
- l$ = l$ + SCase$("While")
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 5 THEN
- PRINT #12, "goto ww_exit_" + str2$(controlid(i)) + ";"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- NEXT
- a$ = "EXIT WHILE without WHILE": GOTO errmes
- END IF
-
- IF secondelement$ = "SELECT" THEN
- 'scan backwards until previous control level reached
- l$ = l$ + SCase$("Select")
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 18 OR t = 19 THEN 'CASE/CASE ELSE
- PRINT #12, "goto sc_" + str2$(controlid(i - 1)) + "_end;"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- NEXT
- a$ = "EXIT SELECT without SELECT": GOTO errmes
- END IF
-
- IF secondelement$ = "CASE" THEN
- 'scan backwards until previous control level reached
- l$ = l$ + SCase$("Case")
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 18 THEN 'CASE
- PRINT #12, "goto sc_ec_" + str2$(everycasenewcase + 1) + "_end;"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- ELSEIF t = 19 THEN 'CASE ELSE
- PRINT #12, "goto sc_" + str2$(controlid(i - 1)) + "_end;"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- NEXT
- a$ = "EXIT CASE without CASE": GOTO errmes
- END IF
-
- END IF
- END IF
-
-
-
-
-
-
-
-
- IF n >= 2 THEN
- IF firstelement$ = "ON" AND secondelement$ = "STRIG" THEN
- DEPENDENCY(DEPENDENCY_DEVICEINPUT) = 1
- i = 3
- IF i > n THEN a$ = "Expected (": GOTO errmes
- a2$ = getelement$(ca$, i): i = i + 1
- IF a2$ <> "(" THEN a$ = "Expected (": GOTO errmes
- l$ = SCase$("On" + sp + "Strig" + sp2 + "(")
- IF i > n THEN a$ = "Expected ...": GOTO errmes
- B = 0
- x = 0
- e2$ = ""
- e3$ = ""
- FOR i = i TO n
- e$ = getelement$(ca$, i)
- a = ASC(e$)
- IF a = 40 THEN B = B + 1
- IF a = 41 THEN B = B - 1
- IF B = -1 THEN GOTO onstriggotarg
- IF a = 44 AND B = 0 THEN
- x = x + 1
- IF x > 1 THEN a$ = "Expected )": GOTO errmes
- IF e2$ = "" THEN a$ = "Expected ... ,": GOTO errmes
- e3$ = e2$
- e2$ = ""
- ELSE
- IF LEN(e2$) THEN e2$ = e2$ + sp + e$ ELSE e2$ = e$
- END IF
- NEXT
- a$ = "Expected )": GOTO errmes
- onstriggotarg:
- IF e2$ = "" THEN a$ = "Expected ... )": GOTO errmes
- PRINT #12, "onstrig_setup(";
-
- 'sort scanned results
- IF LEN(e3$) THEN
- optI$ = e3$
- optController$ = e2$
- optPassed$ = "1"
- ELSE
- optI$ = e2$
- optController$ = "0"
- optPassed$ = "0"
- END IF
-
- 'i
- e$ = fixoperationorder$(optI$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + tlayout$
- e$ = evaluatetotyp(e$, 32&): IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ",";
-
- 'controller , passed
- IF optPassed$ = "1" THEN
- e$ = fixoperationorder$(optController$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluatetotyp(e$, 32&): IF Error_Happened THEN GOTO errmes
- ELSE
- e$ = optController$
- END IF
- PRINT #12, e$ + "," + optPassed$ + ",";
-
- l$ = l$ + sp2 + ")" + sp 'close brackets
-
- i = i + 1
- IF i > n THEN a$ = "Expected GOSUB/sub-name": GOTO errmes
- a2$ = getelement$(a$, i): i = i + 1
- onstrigid = onstrigid + 1
- PRINT #12, str2$(onstrigid) + ",";
-
- IF a2$ = "GOSUB" THEN
- IF i > n THEN a$ = "Expected linenumber/label": GOTO errmes
- a2$ = getelement$(ca$, i): i = i + 1
-
- PRINT #12, "0);"
-
- IF validlabel(a2$) = 0 THEN a$ = "Invalid label": GOTO errmes
-
- v = HashFind(a2$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk60z:
- IF v THEN
- s = Labels(r).Scope
- IF s = 0 OR s = -1 THEN 'main scope?
- IF s = -1 THEN Labels(r).Scope = 0 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- Labels(r).Scope_Restriction = subfuncn
- Labels(r).Error_Line = linenumber
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk60z
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd a2$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = 0
- Labels(r).Error_Line = linenumber
- Labels(r).Scope_Restriction = subfuncn
- END IF 'x
- l$ = l$ + SCase$("GoSub") + sp + tlayout$
-
- PRINT #30, "if(strig_event_id==" + str2$(onstrigid) + ")goto LABEL_" + a2$ + ";"
-
- PRINT #29, "case " + str2$(onstrigid) + ":"
- PRINT #29, "strig_event_occurred++;"
- PRINT #29, "strig_event_id=" + str2$(onstrigid) + ";"
- PRINT #29, "strig_event_occurred++;"
- PRINT #29, "return_point[next_return_point++]=0;"
- PRINT #29, "if (next_return_point>=return_points) more_return_points();"
- PRINT #29, "QBMAIN(NULL);"
- PRINT #29, "break;"
-
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- layoutdone = 1
- GOTO finishedline
-
- ELSE
-
- 'establish whether sub a2$ exists using try
- x = 0
- try = findid(a2$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.subfunc = 2 THEN x = 1: EXIT DO
- IF try = 2 THEN findanotherid = 1: try = findid(a2$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- IF x = 0 THEN a$ = "Expected GOSUB/sub": GOTO errmes
-
- l$ = l$ + RTRIM$(id.cn)
-
- PRINT #29, "case " + str2$(onstrigid) + ":"
- PRINT #29, RTRIM$(id.callname) + "(";
-
- IF id.args > 1 THEN a$ = "SUB requires more than one argument": GOTO errmes
-
- IF i > n THEN
-
- IF id.args = 1 THEN a$ = "Expected argument after SUB": GOTO errmes
- PRINT #12, "0);"
- PRINT #29, ");"
-
- ELSE
-
- IF id.args = 0 THEN a$ = "SUB has no arguments": GOTO errmes
-
- t = CVL(id.arg)
- B = t AND 511
- IF B = 0 OR (t AND ISARRAY) <> 0 OR (t AND ISFLOAT) <> 0 OR (t AND ISSTRING) <> 0 OR (t AND ISOFFSETINBITS) <> 0 THEN a$ = "Only SUB arguments of integer-type allowed": GOTO errmes
- IF B = 8 THEN ct$ = "int8"
- IF B = 16 THEN ct$ = "int16"
- IF B = 32 THEN ct$ = "int32"
- IF B = 64 THEN ct$ = "int64"
- IF t AND ISOFFSET THEN ct$ = "ptrszint"
- IF t AND ISUNSIGNED THEN ct$ = "u" + ct$
- PRINT #29, "(" + ct$ + "*)&i64);"
-
- e$ = getelements$(ca$, i, n)
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluatetotyp(e$, INTEGER64TYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ");"
-
- END IF
-
- PRINT #29, "break;"
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- layoutdone = 1
- GOTO finishedline
- END IF
-
- END IF
- END IF
-
-
-
-
-
-
-
-
-
-
-
-
- IF n >= 2 THEN
- IF firstelement$ = "ON" AND secondelement$ = "TIMER" THEN
- i = 3
- IF i > n THEN a$ = "Expected (": GOTO errmes
- a2$ = getelement$(ca$, i): i = i + 1
- IF a2$ <> "(" THEN a$ = "Expected (": GOTO errmes
- l$ = SCase$("On" + sp + "Timer" + sp2 + "(")
- IF i > n THEN a$ = "Expected ...": GOTO errmes
- B = 0
- x = 0
- e2$ = ""
- e3$ = ""
- FOR i = i TO n
- e$ = getelement$(ca$, i)
- a = ASC(e$)
- IF a = 40 THEN B = B + 1
- IF a = 41 THEN B = B - 1
- IF B = -1 THEN GOTO ontimgotarg
- IF a = 44 AND B = 0 THEN
- x = x + 1
- IF x > 1 THEN a$ = "Expected )": GOTO errmes
- IF e2$ = "" THEN a$ = "Expected ... ,": GOTO errmes
- e3$ = e2$
- e2$ = ""
- ELSE
- IF LEN(e2$) THEN e2$ = e2$ + sp + e$ ELSE e2$ = e$
- END IF
- NEXT
- a$ = "Expected )": GOTO errmes
- ontimgotarg:
- IF e2$ = "" THEN a$ = "Expected ... )": GOTO errmes
- PRINT #12, "ontimer_setup(";
- 'i
- IF LEN(e3$) THEN
- e$ = fixoperationorder$(e3$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + tlayout$ + "," + sp
- e$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ",";
- ELSE
- PRINT #12, "0,";
- l$ = l$ + sp2
- END IF
- 'sec
- e$ = fixoperationorder$(e2$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp2 + ")" + sp
- e$ = evaluatetotyp(e$, DOUBLETYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ",";
- i = i + 1
- IF i > n THEN a$ = "Expected GOSUB/sub-name": GOTO errmes
- a2$ = getelement$(a$, i): i = i + 1
- ontimerid = ontimerid + 1
- PRINT #12, str2$(ontimerid) + ",";
-
- IF a2$ = "GOSUB" THEN
- IF i > n THEN a$ = "Expected linenumber/label": GOTO errmes
- a2$ = getelement$(ca$, i): i = i + 1
-
- PRINT #12, "0);"
-
- IF validlabel(a2$) = 0 THEN a$ = "Invalid label": GOTO errmes
-
- v = HashFind(a2$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk60:
- IF v THEN
- s = Labels(r).Scope
- IF s = 0 OR s = -1 THEN 'main scope?
- IF s = -1 THEN Labels(r).Scope = 0 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- Labels(r).Scope_Restriction = subfuncn
- Labels(r).Error_Line = linenumber
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk60
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd a2$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = 0
- Labels(r).Error_Line = linenumber
- Labels(r).Scope_Restriction = subfuncn
- END IF 'x
- l$ = l$ + SCase$("GoSub") + sp + tlayout$
-
- PRINT #25, "if(timer_event_id==" + str2$(ontimerid) + ")goto LABEL_" + a2$ + ";"
-
- PRINT #24, "case " + str2$(ontimerid) + ":"
- PRINT #24, "timer_event_occurred++;"
- PRINT #24, "timer_event_id=" + str2$(ontimerid) + ";"
- PRINT #24, "timer_event_occurred++;"
- PRINT #24, "return_point[next_return_point++]=0;"
- PRINT #24, "if (next_return_point>=return_points) more_return_points();"
- PRINT #24, "QBMAIN(NULL);"
- PRINT #24, "break;"
-
-
-
- 'call validlabel (to validate the label) [see goto]
- 'increment ontimerid
- 'use ontimerid to generate the jumper routine
- 'etc.
-
-
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- layoutdone = 1
- GOTO finishedline
- ELSE
-
- 'establish whether sub a2$ exists using try
- x = 0
- try = findid(a2$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.subfunc = 2 THEN x = 1: EXIT DO
- IF try = 2 THEN findanotherid = 1: try = findid(a2$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- IF x = 0 THEN a$ = "Expected GOSUB/sub": GOTO errmes
-
- l$ = l$ + RTRIM$(id.cn)
-
- PRINT #24, "case " + str2$(ontimerid) + ":"
- PRINT #24, RTRIM$(id.callname) + "(";
-
- IF id.args > 1 THEN a$ = "SUB requires more than one argument": GOTO errmes
-
- IF i > n THEN
-
- IF id.args = 1 THEN a$ = "Expected argument after SUB": GOTO errmes
- PRINT #12, "0);"
- PRINT #24, ");"
-
- ELSE
-
- IF id.args = 0 THEN a$ = "SUB has no arguments": GOTO errmes
-
- t = CVL(id.arg)
- B = t AND 511
- IF B = 0 OR (t AND ISARRAY) <> 0 OR (t AND ISFLOAT) <> 0 OR (t AND ISSTRING) <> 0 OR (t AND ISOFFSETINBITS) <> 0 THEN a$ = "Only SUB arguments of integer-type allowed": GOTO errmes
- IF B = 8 THEN ct$ = "int8"
- IF B = 16 THEN ct$ = "int16"
- IF B = 32 THEN ct$ = "int32"
- IF B = 64 THEN ct$ = "int64"
- IF t AND ISOFFSET THEN ct$ = "ptrszint"
- IF t AND ISUNSIGNED THEN ct$ = "u" + ct$
- PRINT #24, "(" + ct$ + "*)&i64);"
-
- e$ = getelements$(ca$, i, n)
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluatetotyp(e$, INTEGER64TYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ");"
-
- END IF
-
- PRINT #24, "break;"
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- layoutdone = 1
- GOTO finishedline
- END IF
-
- END IF
- END IF
-
-
-
-
- IF n >= 2 THEN
- IF firstelement$ = "ON" AND secondelement$ = "KEY" THEN
- i = 3
- IF i > n THEN a$ = "Expected (": GOTO errmes
- a2$ = getelement$(ca$, i): i = i + 1
- IF a2$ <> "(" THEN a$ = "Expected (": GOTO errmes
- l$ = SCase$("On" + sp + "Key" + sp2 + "(")
- IF i > n THEN a$ = "Expected ...": GOTO errmes
- B = 0
- x = 0
- e2$ = ""
- FOR i = i TO n
- e$ = getelement$(ca$, i)
- a = ASC(e$)
-
-
- IF a = 40 THEN B = B + 1
- IF a = 41 THEN B = B - 1
- IF B = -1 THEN EXIT FOR
- IF LEN(e2$) THEN e2$ = e2$ + sp + e$ ELSE e2$ = e$
- NEXT
- IF i = n + 1 THEN a$ = "Expected )": GOTO errmes
- IF e2$ = "" THEN a$ = "Expected ... )": GOTO errmes
-
- e$ = fixoperationorder$(e2$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp2 + ")" + sp
- e$ = evaluatetotyp(e$, DOUBLETYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "onkey_setup(" + e$ + ",";
-
- i = i + 1
- IF i > n THEN a$ = "Expected GOSUB/sub-name": GOTO errmes
- a2$ = getelement$(a$, i): i = i + 1
- onkeyid = onkeyid + 1
- PRINT #12, str2$(onkeyid) + ",";
-
- IF a2$ = "GOSUB" THEN
- IF i > n THEN a$ = "Expected linenumber/label": GOTO errmes
- a2$ = getelement$(ca$, i): i = i + 1
-
- PRINT #12, "0);"
-
- IF validlabel(a2$) = 0 THEN a$ = "Invalid label": GOTO errmes
-
- v = HashFind(a2$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk61:
- IF v THEN
- s = Labels(r).Scope
- IF s = 0 OR s = -1 THEN 'main scope?
- IF s = -1 THEN Labels(r).Scope = 0 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- Labels(r).Scope_Restriction = subfuncn
- Labels(r).Error_Line = linenumber
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk61
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd a2$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = 0
- Labels(r).Error_Line = linenumber
- Labels(r).Scope_Restriction = subfuncn
- END IF 'x
- l$ = l$ + SCase$("GoSub") + sp + tlayout$
-
- PRINT #28, "if(key_event_id==" + str2$(onkeyid) + ")goto LABEL_" + a2$ + ";"
-
- PRINT #27, "case " + str2$(onkeyid) + ":"
- PRINT #27, "key_event_occurred++;"
- PRINT #27, "key_event_id=" + str2$(onkeyid) + ";"
- PRINT #27, "key_event_occurred++;"
- PRINT #27, "return_point[next_return_point++]=0;"
- PRINT #27, "if (next_return_point>=return_points) more_return_points();"
- PRINT #27, "QBMAIN(NULL);"
- PRINT #27, "break;"
-
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- layoutdone = 1
- GOTO finishedline
- ELSE
-
- 'establish whether sub a2$ exists using try
- x = 0
- try = findid(a2$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.subfunc = 2 THEN x = 1: EXIT DO
- IF try = 2 THEN findanotherid = 1: try = findid(a2$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- IF x = 0 THEN a$ = "Expected GOSUB/sub": GOTO errmes
-
- l$ = l$ + RTRIM$(id.cn)
-
- PRINT #27, "case " + str2$(onkeyid) + ":"
- PRINT #27, RTRIM$(id.callname) + "(";
-
- IF id.args > 1 THEN a$ = "SUB requires more than one argument": GOTO errmes
-
- IF i > n THEN
-
- IF id.args = 1 THEN a$ = "Expected argument after SUB": GOTO errmes
- PRINT #12, "0);"
- PRINT #27, ");"
-
- ELSE
-
- IF id.args = 0 THEN a$ = "SUB has no arguments": GOTO errmes
-
- t = CVL(id.arg)
- B = t AND 511
- IF B = 0 OR (t AND ISARRAY) <> 0 OR (t AND ISFLOAT) <> 0 OR (t AND ISSTRING) <> 0 OR (t AND ISOFFSETINBITS) <> 0 THEN a$ = "Only SUB arguments of integer-type allowed": GOTO errmes
- IF B = 8 THEN ct$ = "int8"
- IF B = 16 THEN ct$ = "int16"
- IF B = 32 THEN ct$ = "int32"
- IF B = 64 THEN ct$ = "int64"
- IF t AND ISOFFSET THEN ct$ = "ptrszint"
- IF t AND ISUNSIGNED THEN ct$ = "u" + ct$
- PRINT #27, "(" + ct$ + "*)&i64);"
-
- e$ = getelements$(ca$, i, n)
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluatetotyp(e$, INTEGER64TYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, e$ + ");"
-
- END IF
-
- PRINT #27, "break;"
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- layoutdone = 1
- GOTO finishedline
- END IF
-
- END IF
- END IF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'SHARED (SUB)
- IF n >= 1 THEN
- IF firstelement$ = "SHARED" THEN
- IF n = 1 THEN a$ = "Expected SHARED ...": GOTO errmes
- i = 2
- IF subfuncn = 0 THEN a$ = "SHARED must be used within a SUB/FUNCTION": GOTO errmes
-
-
-
- l$ = SCase$("Shared")
- subfuncshr:
-
- 'get variable name
- n$ = getelement$(ca$, i): i = i + 1
-
- IF n$ = "" THEN a$ = "Expected SHARED variable-name or SHARED AS type variable-list": GOTO errmes
-
- IF UCASE$(n$) <> "AS" THEN
- 'traditional dim syntax for SHARED
- newSharedSyntax = 0
- s$ = removesymbol(n$)
- IF Error_Happened THEN GOTO errmes
- l2$ = s$ 'either symbol or nothing
-
- 'array?
- a = 0
- IF getelement$(a$, i) = "(" THEN
- IF getelement$(a$, i + 1) <> ")" THEN a$ = "Expected ()": GOTO errmes
- i = i + 2
- a = 1
- l2$ = l2$ + sp2 + "(" + sp2 + ")"
- END IF
-
- method = 1
-
- 'specific type?
- t$ = ""
- ts$ = ""
- t3$ = ""
- IF getelement$(a$, i) = "AS" THEN
- l2$ = l2$ + sp + SCase$("As")
- getshrtyp:
- i = i + 1
- t2$ = getelement$(a$, i)
- IF t2$ <> "," AND t2$ <> "" THEN
- IF t$ = "" THEN t$ = t2$ ELSE t$ = t$ + " " + t2$
- IF t3$ = "" THEN t3$ = t2$ ELSE t3$ = t3$ + sp + t2$
- GOTO getshrtyp
- END IF
- IF t$ = "" THEN a$ = "Expected AS type": GOTO errmes
-
- t = typname2typ(t$)
- IF Error_Happened THEN GOTO errmes
- IF t AND ISINCONVENTIONALMEMORY THEN t = t - ISINCONVENTIONALMEMORY
- IF t AND ISPOINTER THEN t = t - ISPOINTER
- IF t AND ISREFERENCE THEN t = t - ISREFERENCE
- tsize = typname2typsize
- method = 0
- IF (t AND ISUDT) = 0 THEN
- ts$ = type2symbol$(t$)
- l2$ = l2$ + sp + SCase2$(t3$)
- ELSE
- t3$ = RTRIM$(udtxcname(t AND 511))
- IF RTRIM$(udtxcname(t AND 511)) = "_MEM" AND UCASE$(t$) = "MEM" AND qb64prefix_set = 1 THEN
- t3$ = MID$(RTRIM$(udtxcname(t AND 511)), 2)
- END IF
- l2$ = l2$ + sp + t3$
- END IF
- IF Error_Happened THEN GOTO errmes
-
- END IF 'as
-
- IF LEN(s$) <> 0 AND LEN(t$) <> 0 THEN a$ = "Expected symbol or AS type after variable name": GOTO errmes
-
- 'no symbol of type specified, apply default
- IF s$ = "" AND t$ = "" THEN
- IF LEFT$(n$, 1) = "_" THEN v = 27 ELSE v = ASC(UCASE$(n$)) - 64
- s$ = defineextaz(v)
- END IF
-
- NormalSharedBlock:
- 'switch to main module
- oldsubfunc$ = subfunc$
- subfunc$ = ""
- defdatahandle = 18
- CLOSE #13: OPEN tmpdir$ + "maindata.txt" FOR APPEND AS #13
- CLOSE #19: OPEN tmpdir$ + "mainfree.txt" FOR APPEND AS #19
-
- 'use 'try' to locate the variable (if it already exists)
- n2$ = n$ + s$ + ts$ 'note: either ts$ or s$ will exist unless it is a UDT
- try = findid(n2$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF a THEN
- 'an array
-
- IF id.arraytype THEN
- IF LEN(t$) = 0 THEN GOTO shrfound
- t2 = id.arraytype: t2size = id.tsize
- IF t2 AND ISINCONVENTIONALMEMORY THEN t2 = t2 - ISINCONVENTIONALMEMORY
- IF t2 AND ISPOINTER THEN t2 = t2 - ISPOINTER
- IF t2 AND ISREFERENCE THEN t2 = t2 - ISREFERENCE
- IF t = t2 AND tsize = t2size THEN GOTO shrfound
- END IF
-
- ELSE
- 'not an array
-
- IF id.t THEN
- IF LEN(t$) = 0 THEN GOTO shrfound
- t2 = id.t: t2size = id.tsize
- IF t2 AND ISINCONVENTIONALMEMORY THEN t2 = t2 - ISINCONVENTIONALMEMORY
- IF t2 AND ISPOINTER THEN t2 = t2 - ISPOINTER
- IF t2 AND ISREFERENCE THEN t2 = t2 - ISREFERENCE
-
- IF Debug THEN PRINT #9, "SHARED:comparing:"; t; t2, tsize; t2size
-
- IF t = t2 AND tsize = t2size THEN GOTO shrfound
- END IF
-
- END IF
-
- IF try = 2 THEN findanotherid = 1: try = findid(n2$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- 'unknown variable
- IF a THEN a$ = "Array '" + n$ + "' not defined": GOTO errmes
- 'create variable
- IF LEN(s$) THEN typ$ = s$ ELSE typ$ = t$
- IF optionexplicit THEN a$ = "Variable '" + n$ + "' (" + symbol2fulltypename$(typ$) + ") not defined": GOTO errmes
- bypassNextVariable = -1
- retval = dim2(n$, typ$, method, "")
- manageVariableList "", vWatchNewVariable$, 0, 2
- IF Error_Happened THEN GOTO errmes
- 'note: variable created!
-
- shrfound:
- IF newSharedSyntax = 0 THEN
- l$ = l$ + sp + RTRIM$(id.cn) + l2$
- ELSE
- IF sharedAsLayoutAdded = 0 THEN
- sharedAsLayoutAdded = -1
- l$ = l$ + l2$ + sp$ + RTRIM$(id.cn) + l3$
- ELSE
- l$ = l$ + sp$ + RTRIM$(id.cn) + l3$
- END IF
- END IF
-
- ids(currentid).share = ids(currentid).share OR 2 'set as temporarily shared
-
- 'method must apply to the current sub/function regardless of how the variable was defined in 'main'
- lmay = LEN(RTRIM$(id.mayhave)): lmust = LEN(RTRIM$(id.musthave))
- IF lmay <> 0 OR lmust <> 0 THEN
- IF (method = 1 AND lmust = 0) OR (method = 0 AND lmay = 0) THEN
- revertmaymusthaven = revertmaymusthaven + 1
- revertmaymusthave(revertmaymusthaven) = currentid
- SWAP ids(currentid).musthave, ids(currentid).mayhave
- END IF
- END IF
-
- 'switch back to sub/func
- subfunc$ = oldsubfunc$
- defdatahandle = 13
- CLOSE #13: OPEN tmpdir$ + "data" + str2$(subfuncn) + ".txt" FOR APPEND AS #13
- CLOSE #19: OPEN tmpdir$ + "free" + str2$(subfuncn) + ".txt" FOR APPEND AS #19
-
- IF newSharedSyntax THEN RETURN
-
- IF getelement$(a$, i) = "," THEN i = i + 1: l$ = l$ + sp2 + ",": GOTO subfuncshr
- IF getelement$(a$, i) <> "" THEN a$ = "Expected ,": GOTO errmes
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- ELSE
- 'new dim syntax for SHARED!
- i = i - 1 'relocate back to "AS"
-
- 'estabilish the data type:
- t$ = ""
- ts$ = ""
- t3$ = ""
- n$ = ""
- previousElement$ = ""
- l2$ = sp + SCase$("As")
- sharedAsLayoutAdded = 0
- getshrtyp2:
- i = i + 1
- t2$ = getelement$(a$, i)
- IF t2$ <> "," AND t2$ <> "(" AND t2$ <> "" THEN
- 'get first variable name
- n$ = getelement$(ca$, i)
-
- IF LEN(previousElement$) THEN
- IF t$ = "" THEN t$ = previousElement$ ELSE t$ = t$ + " " + previousElement$
- IF t3$ = "" THEN t3$ = previousElement$ ELSE t3$ = t3$ + sp + previousElement$
- END IF
- previousElement$ = t2$
- GOTO getshrtyp2
- END IF
- IF t$ = "" THEN a$ = "Expected SHARED AS type variable-list or SHARED variable-name AS type": GOTO errmes
-
- t = typname2typ(t$)
- IF Error_Happened THEN GOTO errmes
- IF t AND ISINCONVENTIONALMEMORY THEN t = t - ISINCONVENTIONALMEMORY
- IF t AND ISPOINTER THEN t = t - ISPOINTER
- IF t AND ISREFERENCE THEN t = t - ISREFERENCE
- tsize = typname2typsize
- method = 0
- IF (t AND ISUDT) = 0 THEN
- ts$ = type2symbol$(t$)
- l2$ = l2$ + sp + SCase2$(t3$)
- ELSE
- t3$ = RTRIM$(udtxcname(t AND 511))
- IF RTRIM$(udtxcname(t AND 511)) = "_MEM" AND UCASE$(t$) = "MEM" AND qb64prefix_set = 1 THEN
- t3$ = MID$(RTRIM$(udtxcname(t AND 511)), 2)
- END IF
- l2$ = l2$ + sp + t3$
- END IF
- IF Error_Happened THEN GOTO errmes
-
- subfuncshr2:
- s$ = removesymbol(n$)
- IF Error_Happened THEN GOTO errmes
- IF s$ <> "" THEN
- a$ = "Cannot use type symbol with SHARED AS type variable-list (" + s$ + ")"
- GOTO errmes
- END IF
-
- 'array?
- a = 0
- l3$ = ""
- IF getelement$(a$, i) = "(" THEN
- IF getelement$(a$, i + 1) <> ")" THEN a$ = "Expected ()": GOTO errmes
- i = i + 2
- a = 1
- l3$ = sp2 + "(" + sp2 + ")"
- END IF
-
- newSharedSyntax = -1
- GOSUB NormalSharedBlock
- newSharedSyntax = 0
-
- IF getelement$(a$, i) = "," THEN
- i = i + 1
- l$ = l$ + sp2 + ","
-
- 'get next variable name
- n$ = getelement$(ca$, i): i = i + 1
- GOTO subfuncshr2
- END IF
- IF getelement$(a$, i) <> "" THEN a$ = "Expected ,": GOTO errmes
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
- END IF
-
- 'EXIT SUB/FUNCTION
- IF n = 2 THEN
- IF firstelement$ = "EXIT" THEN
- sf = 0
- IF secondelement$ = "FUNCTION" THEN sf = 1
- IF secondelement$ = "SUB" THEN sf = 2
- IF sf THEN
-
- IF LEN(subfunc) = 0 THEN a$ = "EXIT " + secondelement$ + " must be used within a " + secondelement$: GOTO errmes
-
- PRINT #12, "goto exit_subfunc;"
- IF LEFT$(subfunc, 4) = "SUB_" THEN secondelement$ = SCase$("Sub") ELSE secondelement$ = SCase$("Function")
- l$ = SCase$("Exit") + sp + secondelement$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
- END IF
-
-
- '_ECHO checking
- IF firstelement$ = "_ECHO" OR (firstelement$ = "ECHO" AND qb64prefix_set = 1) THEN
- IF Console = 0 THEN
- a$ = qb64prefix$ + "ECHO requires $CONSOLE or $CONSOLE:ONLY to be set first": GOTO errmes
- END IF
- END IF
-
-
- 'ASC statement (fully inline)
- IF n >= 1 THEN
- IF firstelement$ = "ASC" THEN
- IF getelement$(a$, 2) <> "(" THEN a$ = "Expected ( after ASC": GOTO errmes
-
- 'calculate 3 parts
- useposition = 0
- part = 1
- i = 3
- a3$ = ""
- stringvariable$ = ""
- position$ = ""
- B = 0
- DO
-
- IF i > n THEN 'got part 3
- IF part <> 3 OR LEN(a3$) = 0 THEN a$ = "Expected ASC ( ... , ... ) = ...": GOTO errmes
- expression$ = a3$
- EXIT DO
- END IF
-
- a2$ = getelement$(ca$, i)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
-
- IF B = -1 THEN
-
- IF part = 1 THEN 'eg. ASC(a$)=65
- IF getelement$(a$, i + 1) <> "=" THEN a$ = "Expected =": GOTO errmes
- stringvariable$ = a3$
- position$ = "1"
- part = 3: a3$ = "": i = i + 1: GOTO ascgotpart
- END IF
-
- IF part = 2 THEN 'eg. ASC(a$,i)=65
- IF getelement$(a$, i + 1) <> "=" THEN a$ = "Expected =": GOTO errmes
- useposition = 1
- position$ = a3$
- part = 3: a3$ = "": i = i + 1: GOTO ascgotpart
- END IF
-
- 'fall through, already in part 3
-
- END IF
-
- IF a2$ = "," AND B = 0 THEN
- IF part = 1 THEN stringvariable$ = a3$: part = 2: a3$ = "": GOTO ascgotpart
- END IF
-
- IF LEN(a3$) THEN a3$ = a3$ + sp + a2$ ELSE a3$ = a2$
- ascgotpart:
- i = i + 1
- LOOP
- IF LEN(stringvariable$) = 0 OR LEN(position$) = 0 THEN a$ = "Expected ASC ( ... , ... ) = ...": GOTO errmes
-
- 'validate stringvariable$
- stringvariable$ = fixoperationorder$(stringvariable$)
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("Asc") + sp2 + "(" + sp2 + tlayout$
-
- e$ = evaluate(stringvariable$, sourcetyp)
- IF Error_Happened THEN GOTO errmes
- IF (sourcetyp AND ISREFERENCE) = 0 OR (sourcetyp AND ISSTRING) = 0 THEN a$ = "Expected ASC ( string-variable , ...": GOTO errmes
- stringvariable$ = evaluatetotyp(stringvariable$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
-
-
-
- IF position$ = "1" THEN
- IF useposition THEN l$ = l$ + sp2 + "," + sp + "1" + sp2 + ")" + sp + "=" ELSE l$ = l$ + sp2 + ")" + sp + "="
-
- PRINT #12, "tqbs=" + stringvariable$ + "; if (!new_error){"
- e$ = fixoperationorder$(expression$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "tmp_long=" + e$ + "; if (!new_error){"
- PRINT #12, "if (tqbs->len){tqbs->chr[0]=tmp_long;}else{error(5);}"
- PRINT #12, "}}"
-
- ELSE
-
- PRINT #12, "tqbs=" + stringvariable$ + "; if (!new_error){"
- e$ = fixoperationorder$(position$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$ + sp2 + ")" + sp + "="
- e$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "tmp_fileno=" + e$ + "; if (!new_error){"
- e$ = fixoperationorder$(expression$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- e$ = evaluatetotyp(e$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "tmp_long=" + e$ + "; if (!new_error){"
- PRINT #12, "if ((tmp_fileno>0)&&(tmp_fileno<=tqbs->len)){tqbs->chr[tmp_fileno-1]=tmp_long;}else{error(5);}"
- PRINT #12, "}}}"
-
- END IF
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
-
-
-
-
- 'MID$ statement
- IF n >= 1 THEN
- IF firstelement$ = "MID$" THEN
- IF getelement$(a$, 2) <> "(" THEN a$ = "Expected ( after MID$": GOTO errmes
- 'calculate 4 parts
- length$ = ""
- part = 1
- i = 3
- a3$ = ""
- stringvariable$ = ""
- start$ = ""
- B = 0
- DO
- IF i > n THEN
- IF part <> 4 OR a3$ = "" THEN a$ = "Expected MID$(...)=...": GOTO errmes
- stringexpression$ = a3$
- EXIT DO
- END IF
- a2$ = getelement$(ca$, i)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
- IF B = -1 THEN
- IF part = 2 THEN
- IF getelement$(a$, i + 1) <> "=" THEN a$ = "Expected = after )": GOTO errmes
- start$ = a3$: part = 4: a3$ = "": i = i + 1: GOTO midgotpart
- END IF
- IF part = 3 THEN
- IF getelement$(a$, i + 1) <> "=" THEN a$ = "Expected = after )": GOTO errmes
- IF a3$ = "" THEN a$ = "Omit , before ) if omitting length in MID$ statement": GOTO errmes
- length$ = a3$: part = 4: a3$ = "": i = i + 1: GOTO midgotpart
- END IF
- END IF
- IF a2$ = "," AND B = 0 THEN
- IF part = 1 THEN stringvariable$ = a3$: part = 2: a3$ = "": GOTO midgotpart
- IF part = 2 THEN start$ = a3$: part = 3: a3$ = "": GOTO midgotpart
- END IF
- IF LEN(a3$) THEN a3$ = a3$ + sp + a2$ ELSE a3$ = a2$
- midgotpart:
- i = i + 1
- LOOP
- IF stringvariable$ = "" THEN a$ = "Syntax error - first parameter must be a string variable/array-element": GOTO errmes
- IF start$ = "" THEN a$ = "Syntax error - second parameter not optional": GOTO errmes
- 'check if it is a valid source string
- stringvariable$ = fixoperationorder$(stringvariable$)
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("Mid$") + sp2 + "(" + sp2 + tlayout$
- e$ = evaluate(stringvariable$, sourcetyp)
- IF Error_Happened THEN GOTO errmes
- IF (sourcetyp AND ISREFERENCE) = 0 OR (sourcetyp AND ISSTRING) = 0 THEN a$ = "MID$ expects a string variable/array-element as its first argument": GOTO errmes
- stringvariable$ = evaluatetotyp(stringvariable$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
-
- start$ = fixoperationorder$(start$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- start$ = evaluatetotyp((start$), 32&)
-
- stringexpression$ = fixoperationorder$(stringexpression$)
- IF Error_Happened THEN GOTO errmes
- l2$ = tlayout$
- stringexpression$ = evaluatetotyp(stringexpression$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
-
- IF LEN(length$) THEN
- length$ = fixoperationorder$(length$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- length$ = evaluatetotyp(length$, 32&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_mid(" + stringvariable$ + "," + start$ + "," + length$ + "," + stringexpression$ + ",1);"
- ELSE
- PRINT #12, "sub_mid(" + stringvariable$ + "," + start$ + ",0," + stringexpression$ + ",0);"
- END IF
-
- l$ = l$ + sp2 + ")" + sp + "=" + sp + l2$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
-
-
- IF n >= 2 THEN
- IF firstelement$ = "ERASE" THEN
- i = 2
- l$ = SCase$("Erase")
- erasenextarray:
- var$ = getelement$(ca$, i)
- x$ = var$: ls$ = removesymbol(x$)
- IF Error_Happened THEN GOTO errmes
-
- IF FindArray(var$) THEN
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + RTRIM$(id.cn) + ls$
- 'erase the array
- clearerase:
- n$ = RTRIM$(id.callname)
- bytesperelement$ = str2((id.arraytype AND 511) \ 8)
- IF id.arraytype AND ISSTRING THEN bytesperelement$ = str2(id.tsize)
- IF id.arraytype AND ISOFFSETINBITS THEN bytesperelement$ = str2((id.arraytype AND 511)) + "/8+1"
- IF id.arraytype AND ISUDT THEN
- bytesperelement$ = str2(udtxsize(id.arraytype AND 511) \ 8)
- END IF
- PRINT #12, "if (" + n$ + "[2]&1){" 'array is defined
- PRINT #12, "if (" + n$ + "[2]&2){" 'array is static
- IF (id.arraytype AND ISSTRING) <> 0 AND (id.arraytype AND ISFIXEDLENGTH) = 0 THEN
- PRINT #12, "tmp_long=";
- FOR i2 = 1 TO ABS(id.arrayelements)
- IF i2 <> 1 THEN PRINT #12, "*";
- PRINT #12, n$ + "[" + str2(i2 * 4 - 4 + 5) + "]";
- NEXT
- PRINT #12, ";"
- PRINT #12, "while(tmp_long--){"
- PRINT #12, "((qbs*)(((uint64*)(" + n$ + "[0]))[tmp_long]))->len=0;"
- PRINT #12, "}"
- ELSE
- 'numeric
- 'clear array
- PRINT #12, "memset((void*)(" + n$ + "[0]),0,";
- FOR i2 = 1 TO ABS(id.arrayelements)
- IF i2 <> 1 THEN PRINT #12, "*";
- PRINT #12, n$ + "[" + str2(i2 * 4 - 4 + 5) + "]";
- NEXT
- PRINT #12, "*" + bytesperelement$ + ");"
- END IF
- PRINT #12, "}else{" 'array is dynamic
- '1. free memory & any allocated strings
- IF (id.arraytype AND ISSTRING) <> 0 AND (id.arraytype AND ISFIXEDLENGTH) = 0 THEN
- 'free strings
- PRINT #12, "tmp_long=";
- FOR i2 = 1 TO ABS(id.arrayelements)
- IF i2 <> 1 THEN PRINT #12, "*";
- PRINT #12, n$ + "[" + str2(i2 * 4 - 4 + 5) + "]";
- NEXT
- PRINT #12, ";"
- PRINT #12, "while(tmp_long--){"
- PRINT #12, "qbs_free((qbs*)(((uint64*)(" + n$ + "[0]))[tmp_long]));"
- PRINT #12, "}"
- 'free memory
- PRINT #12, "free((void*)(" + n$ + "[0]));"
- ELSE
- 'free memory
- PRINT #12, "if (" + n$ + "[2]&4){" 'cmem array
- PRINT #12, "cmem_dynamic_free((uint8*)(" + n$ + "[0]));"
- PRINT #12, "}else{" 'non-cmem array
- PRINT #12, "free((void*)(" + n$ + "[0]));"
- PRINT #12, "}"
- END IF
- '2. set array (and its elements) as undefined
- PRINT #12, n$ + "[2]^=1;" 'remove defined flag, keeping other flags (such as cmem)
- 'set dimensions as undefined
- FOR i2 = 1 TO ABS(id.arrayelements)
- B = i2 * 4
- PRINT #12, n$ + "[" + str2(B) + "]=2147483647;" 'base
- PRINT #12, n$ + "[" + str2(B + 1) + "]=0;" 'num. index
- PRINT #12, n$ + "[" + str2(B + 2) + "]=0;" 'multiplier
- NEXT
- IF (id.arraytype AND ISSTRING) <> 0 AND (id.arraytype AND ISFIXEDLENGTH) = 0 THEN
- PRINT #12, n$ + "[0]=(ptrszint)¬hingstring;"
- ELSE
- PRINT #12, n$ + "[0]=(ptrszint)nothingvalue;"
- END IF
- PRINT #12, "}" 'static/dynamic
- PRINT #12, "}" 'array is defined
- IF clearerasereturn = 1 THEN clearerasereturn = 0: GOTO clearerasereturned
- GOTO erasedarray
- END IF
- IF Error_Happened THEN GOTO errmes
- a$ = "Undefined array passed to ERASE": GOTO errmes
-
- erasedarray:
- IF i < n THEN
- i = i + 1: n$ = getelement$(a$, i): IF n$ <> "," THEN a$ = "Expected ,": GOTO errmes
- l$ = l$ + sp2 + ","
- i = i + 1: IF i > n THEN a$ = "Expected , ...": GOTO errmes
- GOTO erasenextarray
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
-
-
- 'DIM/REDIM/STATIC
- IF n >= 2 THEN
- dimoption = 0: redimoption = 0: commonoption = 0
- IF firstelement$ = "DIM" THEN l$ = SCase$("Dim"): dimoption = 1
- IF firstelement$ = "REDIM" THEN
- l$ = SCase$("ReDim")
- dimoption = 2: redimoption = 1
- IF secondelement$ = "_PRESERVE" OR (secondelement$ = "PRESERVE" AND qb64prefix_set = 1) THEN
- redimoption = 2
- IF secondelement$ = "_PRESERVE" THEN
- l$ = l$ + sp + SCase$("_Preserve")
- ELSE
- l$ = l$ + sp + SCase$("Preserve")
- END IF
- IF n = 2 THEN a$ = "Expected REDIM " + qb64prefix$ + "PRESERVE ...": GOTO errmes
- END IF
- END IF
- IF firstelement$ = "STATIC" THEN l$ = SCase$("Static"): dimoption = 3
- IF firstelement$ = "COMMON" THEN l$ = SCase$("Common"): dimoption = 1: commonoption = 1
- IF dimoption THEN
-
- IF dimoption = 3 AND subfuncn = 0 THEN a$ = "STATIC must be used within a SUB/FUNCTION": GOTO errmes
- IF commonoption = 1 AND subfuncn <> 0 THEN a$ = "COMMON cannot be used within a SUB/FUNCTION": GOTO errmes
-
- i = 2
- IF redimoption = 2 THEN i = 3
-
- IF dimoption <> 3 THEN 'shared cannot be static
- a2$ = getelement(a$, i)
- IF a2$ = "SHARED" THEN
- IF subfuncn <> 0 THEN a$ = "DIM/REDIM SHARED invalid within a SUB/FUNCTION": GOTO errmes
- dimshared = 1
- i = i + 1
- l$ = l$ + sp + SCase$("Shared")
- END IF
- END IF
-
- IF dimoption = 3 THEN dimstatic = 1: AllowLocalName = 1
-
- 'look for new dim syntax: DIM AS variabletype var1, var2, etc....
- e$ = getelement$(a$, i)
- IF e$ <> "AS" THEN
- 'no "AS", so this is the traditional dim syntax
- dimnext:
- newDimSyntax = 0
- notype = 0
- listarray = 0
-
-
- 'old chain code
- 'chaincommonarray=0
-
- varname$ = getelement(ca$, i): i = i + 1
- IF varname$ = "" THEN a$ = "Expected " + firstelement$ + " variable-name or " + firstelement$ + " AS type variable-list": GOTO errmes
-
- 'get the next element
- IF i >= n + 1 THEN e$ = "" ELSE e$ = getelement(a$, i): i = i + 1
-
- 'check if next element is a ( to create an array
- elements$ = ""
-
- IF e$ = "(" THEN
- B = 1
- FOR i = i TO n
- e$ = getelement(ca$, i)
- IF e$ = "(" THEN B = B + 1
- IF e$ = ")" THEN B = B - 1
- IF B = 0 THEN EXIT FOR
- IF LEN(elements$) THEN elements$ = elements$ + sp + e$ ELSE elements$ = e$
- NEXT
- IF B <> 0 THEN a$ = "Expected )": GOTO errmes
- i = i + 1 'set i to point to the next element
-
- IF commonoption THEN elements$ = "?"
-
-
- IF Debug THEN PRINT #9, "DIM2:array:elements$:[" + elements$ + "]"
-
- 'arrayname() means list array to it will automatically be static when it is formally dimensioned later
- 'note: listed arrays are always created in dynamic memory, but their contents are not erased
- ' this differs from static arrays from SUB...STATIC and the unique QB64 method -> STATIC arrayname(100)
- IF dimoption = 3 THEN 'STATIC used
- IF LEN(elements$) = 0 THEN 'nothing between brackets
- listarray = 1 'add to static list
- END IF
- END IF
-
- 'last element was ")"
- 'get next element
- IF i >= n + 1 THEN e$ = "" ELSE e$ = getelement(a$, i): i = i + 1
- END IF 'e$="("
- d$ = e$
-
- dimmethod = 0
-
- appendname$ = "" 'the symbol to append to name returned by dim2
- appendtype$ = "" 'eg. sp+AS+spINTEGER
- dim2typepassback$ = ""
-
- 'does varname have an appended symbol?
- s$ = removesymbol$(varname$)
- IF Error_Happened THEN GOTO errmes
- IF validname(varname$) = 0 THEN a$ = "Invalid variable name": GOTO errmes
-
- IF s$ <> "" THEN
- typ$ = s$
- dimmethod = 1
- appendname$ = typ$
- GOTO dimgottyp
- END IF
-
- IF d$ = "AS" THEN
- appendtype$ = sp + SCase$("As")
- typ$ = ""
- FOR i = i TO n
- d$ = getelement(a$, i)
- IF d$ = "," THEN i = i + 1: EXIT FOR
- typ$ = typ$ + d$ + " "
- appendtype$ = appendtype$ + sp + d$
- d$ = ""
- NEXT
- appendtype$ = SCase2$(appendtype$) 'capitalise default types (udt override this later if necessary)
- typ$ = RTRIM$(typ$)
- GOTO dimgottyp
- END IF
-
- 'auto-define type based on name
- notype = 1
- IF LEFT$(varname$, 1) = "_" THEN v = 27 ELSE v = ASC(UCASE$(varname$)) - 64
- typ$ = defineaz(v)
- dimmethod = 1
- GOTO dimgottyp
-
- dimgottyp:
- IF d$ <> "" AND d$ <> "," THEN a$ = "DIM: Expected ,": GOTO errmes
-
- 'In QBASIC, if no type info is given it can refer to an expeicit/formally defined array
- IF notype <> 0 AND dimoption <> 3 AND dimoption <> 1 THEN 'not DIM or STATIC which only create new content
- IF LEN(elements$) THEN 'an array
- IF FindArray(varname$) THEN
- IF LEN(RTRIM$(id.mayhave)) THEN 'explict/formally defined
- typ$ = id2fulltypename$ 'adopt type
- dimmethod = 0 'set as formally defined
- END IF
- END IF
- END IF
- END IF
-
- NormalDimBlock:
- IF dimoption = 3 AND LEN(elements$) THEN 'eg. STATIC a(100)
- 'does a conflicting array exist? (use findarray) if so again this should lead to duplicate definition
- typ2$ = symbol2fulltypename$(typ$)
- t = typname2typ(typ2$): ts = typname2typsize
- 'try name without any extension
- IF FindArray(varname$) THEN 'name without any symbol
- IF id.insubfuncn = subfuncn THEN 'global cannot conflict with static
- IF LEN(RTRIM$(id.musthave)) THEN
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- END IF
- END IF
- ELSE
- IF dimmethod = 0 THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes 'explicit over explicit
- ELSE
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- END IF
- END IF
- END IF
- END IF
- END IF
- END IF
- 'add extension (if possible)
- IF (t AND ISUDT) = 0 THEN
- s2$ = type2symbol$(typ2$)
- IF Error_Happened THEN GOTO errmes
- IF FindArray(varname$ + s2$) THEN
- IF id.insubfuncn = subfuncn THEN 'global cannot conflict with static
- IF LEN(RTRIM$(id.musthave)) THEN
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + s2$ + ")": GOTO errmes
- END IF
- END IF
- ELSE
- IF dimmethod = 0 THEN
- a$ = "Name already in use (" + varname$ + s2$ + ")": GOTO errmes 'explicit over explicit
- ELSE
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + s2$ + ")": GOTO errmes
- END IF
- END IF
- END IF
- END IF
- END IF
- END IF
- END IF 'not a UDT
- END IF
-
- IF listarray THEN 'eg. STATIC a()
- 'note: list is cleared by END SUB/FUNCTION
-
- 'is a conflicting array already listed? if so this should cause a duplicate definition error
- 'check for conflict within list:
- xi = 1
- FOR x = 1 TO staticarraylistn
- varname2$ = getelement$(staticarraylist, xi): xi = xi + 1
- typ2$ = getelement$(staticarraylist, xi): xi = xi + 1
- dimmethod2 = VAL(getelement$(staticarraylist, xi)): xi = xi + 1
- 'check if they are similar
- IF UCASE$(varname$) = UCASE$(varname2$) THEN
- IF dimmethod2 = 1 THEN
- 'old using symbol
- IF symbol2fulltypename$(typ$) = typ2$ THEN a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- ELSE
- 'old using AS
- IF dimmethod = 0 THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- ELSE
- IF symbol2fulltypename$(typ$) = typ2$ THEN a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- END IF
- END IF
- END IF
- NEXT
-
- 'does a conflicting array exist? (use findarray) if so again this should lead to duplicate definition
- typ2$ = symbol2fulltypename$(typ$)
- t = typname2typ(typ2$): ts = typname2typsize
- 'try name without any extension
- IF FindArray(varname$) THEN 'name without any symbol
- IF id.insubfuncn = subfuncn THEN 'global cannot conflict with static
- IF LEN(RTRIM$(id.musthave)) THEN
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- END IF
- END IF
- ELSE
- IF dimmethod = 0 THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes 'explicit over explicit
- ELSE
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + ")": GOTO errmes
- END IF
- END IF
- END IF
- END IF
- END IF
- END IF
- 'add extension (if possible)
- IF (t AND ISUDT) = 0 THEN
- s2$ = type2symbol$(typ2$)
- IF Error_Happened THEN GOTO errmes
- IF FindArray(varname$ + s2$) THEN
- IF id.insubfuncn = subfuncn THEN 'global cannot conflict with static
- IF LEN(RTRIM$(id.musthave)) THEN
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + s2$ + ")": GOTO errmes
- END IF
- END IF
- ELSE
- IF dimmethod = 0 THEN
- a$ = "Name already in use (" + varname$ + s2$ + ")": GOTO errmes 'explicit over explicit
- ELSE
- 'if types match then fail
- IF (id.arraytype AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) = (t AND (ISFLOAT + ISUDT + 511 + ISUNSIGNED + ISSTRING + ISFIXEDLENGTH)) THEN
- IF ts = id.tsize THEN
- a$ = "Name already in use (" + varname$ + s2$ + ")": GOTO errmes
- END IF
- END IF
- END IF
- END IF
- END IF
- END IF
- END IF 'not a UDT
-
- 'note: static list arrays cannot be created until they are formally [or informally] (RE)DIM'd later
- IF LEN(staticarraylist) THEN staticarraylist = staticarraylist + sp
- staticarraylist = staticarraylist + varname$ + sp + symbol2fulltypename$(typ$) + sp + str2(dimmethod)
- IF Error_Happened THEN GOTO errmes
- staticarraylistn = staticarraylistn + 1
- l$ = l$ + sp + varname$ + appendname$ + sp2 + "(" + sp2 + ")" + appendtype$
- 'note: none of the following code is run, dim2 call is also skipped
-
- ELSE
-
- olddimstatic = dimstatic
-
- 'check if varname is on the static list
- IF LEN(elements$) THEN 'it's an array
- IF subfuncn THEN 'it's in a sub/function
- xi = 1
- FOR x = 1 TO staticarraylistn
- varname2$ = getelement$(staticarraylist, xi): xi = xi + 1
- typ2$ = getelement$(staticarraylist, xi): xi = xi + 1
- dimmethod2 = VAL(getelement$(staticarraylist, xi)): xi = xi + 1
- 'check if they are similar
- IF UCASE$(varname$) = UCASE$(varname2$) THEN
- IF symbol2fulltypename$(typ$) = typ2$ THEN
- IF Error_Happened THEN GOTO errmes
- IF dimmethod = dimmethod2 THEN
- 'match found!
- varname$ = varname2$
- dimstatic = 3
- IF dimoption = 3 THEN a$ = "Array already listed as STATIC": GOTO errmes
- END IF
- END IF 'typ
- END IF 'varname
- NEXT
- END IF
- END IF
-
- 'COMMON exception
- 'note: COMMON alone does not imply SHARED
- ' if either(or both) COMMON & later DIM have SHARED, variable becomes shared
- IF commonoption THEN
- IF LEN(elements$) THEN
-
- 'add array to list
- IF LEN(commonarraylist) THEN commonarraylist = commonarraylist + sp
- 'note: dimmethod distinguishes between a%(...) vs a(...) AS INTEGER
- commonarraylist = commonarraylist + varname$ + sp + symbol2fulltypename$(typ$) + sp + str2(dimmethod) + sp + str2(dimshared)
- IF Error_Happened THEN GOTO errmes
- commonarraylistn = commonarraylistn + 1
- IF Debug THEN PRINT #9, "common listed:" + varname$ + sp + symbol2fulltypename$(typ$) + sp + str2(dimmethod) + sp + str2(dimshared)
- IF Error_Happened THEN GOTO errmes
-
- x = 0
-
- v$ = varname$
- IF dimmethod = 1 THEN v$ = v$ + typ$
- try = findid(v$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.arraytype THEN
-
- t = typname2typ(typ$)
- IF Error_Happened THEN GOTO errmes
- s = typname2typsize
- match = 1
- 'note: dimmethod 2 is already matched
- IF dimmethod = 0 THEN
- t2 = id.arraytype
- s2 = id.tsize
- IF (t AND ISFLOAT) <> (t2 AND ISFLOAT) THEN match = 0
- IF (t AND ISUNSIGNED) <> (t2 AND ISUNSIGNED) THEN match = 0
- IF (t AND ISSTRING) <> (t2 AND ISSTRING) THEN match = 0
- IF (t AND ISFIXEDLENGTH) <> (t2 AND ISFIXEDLENGTH) THEN match = 0
- IF (t AND ISOFFSETINBITS) <> (t2 AND ISOFFSETINBITS) THEN match = 0
- IF (t AND ISUDT) <> (t2 AND ISUDT) THEN match = 0
- IF (t AND 511) <> (t2 AND 511) THEN match = 0
- IF s <> s2 THEN match = 0
- 'check for implicit/explicit declaration match
- oldmethod = 0: IF LEN(RTRIM$(id.musthave)) THEN oldmethod = 1
- IF oldmethod <> dimmethod THEN match = 0
- END IF
-
- IF match THEN
- x = currentid
- IF dimshared THEN ids(x).share = 1 'share if necessary
- tlayout$ = RTRIM$(id.cn) + sp + "(" + sp2 + ")"
-
- IF dimmethod = 0 THEN
- IF t AND ISUDT THEN
- dim2typepassback$ = RTRIM$(udtxcname(t AND 511))
- IF UCASE$(typ$) = "MEM" AND qb64prefix_set = 1 AND RTRIM$(udtxcname(t AND 511)) = "_MEM" THEN
- dim2typepassback$ = MID$(RTRIM$(udtxcname(t AND 511)), 2)
- END IF
- ELSE
- dim2typepassback$ = typ$
- DO WHILE INSTR(dim2typepassback$, " ")
- ASC(dim2typepassback$, INSTR(dim2typepassback$, " ")) = ASC(sp)
- LOOP
- dim2typepassback$ = SCase2$(dim2typepassback$)
- END IF
- END IF 'method 0
-
- EXIT DO
- END IF 'match
-
- END IF 'arraytype
- IF try = 2 THEN findanotherid = 1: try = findid(v$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
-
- IF x = 0 THEN x = idn + 1
-
- 'note: the following code only adds include directives, everything else is defered
- OPEN tmpdir$ + "chain.txt" FOR APPEND AS #22
- 'include directive
- PRINT #22, "#include " + CHR$(34) + "chain" + str2$(x) + ".txt" + CHR$(34)
- CLOSE #22
- 'create/clear include file
- OPEN tmpdir$ + "chain" + str2$(x) + ".txt" FOR OUTPUT AS #22: CLOSE #22
-
- OPEN tmpdir$ + "inpchain.txt" FOR APPEND AS #22
- 'include directive
- PRINT #22, "#include " + CHR$(34) + "inpchain" + str2$(x) + ".txt" + CHR$(34)
- CLOSE #22
- 'create/clear include file
- OPEN tmpdir$ + "inpchain" + str2$(x) + ".txt" FOR OUTPUT AS #22: CLOSE #22
-
- 'note: elements$="?"
- IF x <> idn + 1 THEN GOTO skipdim 'array already exists
- GOTO dimcommonarray
-
- END IF
- END IF
-
- 'is varname on common list?
- '******
- IF LEN(elements$) THEN 'it's an array
- IF subfuncn = 0 THEN 'not in a sub/function
-
- IF Debug THEN PRINT #9, "common checking:" + varname$
-
- xi = 1
- FOR x = 1 TO commonarraylistn
- varname2$ = getelement$(commonarraylist, xi): xi = xi + 1
- typ2$ = getelement$(commonarraylist, xi): xi = xi + 1
- dimmethod2 = VAL(getelement$(commonarraylist, xi)): xi = xi + 1
- dimshared2 = VAL(getelement$(commonarraylist, xi)): xi = xi + 1
- IF Debug THEN PRINT #9, "common checking against:" + varname2$ + sp + typ2$ + sp + str2(dimmethod2) + sp + str2(dimshared2)
- 'check if they are similar
- IF varname$ = varname2$ THEN
- IF symbol2fulltypename$(typ$) = typ2$ THEN
- IF Error_Happened THEN GOTO errmes
- IF dimmethod = dimmethod2 THEN
-
- 'match found!
- 'enforce shared status (if necessary)
- IF dimshared2 THEN dimshared = dimshared OR 2 'temp force SHARED
-
- 'old chain code
- 'chaincommonarray=x
-
- END IF 'method
- END IF 'typ
- END IF 'varname
- NEXT
- END IF
- END IF
-
- dimcommonarray:
- retval = dim2(varname$, typ$, dimmethod, elements$)
- IF Error_Happened THEN GOTO errmes
- skipdim:
- IF dimshared >= 2 THEN dimshared = dimshared - 2
-
- 'non-array COMMON variable
- IF commonoption <> 0 AND LEN(elements$) = 0 THEN
-
- 'CHAIN.TXT (save)
-
- use_global_byte_elements = 1
-
- 'switch output from main.txt to chain.txt
- CLOSE #12
- OPEN tmpdir$ + "chain.txt" FOR APPEND AS #12
- l2$ = tlayout$
-
- PRINT #12, "int32val=1;" 'simple variable
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- t = id.t
- bits = t AND 511
- IF t AND ISUDT THEN bits = udtxsize(t AND 511)
- IF t AND ISSTRING THEN
- IF t AND ISFIXEDLENGTH THEN
- bits = id.tsize * 8
- ELSE
- PRINT #12, "int64val=__STRING_" + RTRIM$(id.n) + "->len*8;"
- bits = 0
- END IF
- END IF
-
- IF bits THEN
- PRINT #12, "int64val=" + str2$(bits) + ";" 'size in bits
- END IF
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
-
- 'put the variable
- e$ = RTRIM$(id.n)
-
- IF (t AND ISUDT) = 0 THEN
- IF t AND ISFIXEDLENGTH THEN
- e$ = e$ + "$" + str2$(id.tsize)
- ELSE
- e$ = e$ + typevalue2symbol$(t)
- IF Error_Happened THEN GOTO errmes
- END IF
- END IF
- e$ = evaluatetotyp(fixoperationorder$(e$), -4)
- IF Error_Happened THEN GOTO errmes
-
- PRINT #12, "sub_put(FF,NULL," + e$ + ",0);"
-
- tlayout$ = l2$
- 'revert output to main.txt
- CLOSE #12
- OPEN tmpdir$ + "main.txt" FOR APPEND AS #12
-
-
- 'INPCHAIN.TXT (load)
-
- 'switch output from main.txt to chain.txt
- CLOSE #12
- OPEN tmpdir$ + "inpchain.txt" FOR APPEND AS #12
- l2$ = tlayout$
-
-
- PRINT #12, "if (int32val==1){"
- 'get the size in bits
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- '***assume correct size***
-
- e$ = RTRIM$(id.n)
- t = id.t
- IF (t AND ISUDT) = 0 THEN
- IF t AND ISFIXEDLENGTH THEN
- e$ = e$ + "$" + str2$(id.tsize)
- ELSE
- e$ = e$ + typevalue2symbol$(t)
- IF Error_Happened THEN GOTO errmes
- END IF
- END IF
-
- IF t AND ISSTRING THEN
- IF (t AND ISFIXEDLENGTH) = 0 THEN
- PRINT #12, "tqbs=qbs_new(int64val>>3,1);"
- PRINT #12, "qbs_set(__STRING_" + RTRIM$(id.n) + ",tqbs);"
- 'now that the string is the correct size, the following GET command will work correctly...
- END IF
- END IF
-
- e$ = evaluatetotyp(fixoperationorder$(e$), -4)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_get(FF,NULL," + e$ + ",0);"
-
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);" 'get next command
- PRINT #12, "}"
-
- tlayout$ = l2$
- 'revert output to main.txt
- CLOSE #12
- OPEN tmpdir$ + "main.txt" FOR APPEND AS #12
-
- use_global_byte_elements = 0
-
- END IF
-
- commonarraylisted:
-
- IF LEN(appendtype$) > 0 AND newDimSyntax = -1 THEN
- IF LEN(dim2typepassback$) THEN appendtype$ = sp + SCase$("As") + sp + dim2typepassback$
- IF newDimSyntaxTypePassBack = 0 THEN
- newDimSyntaxTypePassBack = -1
- l$ = l$ + appendtype$
- END IF
- END IF
-
- n2 = numelements(tlayout$)
- l$ = l$ + sp + getelement$(tlayout$, 1) + appendname$
- IF n2 > 1 THEN
- l$ = l$ + sp2 + getelements$(tlayout$, 2, n2)
- END IF
-
- IF LEN(appendtype$) > 0 AND newDimSyntax = 0 THEN
- IF LEN(dim2typepassback$) THEN appendtype$ = sp + SCase$("As") + sp + dim2typepassback$
- l$ = l$ + appendtype$
- END IF
-
- 'modify first element name to include symbol
-
- dimstatic = olddimstatic
-
- END IF 'listarray=0
-
- IF newDimSyntax THEN RETURN
-
- IF d$ = "," THEN l$ = l$ + sp2 + ",": GOTO dimnext
-
- dimoption = 0
- dimshared = 0
- redimoption = 0
- IF dimstatic = 1 THEN dimstatic = 0
- AllowLocalName = 0
-
- layoutdone = 1
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
-
- GOTO finishedline
- ELSE
- 'yes, this is the new dim syntax.
- i = i + 1 'skip "AS"
- newDimSyntaxTypePassBack = 0
-
- 'estabilish the data type:
- appendname$ = ""
- appendtype$ = sp + SCase$("As")
- typ$ = ""
- varname$ = ""
- previousElement$ = ""
- FOR i = i TO n
- d$ = getelement(a$, i)
- IF d$ = "," OR d$ = "(" THEN EXIT FOR
- varname$ = getelement(ca$, i)
- IF LEN(previousElement$) THEN
- typ$ = typ$ + previousElement$ + " "
- appendtype$ = appendtype$ + sp + previousElement$
- END IF
- previousElement$ = d$
- d$ = ""
- NEXT
- appendtype$ = SCase2$(appendtype$) 'capitalise default types (udt override this later if necessary)
- typ$ = RTRIM$(typ$)
-
- dimnext2:
- notype = 0
- listarray = 0
-
- IF typ$ = "" OR varname$ = "" THEN a$ = "Expected " + firstelement$ + " AS type variable-list or " + firstelement$ + " variable-name AS type": GOTO errmes
-
- 'get the next element
- IF i >= n + 1 THEN e$ = "" ELSE e$ = getelement(a$, i): i = i + 1
-
- 'check if next element is a ( to create an array
- elements$ = ""
-
- IF e$ = "(" THEN
- B = 1
- FOR i = i TO n
- e$ = getelement(ca$, i)
- IF e$ = "(" THEN B = B + 1
- IF e$ = ")" THEN B = B - 1
- IF B = 0 THEN EXIT FOR
- IF LEN(elements$) THEN elements$ = elements$ + sp + e$ ELSE elements$ = e$
- NEXT
- IF B <> 0 THEN a$ = "Expected )": GOTO errmes
- i = i + 1 'set i to point to the next element
-
- IF commonoption THEN elements$ = "?"
-
-
- IF Debug THEN PRINT #9, "DIM2:array:elements$:[" + elements$ + "]"
-
- 'arrayname() means list array to it will automatically be static when it is formally dimensioned later
- 'note: listed arrays are always created in dynamic memory, but their contents are not erased
- ' this differs from static arrays from SUB...STATIC and the unique QB64 method -> STATIC arrayname(100)
- IF dimoption = 3 THEN 'STATIC used
- IF LEN(elements$) = 0 THEN 'nothing between brackets
- listarray = 1 'add to static list
- END IF
- END IF
-
- 'last element was ")"
- 'get next element
- IF i >= n + 1 THEN e$ = "" ELSE e$ = getelement(a$, i): i = i + 1
- END IF 'e$="("
- d$ = e$
-
- dimmethod = 0
-
- dim2typepassback$ = ""
-
- 'does varname have an appended symbol?
- s$ = removesymbol$(varname$)
- IF Error_Happened THEN GOTO errmes
- IF validname(varname$) = 0 THEN a$ = "Invalid variable name": GOTO errmes
-
- IF s$ <> "" THEN
- a$ = "Cannot use type symbol with " + firstelement$ + " AS type variable-list (" + s$ + ")"
- GOTO errmes
- END IF
-
- IF d$ <> "" AND d$ <> "," THEN a$ = "DIM: Expected ,": GOTO errmes
-
- newDimSyntax = -1
- GOSUB NormalDimBlock
- newDimSyntax = 0
-
- IF d$ = "," THEN
- l$ = l$ + sp2 + ","
- varname$ = getelement(ca$, i): i = i + 1
- GOTO dimnext2
- END IF
-
- dimoption = 0
- dimshared = 0
- redimoption = 0
- IF dimstatic = 1 THEN dimstatic = 0
- AllowLocalName = 0
-
- layoutdone = 1
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
-
- GOTO finishedline
- END IF
- END IF
- END IF
-
-
-
-
-
-
-
-
-
-
-
- 'THEN [GOTO] linenumber?
- IF THENGOTO = 1 THEN
- IF n = 1 THEN
- l$ = ""
- a = ASC(LEFT$(firstelement$, 1))
- IF a = 46 OR (a >= 48 AND a <= 57) THEN a2$ = ca$: GOTO THENGOTO
- END IF
- END IF
-
- 'goto
- IF n = 2 THEN
- IF getelement$(a$, 1) = "GOTO" THEN
- l$ = SCase$("GoTo")
- a2$ = getelement$(ca$, 2)
- THENGOTO:
- IF validlabel(a2$) = 0 THEN a$ = "Invalid label!": GOTO errmes
-
- v = HashFind(a2$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk2:
- IF v THEN
- s = Labels(r).Scope
- IF s = subfuncn OR s = -1 THEN 'same scope?
- IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk2
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd a2$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = subfuncn
- Labels(r).Error_Line = linenumber
- END IF 'x
-
- IF LEN(l$) THEN l$ = l$ + sp + tlayout$ ELSE l$ = tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- PRINT #12, "goto LABEL_" + a2$ + ";"
- GOTO finishedline
- END IF
- END IF
-
- IF n = 1 THEN
- IF firstelement$ = "_CONTINUE" OR (firstelement$ = "CONTINUE" AND qb64prefix_set = 1) THEN
- IF firstelement$ = "_CONTINUE" THEN l$ = SCase$("_Continue") ELSE l$ = SCase$("Continue")
- 'scan backwards until previous control level reached
- FOR i = controllevel TO 1 STEP -1
- t = controltype(i)
- IF t = 2 THEN 'for...next
- PRINT #12, "goto fornext_continue_" + str2$(controlid(i)) + ";"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- ELSEIF t = 3 OR t = 4 THEN 'do...loop
- PRINT #12, "goto dl_continue_" + str2$(controlid(i)) + ";"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- ELSEIF t = 5 THEN 'while...wend
- PRINT #12, "goto ww_continue_" + str2$(controlid(i)) + ";"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- NEXT
- a$ = qb64prefix$ + "CONTINUE outside DO..LOOP/FOR..NEXT/WHILE..WEND block": GOTO errmes
- END IF
- END IF
-
- IF firstelement$ = "CHAIN" THEN
- IF vWatchOn THEN
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $Debug mode", "CHAIN"
- END IF
- END IF
-
- IF firstelement$ = "RUN" THEN 'RUN
- IF vWatchOn THEN
- addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $Debug mode", "RUN"
- END IF
- l$ = SCase$("Run")
- IF n = 1 THEN
- 'no parameters
- PRINT #12, "sub_run_init();" 'note: called first to free up screen-locked image handles
- PRINT #12, "sub_clear(NULL,NULL,NULL,NULL);" 'use functionality of CLEAR
- IF LEN(subfunc$) THEN
- PRINT #12, "QBMAIN(NULL);"
- ELSE
- PRINT #12, "goto S_0;"
- END IF
- ELSE
- 'parameter passed
- e$ = getelements$(ca$, 2, n)
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l2$ = tlayout$
- ignore$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
- IF n = 2 AND ((typ AND ISSTRING) = 0) THEN
- 'assume it's a label or line number
- lbl$ = getelement$(ca$, 2)
- IF validlabel(lbl$) = 0 THEN a$ = "Invalid label!": GOTO errmes 'invalid label
-
- v = HashFind(lbl$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk501:
- IF v THEN
- s = Labels(r).Scope
- IF s = 0 OR s = -1 THEN 'main scope?
- IF s = -1 THEN Labels(r).Scope = 0 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- Labels(r).Scope_Restriction = subfuncn
- Labels(r).Error_Line = linenumber
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk501
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd lbl$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = 0
- Labels(r).Error_Line = linenumber
- Labels(r).Scope_Restriction = subfuncn
- END IF 'x
-
- l$ = l$ + sp + tlayout$
- PRINT #12, "sub_run_init();" 'note: called first to free up screen-locked image handles
- PRINT #12, "sub_clear(NULL,NULL,NULL,NULL);" 'use functionality of CLEAR
- IF LEN(subfunc$) THEN
- PRINT #21, "if (run_from_line==" + str2(nextrunlineindex) + "){run_from_line=0;goto LABEL_" + lbl$ + ";}"
- PRINT #12, "run_from_line=" + str2(nextrunlineindex) + ";"
- nextrunlineindex = nextrunlineindex + 1
- PRINT #12, "QBMAIN(NULL);"
- ELSE
- PRINT #12, "goto LABEL_" + lbl$ + ";"
- END IF
- ELSE
- 'assume it's a string containing a filename to execute
- e$ = evaluatetotyp(e$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_run(" + e$ + ");"
- l$ = l$ + sp + l2$
- END IF 'isstring
- END IF 'n=1
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF 'run
-
-
-
-
-
- IF firstelement$ = "END" THEN
- l$ = SCase$("End")
- IF n > 1 THEN
- e$ = getelements$(ca$, 2, n)
- e$ = fixoperationorder$(e$): IF Error_Happened THEN GOTO errmes
- l2$ = tlayout$
- e$ = evaluatetotyp(e$, ISINTEGER64): IF Error_Happened THEN GOTO errmes
- inclinenump$ = ""
- IF inclinenumber(inclevel) THEN
- inclinenump$ = "," + str2$(inclinenumber(inclevel))
- thisincname$ = getfilepath$(incname$(inclevel))
- thisincname$ = MID$(incname$(inclevel), LEN(thisincname$) + 1)
- inclinenump$ = inclinenump$ + "," + CHR$(34) + thisincname$ + CHR$(34)
- END IF
- IF vWatchOn AND inclinenumber(inclevel) = 0 THEN temp$ = vWatchErrorCall$ ELSE temp$ = ""
- PRINT #12, "if(qbevent){" + temp$ + "evnt(" + str2$(linenumber) + inclinenump$ + ");}" 'non-resumable error check (cannot exit without handling errors)
- PRINT #12, "exit_code=" + e$ + ";"
- l$ = l$ + sp + l2$
- END IF
- xend
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
-
- IF firstelement$ = "SYSTEM" THEN
- l$ = SCase$("System")
- IF n > 1 THEN
- e$ = getelements$(ca$, 2, n)
- e$ = fixoperationorder$(e$): IF Error_Happened THEN GOTO errmes
- l2$ = tlayout$
- e$ = evaluatetotyp(e$, ISINTEGER64): IF Error_Happened THEN GOTO errmes
- inclinenump$ = ""
- IF inclinenumber(inclevel) THEN
- inclinenump$ = "," + str2$(inclinenumber(inclevel))
- thisincname$ = getfilepath$(incname$(inclevel))
- thisincname$ = MID$(incname$(inclevel), LEN(thisincname$) + 1)
- inclinenump$ = inclinenump$ + "," + CHR$(34) + thisincname$ + CHR$(34)
- END IF
- IF vWatchOn = 1 AND NoChecks = 0 AND inclinenumber(inclevel) = 0 THEN temp$ = vWatchErrorCall$ ELSE temp$ = ""
- PRINT #12, "if(qbevent){" + temp$ + "evnt(" + str2$(linenumber) + inclinenump$ + ");}" 'non-resumable error check (cannot exit without handling errors)
- PRINT #12, "exit_code=" + e$ + ";"
- l$ = l$ + sp + l2$
- END IF
-
-
- IF vWatchOn = 1 THEN
- IF inclinenumber(inclevel) = 0 THEN
- vWatchAddLabel linenumber, 0
- END IF
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= 0; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- PRINT #12, "if (sub_gl_called) error(271);"
- PRINT #12, "close_program=1;"
- PRINT #12, "end();"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
-
- IF n >= 1 THEN
- IF firstelement$ = "STOP" THEN
- l$ = SCase$("Stop")
- IF n > 1 THEN
- e$ = getelements$(ca$, 2, n)
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("Stop") + sp + tlayout$
- e$ = evaluatetotyp(e$, 64)
- IF Error_Happened THEN GOTO errmes
- 'note: this value is currently ignored but evaluated for checking reasons
- END IF
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- IF vWatchOn = 1 AND NoChecks = 0 AND inclinenumber(inclevel) = 0 THEN
- PRINT #12, "*__LONG_VWATCH_LINENUMBER=-3; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;"
- vWatchAddLabel linenumber, 0
- ELSE
- PRINT #12, "close_program=1;"
- PRINT #12, "end();"
- END IF
- GOTO finishedline
- END IF
- END IF
-
- IF n = 2 THEN
- IF firstelement$ = "GOSUB" THEN
- xgosub ca$
- IF Error_Happened THEN GOTO errmes
- 'note: layout implemented in xgosub
- GOTO finishedline
- END IF
- END IF
-
- IF n >= 1 THEN
- IF firstelement$ = "RETURN" THEN
- IF n = 1 THEN
- PRINT #12, "#include " + CHR$(34) + "ret" + str2$(subfuncn) + ".txt" + CHR$(34)
- l$ = SCase$("Return")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- ELSE
- 'label/linenumber follows
- IF subfuncn <> 0 THEN a$ = "RETURN linelabel/linenumber invalid within a SUB/FUNCTION": GOTO errmes
- IF n > 2 THEN a$ = "Expected linelabel/linenumber after RETURN": GOTO errmes
- PRINT #12, "if (!next_return_point) error(3);" 'check return point available
- PRINT #12, "next_return_point--;" 'destroy return point
- a2$ = getelement$(ca$, 2)
- IF validlabel(a2$) = 0 THEN a$ = "Invalid label!": GOTO errmes
-
- v = HashFind(a2$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk505:
- IF v THEN
- s = Labels(r).Scope
- IF s = subfuncn OR s = -1 THEN 'same scope?
- IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk505
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd a2$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = subfuncn
- Labels(r).Error_Line = linenumber
- END IF 'x
-
- PRINT #12, "goto LABEL_" + a2$ + ";"
- l$ = SCase$("Return") + sp + tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
- END IF
-
- IF n >= 1 THEN
- IF firstelement$ = "RESUME" THEN
- l$ = SCase$("Resume")
- IF n = 1 THEN
- resumeprev:
-
-
- PRINT #12, "if (!error_handling){error(20);}else{error_retry=1; qbevent=1; error_handling=0; error_err=0; return;}"
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- IF n > 2 THEN a$ = "Too many parameters": GOTO errmes
- s$ = getelement$(ca$, 2)
- IF UCASE$(s$) = "NEXT" THEN
-
-
- PRINT #12, "if (!error_handling){error(20);}else{error_handling=0; error_err=0; return;}"
-
- l$ = l$ + sp + SCase$("Next")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- IF s$ = "0" THEN l$ = l$ + sp + "0": GOTO resumeprev
- IF validlabel(s$) = 0 THEN a$ = "Invalid label passed to RESUME": GOTO errmes
-
- v = HashFind(s$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk506:
- IF v THEN
- s = Labels(r).Scope
- IF s = subfuncn OR s = -1 THEN 'same scope?
- IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk506
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd s$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = subfuncn
- Labels(r).Error_Line = linenumber
- END IF 'x
-
- l$ = l$ + sp + tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- PRINT #12, "if (!error_handling){error(20);}else{error_handling=0; error_err=0; goto LABEL_" + s$ + ";}"
- GOTO finishedline
- END IF
- END IF
-
- IF n = 4 THEN
- IF getelements(a$, 1, 3) = "ON" + sp + "ERROR" + sp + "GOTO" THEN
- l$ = SCase$("On" + sp + "Error" + sp + "GoTo")
- lbl$ = getelement$(ca$, 4)
- IF lbl$ = "0" THEN
- PRINT #12, "error_goto_line=0;"
- l$ = l$ + sp + "0"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- IF validlabel(lbl$) = 0 THEN a$ = "Invalid label": GOTO errmes
-
- v = HashFind(lbl$, HASHFLAG_LABEL, ignore, r)
- x = 1
- labchk6:
- IF v THEN
- s = Labels(r).Scope
- IF s = 0 OR s = -1 THEN 'main scope?
- IF s = -1 THEN Labels(r).Scope = 0 'acquire scope
- x = 0 'already defined
- tlayout$ = RTRIM$(Labels(r).cn)
- Labels(r).Scope_Restriction = subfuncn
- Labels(r).Error_Line = linenumber
- ELSE
- IF v = 2 THEN v = HashFindCont(ignore, r): GOTO labchk6
- END IF
- END IF
- IF x THEN
- 'does not exist
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd lbl$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = 0
- Labels(r).Error_Line = linenumber
- Labels(r).Scope_Restriction = subfuncn
- END IF 'x
-
-
- l$ = l$ + sp + tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- errorlabels = errorlabels + 1
- PRINT #12, "error_goto_line=" + str2(errorlabels) + ";"
- PRINT #14, "if (error_goto_line==" + str2(errorlabels) + "){error_handling=1; goto LABEL_" + lbl$ + ";}"
- GOTO finishedline
- END IF
- END IF
-
- IF n >= 1 THEN
- IF firstelement$ = "RESTORE" THEN
- l$ = SCase$("Restore")
- IF n = 1 THEN
- PRINT #12, "data_offset=0;"
- ELSE
- IF n > 2 THEN a$ = "Syntax error - too many parameters (expected RESTORE label/line number)": GOTO errmes
- lbl$ = getelement$(ca$, 2)
- IF validlabel(lbl$) = 0 THEN a$ = "Invalid label": GOTO errmes
-
- 'rule: a RESTORE label has no scope, therefore, only one instance of that label may exist
- 'how: enforced by a post check for duplicates
- v = HashFind(lbl$, HASHFLAG_LABEL, ignore, r)
- x = 1
- IF v THEN 'already defined
- x = 0
- tlayout$ = RTRIM$(Labels(r).cn)
- Labels(r).Data_Referenced = 1 'make sure the data referenced flag is set
- IF Labels(r).Error_Line = 0 THEN Labels(r).Error_Line = linenumber
- END IF
- IF x THEN
- nLabels = nLabels + 1: IF nLabels > Labels_Ubound THEN Labels_Ubound = Labels_Ubound * 2: REDIM _PRESERVE Labels(1 TO Labels_Ubound) AS Label_Type
- Labels(nLabels) = Empty_Label
- HashAdd lbl$, HASHFLAG_LABEL, nLabels
- r = nLabels
- Labels(r).State = 0
- Labels(r).cn = tlayout$
- Labels(r).Scope = -1 'modifyable scope
- Labels(r).Error_Line = linenumber
- Labels(r).Data_Referenced = 1
- END IF 'x
-
- l$ = l$ + sp + tlayout$
- PRINT #12, "data_offset=data_at_LABEL_" + lbl$ + ";"
- END IF
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
-
-
-
- 'ON ... GOTO/GOSUB
- IF n >= 1 THEN
- IF firstelement$ = "ON" THEN
- xongotogosub a$, ca$, n
- IF Error_Happened THEN GOTO errmes
- GOTO finishedline
- END IF
- END IF
-
-
- '(_MEM) _MEMPUT _MEMGET
- IF n >= 1 THEN
- IF firstelement$ = "_MEMGET" OR (firstelement$ = "MEMGET" AND qb64prefix_set = 1) THEN
- 'get expressions
- e$ = ""
- B = 0
- ne = 0
- FOR i2 = 2 TO n
- e2$ = getelement$(ca$, i2)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF e2$ = "," AND B = 0 THEN
- ne = ne + 1
- IF ne = 1 THEN blk$ = e$: e$ = ""
- IF ne = 2 THEN offs$ = e$: e$ = ""
- IF ne = 3 THEN a$ = "Syntax error - too many parameters (Expected " + qb64prefix$ + "MEMGET mem-reference, offset, variable)": GOTO errmes
- ELSE
- IF LEN(e$) = 0 THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
- END IF
- NEXT
- var$ = e$
- IF e$ = "" OR ne <> 2 THEN a$ = "Expected " + qb64prefix$ + "MEMGET mem-reference, offset, variable": GOTO errmes
-
- IF firstelement$ = "_MEMGET" THEN l$ = SCase$("_MemGet") + sp ELSE l$ = SCase$("MemGet") + sp
-
- e$ = fixoperationorder$(blk$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
-
- test$ = evaluate(e$, typ): IF Error_Happened THEN GOTO errmes
- IF (typ AND ISUDT) = 0 OR (typ AND 511) <> 1 THEN a$ = "Expected " + qb64prefix$ + "MEM type": GOTO errmes
- blkoffs$ = evaluatetotyp(e$, -6)
-
- ' IF typ AND ISREFERENCE THEN e$ = refer(e$, typ, 0)
-
-
- 'PRINT #12, blkoffs$ '???
-
- e$ = fixoperationorder$(offs$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluatetotyp(e$, OFFSETTYPE - ISPOINTER): IF Error_Happened THEN GOTO errmes
- offs$ = e$
- 'PRINT #12, e$ '???
-
- e$ = fixoperationorder$(var$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- varsize$ = evaluatetotyp(e$, -5): IF Error_Happened THEN GOTO errmes
- varoffs$ = evaluatetotyp(e$, -6): IF Error_Happened THEN GOTO errmes
-
-
- 'PRINT #12, varoffs$ '???
- 'PRINT #12, varsize$ '???
-
- 'what do we do next
- 'need to know offset of variable and its size
-
- 'known sizes will be handled by designated command casts, otherwise use memmove
- s = 0
- IF varsize$ = "1" THEN s = 1: st$ = "int8"
- IF varsize$ = "2" THEN s = 2: st$ = "int16"
- IF varsize$ = "4" THEN s = 4: st$ = "int32"
- IF varsize$ = "8" THEN s = 8: st$ = "int64"
-
- IF NoChecks THEN
- 'fast version:
- IF s THEN
- PRINT #12, "*(" + st$ + "*)" + varoffs$ + "=*(" + st$ + "*)(" + offs$ + ");"
- ELSE
- PRINT #12, "memmove(" + varoffs$ + ",(void*)" + offs$ + "," + varsize$ + ");"
- END IF
- ELSE
- 'safe version:
- PRINT #12, "tmp_long=" + offs$ + ";"
- 'is mem block init?
- PRINT #12, "if ( ((mem_block*)(" + blkoffs$ + "))->lock_offset ){"
- 'are region and id valid?
- PRINT #12, "if ("
- PRINT #12, "tmp_long < ((mem_block*)(" + blkoffs$ + "))->offset ||"
- PRINT #12, "(tmp_long+(" + varsize$ + ")) > ( ((mem_block*)(" + blkoffs$ + "))->offset + ((mem_block*)(" + blkoffs$ + "))->size) ||"
- PRINT #12, "((mem_lock*)((mem_block*)(" + blkoffs$ + "))->lock_offset)->id != ((mem_block*)(" + blkoffs$ + "))->lock_id ){"
- 'diagnose error
- PRINT #12, "if (" + "((mem_lock*)((mem_block*)(" + blkoffs$ + "))->lock_offset)->id != ((mem_block*)(" + blkoffs$ + "))->lock_id" + ") error(308); else error(300);"
- PRINT #12, "}else{"
- IF s THEN
- PRINT #12, "*(" + st$ + "*)" + varoffs$ + "=*(" + st$ + "*)tmp_long;"
- ELSE
- PRINT #12, "memmove(" + varoffs$ + ",(void*)tmp_long," + varsize$ + ");"
- END IF
- PRINT #12, "}"
- PRINT #12, "}else error(309);"
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
-
- END IF
- END IF
-
-
-
-
- IF n >= 1 THEN
- IF firstelement$ = "_MEMPUT" OR (firstelement$ = "MEMPUT" AND qb64prefix_set = 1) THEN
- 'get expressions
- typ$ = ""
- e$ = ""
- B = 0
- ne = 0
- FOR i2 = 2 TO n
- e2$ = getelement$(ca$, i2)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF (e2$ = "," OR UCASE$(e2$) = "AS") AND B = 0 THEN
- ne = ne + 1
- IF ne = 1 THEN blk$ = e$: e$ = ""
- IF ne = 2 THEN offs$ = e$: e$ = ""
- IF ne = 3 THEN var$ = e$: e$ = ""
- IF (UCASE$(e2$) = "AS" AND ne <> 3) OR (ne = 3 AND UCASE$(e2$) <> "AS") OR ne = 4 THEN a$ = "Expected _MEMPUT mem-reference,offset,variable|value[AS type]": GOTO errmes
- ELSE
- IF LEN(e$) = 0 THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
- END IF
- NEXT
- IF ne < 2 OR e$ = "" THEN a$ = "Expected " + qb64prefix$ + "MEMPUT mem-reference, offset, variable|value[AS type]": GOTO errmes
- IF ne = 2 THEN var$ = e$ ELSE typ$ = UCASE$(e$)
-
- IF firstelement$ = "_MEMPUT" THEN l$ = SCase$("_MemPut") + sp ELSE l$ = SCase$("MemPut") + sp
-
- e$ = fixoperationorder$(blk$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
-
- test$ = evaluate(e$, typ): IF Error_Happened THEN GOTO errmes
- IF (typ AND ISUDT) = 0 OR (typ AND 511) <> 1 THEN a$ = "Expected " + qb64prefix$ + "MEM type": GOTO errmes
- blkoffs$ = evaluatetotyp(e$, -6)
-
- e$ = fixoperationorder$(offs$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluatetotyp(e$, OFFSETTYPE - ISPOINTER): IF Error_Happened THEN GOTO errmes
- offs$ = e$
-
- IF ne = 2 THEN
- e$ = fixoperationorder$(var$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
-
- test$ = evaluate(e$, t): IF Error_Happened THEN GOTO errmes
- IF (t AND ISREFERENCE) = 0 AND (t AND ISSTRING) THEN
- PRINT #12, "g_tmp_str=" + test$ + ";"
- varsize$ = "g_tmp_str->len"
- varoffs$ = "g_tmp_str->chr"
- ELSE
- varsize$ = evaluatetotyp(e$, -5): IF Error_Happened THEN GOTO errmes
- varoffs$ = evaluatetotyp(e$, -6): IF Error_Happened THEN GOTO errmes
- END IF
-
- 'known sizes will be handled by designated command casts, otherwise use memmove
- s = 0
- IF varsize$ = "1" THEN s = 1: st$ = "int8"
- IF varsize$ = "2" THEN s = 2: st$ = "int16"
- IF varsize$ = "4" THEN s = 4: st$ = "int32"
- IF varsize$ = "8" THEN s = 8: st$ = "int64"
-
- IF NoChecks THEN
- 'fast version:
- IF s THEN
- PRINT #12, "*(" + st$ + "*)(" + offs$ + ")=*(" + st$ + "*)" + varoffs$ + ";"
- ELSE
- PRINT #12, "memmove((void*)" + offs$ + "," + varoffs$ + "," + varsize$ + ");"
- END IF
- ELSE
- 'safe version:
- PRINT #12, "tmp_long=" + offs$ + ";"
- 'is mem block init?
- PRINT #12, "if ( ((mem_block*)(" + blkoffs$ + "))->lock_offset ){"
- 'are region and id valid?
- PRINT #12, "if ("
- PRINT #12, "tmp_long < ((mem_block*)(" + blkoffs$ + "))->offset ||"
- PRINT #12, "(tmp_long+(" + varsize$ + ")) > ( ((mem_block*)(" + blkoffs$ + "))->offset + ((mem_block*)(" + blkoffs$ + "))->size) ||"
- PRINT #12, "((mem_lock*)((mem_block*)(" + blkoffs$ + "))->lock_offset)->id != ((mem_block*)(" + blkoffs$ + "))->lock_id ){"
- 'diagnose error
- PRINT #12, "if (" + "((mem_lock*)((mem_block*)(" + blkoffs$ + "))->lock_offset)->id != ((mem_block*)(" + blkoffs$ + "))->lock_id" + ") error(308); else error(300);"
- PRINT #12, "}else{"
- IF s THEN
- PRINT #12, "*(" + st$ + "*)tmp_long=*(" + st$ + "*)" + varoffs$ + ";"
- ELSE
- PRINT #12, "memmove((void*)tmp_long," + varoffs$ + "," + varsize$ + ");"
- END IF
- PRINT #12, "}"
- PRINT #12, "}else error(309);"
- END IF
-
- ELSE
-
- '... AS type method
- 'FUNCTION typname2typ& (t2$)
- 'typname2typsize = 0 'the default
- t = typname2typ(typ$)
- IF t = 0 THEN a$ = "Invalid type": GOTO errmes
- IF (t AND ISOFFSETINBITS) <> 0 OR (t AND ISUDT) <> 0 OR (t AND ISSTRING) THEN a$ = qb64prefix$ + "MEMPUT requires numeric type": GOTO errmes
- IF (t AND ISPOINTER) THEN t = t - ISPOINTER
- 'attempt conversion...
- e$ = fixoperationorder$(var$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$ + sp + SCase$("As") + sp + typ$
- e$ = evaluatetotyp(e$, t): IF Error_Happened THEN GOTO errmes
- st$ = typ2ctyp$(t, "")
- varsize$ = str2((t AND 511) \ 8)
- IF NoChecks THEN
- 'fast version:
- PRINT #12, "*(" + st$ + "*)(" + offs$ + ")=" + e$ + ";"
- ELSE
- 'safe version:
- PRINT #12, "tmp_long=" + offs$ + ";"
- 'is mem block init?
- PRINT #12, "if ( ((mem_block*)(" + blkoffs$ + "))->lock_offset ){"
- 'are region and id valid?
- PRINT #12, "if ("
- PRINT #12, "tmp_long < ((mem_block*)(" + blkoffs$ + "))->offset ||"
- PRINT #12, "(tmp_long+(" + varsize$ + ")) > ( ((mem_block*)(" + blkoffs$ + "))->offset + ((mem_block*)(" + blkoffs$ + "))->size) ||"
- PRINT #12, "((mem_lock*)((mem_block*)(" + blkoffs$ + "))->lock_offset)->id != ((mem_block*)(" + blkoffs$ + "))->lock_id ){"
- 'diagnose error
- PRINT #12, "if (" + "((mem_lock*)((mem_block*)(" + blkoffs$ + "))->lock_offset)->id != ((mem_block*)(" + blkoffs$ + "))->lock_id" + ") error(308); else error(300);"
- PRINT #12, "}else{"
- PRINT #12, "*(" + st$ + "*)tmp_long=" + e$ + ";"
- PRINT #12, "}"
- PRINT #12, "}else error(309);"
- END IF
-
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
-
- END IF
- END IF
-
-
-
-
-
- IF n >= 1 THEN
- IF firstelement$ = "_MEMFILL" OR (firstelement$ = "MEMFILL" AND qb64prefix_set = 1) THEN
- 'get expressions
- typ$ = ""
- e$ = ""
- B = 0
- ne = 0
- FOR i2 = 2 TO n
- e2$ = getelement$(ca$, i2)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF (e2$ = "," OR UCASE$(e2$) = "AS") AND B = 0 THEN
- ne = ne + 1
- IF ne = 1 THEN blk$ = e$: e$ = ""
- IF ne = 2 THEN offs$ = e$: e$ = ""
- IF ne = 3 THEN bytes$ = e$: e$ = ""
- IF ne = 4 THEN var$ = e$: e$ = ""
- IF (UCASE$(e2$) = "AS" AND ne <> 4) OR (ne = 4 AND UCASE$(e2$) <> "AS") OR ne = 5 THEN a$ = "Expected _MEMFILL mem-reference,offset,bytes,variable|value[AS type]": GOTO errmes
- ELSE
- IF LEN(e$) = 0 THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
- END IF
- NEXT
- IF ne < 3 OR e$ = "" THEN a$ = "Expected " + qb64prefix$ + "MEMFILL mem-reference, offset, bytes, variable|value[AS type]": GOTO errmes
- IF ne = 3 THEN var$ = e$ ELSE typ$ = UCASE$(e$)
-
- IF firstelement$ = "_MEMFILL" THEN l$ = SCase$("_MemFill") + sp ELSE l$ = SCase$("MemFill") + sp
-
- e$ = fixoperationorder$(blk$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
-
- test$ = evaluate(e$, typ): IF Error_Happened THEN GOTO errmes
- IF (typ AND ISUDT) = 0 OR (typ AND 511) <> 1 THEN a$ = "Expected " + qb64prefix$ + "MEM type": GOTO errmes
- blkoffs$ = evaluatetotyp(e$, -6)
-
- e$ = fixoperationorder$(offs$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluatetotyp(e$, OFFSETTYPE - ISPOINTER): IF Error_Happened THEN GOTO errmes
- offs$ = e$
-
- e$ = fixoperationorder$(bytes$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluatetotyp(e$, OFFSETTYPE - ISPOINTER): IF Error_Happened THEN GOTO errmes
- bytes$ = e$
-
- IF ne = 3 THEN 'no AS
- e$ = fixoperationorder$(var$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- test$ = evaluate(e$, t)
- IF (t AND ISREFERENCE) = 0 AND (t AND ISSTRING) THEN
- PRINT #12, "tmp_long=(ptrszint)" + test$ + ";"
- varsize$ = "((qbs*)tmp_long)->len"
- varoffs$ = "((qbs*)tmp_long)->chr"
- ELSE
- varsize$ = evaluatetotyp(e$, -5): IF Error_Happened THEN GOTO errmes
- varoffs$ = evaluatetotyp(e$, -6): IF Error_Happened THEN GOTO errmes
- END IF
-
- IF NoChecks THEN
- PRINT #12, "sub__memfill_nochecks(" + offs$ + "," + bytes$ + ",(ptrszint)" + varoffs$ + "," + varsize$ + ");"
- ELSE
- PRINT #12, "sub__memfill((mem_block*)" + blkoffs$ + "," + offs$ + "," + bytes$ + ",(ptrszint)" + varoffs$ + "," + varsize$ + ");"
- END IF
-
- ELSE
-
- '... AS type method
- t = typname2typ(typ$)
- IF t = 0 THEN a$ = "Invalid type": GOTO errmes
- IF (t AND ISOFFSETINBITS) <> 0 OR (t AND ISUDT) <> 0 OR (t AND ISSTRING) THEN a$ = qb64prefix$ + "MEMFILL requires numeric type": GOTO errmes
- IF (t AND ISPOINTER) THEN t = t - ISPOINTER
- 'attempt conversion...
- e$ = fixoperationorder$(var$): IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$ + sp + SCase$("As") + sp + typ$
- e$ = evaluatetotyp(e$, t): IF Error_Happened THEN GOTO errmes
-
- c$ = "sub__memfill_"
- IF NoChecks THEN c$ = "sub__memfill_nochecks_"
- IF t AND ISOFFSET THEN
- c$ = c$ + "OFFSET"
- ELSE
- IF t AND ISFLOAT THEN
- IF (t AND 511) = 32 THEN c$ = c$ + "SINGLE"
- IF (t AND 511) = 64 THEN c$ = c$ + "DOUBLE"
- IF (t AND 511) = 256 THEN c$ = c$ + "FLOAT" 'padded variable
- ELSE
- c$ = c$ + str2((t AND 511) \ 8)
- END IF
- END IF
- c$ = c$ + "("
- IF NoChecks = 0 THEN c$ = c$ + "(mem_block*)" + blkoffs$ + ","
- PRINT #12, c$ + offs$ + "," + bytes$ + "," + e$ + ");"
- END IF
-
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
-
- END IF
- END IF
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'note: ABSOLUTE cannot be used without CALL
- cispecial = 0
- IF n > 1 THEN
- IF firstelement$ = "INTERRUPT" OR firstelement$ = "INTERRUPTX" THEN
- a$ = "CALL" + sp + firstelement$ + sp + "(" + sp + getelements$(a$, 2, n) + sp + ")"
- ca$ = "CALL" + sp + firstelement$ + sp + "(" + sp + getelements$(ca$, 2, n) + sp + ")"
- n = n + 3
- firstelement$ = "CALL"
- cispecial = 1
- 'fall through
- END IF
- END IF
-
- usecall = 0
- IF firstelement$ = "CALL" THEN
- usecall = 1
- IF n = 1 THEN a$ = "Expected CALL sub-name [(...)]": GOTO errmes
- cn$ = getelement$(ca$, 2): n$ = UCASE$(cn$)
-
- IF n > 2 THEN
-
- IF n <= 4 THEN a$ = "Expected CALL sub-name (...)": GOTO errmes
- IF getelement$(a$, 3) <> "(" OR getelement$(a$, n) <> ")" THEN a$ = "Expected CALL sub-name (...)": GOTO errmes
- a$ = n$ + sp + getelements$(a$, 4, n - 1)
- ca$ = cn$ + sp + getelements$(ca$, 4, n - 1)
-
-
- IF n$ = "INTERRUPT" OR n$ = "INTERRUPTX" THEN 'assume CALL INTERRUPT[X] request
- 'print "CI: call interrupt command reached":sleep 1
- IF n$ = "INTERRUPT" THEN PRINT #12, "call_interrupt("; ELSE PRINT #12, "call_interruptx(";
- argn = 0
- n = numelements(a$)
- B = 0
- e$ = ""
- FOR i = 2 TO n
- e2$ = getelement$(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF (e2$ = "," AND B = 0) OR i = n THEN
- IF i = n THEN
- IF e$ = "" THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
- END IF
- argn = argn + 1
- IF argn = 1 THEN 'interrupt number
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = SCase$("Call") + sp + n$ + sp2 + "(" + sp2 + tlayout$
- IF cispecial = 1 THEN l$ = n$ + sp + tlayout$
- e$ = evaluatetotyp(e$, 64&)
- IF Error_Happened THEN GOTO errmes
- 'print "CI: evaluated interrupt number as ["+e$+"]":sleep 1
- PRINT #12, e$;
- END IF
- IF argn = 2 OR argn = 3 THEN 'inregs, outregs
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e2$ = e$
- e$ = evaluatetotyp(e$, -2) 'offset+size
- IF Error_Happened THEN GOTO errmes
- 'print "CI: evaluated in/out regs ["+e2$+"] as ["+e$+"]":sleep 1
- PRINT #12, "," + e$;
- END IF
- e$ = ""
- ELSE
- IF e$ = "" THEN e$ = e2$ ELSE e$ = e$ + sp + e2$
- END IF
- NEXT
- IF argn <> 3 THEN a$ = "Expected CALL INTERRUPT (interrupt-no, inregs, outregs)": GOTO errmes
- PRINT #12, ");"
- IF cispecial = 0 THEN l$ = l$ + sp2 + ")"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- 'print "CI: done":sleep 1
- GOTO finishedline
- END IF 'call interrupt
-
-
-
-
-
-
-
-
- 'call to CALL ABSOLUTE beyond reasonable doubt
- IF n$ = "ABSOLUTE" THEN
- l$ = SCase$("Call" + sp + "Absolute" + sp2 + "(" + sp2)
- argn = 0
- n = numelements(a$)
- B = 0
- e$ = ""
- FOR i = 2 TO n
- e2$ = getelement$(ca$, i)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF (e2$ = "," AND B = 0) OR i = n THEN
- IF i < n THEN
- IF e$ = "" THEN a$ = "Expected expression before , or )": GOTO errmes
- '1. variable or value?
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp2 + "," + sp
- ignore$ = evaluate(e$, typ)
- IF Error_Happened THEN GOTO errmes
-
- IF (typ AND ISPOINTER) <> 0 AND (typ AND ISREFERENCE) <> 0 THEN
-
- 'assume standard variable
- 'assume not string/array/udt/etc
- e$ = "VARPTR" + sp + "(" + sp + e$ + sp + ")"
- e$ = evaluatetotyp(e$, UINTEGERTYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
-
- ELSE
-
- 'assume not string
- 'single, double or integer64?
- IF typ AND ISFLOAT THEN
- IF (typ AND 511) = 32 THEN
- e$ = evaluatetotyp(e$, SINGLETYPE - ISPOINTER)
- IF Error_Happened THEN GOTO errmes
- v$ = "pass" + str2$(uniquenumber)
- PRINT #defdatahandle, "float *" + v$ + "=NULL;"
- PRINT #13, "if(" + v$ + "==NULL){"
- PRINT #13, "cmem_sp-=4;"
- PRINT #13, v$ + "=(float*)(dblock+cmem_sp);"
- PRINT #13, "if (cmem_sp2
-
- a$ = n$
- ca$ = cn$
- usecall = 2
-
- END IF 'n>2
-
- n = numelements(a$)
- firstelement$ = getelement$(a$, 1)
-
- 'valid SUB name
- validsub = 0
- findidsecondarg = "": IF n >= 2 THEN findidsecondarg = getelement$(a$, 2)
- try = findid(firstelement$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.subfunc = 2 THEN validsub = 1: EXIT DO
- IF try = 2 THEN
- findidsecondarg = "": IF n >= 2 THEN findidsecondarg = getelement$(a$, 2)
- findanotherid = 1
- try = findid(firstelement$)
- IF Error_Happened THEN GOTO errmes
- ELSE
- try = 0
- END IF
- LOOP
- IF validsub = 0 THEN a$ = "Expected CALL sub-name [(...)]": GOTO errmes
- END IF
-
- 'sub?
- IF n >= 1 THEN
-
- IF firstelement$ = "?" THEN firstelement$ = "PRINT"
-
- findidsecondarg = "": IF n >= 2 THEN findidsecondarg = getelement$(a$, 2)
- try = findid(firstelement$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.subfunc = 2 THEN
-
- 'check symbol
- s$ = removesymbol$(firstelement$ + "")
- IF Error_Happened THEN GOTO errmes
- IF ASC(id.musthave) = 36 THEN '="$"
- IF s$ <> "$" THEN GOTO notsubcall 'missing musthave "$"
- ELSE
- IF LEN(s$) THEN GOTO notsubcall 'unrequired symbol added
- END IF
- 'check for variable assignment
- IF n > 1 THEN
- IF ASC(id.specialformat) <> 61 THEN '<>"="
- IF ASC(getelement$(a$, 2)) = 61 THEN GOTO notsubcall 'assignment, not sub call
- END IF
- END IF
- 'check for array assignment
- IF n > 2 THEN
- IF firstelement$ <> "PRINT" AND firstelement$ <> "LPRINT" THEN
- IF getelement$(a$, 2) = "(" THEN
- B = 1
- FOR i = 3 TO n
- e$ = getelement$(a$, i)
- IF e$ = "(" THEN B = B + 1
- IF e$ = ")" THEN
- B = B - 1
- IF B = 0 THEN
- IF i = n THEN EXIT FOR
- IF getelement$(a$, i + 1) = "=" THEN GOTO notsubcall
- END IF
- END IF
- NEXT
- END IF
- END IF
- END IF
-
-
- 'generate error on driect _GL call
- IF firstelement$ = "_GL" THEN
- a$ = "Cannot call SUB _GL directly": GOTO errmes
- END IF
-
- IF firstelement$ = "VWATCH" THEN
- a$ = "Cannot call SUB VWATCH directly": GOTO errmes
- END IF
-
- IF firstelement$ = "OPEN" THEN
- 'gwbasic or qbasic version?
- B = 0
- FOR x = 2 TO n
- a2$ = getelement$(a$, x)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
- IF a2$ = "FOR" OR a2$ = "AS" THEN EXIT FOR 'qb style open verified
- IF B = 0 AND a2$ = "," THEN 'the gwbasic version includes a comma after the first string expression
- findanotherid = 1
- try = findid(firstelement$) 'id of sub_open_gwbasic
- IF Error_Happened THEN GOTO errmes
- EXIT FOR
- END IF
- NEXT
- END IF
-
-
- 'IF findid(firstelement$) THEN
- 'IF id.subfunc = 2 THEN
-
-
- IF firstelement$ = "CLOSE" OR firstelement$ = "RESET" THEN
- IF firstelement$ = "RESET" THEN
- IF n > 1 THEN a$ = "Syntax error - RESET takes no parameters": GOTO errmes
- l$ = SCase$("Reset")
- ELSE
- l$ = SCase$("Close")
- END IF
-
- IF n = 1 THEN
- PRINT #12, "sub_close(NULL,0);" 'closes all files
- ELSE
- l$ = l$ + sp
- B = 0
- s = 0
- a3$ = ""
- FOR x = 2 TO n
- a2$ = getelement$(ca$, x)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
- IF a2$ = "#" AND B = 0 THEN
- IF s = 0 THEN s = 1 ELSE a$ = "Unexpected #": GOTO errmes
- l$ = l$ + "#" + sp2
- GOTO closenexta
- END IF
-
- IF a2$ = "," AND B = 0 THEN
- IF s = 2 THEN
- e$ = fixoperationorder$(a3$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$ + sp2 + "," + sp
- e$ = evaluatetotyp(e$, 64&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_close(" + e$ + ",1);"
- a3$ = ""
- s = 0
- GOTO closenexta
- ELSE
- a$ = "Expected expression before ,": GOTO errmes
- END IF
- END IF
-
- s = 2
- IF a3$ = "" THEN a3$ = a2$ ELSE a3$ = a3$ + sp + a2$
-
- closenexta:
- NEXT
-
- IF s = 2 THEN
- e$ = fixoperationorder$(a3$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + tlayout$
- e$ = evaluatetotyp(e$, 64&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_close(" + e$ + ",1);"
- ELSE
- l$ = LEFT$(l$, LEN(l$) - 1)
- END IF
-
- END IF
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF 'close
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'data, restore, read
- IF firstelement$ = "READ" THEN 'file input
- xread ca$, n
- IF Error_Happened THEN GOTO errmes
- 'note: layout done in xread sub
- GOTO finishedline
- END IF 'read
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- lineinput = 0
- IF n >= 2 THEN
- IF firstelement$ = "LINE" AND secondelement$ = "INPUT" THEN
- lineinput = 1
- a$ = RIGHT$(a$, LEN(a$) - 5): ca$ = RIGHT$(ca$, LEN(ca$) - 5): n = n - 1 'remove "LINE"
- firstelement$ = "INPUT"
- END IF
- END IF
-
- IF firstelement$ = "INPUT" THEN 'file input
- IF n > 1 THEN
- IF getelement$(a$, 2) = "#" THEN
- l$ = SCase$("Input") + sp + "#": IF lineinput THEN l$ = SCase$("Line") + sp + l$
-
- u$ = str2$(uniquenumber)
- 'which file?
- IF n = 2 THEN a$ = "Expected # ... , ...": GOTO errmes
- a3$ = ""
- B = 0
- FOR i = 3 TO n
- a2$ = getelement$(ca$, i)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
- IF a2$ = "," AND B = 0 THEN
- IF a3$ = "" THEN a$ = "Expected # ... , ...": GOTO errmes
- GOTO inputgotfn
- END IF
- IF a3$ = "" THEN a3$ = a2$ ELSE a3$ = a3$ + sp + a2$
- NEXT
- inputgotfn:
- e$ = fixoperationorder$(a3$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + tlayout$
- e$ = evaluatetotyp(e$, 64&)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "tmp_fileno=" + e$ + ";"
- PRINT #12, "if (new_error) goto skip" + u$ + ";"
- i = i + 1
- IF i > n THEN a$ = "Expected , ...": GOTO errmes
- a3$ = ""
- B = 0
- FOR i = i TO n
- a2$ = getelement$(ca$, i)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
- IF i = n THEN
- IF a3$ = "" THEN a3$ = a2$ ELSE a3$ = a3$ + sp + a2$
- a2$ = ",": B = 0
- END IF
- IF a2$ = "," AND B = 0 THEN
- IF a3$ = "" THEN a$ = "Expected , ...": GOTO errmes
- e$ = fixoperationorder$(a3$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp2 + "," + sp + tlayout$
- e$ = evaluate(e$, t)
- IF Error_Happened THEN GOTO errmes
- IF (t AND ISREFERENCE) = 0 THEN a$ = "Expected variable-name": GOTO errmes
- IF (t AND ISSTRING) THEN
- e$ = refer(e$, t, 0)
- IF Error_Happened THEN GOTO errmes
- IF lineinput THEN
- PRINT #12, "sub_file_line_input_string(tmp_fileno," + e$ + ");"
- PRINT #12, "if (new_error) goto skip" + u$ + ";"
- ELSE
- PRINT #12, "sub_file_input_string(tmp_fileno," + e$ + ");"
- PRINT #12, "if (new_error) goto skip" + u$ + ";"
- END IF
- stringprocessinghappened = 1
- ELSE
- IF lineinput THEN a$ = "Expected string-variable": GOTO errmes
-
- 'numeric variable
- IF (t AND ISFLOAT) <> 0 OR (t AND 511) <> 64 THEN
- IF (t AND ISOFFSETINBITS) THEN
- setrefer e$, t, "((int64)func_file_input_float(tmp_fileno," + str2(t) + "))", 1
- IF Error_Happened THEN GOTO errmes
- ELSE
- setrefer e$, t, "func_file_input_float(tmp_fileno," + str2(t) + ")", 1
- IF Error_Happened THEN GOTO errmes
- END IF
- ELSE
- IF t AND ISUNSIGNED THEN
- setrefer e$, t, "func_file_input_uint64(tmp_fileno)", 1
- IF Error_Happened THEN GOTO errmes
- ELSE
- setrefer e$, t, "func_file_input_int64(tmp_fileno)", 1
- IF Error_Happened THEN GOTO errmes
- END IF
- END IF
-
- PRINT #12, "if (new_error) goto skip" + u$ + ";"
-
- END IF
- IF i = n THEN EXIT FOR
- IF lineinput THEN a$ = "Too many variables": GOTO errmes
- a3$ = "": a2$ = ""
- END IF
- IF a3$ = "" THEN a3$ = a2$ ELSE a3$ = a3$ + sp + a2$
- NEXT
- PRINT #12, "skip" + u$ + ":"
- IF stringprocessinghappened THEN PRINT #12, cleanupstringprocessingcall$ + "0);"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
- END IF
- END IF 'input#
-
-
- IF firstelement$ = "INPUT" THEN
- l$ = SCase$("Input"): IF lineinput THEN l$ = SCase$("Line") + sp + l$
- commaneeded = 0
- i = 2
-
- newline = 1: IF getelement$(a$, i) = ";" THEN newline = 0: i = i + 1: l$ = l$ + sp + ";"
-
- a2$ = getelement$(ca$, i)
- IF LEFT$(a2$, 1) = CHR$(34) THEN
- e$ = fixoperationorder$(a2$): l$ = l$ + sp + tlayout$
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "qbs_print(qbs_new_txt_len(" + a2$ + "),0);"
- i = i + 1
- 'MUST be followed by a ; or ,
- a2$ = getelement$(ca$, i)
- i = i + 1
- l$ = l$ + sp2 + a2$
- IF a2$ = ";" THEN
- IF lineinput THEN GOTO finishedpromptstring
- PRINT #12, "qbs_print(qbs_new_txt(" + CHR$(34) + "? " + CHR$(34) + "),0);"
- GOTO finishedpromptstring
- END IF
- IF a2$ = "," THEN
- GOTO finishedpromptstring
- END IF
- a$ = "Syntax error - Reference: INPUT [;] " + CHR$(34) + "[Question or statement text]" + CHR$(34) + "{,|;} variable[, ...] or INPUT ; variable[, ...]": GOTO errmes
- END IF
- 'there was no promptstring, so print a ?
- IF lineinput = 0 THEN PRINT #12, "qbs_print(qbs_new_txt(" + CHR$(34) + "? " + CHR$(34) + "),0);"
- finishedpromptstring:
- numvar = 0
- FOR i = i TO n
- IF commaneeded = 1 THEN
- a2$ = getelement$(ca$, i)
- IF a2$ <> "," THEN a$ = "Syntax error - comma expected": GOTO errmes
- ELSE
-
- B = 0
- e$ = ""
- FOR i2 = i TO n
- e2$ = getelement$(ca$, i2)
- IF e2$ = "(" THEN B = B + 1
- IF e2$ = ")" THEN B = B - 1
- IF e2$ = "," AND B = 0 THEN i2 = i2 - 1: EXIT FOR
- e$ = e$ + sp + e2$
- NEXT
- i = i2: IF i > n THEN i = n
- IF e$ = "" THEN a$ = "Expected variable": GOTO errmes
- e$ = RIGHT$(e$, LEN(e$) - 1)
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$: IF i <> n THEN l$ = l$ + sp2 + ","
- e$ = evaluate(e$, t)
- IF Error_Happened THEN GOTO errmes
- IF (t AND ISREFERENCE) = 0 THEN a$ = "Expected variable": GOTO errmes
-
- IF (t AND ISSTRING) THEN
- e$ = refer(e$, t, 0)
- IF Error_Happened THEN GOTO errmes
- numvar = numvar + 1
- IF lineinput THEN
- PRINT #12, "qbs_input_variabletypes[" + str2(numvar) + "]=ISSTRING+512;"
- ELSE
- PRINT #12, "qbs_input_variabletypes[" + str2(numvar) + "]=ISSTRING;"
- END IF
- PRINT #12, "qbs_input_variableoffsets[" + str2(numvar) + "]=" + e$ + ";"
- GOTO gotinputvar
- END IF
-
- IF lineinput THEN a$ = "Expected string variable": GOTO errmes
- IF (t AND ISARRAY) THEN
- IF (t AND ISOFFSETINBITS) THEN
- a$ = "INPUT cannot handle BIT array elements": GOTO errmes
- END IF
- END IF
- e$ = "&(" + refer(e$, t, 0) + ")"
- IF Error_Happened THEN GOTO errmes
-
- 'remove assumed/unnecessary flags
- IF (t AND ISPOINTER) THEN t = t - ISPOINTER
- IF (t AND ISINCONVENTIONALMEMORY) THEN t = t - ISINCONVENTIONALMEMORY
- IF (t AND ISREFERENCE) THEN t = t - ISREFERENCE
-
- 'IF (t AND ISOFFSETINBITS) THEN
- 'numvar = numvar + 1
- 'consider storing the bit offset in unused bits of t
- 'PRINT #12, "qbs_input_variabletypes[" + str2(numvar) + "]=" + str2(t) + ";"
- 'PRINT #12, "qbs_input_variableoffsets[" + str2(numvar) + "]=" + refer(ref$, typ, 1) + ";"
- 'GOTO gotinputvar
- 'END IF
-
- 'assume it is a regular variable
- numvar = numvar + 1
- PRINT #12, "qbs_input_variabletypes[" + str2(numvar) + "]=" + str2$(t) + ";"
- PRINT #12, "qbs_input_variableoffsets[" + str2(numvar) + "]=" + e$ + ";"
- GOTO gotinputvar
-
- END IF
- gotinputvar:
- commaneeded = commaneeded + 1: IF commaneeded = 2 THEN commaneeded = 0
- NEXT
- IF numvar = 0 THEN a$ = "Syntax error - Reference: INPUT [;] " + CHR$(34) + "[Question or statement text]" + CHR$(34) + "{,|;} variable[, ...] or INPUT ; variable[, ...]": GOTO errmes
- IF lineinput = 1 AND numvar > 1 THEN a$ = "Too many variables": GOTO errmes
- IF vWatchOn = 1 THEN
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= -4; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- PRINT #12, "qbs_input(" + str2(numvar) + "," + str2$(newline) + ");"
- PRINT #12, "if (stop_program) end();"
- IF vWatchOn = 1 THEN
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= -5; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- PRINT #12, cleanupstringprocessingcall$ + "0);"
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
-
-
-
- IF firstelement$ = "WRITE" THEN 'file write
- IF n > 1 THEN
- IF getelement$(a$, 2) = "#" THEN
- xfilewrite ca$, n
- IF Error_Happened THEN GOTO errmes
- GOTO finishedline
- END IF '#
- END IF 'n>1
- END IF '"write"
-
- IF firstelement$ = "WRITE" THEN 'write
- xwrite ca$, n
- IF Error_Happened THEN GOTO errmes
- GOTO finishedline
- END IF '"write"
-
- IF firstelement$ = "PRINT" THEN 'file print
- IF n > 1 THEN
- IF getelement$(a$, 2) = "#" THEN
- xfileprint a$, ca$, n
- IF Error_Happened THEN GOTO errmes
- l$ = tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF '#
- END IF 'n>1
- END IF '"print"
-
- IF firstelement$ = "PRINT" OR firstelement$ = "LPRINT" THEN
- IF secondelement$ <> "USING" THEN 'check to see if we need to auto-add semicolons
- elementon = 2
- redosemi:
- FOR i = elementon TO n - 1
- nextchar$ = getelement$(a$, i + 1)
- IF nextchar$ <> ";" AND nextchar$ <> "," AND nextchar$ <> "+" AND nextchar$ <> ")" THEN
- temp1$ = getelement$(a$, i)
- beginpoint = INSTR(beginpoint, temp1$, CHR$(34))
- endpoint = INSTR(beginpoint + 1, temp1$, CHR$(34) + ",")
- IF beginpoint <> 0 AND endpoint <> 0 THEN 'if we have both positions
- 'Quote without semicolon check (like PRINT "abc"123)
- textlength = endpoint - beginpoint - 1
- textvalue$ = MID$(temp1$, endpoint + 2, LEN(LTRIM$(STR$(textlength))))
- IF VAL(textvalue$) = textlength THEN
- insertelements a$, i, ";"
- insertelements ca$, i, ";"
- n = n + 1
- elementon = i + 2 'just a easy way to reduce redundant calls to the routine
- GOTO redosemi
- END IF
- END IF
- IF temp1$ <> "USING" THEN
- IF LEFT$(LTRIM$(nextchar$), 1) = CHR$(34) THEN
- IF temp1$ <> ";" AND temp1$ <> "," AND temp1$ <> "+" AND temp1$ <> "(" THEN
- insertelements a$, i, ";"
- insertelements ca$, i, ";"
- n = n + 1
- elementon = i + 2 'just a easy way to reduce redundant calls to the routine
- GOTO redosemi
- END IF
- END IF
- END IF
- END IF
- NEXT
- END IF
-
- xprint a$, ca$, n
- IF Error_Happened THEN GOTO errmes
- l$ = tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- END IF
-
-
-
- IF firstelement$ = "CLEAR" THEN
- IF subfunc$ <> "" THEN a$ = "CLEAR cannot be used inside a SUB/FUNCTION": GOTO errmes
- END IF
-
- 'LSET/RSET
- IF firstelement$ = "LSET" OR firstelement$ = "RSET" THEN
- IF n = 1 THEN a$ = "Expected " + firstelement$ + " ...": GOTO errmes
- IF firstelement$ = "LSET" THEN l$ = SCase$("LSet") ELSE l$ = SCase$("RSet")
- dest$ = ""
- source$ = ""
- part = 1
- i = 2
- a3$ = ""
- B = 0
- DO
- IF i > n THEN
- IF part <> 2 OR a3$ = "" THEN a$ = "Expected LSET/RSET stringvariable=string": GOTO errmes
- source$ = a3$
- EXIT DO
- END IF
- a2$ = getelement$(ca$, i)
- IF a2$ = "(" THEN B = B + 1
- IF a2$ = ")" THEN B = B - 1
- IF a2$ = "=" AND B = 0 THEN
- IF part = 1 THEN dest$ = a3$: part = 2: a3$ = "": GOTO lrsetgotpart
- END IF
- IF LEN(a3$) THEN a3$ = a3$ + sp + a2$ ELSE a3$ = a2$
- lrsetgotpart:
- i = i + 1
- LOOP
- IF dest$ = "" THEN a$ = "Expected LSET/RSET stringvariable=string": GOTO errmes
- 'check if it is a valid source string
- f$ = fixoperationorder$(dest$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$ + sp + "="
- e$ = evaluate(f$, sourcetyp)
- IF Error_Happened THEN GOTO errmes
- IF (sourcetyp AND ISREFERENCE) = 0 OR (sourcetyp AND ISSTRING) = 0 THEN a$ = "LSET/RSET expects a string variable/array-element as its first argument": GOTO errmes
- dest$ = evaluatetotyp(f$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
- source$ = fixoperationorder$(source$)
- IF Error_Happened THEN GOTO errmes
- l$ = l$ + sp + tlayout$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- source$ = evaluatetotyp(source$, ISSTRING)
- IF Error_Happened THEN GOTO errmes
- IF firstelement$ = "LSET" THEN
- PRINT #12, "sub_lset(" + dest$ + "," + source$ + ");"
- ELSE
- PRINT #12, "sub_rset(" + dest$ + "," + source$ + ");"
- END IF
- GOTO finishedline
- END IF
-
- 'SWAP
- IF firstelement$ = "SWAP" THEN
- IF n < 4 THEN a$ = "Expected SWAP ... , ...": GOTO errmes
- B = 0
- ele = 1
- e1$ = ""
- e2$ = ""
- FOR i = 2 TO n
- e$ = getelement$(ca$, i)
- IF e$ = "(" THEN B = B + 1
- IF e$ = ")" THEN B = B - 1
- IF e$ = "," AND B = 0 THEN
- IF ele = 2 THEN a$ = "Expected SWAP ... , ...": GOTO errmes
- ele = 2
- ELSE
- IF ele = 1 THEN e1$ = e1$ + sp + e$ ELSE e2$ = e2$ + sp + e$
- END IF
- NEXT
- IF e2$ = "" THEN a$ = "Expected SWAP ... , ...": GOTO errmes
- e1$ = RIGHT$(e1$, LEN(e1$) - 1): e2$ = RIGHT$(e2$, LEN(e2$) - 1)
-
- e1$ = fixoperationorder(e1$)
- IF Error_Happened THEN GOTO errmes
- e1l$ = tlayout$
- e2$ = fixoperationorder(e2$)
- IF Error_Happened THEN GOTO errmes
- e2l$ = tlayout$
- e1$ = evaluate(e1$, e1typ): e2$ = evaluate(e2$, e2typ)
- IF Error_Happened THEN GOTO errmes
- IF (e1typ AND ISREFERENCE) = 0 OR (e2typ AND ISREFERENCE) = 0 THEN a$ = "Expected variable": GOTO errmes
-
- layoutdone = 1
- l$ = SCase$("Swap") + sp + e1l$ + sp2 + "," + sp + e2l$
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
-
- 'swap strings?
- IF (e1typ AND ISSTRING) THEN
- IF (e2typ AND ISSTRING) = 0 THEN a$ = "Type mismatch": GOTO errmes
- e1$ = refer(e1$, e1typ, 0): e2$ = refer(e2$, e2typ, 0)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "swap_string(" + e1$ + "," + e2$ + ");"
- GOTO finishedline
- END IF
-
- 'swap UDT?
- 'note: entire UDTs, unlike thier elements cannot be swapped like standard variables
- ' as UDT sizes may vary, and to avoid a malloc operation, QB64 should allocate a buffer
- ' in global.txt for the purpose of swapping each UDT type
-
- IF e1typ AND ISUDT THEN
- a$ = e1$
- 'retrieve ID
- i = INSTR(a$, sp3)
- IF i THEN
- idnumber = VAL(LEFT$(a$, i - 1)): a$ = RIGHT$(a$, LEN(a$) - i)
- getid idnumber
- IF Error_Happened THEN GOTO errmes
- u = VAL(a$)
- i = INSTR(a$, sp3): a$ = RIGHT$(a$, LEN(a$) - i): E = VAL(a$)
- i = INSTR(a$, sp3): o$ = RIGHT$(a$, LEN(a$) - i)
- n$ = "UDT_" + RTRIM$(id.n): IF id.t = 0 THEN n$ = "ARRAY_" + n$ + "[0]"
- IF E = 0 THEN 'not an element of UDT u
- lhsscope$ = scope$
- e$ = e2$: t2 = e2typ
- IF (t2 AND ISUDT) = 0 THEN a$ = "Expected SWAP with similar user defined type": GOTO errmes
- idnumber2 = VAL(e$)
- getid idnumber2
- IF Error_Happened THEN GOTO errmes
- n2$ = "UDT_" + RTRIM$(id.n): IF id.t = 0 THEN n2$ = "ARRAY_" + n2$ + "[0]"
- i = INSTR(e$, sp3): e$ = RIGHT$(e$, LEN(e$) - i): u2 = VAL(e$)
- i = INSTR(e$, sp3): e$ = RIGHT$(e$, LEN(e$) - i): e2 = VAL(e$)
-
- i = INSTR(e$, sp3): o2$ = RIGHT$(e$, LEN(e$) - i)
- 'WARNING: u2 may need minor modifications based on e to see if they are the same
- IF u <> u2 OR e2 <> 0 THEN a$ = "Expected SWAP with similar user defined type": GOTO errmes
- dst$ = "(((char*)" + lhsscope$ + n$ + ")+(" + o$ + "))"
- src$ = "(((char*)" + scope$ + n2$ + ")+(" + o2$ + "))"
- B = udtxsize(u) \ 8
- siz$ = str2$(B)
- IF B = 1 THEN PRINT #12, "swap_8(" + src$ + "," + dst$ + ");"
- IF B = 2 THEN PRINT #12, "swap_16(" + src$ + "," + dst$ + ");"
- IF B = 4 THEN PRINT #12, "swap_32(" + src$ + "," + dst$ + ");"
- IF B = 8 THEN PRINT #12, "swap_64(" + src$ + "," + dst$ + ");"
- IF B <> 1 AND B <> 2 AND B <> 4 AND B <> 8 THEN PRINT #12, "swap_block(" + src$ + "," + dst$ + "," + siz$ + ");"
- GOTO finishedline
- END IF 'e=0
- END IF 'i
- END IF 'isudt
-
- 'cull irrelavent flags to make comparison possible
- e1typc = e1typ
- IF e1typc AND ISPOINTER THEN e1typc = e1typc - ISPOINTER
- IF e1typc AND ISINCONVENTIONALMEMORY THEN e1typc = e1typc - ISINCONVENTIONALMEMORY
- IF e1typc AND ISARRAY THEN e1typc = e1typc - ISARRAY
- IF e1typc AND ISUNSIGNED THEN e1typc = e1typc - ISUNSIGNED
- IF e1typc AND ISUDT THEN e1typc = e1typc - ISUDT
- e2typc = e2typ
- IF e2typc AND ISPOINTER THEN e2typc = e2typc - ISPOINTER
- IF e2typc AND ISINCONVENTIONALMEMORY THEN e2typc = e2typc - ISINCONVENTIONALMEMORY
- IF e2typc AND ISARRAY THEN e2typc = e2typc - ISARRAY
- IF e2typc AND ISUNSIGNED THEN e2typc = e2typc - ISUNSIGNED
- IF e2typc AND ISUDT THEN e2typc = e2typc - ISUDT
- IF e1typc <> e2typc THEN a$ = "Type mismatch": GOTO errmes
- t = e1typ
- IF t AND ISOFFSETINBITS THEN a$ = "Cannot SWAP bit-length variables": GOTO errmes
- B = t AND 511
- t$ = str2$(B): IF B > 64 THEN t$ = "longdouble"
- PRINT #12, "swap_" + t$ + "(&" + refer(e1$, e1typ, 0) + ",&" + refer(e2$, e2typ, 0) + ");"
- IF Error_Happened THEN GOTO errmes
- GOTO finishedline
- END IF
-
- IF firstelement$ = "OPTION" THEN
- IF optionexplicit = 0 THEN e$ = " or OPTION " + qb64prefix$ + "EXPLICIT" ELSE e$ = ""
- IF optionexplicitarray = 0 THEN e$ = e$ + " or OPTION " + qb64prefix$ + "EXPLICITARRAY"
- IF n = 1 THEN a$ = "Expected OPTION BASE" + e$: GOTO errmes
- e$ = getelement$(a$, 2)
- SELECT CASE e$
- CASE "BASE"
- l$ = getelement$(a$, 3)
- IF l$ <> "0" AND l$ <> "1" THEN a$ = "Expected OPTION BASE 0 or 1": GOTO errmes
- IF l$ = "1" THEN optionbase = 1 ELSE optionbase = 0
- l$ = SCase$("Option" + sp + "Base") + sp + l$
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- CASE "EXPLICIT", "_EXPLICIT"
- IF e$ = "EXPLICIT" AND qb64prefix$ = "_" THEN
- IF optionexplicit = 0 THEN e$ = " or OPTION " + qb64prefix$ + "EXPLICIT" ELSE e$ = ""
- IF optionexplicitarray = 0 THEN e$ = e$ + " or OPTION " + qb64prefix$ + "EXPLICITARRAY"
- a$ = "Expected OPTION BASE" + e$: GOTO errmes
- END IF
-
- opex_desiredState = -1
- IF optionexplicit = 0 THEN
- IF opex_recompileAttempts = 0 THEN
- opex_recompileAttempts = opex_recompileAttempts + 1
- GOTO do_recompile
- END IF
- END IF
-
- l$ = SCase$("Option") + sp
- IF e$ = "EXPLICIT" THEN l$ = l$ + SCase$("Explicit") ELSE l$ = l$ + SCase$("_Explicit")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- CASE "EXPLICITARRAY", "_EXPLICITARRAY"
- IF e$ = "EXPLICITARRAY" AND qb64prefix$ = "_" THEN
- IF optionexplicit = 0 THEN e$ = " or OPTION " + qb64prefix$ + "EXPLICIT" ELSE e$ = ""
- IF optionexplicitarray = 0 THEN e$ = e$ + " or OPTION " + qb64prefix$ + "EXPLICITARRAY"
- a$ = "Expected OPTION BASE" + e$: GOTO errmes
- END IF
-
- opexarray_desiredState = -1
- IF optionexplicitarray = 0 THEN
- IF opexarray_recompileAttempts = 0 THEN
- opexarray_recompileAttempts = opexarray_recompileAttempts + 1
- GOTO do_recompile
- END IF
- END IF
-
- l$ = SCase$("Option") + sp
- IF e$ = "EXPLICITARRAY" THEN l$ = l$ + SCase$("ExplicitArray") ELSE l$ = l$ + SCase$("_ExplicitArray")
- layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- GOTO finishedline
- CASE ELSE
- IF optionexplicit = 0 THEN e$ = " or OPTION " + qb64prefix$ + "EXPLICIT" ELSE e$ = ""
- IF optionexplicitarray = 0 THEN e$ = e$ + " or OPTION " + qb64prefix$ + "EXPLICITARRAY"
- a$ = "Expected OPTION BASE" + e$: GOTO errmes
- END SELECT
- END IF
-
- 'any other "unique" subs can be processed above
-
- id2 = id
-
- targetid = currentid
-
- IF RTRIM$(id2.callname) = "sub_stub" THEN a$ = "Command not implemented": GOTO errmes
-
- IF n > 1 THEN
- IF id2.args = 0 THEN a$ = "SUB does not require any arguments": GOTO errmes
- END IF
-
- SetDependency id2.Dependency
-
- seperateargs_error = 0
- passedneeded = seperateargs(getelements(a$, 2, n), getelements(ca$, 2, n), passed&)
- IF seperateargs_error THEN a$ = seperateargs_error_message: GOTO errmes
-
- 'backup args to local string array space before calling evaluate
- FOR i = 1 TO OptMax: separgs2(i) = "": NEXT 'save space!
- FOR i = 1 TO OptMax + 1: separgslayout2(i) = "": NEXT
- FOR i = 1 TO id2.args: separgs2(i) = separgs(i): NEXT
- FOR i = 1 TO id2.args + 1: separgslayout2(i) = separgslayout(i): NEXT
-
-
-
- IF Debug THEN
- PRINT #9, "separgs:": FOR i = 1 TO id2.args: PRINT #9, i, separgs2(i): NEXT
- PRINT #9, "separgslayout:": FOR i = 1 TO id2.args + 1: PRINT #9, i, separgslayout2(i): NEXT
- END IF
-
-
-
- 'note: seperateargs finds the arguments to pass and sets passed& as necessary
- ' FIXOPERTIONORDER is not called on these args yet
- ' what we need it to do is build a second array of layout info at the same time
- ' ref:DIM SHARED separgslayout(100) AS STRING
- ' the above array stores what layout info (if any) goes BEFORE the arg in question
- ' it has one extra index which is the arg after
-
- IF usecall THEN
- IF id.internal_subfunc THEN
- IF usecall = 1 THEN l$ = SCase$("Call") + sp + SCase$(RTRIM$(id.cn)) + RTRIM$(id.musthave) + sp2 + "(" + sp2
- IF usecall = 2 THEN l$ = SCase$("Call") + sp + SCase$(RTRIM$(id.cn)) + RTRIM$(id.musthave) + sp 'sp at end for easy parsing
- ELSE
- IF usecall = 1 THEN l$ = SCase$("Call") + sp + RTRIM$(id.cn) + RTRIM$(id.musthave) + sp2 + "(" + sp2
- IF usecall = 2 THEN l$ = SCase$("Call") + sp + RTRIM$(id.cn) + RTRIM$(id.musthave) + sp 'sp at end for easy parsing
- END IF
- ELSE
- IF id.internal_subfunc THEN
- l$ = SCase$(RTRIM$(id.cn)) + RTRIM$(id.musthave) + sp
- ELSE
- l$ = RTRIM$(id.cn) + RTRIM$(id.musthave) + sp
- END IF
- END IF
-
- subcall$ = RTRIM$(id.callname) + "("
- addedlayout = 0
-
- fieldcall = 0
- 'GET/PUT field exception
- IF RTRIM$(id2.callname) = "sub_get" OR RTRIM$(id2.callname) = "sub_put" THEN
- IF passed AND 2 THEN
- 'regular GET/PUT call with variable provided
- passed = passed - 2 'for complience with existing methods, remove 'passed' flag for the passing of a variable
- ELSE
- 'FIELD GET/PUT call with variable omited
- IF RTRIM$(id2.callname) = "sub_get" THEN
- fieldcall = 1
- subcall$ = "field_get("
- ELSE
- fieldcall = 2
- subcall$ = "field_put("
- END IF
- END IF
- END IF 'field exception
-
- IF RTRIM$(id2.callname) = "sub_timer" OR RTRIM$(id2.callname) = "sub_key" THEN 'spacing exception
- IF usecall = 0 THEN
- l$ = LEFT$(l$, LEN(l$) - 1) + sp2
- END IF
- END IF
-
- FOR i = 1 TO id2.args
- targettyp = CVL(MID$(id2.arg, -3 + i * 4, 4))
- nele = ASC(MID$(id2.nele, i, 1))
- nelereq = ASC(MID$(id2.nelereq, i, 1))
-
- addlayout = 1 'omits option values in layout (eg. BINARY="2")
- convertspacing = 0 'if an 'equation' is next, it will be preceeded by a space
- x$ = separgslayout2$(i)
- DO WHILE LEN(x$)
- x = ASC(x$)
- IF x THEN
- convertspacing = 0
- x2$ = MID$(x$, 2, x)
- x$ = RIGHT$(x$, LEN(x$) - x - 1)
-
- s = 0
- an = 0
- x3$ = RIGHT$(l$, 1)
- IF x3$ = sp THEN s = 1
- IF x3$ = sp2 THEN
- s = 2
- IF alphanumeric(ASC(RIGHT$(l$, 2))) THEN an = 1
- ELSE
- IF alphanumeric(ASC(x3$)) THEN an = 1
- END IF
- s1 = s
-
- IF alphanumeric(ASC(x2$)) THEN convertspacing = 1
-
-
- IF x2$ = "LPRINT" THEN
-
- 'x2$="LPRINT"
- 'x$=CHR$(0)
- 'x3$=[sp] from WIDTH[sp]
- 'therefore...
- 's=1
- 'an=0
- 'convertspacing=1
-
-
- 'if debug=1 then
- 'print #9,"LPRINT:"
- 'print #9,s
- 'print #9,an
- 'print #9,l$
- 'print #9,x2$
- 'end if
-
- END IF
-
-
-
-
- IF (an = 1 OR addedlayout = 1) AND alphanumeric(ASC(x2$)) <> 0 THEN
-
-
-
- s = 1 'force space
- x2$ = x2$ + sp2
- GOTO customlaychar
- END IF
-
- IF x2$ = "=" THEN
- s = 1
- x2$ = x2$ + sp
- GOTO customlaychar
- END IF
-
- IF x2$ = "#" THEN
- s = 1
- x2$ = x2$ + sp2
- GOTO customlaychar
- END IF
-
- IF x2$ = "," THEN x2$ = x2$ + sp: GOTO customlaychar
-
-
- IF x$ = CHR$(0) THEN 'substitution
- IF x2$ = "STEP" THEN x2$ = x2$ + sp2: GOTO customlaychar
- x2$ = x2$ + sp: GOTO customlaychar
- END IF
-
- 'default solution sp2+?+sp2
- x2$ = x2$ + sp2
-
-
-
-
-
- customlaychar:
- IF s = 0 THEN s = 2
- IF s <> s1 THEN
- IF s1 THEN l$ = LEFT$(l$, LEN(l$) - 1)
- IF s = 1 THEN l$ = l$ + sp
- IF s = 2 THEN l$ = l$ + sp2
- END IF
-
- IF (RTRIM$(id2.callname) = "sub_timer" OR RTRIM$(id2.callname) = "sub_key") AND i = id2.args THEN 'spacing exception
- IF x2$ <> ")" + sp2 THEN
- l$ = LEFT$(l$, LEN(l$) - 1) + sp
- END IF
- END IF
-
- l$ = l$ + x2$
-
- ELSE
- addlayout = 0
- x$ = RIGHT$(x$, LEN(x$) - 1)
- END IF
- addedlayout = 0
- LOOP
-
-
-
- '---better sub syntax checking begins here---
-
-
-
- IF targettyp = -3 THEN
- IF separgs2(i) = "N-LL" THEN a$ = "Expected array name": GOTO errmes
- 'names of numeric arrays have ( ) automatically appended (nothing else)
- e$ = separgs2(i)
-
- IF INSTR(e$, sp) = 0 THEN 'one element only
- try_string$ = e$
- try = findid(try_string$)
- IF Error_Happened THEN GOTO errmes
- DO
- IF try THEN
- IF id.arraytype THEN
- IF (id.arraytype AND ISSTRING) = 0 THEN
- e$ = e$ + sp + "(" + sp + ")"
- EXIT DO
- END IF
- END IF
- '---
- IF try = 2 THEN findanotherid = 1: try = findid(try_string$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- END IF 'if try
- IF try = 0 THEN 'add symbol?
- IF LEN(removesymbol$(try_string$)) = 0 THEN
- IF Error_Happened THEN GOTO errmes
- a = ASC(try_string$)
- IF a >= 97 AND a <= 122 THEN a = a - 32
- IF a = 95 THEN a = 91
- a = a - 64
- IF LEN(defineextaz(a)) THEN try_string$ = try_string$ + defineextaz(a): try = findid(try_string$)
- IF Error_Happened THEN GOTO errmes
- END IF
- END IF 'try=0
- LOOP UNTIL try = 0
- END IF 'one element only
-
-
-
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- IF convertspacing = 1 AND addlayout = 1 THEN l$ = LEFT$(l$, LEN(l$) - 1) + sp
- IF addlayout THEN l$ = l$ + tlayout$: addedlayout = 1
- e$ = evaluatetotyp(e$, -2)
- IF Error_Happened THEN GOTO errmes
- GOTO sete
- END IF '-3
-
-
- IF targettyp = -2 THEN
- e$ = fixoperationorder$(e$)
- IF Error_Happened THEN GOTO errmes
- IF convertspacing = 1 AND addlayout = 1 THEN l$ = LEFT$(l$, LEN(l$) - 1) + sp
- IF addlayout THEN l$ = l$ + tlayout$: addedlayout = 1
- e$ = evaluatetotyp(e$, -2)
- IF Error_Happened THEN GOTO errmes
- GOTO sete
- END IF '-2
-
- IF targettyp = -4 THEN
-
- IF fieldcall THEN
- i = id2.args + 1
- EXIT FOR
- END IF
-
- IF separgs2(i) = "N-LL" THEN a$ = "Expected variable name/array element": GOTO errmes
- e$ = fixoperationorder$(separgs2(i))
- IF Error_Happened THEN GOTO errmes
- IF convertspacing = 1 AND addlayout = 1 THEN l$ = LEFT$(l$, LEN(l$) - 1) + sp
- IF addlayout THEN l$ = l$ + tlayout$: addedlayout = 1
-
- 'GET/PUT RANDOM-ACCESS override
- IF firstelement$ = "GET" OR firstelement$ = "PUT" THEN
- e2$ = e$ 'backup
- e$ = evaluate(e$, sourcetyp)
- IF Error_Happened THEN GOTO errmes
- IF (sourcetyp AND ISSTRING) THEN
- IF (sourcetyp AND ISFIXEDLENGTH) = 0 THEN
- 'replace name of sub to call
- subcall$ = RIGHT$(subcall$, LEN(subcall$) - 7) 'delete original name
- 'note: GET2 & PUT2 take differing input, following code is correct
- IF firstelement$ = "GET" THEN
- subcall$ = "sub_get2" + subcall$
- e$ = refer(e$, sourcetyp, 0) 'pass a qbs pointer instead
- IF Error_Happened THEN GOTO errmes
- GOTO sete
- ELSE
- subcall$ = "sub_put2" + subcall$
- 'no goto sete required, fall through
- END IF
- END IF
- END IF
- e$ = e2$ 'restore
- END IF 'override
-
- e$ = evaluatetotyp(e$, -4)
- IF Error_Happened THEN GOTO errmes
- GOTO sete
- END IF '-4
-
- IF separgs2(i) = "N-LL" THEN
- e$ = "NULL"
- ELSE
-
- e2$ = fixoperationorder$(separgs2(i))
- IF Error_Happened THEN GOTO errmes
- IF convertspacing = 1 AND addlayout = 1 THEN l$ = LEFT$(l$, LEN(l$) - 1) + sp
- IF addlayout THEN l$ = l$ + tlayout$: addedlayout = 1
-
- e$ = evaluate(e2$, sourcetyp)
- IF Error_Happened THEN GOTO errmes
-
- IF sourcetyp AND ISOFFSET THEN
- IF (targettyp AND ISOFFSET) = 0 THEN
- IF id2.internal_subfunc = 0 THEN a$ = "Cannot convert _OFFSET type to other types": GOTO errmes
- END IF
- END IF
-
- IF RTRIM$(id2.callname) = "sub_paint" THEN
- IF i = 3 THEN
- IF (sourcetyp AND ISSTRING) THEN
- targettyp = ISSTRING
- END IF
- END IF
- END IF
-
- IF LEFT$(separgs2(i), 2) = "(" + sp THEN dereference = 1 ELSE dereference = 0
-
- 'pass by reference
- IF (targettyp AND ISPOINTER) THEN
- IF dereference = 0 THEN 'check deferencing wasn't used
-
- 'note: array pointer
- IF (targettyp AND ISARRAY) THEN
- IF (sourcetyp AND ISREFERENCE) = 0 THEN a$ = "Expected arrayname()": GOTO errmes
- IF (sourcetyp AND ISARRAY) = 0 THEN a$ = "Expected arrayname()": GOTO errmes
- IF Debug THEN PRINT #9, "sub:array reference:[" + e$ + "]"
-
- 'check arrays are of same type
- targettyp2 = targettyp: sourcetyp2 = sourcetyp
- targettyp2 = targettyp2 AND (511 + ISOFFSETINBITS + ISUDT + ISSTRING + ISFIXEDLENGTH + ISFLOAT)
- sourcetyp2 = sourcetyp2 AND (511 + ISOFFSETINBITS + ISUDT + ISSTRING + ISFIXEDLENGTH + ISFLOAT)
- IF sourcetyp2 <> targettyp2 THEN a$ = "Incorrect array type passed to sub": GOTO errmes
-
- 'check arrayname was followed by '()'
- IF targettyp AND ISUDT THEN
- IF Debug THEN PRINT #9, "sub:array reference:udt reference:[" + e$ + "]"
- 'get UDT info
- udtrefid = VAL(e$)
- getid udtrefid
- IF Error_Happened THEN GOTO errmes
- udtrefi = INSTR(e$, sp3) 'end of id
- udtrefi2 = INSTR(udtrefi + 1, e$, sp3) 'end of u
- udtrefu = VAL(MID$(e$, udtrefi + 1, udtrefi2 - udtrefi - 1))
- udtrefi3 = INSTR(udtrefi2 + 1, e$, sp3) 'skip e
- udtrefe = VAL(MID$(e$, udtrefi2 + 1, udtrefi3 - udtrefi2 - 1))
- o$ = RIGHT$(e$, LEN(e$) - udtrefi3)
- 'note: most of the UDT info above is not required
- IF LEFT$(o$, 4) <> "(0)*" THEN a$ = "Expected arrayname()": GOTO errmes
- ELSE
- IF RIGHT$(e$, 2) <> sp3 + "0" THEN a$ = "Expected arrayname()": GOTO errmes
- END IF
-
- idnum = VAL(LEFT$(e$, INSTR(e$, sp3) - 1))
- getid idnum
- IF Error_Happened THEN GOTO errmes
-
- IF targettyp AND ISFIXEDLENGTH THEN
- targettypsize = CVL(MID$(id2.argsize, i * 4 - 4 + 1, 4))
- IF id.tsize <> targettypsize THEN a$ = "Incorrect array type passed to sub": GOTO errmes
- END IF
-
- IF MID$(sfcmemargs(targetid), i, 1) = CHR$(1) THEN 'cmem required?
- IF cmemlist(idnum) = 0 THEN
- cmemlist(idnum) = 1
- recompile = 1
- END IF
- END IF
-
- IF id.linkid = 0 THEN
- 'if id.linkid is 0, it means the number of array elements is definietly
- 'known of the array being passed, this is not some "fake"/unknown array.
- 'using the numer of array elements of a fake array would be dangerous!
-
-
- IF nelereq = 0 THEN
- 'only continue if the number of array elements required is unknown
- 'and it needs to be set
-
- IF id.arrayelements > 0 THEN '2009
-
- nelereq = id.arrayelements
- MID$(id2.nelereq, i, 1) = CHR$(nelereq)
-
- END IF
-
- 'print rtrim$(id2.n)+">nelereq=";nelereq
-
- ids(targetid) = id2
-
- ELSE
-
- 'the number of array elements required is known AND
- 'the number of elements in the array to be passed is known
-
- IF id.arrayelements <> nelereq THEN a$ = "Passing arrays with a differing number of elements to a SUB/FUNCTION is not supported": GOTO errmes
-
-
- END IF
- END IF
-
- e$ = refer(e$, sourcetyp, 1)
- IF Error_Happened THEN GOTO errmes
- GOTO sete
-
- END IF 'target is an array
-
- 'note: not an array...
- 'target is not an array
-
- IF (targettyp AND ISSTRING) = 0 THEN
- IF (sourcetyp AND ISREFERENCE) THEN
- idnum = VAL(LEFT$(e$, INSTR(e$, sp3) - 1)) 'id# of sourcetyp
-
- targettyp2 = targettyp: sourcetyp2 = sourcetyp
-
- 'get info about source/target
- arr = 0: IF (sourcetyp2 AND ISARRAY) THEN arr = 1
- passudtelement = 0: IF (targettyp2 AND ISUDT) = 0 AND (sourcetyp2 AND ISUDT) <> 0 THEN passudtelement = 1: sourcetyp2 = sourcetyp2 - ISUDT
-
- 'remove flags irrelevant for comparison... ISPOINTER,ISREFERENCE,ISINCONVENTIONALMEMORY,ISARRAY
- targettyp2 = targettyp2 AND (511 + ISOFFSETINBITS + ISUDT + ISFLOAT + ISSTRING)
- sourcetyp2 = sourcetyp2 AND (511 + ISOFFSETINBITS + ISUDT + ISFLOAT + ISSTRING)
-
- 'compare types
- IF sourcetyp2 = targettyp2 THEN
-
- IF sourcetyp AND ISUDT THEN
- 'udt/udt array
-
- 'get info
- udtrefid = VAL(e$)
- getid udtrefid
- IF Error_Happened THEN GOTO errmes
- udtrefi = INSTR(e$, sp3) 'end of id
- udtrefi2 = INSTR(udtrefi + 1, e$, sp3) 'end of u
- udtrefu = VAL(MID$(e$, udtrefi + 1, udtrefi2 - udtrefi - 1))
- udtrefi3 = INSTR(udtrefi2 + 1, e$, sp3) 'skip e
- udtrefe = VAL(MID$(e$, udtrefi2 + 1, udtrefi3 - udtrefi2 - 1))
- o$ = RIGHT$(e$, LEN(e$) - udtrefi3)
- 'note: most of the UDT info above is not required
-
- IF arr THEN
- n$ = scope$ + "ARRAY_UDT_" + RTRIM$(id.n) + "[0]"
- ELSE
- n$ = scope$ + "UDT_" + RTRIM$(id.n)
- END IF
-
- e$ = "(void*)( ((char*)(" + n$ + ")) + (" + o$ + ") )"
-
- 'convert void* to target type*
- IF passudtelement THEN e$ = "(" + typ2ctyp$(targettyp2 + (targettyp AND ISUNSIGNED), "") + "*)" + e$
- IF Error_Happened THEN GOTO errmes
-
- ELSE
- 'not a udt
- IF arr THEN
- IF (sourcetyp2 AND ISOFFSETINBITS) THEN a$ = "Cannot pass BIT array offsets": GOTO errmes
- e$ = "(&(" + refer(e$, sourcetyp, 0) + "))"
- IF Error_Happened THEN GOTO errmes
- ELSE
- e$ = refer(e$, sourcetyp, 1)
- IF Error_Happened THEN GOTO errmes
- END IF
-
- 'note: signed/unsigned mismatch requires casting
- IF (sourcetyp AND ISUNSIGNED) <> (targettyp AND ISUNSIGNED) THEN
- e$ = "(" + typ2ctyp$(targettyp2 + (targettyp AND ISUNSIGNED), "") + "*)" + e$
- IF Error_Happened THEN GOTO errmes
- END IF
-
- END IF 'udt?
-
- IF MID$(sfcmemargs(targetid), i, 1) = CHR$(1) THEN 'cmem required?
- IF cmemlist(idnum) = 0 THEN
- cmemlist(idnum) = 1
- recompile = 1
- END IF
- END IF
-
- GOTO sete
- END IF 'similar
- END IF 'reference
- ELSE 'not a string
- 'its a string
- IF (sourcetyp AND ISREFERENCE) THEN
- idnum = VAL(LEFT$(e$, INSTR(e$, sp3) - 1)) 'id# of sourcetyp
- IF MID$(sfcmemargs(targetid), i, 1) = CHR$(1) THEN 'cmem required?
- IF cmemlist(idnum) = 0 THEN
- cmemlist(idnum) = 1
- recompile = 1
- END IF
- END IF
- END IF 'reference
- END IF 'its a string
-
- END IF 'dereference check
- END IF 'target is a pointer
-
- 'note: Target is not a pointer...
-
- 'String-numeric mismatch?
- IF targettyp AND ISSTRING THEN
- IF (sourcetyp AND ISSTRING) = 0 THEN
- nth = i
- IF ids(targetid).args = 1 THEN a$ = "String required for sub": GOTO errmes
- a$ = str_nth$(nth) + " sub argument requires a string": GOTO errmes
- END IF
- END IF
- IF (targettyp AND ISSTRING) = 0 THEN
- IF sourcetyp AND ISSTRING THEN
- nth = i
- IF ids(targetid).args = 1 THEN a$ = "Number required for sub": GOTO errmes
- a$ = str_nth$(nth) + " sub argument requires a number": GOTO errmes
- END IF
- END IF
-
- 'change to "non-pointer" value
- IF (sourcetyp AND ISREFERENCE) THEN
- e$ = refer(e$, sourcetyp, 0)
- IF Error_Happened THEN GOTO errmes
- END IF
-
- IF explicitreference = 0 THEN
- IF targettyp AND ISUDT THEN
- nth = i
- IF qb64prefix_set AND udtxcname(targettyp AND 511) = "_MEM" THEN
- x$ = "'" + MID$(RTRIM$(udtxcname(targettyp AND 511)), 2) + "'"
- ELSE
- x$ = "'" + RTRIM$(udtxcname(targettyp AND 511)) + "'"
- END IF
- IF ids(targetid).args = 1 THEN a$ = "TYPE " + x$ + " required for sub": GOTO errmes
- a$ = str_nth$(nth) + " sub argument requires TYPE " + x$: GOTO errmes
- END IF
- ELSE
- IF sourcetyp AND ISUDT THEN a$ = "Number required for sub": GOTO errmes
- END IF
-
- 'round to integer if required
- IF (sourcetyp AND ISFLOAT) THEN
- IF (targettyp AND ISFLOAT) = 0 THEN
- '**32 rounding fix
- bits = targettyp AND 511
- IF bits <= 16 THEN e$ = "qbr_float_to_long(" + e$ + ")"
- IF bits > 16 AND bits < 32 THEN e$ = "qbr_double_to_long(" + e$ + ")"
- IF bits >= 32 THEN e$ = "qbr(" + e$ + ")"
- END IF
- END IF
-
- IF (targettyp AND ISPOINTER) THEN 'pointer required
- IF (targettyp AND ISSTRING) THEN GOTO sete 'no changes required
- t$ = typ2ctyp$(targettyp, "")
- IF Error_Happened THEN GOTO errmes
- v$ = "pass" + str2$(uniquenumber)
- 'assume numeric type
- IF MID$(sfcmemargs(targetid), i, 1) = CHR$(1) THEN 'cmem required?
- bytesreq = ((targettyp AND 511) + 7) \ 8
- PRINT #defdatahandle, t$ + " *" + v$ + "=NULL;"
- PRINT #13, "if(" + v$ + "==NULL){"
- PRINT #13, "cmem_sp-=" + str2(bytesreq) + ";"
- PRINT #13, v$ + "=(" + t$ + "*)(dblock+cmem_sp);"
- PRINT #13, "if (cmem_spchr"
- END IF
-
- IF LTRIM$(RTRIM$(e$)) = "0" THEN e$ = "NULL"
-
- END IF
-
- IF i <> 1 THEN subcall$ = subcall$ + ","
- subcall$ = subcall$ + e$
- NEXT
-
- 'note: i=id.args+1
- x$ = separgslayout2$(i)
- DO WHILE LEN(x$)
- x = ASC(x$)
- IF x THEN
- x2$ = MID$(x$, 2, x)
- x$ = RIGHT$(x$, LEN(x$) - x - 1)
-
- s = 0
- an = 0
- x3$ = RIGHT$(l$, 1)
- IF x3$ = sp THEN s = 1
- IF x3$ = sp2 THEN
- s = 2
- IF alphanumeric(ASC(RIGHT$(l$, 2))) THEN an = 1
- 'if asc(right$(l$,2))=34 then an=1
- ELSE
- IF alphanumeric(ASC(x3$)) THEN an = 1
- 'if asc(x3$)=34 then an=1
- END IF
- s1 = s
-
- IF (an = 1 OR addedlayout = 1) AND alphanumeric(ASC(x2$)) <> 0 THEN
- s = 1 'force space
- x2$ = x2$ + sp2
- GOTO customlaychar2
- END IF
-
- IF x2$ = "=" THEN
- s = 1
- x2$ = x2$ + sp
- GOTO customlaychar2
- END IF
-
- IF x2$ = "#" THEN
- s = 1
- x2$ = x2$ + sp2
- GOTO customlaychar2
- END IF
-
- IF x2$ = "," THEN x2$ = x2$ + sp: GOTO customlaychar2
-
- IF x$ = CHR$(0) THEN 'substitution
- IF x2$ = "STEP" THEN x2$ = SCase$("Step") + sp2: GOTO customlaychar2
- x2$ = x2$ + sp: GOTO customlaychar2
- END IF
-
- 'default solution sp2+?+sp2
- x2$ = x2$ + sp2
- customlaychar2:
- IF s = 0 THEN s = 2
- IF s <> s1 THEN
- IF s1 THEN l$ = LEFT$(l$, LEN(l$) - 1)
- IF s = 1 THEN l$ = l$ + sp
- IF s = 2 THEN l$ = l$ + sp2
- END IF
- l$ = l$ + x2$
-
- ELSE
- addlayout = 0
- x$ = RIGHT$(x$, LEN(x$) - 1)
- END IF
- addedlayout = 0
- LOOP
-
-
-
-
-
-
- IF passedneeded THEN
- subcall$ = subcall$ + "," + str2$(passed&)
- END IF
- subcall$ = subcall$ + ");"
-
- IF firstelement$ = "SLEEP" THEN
- IF vWatchOn = 1 THEN
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= -4; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- END IF
-
- PRINT #12, subcall$
-
- IF firstelement$ = "SLEEP" THEN
- IF vWatchOn = 1 THEN
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= -5; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- END IF
-
- subcall$ = ""
- IF stringprocessinghappened THEN PRINT #12, cleanupstringprocessingcall$ + "0);"
-
- layoutdone = 1
- x$ = RIGHT$(l$, 1): IF x$ = sp OR x$ = sp2 THEN l$ = LEFT$(l$, LEN(l$) - 1)
- IF usecall = 1 THEN l$ = l$ + sp2 + ")"
- IF Debug THEN PRINT #9, "SUB layout:[" + l$ + "]"
- IF LEN(layout$) = 0 THEN layout$ = l$ ELSE layout$ = layout$ + sp + l$
- GOTO finishedline
-
-
- END IF
-
- IF try = 2 THEN
- findidsecondarg = "": IF n >= 2 THEN findidsecondarg = getelement$(a$, 2)
- findanotherid = 1
- try = findid(firstelement$)
- IF Error_Happened THEN GOTO errmes
- ELSE
- try = 0
- END IF
- LOOP
-
- END IF
-
- notsubcall:
-
- IF n >= 1 THEN
- IF firstelement$ = "LET" THEN
- IF n = 1 THEN a$ = "Syntax error - Reference: LET variable = expression (tip: LET is entirely optional)": GOTO errmes
- ca$ = RIGHT$(ca$, LEN(ca$) - 4)
- n = n - 1
- l$ = SCase$("Let")
- IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
- 'note: layoutdone=1 will be set later
- GOTO letused
- END IF
- END IF
-
- 'LET ???=???
- IF n >= 3 THEN
- IF INSTR(a$, sp + "=" + sp) THEN
- letused:
- assign ca$, n
- IF Error_Happened THEN GOTO errmes
- layoutdone = 1
- IF LEN(layout$) = 0 THEN layout$ = tlayout$ ELSE layout$ = layout$ + sp + tlayout$
- GOTO finishedline
- END IF
- END IF '>=3
- IF RIGHT$(a$, 2) = sp + "=" THEN a$ = "Expected ... = expression": GOTO errmes
-
- 'Syntax error
- a$ = "Syntax error": GOTO errmes
-
- finishedline:
- THENGOTO = 0
- finishedline2:
-
- IF inputfunctioncalled THEN
- inputfunctioncalled = 0
- IF vWatchOn = 1 THEN
- PRINT #12, "*__LONG_VWATCH_LINENUMBER= -5; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
- END IF
- END IF
-
- IF arrayprocessinghappened = 1 THEN arrayprocessinghappened = 0
-
- inclinenump$ = ""
- IF inclinenumber(inclevel) THEN
- inclinenump$ = "," + str2$(inclinenumber(inclevel))
- thisincname$ = getfilepath$(incname$(inclevel))
- thisincname$ = MID$(incname$(inclevel), LEN(thisincname$) + 1)
- inclinenump$ = inclinenump$ + "," + CHR$(34) + thisincname$ + CHR$(34)
- END IF
- IF NoChecks = 0 THEN
- IF vWatchOn AND inclinenumber(inclevel) = 0 THEN temp$ = vWatchErrorCall$ ELSE temp$ = ""
- IF dynscope THEN
- dynscope = 0
- PRINT #12, "if(qbevent){" + temp$ + "evnt(" + str2$(linenumber) + inclinenump$ + ");if(r)goto S_" + str2$(statementn) + ";}"
- ELSE
- PRINT #12, "if(!qbevent)break;" + temp$ + "evnt(" + str2$(linenumber) + inclinenump$ + ");}while(r);"
- END IF
- END IF
-
- finishednonexec:
-
- firstLine = 0
-
- IF layoutdone = 0 THEN layoutok = 0 'invalidate layout if not handled
-
- IF continuelinefrom = 0 THEN 'note: manager #2 requires this condition
-
- 'Include Manager #2 '***
- IF LEN(addmetainclude$) THEN
-
- IF inclevel = 0 THEN
- 'backup line formatting
- layoutcomment_backup$ = layoutcomment$
- layoutok_backup = layoutok
- layout_backup$ = layout$
- END IF
-
- a$ = addmetainclude$: addmetainclude$ = "" 'read/clear message
-
- IF inclevel = 0 THEN
- includingFromRoot = 0
- forceIncludingFile = 0
- forceInclude:
- IF forceIncludeFromRoot$ <> "" THEN
- a$ = forceIncludeFromRoot$
- forceIncludeFromRoot$ = ""
- forceIncludingFile = 1
- includingFromRoot = 1
- END IF
- END IF
-
- IF inclevel = 100 THEN a$ = "Too many indwelling INCLUDE files": GOTO errmes
- '1. Verify file exists (location is either (a)relative to source file or (b)absolute)
- fh = 99 + inclevel + 1
-
- firstTryMethod = 1
- IF includingFromRoot <> 0 AND inclevel = 0 THEN firstTryMethod = 2
- FOR try = firstTryMethod TO 2 'if including file from root, do not attempt including from relative location
- IF try = 1 THEN
- IF inclevel = 0 THEN
- IF idemode THEN p$ = idepath$ + pathsep$ ELSE p$ = getfilepath$(sourcefile$)
- ELSE
- p$ = getfilepath$(incname(inclevel))
- END IF
- f$ = p$ + a$
- END IF
- IF try = 2 THEN f$ = a$
- IF _FILEEXISTS(f$) THEN
- qberrorhappened = -2 '***
- OPEN f$ FOR BINARY AS #fh
- qberrorhappened2: '***
- IF qberrorhappened = -2 THEN EXIT FOR '***
- END IF
- qberrorhappened = 0
- NEXT
- IF qberrorhappened <> -2 THEN qberrorhappened = 0: a$ = "File " + a$ + " not found": GOTO errmes
- inclevel = inclevel + 1: incname$(inclevel) = f$: inclinenumber(inclevel) = 0
- END IF 'fall through to next section...
- '--------------------
- DO WHILE inclevel
- fh = 99 + inclevel
- '2. Feed next line
- IF EOF(fh) = 0 THEN
- LINE INPUT #fh, x$
- a3$ = x$
- continuelinefrom = 0
- inclinenumber(inclevel) = inclinenumber(inclevel) + 1
- 'create extended error string 'incerror$'
- errorLineInInclude = inclinenumber(inclevel)
- e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
- IF inclevel > 1 THEN
- e$ = e$ + " (through "
- FOR x = 1 TO inclevel - 1 STEP 1
- e$ = e$ + incname$(x)
- IF x < inclevel - 1 THEN 'a sep is req
- IF x = inclevel - 2 THEN
- e$ = e$ + " then "
- ELSE
- e$ = e$ + ", "
- END IF
- END IF
- NEXT
- e$ = e$ + ")"
- END IF
- incerror$ = e$
- linenumber = linenumber - 1 'lower official linenumber to counter later increment
- IF idemode THEN sendc$ = CHR$(10) + a3$: GOTO sendcommand 'passback
- GOTO includeline
- END IF
- '3. Close & return control
- CLOSE #fh
- inclevel = inclevel - 1
- IF inclevel = 0 THEN
- IF forceIncludingFile = 1 THEN
- forceIncludingFile = 0
- GOTO forceIncludeCompleted
- END IF
- 'restore line formatting
- layoutok = layoutok_backup
- layout$ = layout_backup$
- layoutcomment$ = layoutcomment_backup$
- END IF
- LOOP 'fall through to next section...
- '(end manager)
-
-
-
- END IF 'continuelinefrom=0
-
-
- IF Debug THEN
- PRINT #9, "[layout check]"
- PRINT #9, "[" + layoutoriginal$ + "]"
- PRINT #9, "[" + layout$ + "]"
- PRINT #9, layoutok
- PRINT #9, "[end layout check]"
- END IF
-
-
-
-
- IF idemode THEN
- IF continuelinefrom <> 0 THEN GOTO ide4 'continue processing other commands on line
-
- IF LEN(layoutcomment$) THEN
- IF LEN(layout$) THEN layout$ = layout$ + sp + layoutcomment$ ELSE layout$ = layoutcomment$
- END IF
-
- IF layoutok = 0 THEN
- layout$ = layoutoriginal$
- ELSE
-
- 'reverse '046' changes present in autolayout
- 'replace fix046$ with .
- i = INSTR(layout$, fix046$)
- DO WHILE i
- layout$ = LEFT$(layout$, i - 1) + "." + RIGHT$(layout$, LEN(layout$) - (i + LEN(fix046$) - 1))
- i = INSTR(layout$, fix046$)
- LOOP
-
- END IF
- x = lhscontrollevel: IF controllevel < lhscontrollevel THEN x = controllevel
- IF definingtype = 2 THEN x = x + 1
- IF definingtype > 0 THEN definingtype = 2
- IF declaringlibrary = 2 THEN x = x + 1
- IF declaringlibrary > 0 THEN declaringlibrary = 2
- layout$ = SPACE$(x) + layout$
- IF linecontinuation THEN layout$ = ""
-
- GOTO ideret4 'return control to IDE
- END IF
-
- 'layout is not currently used by the compiler (as appose to the IDE), if it was it would be used here
- skipide4:
-LOOP
-
-'add final line
-IF lastLineReturn = 0 THEN
- lastLineReturn = 1
- lastLine = 1
- wholeline$ = ""
- GOTO mainpassLastLine
-END IF
-
-ide5:
-linenumber = 0
-
-IF closedmain = 0 THEN closemain
-
-IF definingtype THEN linenumber = definingtypeerror: a$ = "TYPE without END TYPE": GOTO errmes
-
-'check for open controls (copy #1)
-IF controllevel THEN
- a$ = "Unidentified open control block"
- SELECT CASE controltype(controllevel)
- CASE 1: a$ = "IF without END IF"
- CASE 2: a$ = "FOR without NEXT"
- CASE 3, 4: a$ = "DO without LOOP"
- CASE 5: a$ = "WHILE without WEND"
- CASE 6: a$ = "$IF without $END IF"
- CASE 10 TO 19: a$ = "SELECT CASE without END SELECT"
- CASE 32: a$ = "SUB/FUNCTION without END SUB/FUNCTION"
- END SELECT
- linenumber = controlref(controllevel)
- GOTO errmes
-END IF
-
-IF ideindentsubs = 0 THEN
- IF LEN(subfunc) THEN a$ = "SUB/FUNCTION without END SUB/FUNCTION": GOTO errmes
-END IF
-
-'close the error handler (cannot be put in 'closemain' because subs/functions can also add error jumps to this file)
-PRINT #14, "exit(99);" 'in theory this line should never be run!
-PRINT #14, "}" 'close error jump handler
-
-'create CLEAR method "CLEAR"
-CLOSE #12 'close code handle
-OPEN tmpdir$ + "clear.txt" FOR OUTPUT AS #12 'direct code to clear.txt
-
-FOR i = 1 TO idn
-
- IF ids(i).staticscope THEN 'static scope?
- subfunc = RTRIM$(ids(i).insubfunc) 'set static scope
- GOTO clearstaticscope
- END IF
-
- a = ASC(ids(i).insubfunc)
- IF a = 0 OR a = 32 THEN 'global scope?
- subfunc = "" 'set global scope
- clearstaticscope:
-
- IF ids(i).arraytype THEN 'an array
- getid i
- IF Error_Happened THEN GOTO errmes
- IF id.arrayelements = -1 THEN GOTO clearerasereturned 'cannot erase non-existant array
- IF INSTR(vWatchVariableExclusions$, "@" + RTRIM$(id.callname) + "@") > 0 THEN
- GOTO clearerasereturned
- END IF
- clearerasereturn = 1: GOTO clearerase
- END IF 'array
-
- IF ids(i).t THEN 'non-array variable
- getid i
- IF Error_Happened THEN GOTO errmes
- bytes$ = variablesize$(-1)
- IF Error_Happened THEN GOTO errmes
- 'create a reference
- typ = id.t + ISREFERENCE
- IF typ AND ISUDT THEN
- e$ = str2(i) + sp3 + str2(typ AND 511) + sp3 + "0" + sp3 + "0"
- ELSE
- e$ = str2(i)
- END IF
- e$ = refer$(e$, typ, 1)
- IF Error_Happened THEN GOTO errmes
- IF typ AND ISSTRING THEN
- IF typ AND ISFIXEDLENGTH THEN
- PRINT #12, "memset((void*)(" + e$ + "->chr),0," + bytes$ + ");"
- GOTO cleared
- ELSE
- IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN
- PRINT #12, e$ + "->len=0;"
- END IF
- GOTO cleared
- END IF
- END IF
- IF typ AND ISUDT THEN
- IF udtxvariable(typ AND 511) THEN
- 'this next procedure resets values of UDT variables with variable-length strings
- clear_udt_with_varstrings e$, typ AND 511, 12, 0
- ELSE
- PRINT #12, "memset((void*)" + e$ + ",0," + bytes$ + ");"
- END IF
- ELSE
- IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN
- PRINT #12, "*" + e$ + "=0;"
- END IF
- END IF
- GOTO cleared
- END IF 'non-array variable
-
- END IF 'scope
-
- cleared:
- clearerasereturned:
-NEXT
-CLOSE #12
-
-IF Debug THEN
- PRINT #9, "finished making program!"
- PRINT #9, "recompile="; recompile
-END IF
-
-'Set cmem flags for subs/functions requiring data passed in cmem
-FOR i = 1 TO idn
- IF cmemlist(i) THEN 'must be in cmem
-
- getid i
- IF Error_Happened THEN GOTO errmes
-
- IF Debug THEN PRINT #9, "recompiling cmem sf! checking:"; RTRIM$(id.n)
-
- IF id.sfid THEN 'it is an argument of a sub/function
-
- IF Debug THEN PRINT #9, "recompiling cmem sf! It's a sub/func arg!"
-
- i2 = id.sfid
- x = id.sfarg
-
- IF Debug THEN PRINT #9, "recompiling cmem sf! values:"; i2; x
-
- 'check if cmem flag is set, if not then set it & force recompile
- IF MID$(sfcmemargs(i2), x, 1) <> CHR$(1) THEN
- MID$(sfcmemargs(i2), x, 1) = CHR$(1)
-
-
- IF Debug THEN PRINT #9, "recompiling cmem sf! setting:"; i2; x
-
-
- recompile = 1
- END IF
- END IF
- END IF
-NEXT i
-
-unresolved = 0
-FOR i = 1 TO idn
- getid i
- IF Error_Happened THEN GOTO errmes
-
- IF Debug THEN PRINT #9, "checking id named:"; id.n
-
- IF id.subfunc THEN
- FOR i2 = 1 TO id.args
- t = CVL(MID$(id.arg, i2 * 4 - 3, 4))
- IF t > 0 THEN
- IF (t AND ISPOINTER) THEN
- IF (t AND ISARRAY) THEN
-
- IF Debug THEN PRINT #9, "checking argument "; i2; " of "; id.args
-
- nele = ASC(MID$(id.nele, i2, 1))
- nelereq = ASC(MID$(id.nelereq, i2, 1))
-
- IF Debug THEN PRINT #9, "nele="; nele
- IF Debug THEN PRINT #9, "nelereq="; nelereq
-
- IF nele <> nelereq THEN
-
- IF Debug THEN PRINT #9, "mismatch detected!"
-
- unresolved = unresolved + 1
- sflistn = sflistn + 1
- sfidlist(sflistn) = i
- sfarglist(sflistn) = i2
- sfelelist(sflistn) = nelereq '0 means still unknown
- END IF
- END IF
- END IF
- END IF
- NEXT
- END IF
-NEXT
-
-'is recompilation required to resolve this?
-IF unresolved > 0 THEN
- IF lastunresolved = -1 THEN
- 'first pass
- recompile = 1
- IF Debug THEN
- PRINT #9, "recompiling to resolve array elements (first time)"
- PRINT #9, "sflistn="; sflistn
- PRINT #9, "oldsflistn="; oldsflistn
- END IF
- ELSE
- 'not first pass
- IF unresolved < lastunresolved THEN
- recompile = 1
- IF Debug THEN
- PRINT #9, "recompiling to resolve array elements (not first time)"
- PRINT #9, "sflistn="; sflistn
- PRINT #9, "oldsflistn="; oldsflistn
- END IF
- END IF
- END IF
-END IF 'unresolved
-lastunresolved = unresolved
-
-'IDEA!
-'have a flag to record if anything gets resolved in a pass
-'if not then it's time to stop
-'the problem is the same amount of new problems may be created by a
-'resolve as those that get fixed
-'also/or.. could it be that previous fixes are overridden in a recompile
-' by a new fix? if so, it would give these effects
-
-
-
-'could recompilation resolve this?
-'IF sflistn <> -1 THEN
-'IF sflistn <> oldsflistn THEN
-'recompile = 1
-'
-'if debug then
-'print #9,"recompile set to 1 to resolve array elements"
-'print #9,"sflistn=";sflistn
-'print #9,"oldsflistn=";oldsflistn
-'end if
-'
-'END IF
-'END IF
-
-IF Debug THEN PRINT #9, "Beginning COMMON array list check..."
-xi = 1
-FOR x = 1 TO commonarraylistn
- varname$ = getelement$(commonarraylist, xi): xi = xi + 1
- typ$ = getelement$(commonarraylist, xi): xi = xi + 1
- dimmethod2 = VAL(getelement$(commonarraylist, xi)): xi = xi + 1
- dimshared2 = VAL(getelement$(commonarraylist, xi)): xi = xi + 1
- 'find the array ID (try method)
- t = typname2typ(typ$)
- IF Error_Happened THEN GOTO errmes
- IF (t AND ISUDT) = 0 THEN varname$ = varname$ + type2symbol$(typ$)
- IF Error_Happened THEN GOTO errmes
-
- IF Debug THEN PRINT #9, "Checking for array '" + varname$ + "'..."
-
- try = findid(varname$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.arraytype THEN GOTO foundcommonarray2
- IF try = 2 THEN findanotherid = 1: try = findid(varname$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- foundcommonarray2:
-
- IF Debug THEN PRINT #9, "Found array '" + varname$ + "!"
-
- IF id.arrayelements = -1 THEN
- IF arrayelementslist(currentid) <> 0 THEN recompile = 1
- IF Debug THEN PRINT #9, "Recompiling to resolve elements of:" + varname$
- END IF
-NEXT
-IF Debug THEN PRINT #9, "Finished COMMON array list check!"
-
-IF vWatchDesiredState <> vWatchOn THEN
- vWatchRecompileAttempts = vWatchRecompileAttempts + 1
- recompile = 1
-END IF
-
-IF recompile THEN
- do_recompile:
- IF Debug THEN PRINT #9, "Recompile required!"
- recompile = 0
- IF idemode THEN iderecompile = 1
- FOR closeall = 1 TO 255: CLOSE closeall: NEXT
- OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26 'relock
- GOTO recompile
-END IF
-
-IF Debug THEN PRINT #9, "Beginning label check..."
-FOR r = 1 TO nLabels
-
- IF Labels(r).Scope_Restriction THEN
- a$ = RTRIM$(Labels(r).cn)
- ignore = validlabel(a$)
- v = HashFind(a$, HASHFLAG_LABEL, ignore, r2)
- addlabchk7:
- IF v THEN
- IF Labels(r2).Scope = Labels(r).Scope_Restriction THEN
- linenumber = Labels(r).Error_Line: a$ = "Common label within a SUB/FUNCTION": GOTO errmes
- END IF
- IF v = 2 THEN v = HashFindCont(ignore, r2): GOTO addlabchk7
- END IF 'v
- END IF 'restriction
-
- 'check for undefined labels
- IF Labels(r).State = 0 THEN
-
- IF INSTR(PossibleSubNameLabels$, sp + UCASE$(RTRIM$(Labels(r).cn)) + sp) THEN
- IF INSTR(SubNameLabels$, sp + UCASE$(RTRIM$(Labels(r).cn)) + sp) = 0 THEN 'not already added
- SubNameLabels$ = SubNameLabels$ + UCASE$(RTRIM$(Labels(r).cn)) + sp
- IF Debug THEN PRINT #9, "Recompiling to resolve label:"; RTRIM$(Labels(r).cn)
- GOTO do_recompile
- END IF
- END IF
-
- linenumber = Labels(r).Error_Line: a$ = "Label '" + RTRIM$(Labels(r).cn) + "' not defined": GOTO errmes
- END IF
-
-
- IF Labels(r).Data_Referenced THEN
-
- 'check for ambiguous RESTORE reference
- x = 0
- a$ = RTRIM$(Labels(r).cn)
- ignore = validlabel(a$)
- v = HashFind(a$, HASHFLAG_LABEL, ignore, r2)
- addlabchk4:
- IF v THEN
- x = x + 1
- IF v = 2 THEN v = HashFindCont(ignore, r2): GOTO addlabchk4
- END IF 'v
- IF x <> 1 THEN linenumber = Labels(r).Error_Line: a$ = "Ambiguous DATA label": GOTO errmes
-
- 'add global data offset variable
- PRINT #18, "ptrszint data_at_LABEL_" + a$ + "=" + str2(Labels(r).Data_Offset) + ";"
-
- END IF 'data referenced
-
-NEXT
-IF Debug THEN PRINT #9, "Finished check!"
-
-
-'if targettyp=-4 or targettyp=-5 then '? -> byte_element(offset,element size in bytes)
-' IF (sourcetyp AND ISREFERENCE) = 0 THEN a$ = "Expected variable name/array element": GOTO errmes
-
-
-'create include files for COMMON arrays
-
-CLOSE #12
-
-'return to 'main'
-subfunc$ = ""
-defdatahandle = 18
-CLOSE #13: OPEN tmpdir$ + "maindata.txt" FOR APPEND AS #13
-CLOSE #19: OPEN tmpdir$ + "mainfree.txt" FOR APPEND AS #19
-
-IF Console THEN
- PRINT #18, "int32 console=1;"
-ELSE
- PRINT #18, "int32 console=0;"
-END IF
-
-IF ScreenHide THEN
- PRINT #18, "int32 screen_hide_startup=1;"
-ELSE
- PRINT #18, "int32 screen_hide_startup=0;"
-END IF
-
-IF Asserts THEN
- PRINT #18, "int32 asserts=1;"
-ELSE
- PRINT #18, "int32 asserts=0;"
-END IF
-
-IF vWatchOn THEN
- PRINT #18, "int32 vwatch=-1;"
-ELSE
- PRINT #18, "int32 vwatch=0;"
-END IF
-
-fh = FREEFILE
-OPEN tmpdir$ + "dyninfo.txt" FOR APPEND AS #fh
-IF Resize THEN
- PRINT #fh, "ScreenResize=1;"
-END IF
-IF Resize_Scale THEN
- PRINT #fh, "ScreenResizeScale=" + str2(Resize_Scale) + ";"
-END IF
-CLOSE #fh
-
-IF vWatchOn = 1 THEN
- vWatchVariable "", 1
-END IF
-
-
-'DATA_finalize
-PRINT #18, "ptrszint data_size=" + str2(DataOffset) + ";"
-IF DataOffset = 0 THEN
-
- PRINT #18, "uint8 *data=(uint8*)calloc(1,1);"
-
-ELSE
-
- IF inline_DATA = 0 THEN
- IF os$ = "WIN" THEN
- IF OS_BITS = 32 THEN
- x$ = CHR$(0): PUT #16, , x$
- PRINT #18, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #18, "extern char *binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
- PRINT #18, "}"
- PRINT #18, "uint8 *data=(uint8*)&binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
- ELSE
- x$ = CHR$(0): PUT #16, , x$
- PRINT #18, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #18, "extern char *_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
- PRINT #18, "}"
- PRINT #18, "uint8 *data=(uint8*)&_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
- END IF
- END IF
- IF os$ = "LNX" THEN
- x$ = CHR$(0): PUT #16, , x$
- PRINT #18, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #18, "extern char *_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
- PRINT #18, "}"
- PRINT #18, "uint8 *data=(uint8*)&_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
- END IF
- ELSE
- 'inline data
- CLOSE #16
- ff = FREEFILE
- OPEN tmpdir$ + "data.bin" FOR BINARY AS #ff
- x$ = SPACE$(LOF(ff))
- GET #ff, , x$
- CLOSE #ff
- x2$ = "uint8 inline_data[]={"
- FOR i = 1 TO LEN(x$)
- x2$ = x2$ + inlinedatastr$(ASC(x$, i))
- NEXT
- x2$ = x2$ + "0};"
- PRINT #18, x2$
- PRINT #18, "uint8 *data=&inline_data[0];"
- x$ = "": x2$ = ""
- END IF
-END IF
-
-IF Debug THEN PRINT #9, "Beginning generation of code for saving/sharing common array data..."
-use_global_byte_elements = 1
-ncommontmp = 0
-xi = 1
-FOR x = 1 TO commonarraylistn
- varname$ = getelement$(commonarraylist, xi): xi = xi + 1
- typ$ = getelement$(commonarraylist, xi): xi = xi + 1
- dimmethod2 = VAL(getelement$(commonarraylist, xi)): xi = xi + 1
- dimshared2 = VAL(getelement$(commonarraylist, xi)): xi = xi + 1
-
- 'find the array ID (try method)
- purevarname$ = varname$
- t = typname2typ(typ$)
- IF Error_Happened THEN GOTO errmes
- IF (t AND ISUDT) = 0 THEN varname$ = varname$ + type2symbol$(typ$)
- IF Error_Happened THEN GOTO errmes
- try = findid(varname$)
- IF Error_Happened THEN GOTO errmes
- DO WHILE try
- IF id.arraytype THEN GOTO foundcommonarray
- IF try = 2 THEN findanotherid = 1: try = findid(varname$) ELSE try = 0
- IF Error_Happened THEN GOTO errmes
- LOOP
- a$ = "COMMON array unlocatable": GOTO errmes 'should never happen
- foundcommonarray:
- IF Debug THEN PRINT #9, "Found common array '" + varname$ + "'!"
-
- i = currentid
- arraytype = id.arraytype
- arrayelements = id.arrayelements
- e$ = RTRIM$(id.n)
- IF (t AND ISUDT) = 0 THEN e$ = e$ + typevalue2symbol$(t)
- IF Error_Happened THEN GOTO errmes
- n$ = e$
- n2$ = RTRIM$(id.callname)
- tsize = id.tsize
-
- 'select command
- command = 3 'fixed length elements
- IF t AND ISSTRING THEN
- IF (t AND ISFIXEDLENGTH) = 0 THEN
- command = 4 'var-len elements
- END IF
- END IF
-
-
- 'if...
- 'i) array elements are still undefined (ie. arrayelements=-1) pass the input content along
- ' if any existed or an array-placeholder
- 'ii) if the array's elements were defined, any input content would have been loaded so the
- ' array (in whatever state it currently is) should be passed. If it is currently erased
- ' then it should be passed as a placeholder
-
- IF arrayelements = -1 THEN
-
- 'load array (copies the array, if any, into a buffer for later)
-
-
-
- OPEN tmpdir$ + "inpchain" + str2$(i) + ".txt" FOR OUTPUT AS #12
- PRINT #12, "if (int32val==2){" 'array place-holder
- 'create buffer to store array as-is in global.txt
- x$ = str2$(uniquenumber)
- x1$ = "chainarraybuf" + x$
- x2$ = "chainarraybufsiz" + x$
- PRINT #18, "static uint8 *" + x1$ + "=(uint8*)malloc(1);"
- PRINT #18, "static int64 " + x2$ + "=0;"
- 'read next command
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- IF command = 3 THEN PRINT #12, "if (int32val==3){" 'fixed-length-element array
- IF command = 4 THEN PRINT #12, "if (int32val==4){" 'var-length-element array
- PRINT #12, x2$ + "+=4; " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + "); *(int32*)(" + x1$ + "+" + x2$ + "-4)=int32val;"
-
- IF command = 3 THEN
- 'read size in bits of one element, convert it to bytes
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- PRINT #12, x2$ + "+=8; " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + "); *(int64*)(" + x1$ + "+" + x2$ + "-8)=int64val;"
- PRINT #12, "bytes=int64val>>3;"
- END IF 'com=3
-
- IF command = 4 THEN PRINT #12, "bytes=1;" 'bytes used to calculate number of elements
-
- 'read number of dimensions
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
- PRINT #12, x2$ + "+=4; " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + "); *(int32*)(" + x1$ + "+" + x2$ + "-4)=int32val;"
-
- 'read size of dimensions & calculate the size of the array in bytes
- PRINT #12, "while(int32val--){"
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);" 'lbound
- PRINT #12, x2$ + "+=8; " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + "); *(int64*)(" + x1$ + "+" + x2$ + "-8)=int64val;"
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val2,8," + NewByteElement$ + "),0);" 'ubound
- PRINT #12, x2$ + "+=8; " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + "); *(int64*)(" + x1$ + "+" + x2$ + "-8)=int64val2;"
- PRINT #12, "bytes*=(int64val2-int64val+1);"
- PRINT #12, "}"
-
- IF command = 3 THEN
- 'read the array data
- PRINT #12, x2$ + "+=bytes; " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + ");"
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)(" + x1$ + "+" + x2$ + "-bytes),bytes," + NewByteElement$ + "),0);"
- END IF 'com=3
-
- IF command = 4 THEN
- PRINT #12, "bytei=0;"
- PRINT #12, "while(bytei>3); " + x1$ + "=(uint8*)realloc(" + x1$ + "," + x2$ + ");"
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)(" + x1$ + "+" + x2$ + "-(int64val>>3)),(int64val>>3)," + NewByteElement$ + "),0);"
- PRINT #12, "bytei++;"
- PRINT #12, "}"
- END IF
-
- 'get next command
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
- PRINT #12, "}" 'command=3 or 4
-
- PRINT #12, "}" 'array place-holder
- CLOSE #12
-
-
- 'save array (saves the buffered data, if any, for later)
-
- OPEN tmpdir$ + "chain" + str2$(i) + ".txt" FOR OUTPUT AS #12
- PRINT #12, "int32val=2;" 'placeholder
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)" + x1$ + "," + x2$ + "," + NewByteElement$ + "),0);"
- CLOSE #12
-
-
-
-
- ELSE
- 'note: arrayelements<>-1
-
- 'load array
-
- OPEN tmpdir$ + "inpchain" + str2$(i) + ".txt" FOR OUTPUT AS #12
-
- PRINT #12, "if (int32val==2){" 'array place-holder
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- IF command = 3 THEN PRINT #12, "if (int32val==3){" 'fixed-length-element array
- IF command = 4 THEN PRINT #12, "if (int32val==4){" 'var-length-element array
-
- IF command = 3 THEN
- 'get size in bits
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- '***assume correct***
- END IF
-
- 'get number of elements
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
- '***assume correct***
-
- e$ = ""
- IF command = 4 THEN PRINT #12, "bytes=1;" 'bytes counts the number of total elements
- FOR x2 = 1 TO arrayelements
-
- 'create 'secret' variables to assist in passing common arrays
- IF x2 > ncommontmp THEN
- ncommontmp = ncommontmp + 1
-
- IF Debug THEN PRINT #9, "Calling DIM2(...)..."
- IF Error_Happened THEN GOTO errmes
- retval = dim2("___RESERVED_COMMON_LBOUND" + str2$(ncommontmp), "_INTEGER64", 0, "")
- IF Error_Happened THEN GOTO errmes
- retval = dim2("___RESERVED_COMMON_UBOUND" + str2$(ncommontmp), "_INTEGER64", 0, "")
- IF Error_Happened THEN GOTO errmes
- IF Debug THEN PRINT #9, "Finished calling DIM2(...)!"
- IF Error_Happened THEN GOTO errmes
-
-
- END IF
-
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- PRINT #12, "*__INTEGER64____RESERVED_COMMON_LBOUND" + str2$(x2) + "=int64val;"
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int64val2,8," + NewByteElement$ + "),0);"
- PRINT #12, "*__INTEGER64____RESERVED_COMMON_UBOUND" + str2$(x2) + "=int64val2;"
- IF command = 4 THEN PRINT #12, "bytes*=(int64val2-int64val+1);"
- IF x2 > 1 THEN e$ = e$ + sp + "," + sp
- e$ = e$ + "___RESERVED_COMMON_LBOUND" + str2$(x2) + sp + "TO" + sp + "___RESERVED_COMMON_UBOUND" + str2$(x2)
- NEXT
-
- IF Debug THEN PRINT #9, "Calling DIM2(" + purevarname$ + "," + typ$ + ",0," + e$ + ")..."
- IF Error_Happened THEN GOTO errmes
- 'Note: purevarname$ is simply varname$ without the type symbol after it
- redimoption = 1
- retval = dim2(purevarname$, typ$, 0, e$)
- IF Error_Happened THEN GOTO errmes
- redimoption = 0
- IF Debug THEN PRINT #9, "Finished calling DIM2(" + purevarname$ + "," + typ$ + ",0," + e$ + ")!"
- IF Error_Happened THEN GOTO errmes
-
- IF command = 3 THEN
- 'use get to load in the array data
- varname$ = varname$ + sp + "(" + sp + ")"
- e$ = evaluatetotyp(fixoperationorder$(varname$), -4)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_get(FF,NULL," + e$ + ",0);"
- END IF
-
- IF command = 4 THEN
- PRINT #12, "bytei=0;"
- PRINT #12, "while(bytei>3,1));" 'change string size
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)tqbs->chr,int64val>>3," + NewByteElement$ + "),0);" 'get size
- PRINT #12, "bytei++;"
- PRINT #12, "}"
- END IF
-
- 'get next command
- PRINT #12, "sub_get(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
- PRINT #12, "}"
- PRINT #12, "}"
- CLOSE #12
-
- 'save array
-
- OPEN tmpdir$ + "chain" + str2$(i) + ".txt" FOR OUTPUT AS #12
-
- PRINT #12, "int32val=2;" 'placeholder
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- PRINT #12, "if (" + n2$ + "[2]&1){" 'don't add unless defined
-
- IF command = 3 THEN PRINT #12, "int32val=3;"
- IF command = 4 THEN PRINT #12, "int32val=4;"
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- IF command = 3 THEN
- 'size of each element in bits
- bits = t AND 511
- IF t AND ISUDT THEN bits = udtxsize(t AND 511)
- IF t AND ISSTRING THEN bits = tsize * 8
- PRINT #12, "int64val=" + str2$(bits) + ";" 'size in bits
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- END IF 'com=3
-
- PRINT #12, "int32val=" + str2$(arrayelements) + ";" 'number of dimensions
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int32val,4," + NewByteElement$ + "),0);"
-
- IF command = 3 THEN
-
- FOR x2 = 1 TO arrayelements
- 'simulate calls to lbound/ubound
- e$ = "LBOUND" + sp + "(" + sp + n$ + sp + "," + sp + str2$(x2) + sp + ")"
- e$ = evaluatetotyp(fixoperationorder$(e$), 64)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "int64val=" + e$ + ";"
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- e$ = "UBOUND" + sp + "(" + sp + n$ + sp + "," + sp + str2$(x2) + sp + ")"
- e$ = evaluatetotyp(fixoperationorder$(e$), 64)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "int64val=" + e$ + ";"
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- NEXT
-
- 'array data
- e$ = evaluatetotyp(fixoperationorder$(n$ + sp + "(" + sp + ")"), -4)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "sub_put(FF,NULL," + e$ + ",0);"
-
- END IF 'com=3
-
- IF command = 4 THEN
-
- 'store LBOUND/UBOUND values and calculate number of total elements/strings
- PRINT #12, "bytes=1;" 'note: bytes is actually the total number of elements
- FOR x2 = 1 TO arrayelements
- e$ = "LBOUND" + sp + "(" + sp + n$ + sp + "," + sp + str2$(x2) + sp + ")"
- e$ = evaluatetotyp(fixoperationorder$(e$), 64)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "int64val=" + e$ + ";"
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);"
- e$ = "UBOUND" + sp + "(" + sp + n$ + sp + "," + sp + str2$(x2) + sp + ")"
- e$ = evaluatetotyp(fixoperationorder$(e$), 64)
- IF Error_Happened THEN GOTO errmes
- PRINT #12, "int64val2=" + e$ + ";"
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val2,8," + NewByteElement$ + "),0);"
- PRINT #12, "bytes*=(int64val2-int64val+1);"
- NEXT
-
- PRINT #12, "bytei=0;"
- PRINT #12, "while(byteilen; int64val<<=3;"
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)&int64val,8," + NewByteElement$ + "),0);" 'size of element
- PRINT #12, "sub_put(FF,NULL,byte_element((uint64)tqbs->chr,tqbs->len," + NewByteElement$ + "),0);" 'element data
- PRINT #12, "bytei++;"
- PRINT #12, "}"
-
- END IF 'com=4
-
- PRINT #12, "}" 'don't add unless defined
-
- CLOSE #12
-
-
-
-
- 'if chaincommonarray then
- 'l2$=tlayout$
- 'x=chaincommonarray
- '
- ''chain???.txt
- 'open tmpdir$ + "chain" + str2$(x) + ".txt" for append as #22
- 'if lof(22) then close #22: goto chaindone 'only add this once
- ''***assume non-var-len-string array***
- 'print #22,"int32val=3;" 'non-var-len-element array
- 'print #22,"sub_put(FF,NULL,byte_element((uint64)&int32val,4,"+NewByteElement$+"),0);"
- 't=id.arraytype
- ''***check for UDT size if necessary***
- ''***check for string length if necessary***
- 'bits=t and 511
- 'print #22,"int64val="+str2$(bits)+";" 'size in bits
- 'print #22,"sub_put(FF,NULL,byte_element((uint64)&int64val,8,"+NewByteElement$+"),0);"
- 'print #22,"int32val="+str2$(id.arrayelements)+";" 'number of elements
- 'print #22,"sub_put(FF,NULL,byte_element((uint64)&int32val,4,"+NewByteElement$+"),0);"
- 'e$=rtrim$(id.n)
- 'if (t and ISUDT)=0 then e$=e$+typevalue2symbol$(t)
- 'n$=e$
- 'for x2=1 to id.arrayelements
- ''simulate calls to lbound/ubound
- 'e$="LBOUND"+sp+"("+sp+n$+sp+","+sp+str2$(x2)+sp+")"
- 'e$=evaluatetotyp(fixoperationorder$(e$),64)
- 'print #22,"int64val="+e$+";"'LBOUND
- 'print #22,"sub_put(FF,NULL,byte_element((uint64)&int64val,8,"+NewByteElement$+"),0);"
- 'e$="UBOUND"+sp+"("+sp+n$+sp+","+sp+str2$(x2)+sp+")"
- 'e$=evaluatetotyp(fixoperationorder$(e$),64)
- 'print #22,"int64val="+e$+";"'LBOUND
- 'print #22,"sub_put(FF,NULL,byte_element((uint64)&int64val,8,"+NewByteElement$+"),0);"
- 'next
- ''add array data
- 'e$=evaluatetotyp(fixoperationorder$(n$+sp+"("+sp+")"),-4)
- 'print #22,"sub_put(FF,NULL,"+e$+",0);"
- 'close #22
- '
- ''inpchain???.txt
- 'open tmpdir$ + "chain" + str2$(x) + ".txt" for append as #22
- 'print #22,"if (int32val==1){" 'common declaration of an array
- 'print #22,"sub_get(FF,NULL,byte_element((uint64)&int32val,4,"+NewByteElement$+"),0);"
- 'print #22,"if (int32val==3){" 'fixed-length-element array
- '
- 'print #22,"sub_get(FF,NULL,byte_element((uint64)&int64val,8,"+NewByteElement$+"),0);"
- ''***assume size correct and continue***
- '
- ''get number of elements
- 'print #22,"sub_get(FF,NULL,byte_element((uint64)&int32val,4,"+NewByteElement$+"),0);"
- '
- ''call dim2 and tell it to redim an array
- '
- ''*********this should happen BEFORE the array (above) is actually dimensioned,
- ''*********where the common() declaration is
- '
- ''****although, if you never reference the array.............
- ''****ARGH! you can access an undimmed array just like in a sub/function
- '
- '
- '
- '
- 'print #22,"}"
- 'print #22,"}"
- 'close #22
- '
- 'chaindone:
- 'tlayout$=l2$
- 'end if 'chaincommonarray
-
-
-
-
- 'OPEN tmpdir$ + "chain.txt" FOR APPEND AS #22
- ''include directive
- 'print #22, "#include " + CHR$(34) + "chain" + str2$(x) + ".txt" + CHR$(34)
- 'close #22
- ''create/clear include file
- 'open tmpdir$ + "chain" + str2$(x) + ".txt" for output as #22:close #22
- '
- 'OPEN tmpdir$ + "inpchain.txt" FOR APPEND AS #22
- ''include directive
- 'print #22, "#include " + CHR$(34) + "inpchain" + str2$(x) + ".txt" + CHR$(34)
- 'close #22
- ''create/clear include file
- 'open tmpdir$ + "inpchain" + str2$(x) + ".txt" for output as #22:close #22
-
-
-
-
-
-
- END IF 'id.arrayelements=-1
-
-NEXT
-use_global_byte_elements = 0
-IF Debug THEN PRINT #9, "Finished generation of code for saving/sharing common array data!"
-
-
-FOR closeall = 1 TO 255: CLOSE closeall: NEXT
-OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26 'relock
-
-compilelog$ = tmpdir$ + "compilelog.txt"
-
-OPEN compilelog$ FOR OUTPUT AS #1: CLOSE #1 'Clear log
-
-IF idemode = 0 AND NOT QuietMode THEN
- IF ConsoleMode THEN
- PRINT "[" + STRING$(maxprogresswidth, ".") + "] 100%"
- ELSE
- LOCATE , 1
- PRINT STRING$(maxprogresswidth, 219) + " 100%"
- END IF
-END IF
-
-IF NOT IgnoreWarnings THEN
- totalUnusedVariables = 0
- FOR i = 1 TO totalVariablesCreated
- IF usedVariableList(i).used = 0 THEN
- totalUnusedVariables = totalUnusedVariables + 1
- END IF
- NEXT
-
- IF totalUnusedVariables > 0 THEN
- maxVarNameLen = 0
- FOR i = 1 TO totalVariablesCreated
- IF usedVariableList(i).used = 0 THEN
- IF LEN(usedVariableList(i).name) > maxVarNameLen THEN maxVarNameLen = LEN(usedVariableList(i).name)
- END IF
- NEXT
-
- header$ = "unused variable" 's (" + LTRIM$(STR$(totalUnusedVariables)) + ")"
- FOR i = 1 TO totalVariablesCreated
- IF usedVariableList(i).used = 0 THEN
- addWarning usedVariableList(i).linenumber, usedVariableList(i).includeLevel, usedVariableList(i).includedLine, usedVariableList(i).includedFile, header$, usedVariableList(i).name + SPACE$((maxVarNameLen + 1) - LEN(usedVariableList(i).name)) + " " + usedVariableList(i).varType
- END IF
- NEXT
- END IF
-END IF
-
-IF idemode THEN GOTO ideret5
-ide6:
-
-IF idemode = 0 AND No_C_Compile_Mode = 0 THEN
- IF NOT QuietMode THEN
- PRINT
- IF os$ = "LNX" THEN
- PRINT "Compiling C++ code into executable..."
- ELSE
- PRINT "Compiling C++ code into EXE..."
- END IF
- END IF
- IF LEN(outputfile_cmd$) THEN
- 'resolve relative path for output file
- path.out$ = getfilepath$(outputfile_cmd$)
- f$ = MID$(outputfile_cmd$, LEN(path.out$) + 1)
- file$ = RemoveFileExtension$(f$)
- IF LEN(path.out$) THEN
- IF _DIREXISTS(path.out$) = 0 THEN
- PRINT
- PRINT "Can't create output executable - path not found: " + path.out$
- IF ConsoleMode THEN SYSTEM 1
- END 1
- END IF
- currentdir$ = _CWD$
- CHDIR path.out$
- path.out$ = _CWD$
- CHDIR currentdir$
- IF RIGHT$(path.out$, 1) <> pathsep$ THEN path.out$ = path.out$ + pathsep$
- path.exe$ = path.out$
- SaveExeWithSource = -1 'Override the global setting if an output file was specified
- END IF
- END IF
- t.path.exe$ = path.exe$
- IF _FILEEXISTS(path.exe$ + file$ + extension$) THEN
- E = 0
- ON ERROR GOTO qberror_test
- KILL path.exe$ + file$ + extension$
- ON ERROR GOTO qberror
- IF E = 1 THEN
- a$ = "CANNOT CREATE " + CHR$(34) + file$ + extension$ + CHR$(34) + " BECAUSE THE FILE IS ALREADY IN USE!": GOTO errmes
- END IF
- END IF
- path.exe$ = t.path.exe$
-END IF
-
-IF ExeIconSet THEN
- linenumber = ExeIconSet 'on error, this allows reporting the linenumber where $EXEICON was used
- wholeline = " $EXEICON:'" + ExeIconFile$ + "'"
-
- ' Copy icon file into temp directory with known name
- ' This solves the problem of the resource file needing an absolute path
- ON ERROR GOTO qberror_test
-
- DIM errNo AS LONG
- errNo = CopyFile&(ExeIconFile$, tmpdir$ + "icon.ico")
- IF errNo <> 0 THEN a$ = "Error copying " + QuotedFilename$(ExeIconFile$) + " to temp directory": GOTO errmes
-
- ON ERROR GOTO qberror
-END IF
-
-IF VersionInfoSet THEN
- manifest = FREEFILE
- OPEN tmpdir$ + file$ + extension$ + ".manifest" FOR OUTPUT AS #manifest
- PRINT #manifest, ""
- PRINT #manifest, ""
- PRINT #manifest, ""
- PRINT #manifest, "" + viFileDescription$ + ""
- PRINT #manifest, ""
- PRINT #manifest, " "
- PRINT #manifest, " "
- PRINT #manifest, " "
- PRINT #manifest, ""
- PRINT #manifest, ""
- CLOSE #manifest
-
- manifestembed = FREEFILE
- OPEN tmpdir$ + "manifest.h" FOR OUTPUT AS #manifestembed
- PRINT #manifestembed, "#ifndef RESOURCE_H"
- PRINT #manifestembed, "#define RESOURCE_H"
- PRINT #manifestembed, "#ifdef __cplusplus"
- PRINT #manifestembed, "extern " + AddQuotes$("C") + " {"
- PRINT #manifestembed, "#endif"
- PRINT #manifestembed, "#ifdef __cplusplus"
- PRINT #manifestembed, "}"
- PRINT #manifestembed, "#endif"
- PRINT #manifestembed, "#endif /* RESOURCE_H */"
- PRINT #manifestembed, "#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 /*Defined manifest file*/"
- PRINT #manifestembed, "#define RT_MANIFEST 24"
- CLOSE #manifestembed
-END IF
-
-IF VersionInfoSet OR ExeIconSet THEN
- iconfilehandle = FREEFILE
- OPEN tmpdir$ + "icon.rc" FOR OUTPUT AS #iconfilehandle
-
- IF ExeIconSet THEN
- PRINT #iconfilehandle, "0 ICON " + AddQuotes$("icon.ico")
- END IF
-
- IF VersionInfoSet THEN
- PRINT #iconfilehandle, ""
- PRINT #iconfilehandle, "#include " + AddQuotes$("manifest.h")
- PRINT #iconfilehandle, ""
- PRINT #iconfilehandle, "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST " + AddQuotes$(file$ + extension$ + ".manifest")
- PRINT #iconfilehandle, ""
- PRINT #iconfilehandle, "1 VERSIONINFO"
- IF LEN(viFileVersionNum$) THEN PRINT #iconfilehandle, "FILEVERSION "; viFileVersionNum$
- IF LEN(viProductVersionNum$) THEN PRINT #iconfilehandle, "PRODUCTVERSION "; viProductVersionNum$
- PRINT #iconfilehandle, "BEGIN"
- PRINT #iconfilehandle, " BLOCK " + AddQuotes$("StringFileInfo")
- PRINT #iconfilehandle, " BEGIN"
- PRINT #iconfilehandle, " BLOCK " + AddQuotes$("040904E4")
- PRINT #iconfilehandle, " BEGIN"
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("CompanyName") + "," + AddQuotes$(viCompanyName$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("FileDescription") + "," + AddQuotes$(viFileDescription$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("FileVersion") + "," + AddQuotes$(viFileVersion$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("InternalName") + "," + AddQuotes$(viInternalName$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("LegalCopyright") + "," + AddQuotes$(viLegalCopyright$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("LegalTrademarks") + "," + AddQuotes$(viLegalTrademarks$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("OriginalFilename") + "," + AddQuotes$(viOriginalFilename$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("ProductName") + "," + AddQuotes$(viProductName$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("ProductVersion") + "," + AddQuotes$(viProductVersion$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("Comments") + "," + AddQuotes$(viComments$ + "\0")
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("Web") + "," + AddQuotes$(viWeb$ + "\0")
- PRINT #iconfilehandle, " END"
- PRINT #iconfilehandle, " END"
- PRINT #iconfilehandle, " BLOCK " + AddQuotes$("VarFileInfo")
- PRINT #iconfilehandle, " BEGIN"
- PRINT #iconfilehandle, " VALUE " + AddQuotes$("Translation") + ", 0x409, 0x04E4"
- PRINT #iconfilehandle, " END"
- PRINT #iconfilehandle, "END"
- CLOSE #iconfilehandle
- END IF
-END IF
-
-'Update dependencies
-
-o$ = LCASE$(os$)
-win = 0: IF os$ = "WIN" THEN win = 1
-lnx = 0: IF os$ = "LNX" THEN lnx = 1
-mac = 0: IF MacOSX THEN mac = 1: o$ = "osx"
-ver$ = Version$ 'eg. "0.123"
-libs$ = ""
-makedeps$ = ""
-make$ = GetMakeExecutable$
-
-localpath$ = "internal\c\"
-
-
-IF DEPENDENCY(DEPENDENCY_GL) THEN makedeps$ = makedeps$ + " DEP_GL=y"
-IF DEPENDENCY(DEPENDENCY_SCREENIMAGE) THEN makedeps$ = makedeps$ + " DEP_SCREENIMAGE=y"
-IF DEPENDENCY(DEPENDENCY_IMAGE_CODEC) THEN makedeps$ = makedeps$ + " DEP_IMAGE_CODEC=y"
-IF DEPENDENCY(DEPENDENCY_CONSOLE_ONLY) THEN makedeps$ = makedeps$ + " DEP_CONSOLE_ONLY=y"
-IF DEPENDENCY(DEPENDENCY_SOCKETS) THEN makedeps$ = makedeps$ + " DEP_SOCKETS=y"
-IF DEPENDENCY(DEPENDENCY_PRINTER) THEN makedeps$ = makedeps$ + " DEP_PRINTER=y"
-IF DEPENDENCY(DEPENDENCY_ICON) THEN makedeps$ = makedeps$ + " DEP_ICON=y"
-IF DEPENDENCY(DEPENDENCY_SCREENIMAGE) THEN makedeps$ = makedeps$ + " DEP_SCREENIMAGE=y"
-IF DEPENDENCY(DEPENDENCY_LOADFONT) THEN makedeps$ = makedeps$ + " DEP_FONT=y"
-IF DEPENDENCY(DEPENDENCY_DEVICEINPUT) THEN makedeps$ = makedeps$ + " DEP_DEVICEINPUT=y"
-IF DEPENDENCY(DEPENDENCY_AUDIO_DECODE) THEN makedeps$ = makedeps$ + " DEP_AUDIO_DECODE=y"
-IF DEPENDENCY(DEPENDENCY_AUDIO_CONVERSION) THEN makedeps$ = makedeps$ + " DEP_AUDIO_CONVERSION=y"
-IF DEPENDENCY(DEPENDENCY_AUDIO_DECODE) THEN makedeps$ = makedeps$ + " DEP_AUDIO_DECODE=y"
-IF DEPENDENCY(DEPENDENCY_AUDIO_OUT) THEN makedeps$ = makedeps$ + " DEP_AUDIO_OUT=y"
-IF DEPENDENCY(DEPENDENCY_ZLIB) THEN makedeps$ = makedeps$ + " DEP_ZLIB=y"
-IF inline_DATA = 0 AND DataOffset THEN makedeps$ = makedeps$ + " DEP_DATA=y"
-IF Console THEN makedeps$ = makedeps$ + " DEP_CONSOLE=y"
-IF ExeIconSet OR VersionInfoSet THEN makedeps$ = makedeps$ + " DEP_ICON_RC=y"
-
-IF tempfolderindex > 1 THEN makedeps$ = makedeps$ + " TEMP_ID=" + str2$(tempfolderindex)
-
-CxxFlagsExtra$ = ExtraCppFlags
-CxxLibsExtra$ = ExtraLinkerFlags
-
-' If debugging then use `-Og` rather than `-O2`
-IF OptimizeCppProgram THEN
- IF Include_GDB_Debugging_Info THEN
- CxxFlagsExtra$ = CxxFlagsExtra$ + " -Og"
- ELSE
- CxxFlagsExtra$ = CxxFlagsExtra$ + " -O2"
- END IF
-ELSE
- IF Include_GDB_Debugging_Info THEN
- CxxFlagsExtra$ = CxxFlagsExtra$ + " -g"
- END IF
-END IF
-
-CxxLibsExtra$ = CxxLibsExtra$ + " " + mylib$ + " " + mylibopt$
-
-' Make and the shell don't like certain characters in the file name, so we
-' escape them to get them to handle them properly
-escapedExe$ = StrReplace$(path.exe$ + file$ + extension$, " ", "\ ")
-escapedExe$ = StrReplace$(escapedExe$, "$", "$$")
-
-makeline$ = make$ + makedeps$ + " EXE=" + AddQuotes$(escapedExe$)
-makeline$ = makeline$ + " " + AddQuotes$("CXXFLAGS_EXTRA=" + CxxFlagsExtra$)
-makeline$ = makeline$ + " " + AddQuotes$("CFLAGS_EXTRA=" + CxxFlagsExtra$)
-makeline$ = makeline$ + " " + AddQuotes$("CXXLIBS_EXTRA=" + CxxLibsExtra$)
-makeline$ = makeline$ + " -j" + AddQuotes$(str2$(MaxParallelProcesses))
-
-IF NOT StripDebugSymbols THEN
- makeline$ = makeline$ + " STRIP_SYMBOLS=n"
-END IF
-
-IF os$ = "WIN" THEN
-
- makeline$ = makeline$ + " OS=win"
-
- 'resolve static function definitions and add to global.txt
- FOR x = 1 TO ResolveStaticFunctions
- IF LEN(ResolveStaticFunction_File(x)) THEN
-
- n = 0
- SHELL _HIDE "cmd /c internal\c\c_compiler\bin\nm.exe " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " --demangle -g >internal\temp\nm_output.txt"
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x) + "("
- OPEN "internal\temp\nm_output.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname+LEFTBRACKET
- x1 = INSTR(a$, s$)
- IF x1 THEN
- IF ResolveStaticFunction_Method(x) = 1 THEN
- x1 = x1 + 1
- x2 = INSTR(x1, a$, ")")
- fh2 = FREEFILE
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern void " + MID$(a$, x1, x2 - x1 + 1) + ";"
- CLOSE #fh2
- END IF
- n = n + 1
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- IF n > 1 THEN a$ = "Unable to resolve multiple instances of sub/function '" + ResolveStaticFunction_Name(x) + "' in '" + ResolveStaticFunction_File(x) + "'": GOTO errmes
-
- IF n = 0 THEN 'attempt to locate simple function name without brackets
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x)
- OPEN "internal\temp\nm_output.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname
- x1 = INSTR(a$, s$)
- IF RIGHT$(a$, LEN(s$)) = s$ THEN
- fh2 = FREEFILE
- IF ResolveStaticFunction_Method(x) = 1 THEN
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #fh2, "extern void " + s$ + "(void);"
- PRINT #fh2, "}"
- ELSE
- OPEN tmpdir$ + "externtype" + str2(x) + ".txt" FOR OUTPUT AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + " "
- END IF
- CLOSE #fh2
- n = n + 1
- EXIT DO
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- END IF
-
- IF n = 0 THEN 'a C++ dynamic object library?
- SHELL _HIDE "cmd /c internal\c\c_compiler\bin\nm.exe " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " -D --demangle -g >.\internal\temp\nm_output_dynamic.txt"
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x) + "("
- OPEN "internal\temp\nm_output_dynamic.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname+LEFTBRACKET
- x1 = INSTR(a$, s$)
- IF x1 THEN
- IF ResolveStaticFunction_Method(x) = 1 THEN
- x1 = x1 + 1
- x2 = INSTR(x1, a$, ")")
- fh2 = FREEFILE
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern void " + MID$(a$, x1, x2 - x1 + 1) + ";"
- CLOSE #fh2
- END IF
- n = n + 1
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- IF n > 1 THEN a$ = "Unable to resolve multiple instances of sub/function '" + ResolveStaticFunction_Name(x) + "' in '" + ResolveStaticFunction_File(x) + "'": GOTO errmes
- END IF
-
- IF n = 0 THEN 'a C dynamic object library?
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x)
- OPEN "internal\temp\nm_output_dynamic.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname
- x1 = INSTR(a$, s$)
- IF RIGHT$(a$, LEN(s$)) = s$ THEN
- fh2 = FREEFILE
- IF ResolveStaticFunction_Method(x) = 1 THEN
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #fh2, "extern void " + s$ + "(void);"
- PRINT #fh2, "}"
- ELSE
- OPEN tmpdir$ + "externtype" + str2(x) + ".txt" FOR OUTPUT AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + " "
- END IF
- CLOSE #fh2
- n = n + 1
- EXIT DO
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- IF n = 0 THEN a$ = "Could not find sub/function '" + ResolveStaticFunction_Name(x) + "' in '" + ResolveStaticFunction_File(x) + "'": GOTO errmes
- END IF
-
- END IF
- NEXT
-
- IF No_C_Compile_Mode = 0 THEN
- SHELL _HIDE "cmd /c " + makeline$ + " 1>> " + compilelog$ + " 2>&1"
-
- IF idemode THEN
- 'Restore fg/bg colors
- dummy = DarkenFGBG(0)
- END IF
- END IF
-
- ffh = FREEFILE
- OPEN tmpdir$ + "debug_win.bat" FOR OUTPUT AS #ffh
- PRINT #ffh, "@echo off"
- PRINT #ffh, "cd %0\..\"
- PRINT #ffh, "cd ../.."
- PRINT #ffh, "echo C++ Debugging: " + file$ + extension$ + " using gdb.exe"
- PRINT #ffh, "echo Debugger commands:"
- PRINT #ffh, "echo After the debugger launches type 'run' to start your program"
- PRINT #ffh, "echo After your program crashes type 'list' to find where the problem is and fix/report it"
- PRINT #ffh, "echo Type 'quit' to exit"
- PRINT #ffh, "echo (the GDB debugger has many other useful commands, this advice is for beginners)"
- PRINT #ffh, "pause"
- PRINT #ffh, "internal\c\c_compiler\bin\gdb.exe " + CHR$(34) + path.exe$ + file$ + extension$ + CHR$(34)
- PRINT #ffh, "pause"
- CLOSE ffh
-END IF
-
-IF os$ = "LNX" THEN
-
- IF INSTR(_OS$, "[MACOSX]") THEN
- makeline$ = makeline$ + " OS=osx"
- ELSE
- makeline$ = makeline$ + " OS=lnx"
- END IF
-
- FOR x = 1 TO ResolveStaticFunctions
- IF LEN(ResolveStaticFunction_File(x)) THEN
-
- n = 0
- IF MacOSX = 0 THEN SHELL _HIDE "nm " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " --demangle -g >./internal/temp/nm_output.txt 2>./internal/temp/nm_error.txt"
- IF MacOSX THEN SHELL _HIDE "nm " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " >./internal/temp/nm_output.txt 2>./internal/temp/nm_error.txt"
-
- IF MacOSX = 0 THEN 'C++ name demangling not supported in MacOSX
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x) + "("
- OPEN "internal\temp\nm_output.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname+LEFTBRACKET
- x1 = INSTR(a$, s$)
- IF x1 THEN
- IF ResolveStaticFunction_Method(x) = 1 THEN
- x1 = x1 + 1
- x2 = INSTR(x1, a$, ")")
- fh2 = FREEFILE
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern void " + MID$(a$, x1, x2 - x1 + 1) + ";"
- CLOSE #fh2
- END IF
- n = n + 1
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- IF n > 1 THEN a$ = "Unable to resolve multiple instances of sub/function '" + ResolveStaticFunction_Name(x) + "' in '" + ResolveStaticFunction_File(x) + "'": GOTO errmes
- END IF 'macosx=0
-
- IF n = 0 THEN 'attempt to locate simple function name without brackets
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x): s2$ = s$
- IF MacOSX THEN s$ = " _" + ResolveStaticFunction_Name(x) 'search for C mangled name
- OPEN "internal\temp\nm_output.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname
- x1 = INSTR(a$, s$)
- IF RIGHT$(a$, LEN(s$)) = s$ THEN
- fh2 = FREEFILE
- IF ResolveStaticFunction_Method(x) = 1 THEN
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #fh2, "extern void " + s2$ + "(void);"
- PRINT #fh2, "}"
- ELSE
- OPEN tmpdir$ + "externtype" + str2(x) + ".txt" FOR OUTPUT AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + " "
- END IF
- CLOSE #fh2
- n = n + 1
- EXIT DO
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- END IF
-
- IF n = 0 THEN 'a C++ dynamic object library?
- IF MacOSX THEN GOTO macosx_libfind_failed
- SHELL _HIDE "nm " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " -D --demangle -g >./internal/temp/nm_output_dynamic.txt 2>./internal/temp/nm_error.txt"
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x) + "("
- OPEN "internal\temp\nm_output_dynamic.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname+LEFTBRACKET
- x1 = INSTR(a$, s$)
- IF x1 THEN
- IF ResolveStaticFunction_Method(x) = 1 THEN
- x1 = x1 + 1
- x2 = INSTR(x1, a$, ")")
- fh2 = FREEFILE
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern void " + MID$(a$, x1, x2 - x1 + 1) + ";"
- CLOSE #fh2
- END IF
- n = n + 1
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- IF n > 1 THEN a$ = "Unable to resolve multiple instances of sub/function '" + ResolveStaticFunction_Name(x) + "' in '" + ResolveStaticFunction_File(x) + "'": GOTO errmes
- END IF
-
- IF n = 0 THEN 'a C dynamic object library?
- fh = FREEFILE
- s$ = " " + ResolveStaticFunction_Name(x)
- OPEN "internal\temp\nm_output_dynamic.txt" FOR BINARY AS #fh
- DO UNTIL EOF(fh)
- LINE INPUT #fh, a$
- IF LEN(a$) THEN
- 'search for SPACE+functionname
- x1 = INSTR(a$, s$)
- IF RIGHT$(a$, LEN(s$)) = s$ THEN
- fh2 = FREEFILE
- IF ResolveStaticFunction_Method(x) = 1 THEN
- OPEN tmpdir$ + "global.txt" FOR APPEND AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
- PRINT #fh2, "extern void " + s$ + "(void);"
- PRINT #fh2, "}"
- ELSE
- OPEN tmpdir$ + "externtype" + str2(x) + ".txt" FOR OUTPUT AS #fh2
- PRINT #fh2, "extern " + CHR$(34) + "C" + CHR$(34) + " "
- END IF
- CLOSE #fh2
- n = n + 1
- EXIT DO
- END IF 'x1
- END IF '<>""
- LOOP
- CLOSE #fh
- macosx_libfind_failed:
- IF n = 0 THEN a$ = "Could not find sub/function '" + ResolveStaticFunction_Name(x) + "' in '" + ResolveStaticFunction_File(x) + "'": GOTO errmes
- END IF
-
- END IF
- NEXT
-
- IF INSTR(_OS$, "[MACOSX]") THEN
-
- ffh = FREEFILE
- OPEN tmpdir$ + "recompile_osx.command" FOR OUTPUT AS #ffh
- PRINT #ffh, "cd " + CHR_QUOTE + "$(dirname " + CHR_QUOTE + "$0" + CHR_QUOTE + ")" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "Recompiling..." + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "cd ../c" + CHR$(10);
- PRINT #ffh, makeline$ + CHR$(10);
- PRINT #ffh, "read -p " + CHR_QUOTE + "Press ENTER to exit..." + CHR_QUOTE + CHR$(10);
- CLOSE ffh
- SHELL _HIDE "chmod +x " + tmpdir$ + "recompile_osx.command"
-
- ffh = FREEFILE
- OPEN tmpdir$ + "debug_osx.command" FOR OUTPUT AS #ffh
- PRINT #ffh, "cd " + CHR_QUOTE + "$(dirname " + CHR_QUOTE + "$0" + CHR_QUOTE + ")" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "Pause()" + CHR$(10);
- PRINT #ffh, "{" + CHR$(10);
- PRINT #ffh, "OLDCONFIG=`stty -g`" + CHR$(10);
- PRINT #ffh, "stty -icanon -echo min 1 time 0" + CHR$(10);
- PRINT #ffh, "dd count=1 2>/dev/null" + CHR$(10);
- PRINT #ffh, "stty $OLDCONFIG" + CHR$(10);
- PRINT #ffh, "}" + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "C++ Debugging: " + file$ + extension$ + " using GDB" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "Debugger commands:" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "After the debugger launches type 'run' to start your program" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "After your program crashes type 'list' to find where the problem is and fix/report it" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "(the GDB debugger has many other useful commands, this advice is for beginners)" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "gdb " + CHR$(34) + path.exe$ + file$ + extension$ + CHR$(34) + CHR$(10);
- PRINT #ffh, "Pause" + CHR$(10);
- CLOSE ffh
- SHELL _HIDE "chmod +x " + tmpdir$ + "debug_osx.command"
-
- ELSE
-
- ffh = FREEFILE
- OPEN tmpdir$ + "recompile_lnx.sh" FOR OUTPUT AS #ffh
- PRINT #ffh, "#!/bin/sh" + CHR$(10);
- PRINT #ffh, "Pause()" + CHR$(10);
- PRINT #ffh, "{" + CHR$(10);
- PRINT #ffh, "OLDCONFIG=`stty -g`" + CHR$(10);
- PRINT #ffh, "stty -icanon -echo min 1 time 0" + CHR$(10);
- PRINT #ffh, "dd count=1 2>/dev/null" + CHR$(10);
- PRINT #ffh, "stty $OLDCONFIG" + CHR$(10);
- PRINT #ffh, "}" + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "Recompiling..." + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "cd ../c" + CHR$(10);
- PRINT #ffh, makeline$ + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "Press ENTER to exit..." + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "Pause" + CHR$(10);
- CLOSE ffh
- SHELL _HIDE "chmod +x " + tmpdir$ + "recompile_lnx.sh"
-
- ffh = FREEFILE
- OPEN tmpdir$ + "debug_lnx.sh" FOR OUTPUT AS #ffh
- PRINT #ffh, "#!/bin/sh" + CHR$(10);
- PRINT #ffh, "Pause()" + CHR$(10);
- PRINT #ffh, "{" + CHR$(10);
- PRINT #ffh, "OLDCONFIG=`stty -g`" + CHR$(10);
- PRINT #ffh, "stty -icanon -echo min 1 time 0" + CHR$(10);
- PRINT #ffh, "dd count=1 2>/dev/null" + CHR$(10);
- PRINT #ffh, "stty $OLDCONFIG" + CHR$(10);
- PRINT #ffh, "}" + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "C++ Debugging: " + file$ + extension$ + " using GDB" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "Debugger commands:" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "After the debugger launches type 'run' to start your program" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "After your program crashes type 'list' to find where the problem is and fix/report it" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "echo " + CHR_QUOTE + "(the GDB debugger has many other useful commands, this advice is for beginners)" + CHR_QUOTE + CHR$(10);
- PRINT #ffh, "gdb " + CHR$(34) + path.exe$ + file$ + extension$ + CHR$(34) + CHR$(10);
- PRINT #ffh, "Pause" + CHR$(10);
- CLOSE ffh
- SHELL _HIDE "chmod +x " + tmpdir$ + "debug_lnx.sh"
-
- END IF
-
- IF No_C_Compile_Mode = 0 THEN
- SHELL _HIDE makeline$ + " 1>> " + compilelog$ + " 2>&1"
- IF idemode THEN
- 'Restore fg/bg colors
- dummy = DarkenFGBG(0)
- END IF
- END IF
-
- IF INSTR(_OS$, "[MACOSX]") THEN
- ff = FREEFILE
- IF path.exe$ = "./" OR path.exe$ = "../../" OR path.exe$ = "..\..\" THEN path.exe$ = ""
- OPEN path.exe$ + file$ + extension$ + "_start.command" FOR OUTPUT AS #ff
- PRINT #ff, "cd " + CHR$(34) + "$(dirname " + CHR$(34) + "$0" + CHR$(34) + ")" + CHR$(34);
- PRINT #ff, CHR$(10);
- PRINT #ff, "./" + file$ + extension$ + " &";
- PRINT #ff, CHR$(10);
- PRINT #ff, "osascript -e 'tell application " + CHR$(34) + "Terminal" + CHR$(34) + " to close (every window whose name contains " + CHR$(34) + file$ + extension$ + "_start.command" + CHR$(34) + ")' &";
- PRINT #ff, CHR$(10);
- PRINT #ff, "osascript -e 'if (count the windows of application " + CHR$(34) + "Terminal" + CHR$(34) + ") is 0 then tell application " + CHR$(34) + "Terminal" + CHR$(34) + " to quit' &";
- PRINT #ff, CHR$(10);
- PRINT #ff, "exit";
- PRINT #ff, CHR$(10);
- CLOSE #ff
- SHELL _HIDE "chmod +x " + path.exe$ + file$ + extension$ + "_start.command"
- END IF
-
-END IF
-
-IF No_C_Compile_Mode THEN compfailed = 0: GOTO No_C_Compile
-IF path.exe$ = "../../" OR path.exe$ = "..\..\" THEN path.exe$ = ""
-IF _FILEEXISTS(path.exe$ + file$ + extension$) THEN
- compfailed = 0
- lastBinaryGenerated$ = path.exe$ + file$ + extension$
-ELSE
- compfailed = 1 'detect compilation failure
-END IF
-
-IF compfailed THEN
- IF idemode THEN
- idemessage$ = "C++ Compilation failed " + CHR$(0) + "(Check " + _TRIM$(compilelog$) + ")"
- GOTO ideerror
- END IF
- IF compfailed THEN
- PRINT "ERROR: C++ compilation failed."
- PRINT "Check " + compilelog$ + " for details."
- END IF
-ELSE
- IF idemode = 0 AND NOT QuietMode THEN PRINT "Output: "; lastBinaryGenerated$
-END IF
-
-Skip_Build:
-
-
-
-IF idemode THEN GOTO ideret6
-
-No_C_Compile:
-
-IF (compfailed <> 0 OR warningsissued <> 0) AND ConsoleMode = 0 THEN END 1
-IF compfailed <> 0 THEN SYSTEM 1
-SYSTEM 0
-
-qberror_test:
-E = 1
-RESUME NEXT
-
-qberror:
-'_CONSOLE ON
-'_ECHO "A QB error has occurred (and you have compiled in debugging support)."
-'_ECHO "Some key information (qb64.bas):"
-'_ECHO "Error" + STR$(ERR)
-'_ECHO "Description: " + _ERRORMESSAGE$
-'_ECHO "Line" + STR$(_ERRORLINE)
-'IF _INCLERRORLINE THEN
-' _ECHO "Included line" + STR$(_INCLERRORLINE)
-' _ECHO "Included file " + _INCLERRORFILE$
-'END IF
-'_ECHO ""
-'_ECHO "Loaded source file details:"
-'_ECHO "ideerror =" + STR$(ideerror) + "; qberrorhappened =" + STR$(qberrorhappened) + "; qberrorhappenedvalue =" + STR$(qberrorhappenedvalue) + "; linenumber =" + STR$(linenumber)
-'_ECHO "ca$ = {" + ca$ + "}, idecommand$ = {" + idecommand$ + "}"
-'_ECHO "linefragment = {" + linefragment+ "}"
-
-IF Debug THEN 'A more in-your-face error handler
- IF ConsoleMode THEN
- PRINT
- ELSE
- _AUTODISPLAY
- SCREEN _NEWIMAGE(80, 25, 0), , 0, 0
- COLOR 7, 0
- END IF
- _CONTROLCHR OFF
- PRINT "A QB error has occurred (and you have compiled in debugging support)."
- PRINT "Some key information (qb64.bas):"
- PRINT "Error"; ERR
- PRINT "Description: "; _ERRORMESSAGE$
- PRINT "Line"; _ERRORLINE
- IF _INCLERRORLINE THEN
- PRINT "Included line"; _INCLERRORLINE
- PRINT "Included file "; _INCLERRORFILE$
- END IF
- PRINT
- PRINT "Loaded source file details:"
- PRINT "ideerror ="; ideerror; "qberrorhappened ="; qberrorhappened; "qberrorhappenedvalue ="; qberrorhappenedvalue; "linenumber ="; linenumber
- PRINT "ca$ = {"; ca$; "}, idecommand$ = {"; idecommand$; "}"
- PRINT "linefragment = {"; linefragment; "}"
- END
-END IF
-
-IF ideerror THEN 'error happened inside the IDE
- fh = FREEFILE
- OPEN "internal\temp\ideerror.txt" FOR APPEND AS #fh
- PRINT #fh, DATE$; TIME$; "--------------------"
- PRINT #fh, ERR
- PRINT #fh, _ERRORMESSAGE$
- PRINT #fh, _ERRORLINE
- PRINT #fh, _INCLERRORLINE
- PRINT #fh, _INCLERRORFILE$
- CLOSE #fh
- sendc$ = CHR$(255) 'a runtime error has occurred
- RESUME sendcommand 'allow IDE to handle error recovery
-END IF
-
-qberrorhappenedvalue = qberrorhappened
-qberrorhappened = 1
-
-IF Debug THEN PRINT #9, "QB ERROR!"
-IF Debug THEN PRINT #9, "ERR="; ERR
-IF Debug THEN PRINT #9, "ERL="; ERL
-
-IF idemode AND qberrorhappenedvalue >= 0 THEN
- 'real qb error occurred
- ideerrorline = linenumber
- idemessage$ = "Compiler error (check for syntax errors) (" + _ERRORMESSAGE$ + ":"
- IF ERR THEN idemessage$ = idemessage$ + str2$(ERR) + "-"
- IF _ERRORLINE THEN idemessage$ = idemessage$ + str2$(_ERRORLINE)
- IF _INCLERRORLINE THEN idemessage$ = idemessage$ + "-" + _INCLERRORFILE$ + "-" + str2$(_INCLERRORLINE)
- idemessage$ = idemessage$ + ")"
- IF inclevel > 0 THEN idemessage$ = idemessage$ + incerror$
- RESUME ideerror
-END IF
-
-IF qberrorhappenedvalue >= 0 THEN
- a$ = "UNEXPECTED INTERNAL COMPILER ERROR!": GOTO errmes 'internal comiler error
-END IF
-
-
-qberrorcode = ERR
-qberrorline = ERL
-IF qberrorhappenedvalue = -1 THEN RESUME qberrorhappened1
-IF qberrorhappenedvalue = -2 THEN RESUME qberrorhappened2
-IF qberrorhappenedvalue = -3 THEN RESUME qberrorhappened3
-END
-
-errmes: 'set a$ to message
-IF Error_Happened THEN a$ = Error_Message: Error_Happened = 0
-layout$ = "": layoutok = 0 'invalidate layout
-
-IF forceIncludingFile THEN 'If we're to the point where we're adding the automatic QB64 includes, we don't need to report the $INCLUDE information
- IF INSTR(a$, "END SUB/FUNCTION before") THEN a$ = "SUB without END SUB" 'Just a simple rewrite of the error message to be less confusing for SUB/FUNCTIONs
-ELSE 'We want to let the user know which module the error occurred in
- IF inclevel > 0 THEN a$ = a$ + incerror$
-END IF
-
-IF idemode THEN
- ideerrorline = linenumber
- idemessage$ = a$
- GOTO ideerror 'infinitely preferable to RESUME
-END IF
-'non-ide mode output
-PRINT
-IF NOT MonochromeLoggingMode THEN
- IF INSTR(_OS$, "WIN") THEN
- COLOR 4
- ELSE
- COLOR 9
- END IF
-END IF
-PRINT a$
-IF NOT MonochromeLoggingMode THEN COLOR 7
-FOR i = 1 TO LEN(linefragment)
- IF MID$(linefragment, i, 1) = sp$ THEN MID$(linefragment, i, 1) = " "
-NEXT
-FOR i = 1 TO LEN(wholeline)
- IF MID$(wholeline, i, 1) = sp$ THEN MID$(wholeline, i, 1) = " "
-NEXT
-PRINT "Caused by (or after):" + linefragment
-IF NOT MonochromeLoggingMode THEN COLOR 8
-PRINT "LINE ";
-IF NOT MonochromeLoggingMode THEN COLOR 15
-PRINT str2(linenumber) + ":";
-IF NOT MonochromeLoggingMode THEN COLOR 7
-PRINT wholeline
-
-IF ConsoleMode THEN SYSTEM 1
-END 1
-
-FUNCTION ParseCMDLineArgs$ ()
- 'Recall that COMMAND$ is a concatenation of argv[] elements, so we don't have
- 'to worry about more than one space between things (unless they used quotes,
- 'in which case they're simply asking for trouble).
- FOR i = 1 TO _COMMANDCOUNT
- token$ = COMMAND$(i)
- IF LCASE$(token$) = "/?" OR LCASE$(token$) = "--help" OR LCASE$(token$) = "/help" THEN token$ = "-?"
- SELECT CASE LCASE$(LEFT$(token$, 2))
- CASE "-?" 'Command-line help
- _DEST _CONSOLE
- IF qb64versionprinted = 0 THEN qb64versionprinted = -1: PRINT "QB64 Compiler V" + Version$
- PRINT
- PRINT "Usage: qb64 [switches] "
- PRINT
- PRINT "Options:"
- PRINT " Source file to load" ' '80 columns
- PRINT " -c Compile instead of edit"
- PRINT " -o