diff --git a/internal/support/addprefix/addprefix.bas b/internal/support/addprefix/addprefix.bas index 6c9a8bdd4..c646897c0 100644 --- a/internal/support/addprefix/addprefix.bas +++ b/internal/support/addprefix/addprefix.bas @@ -1,7 +1,7 @@ -option _explicit -$screenhide -$console -deflng a-z +OPTION _EXPLICIT +$SCREENHIDE +$CONSOLE +DEFLNG A-Z 'Removed leading @ 'Line continutation formatting @@ -51,188 +51,188 @@ const KEYWORDS = "_ACCEPTFILEDROP@_ACOS@_ACOSH@_ADLER32@_ALLOWFULLSCREEN@_ALPHA@ "_UCHARPOS@_UFONTHEIGHT@_ULINESPACING@_UNSIGNED@_UPRINTSTRING@_UPRINTWIDTH@"+_ "_WHEEL@_WIDTH@_WINDOWHANDLE@_WINDOWHASFOCUS@_WRITEFILE@" -const FALSE = 0, TRUE = -1 - -const ASCII_TAB = 9 -const ASCII_LF = 10 -const ASCII_VTAB = 11 -const ASCII_FF = 12 -const ASCII_CR = 13 -const ASCII_EOF = 0 'Prefer NUL over ^Z for this purpose as some people embed ^Z in their programs -const ASCII_QUOTE = 34 - -const TOK_EOF = 1 -const TOK_NEWLINE = 2 -const TOK_WORD = 3 -const TOK_METACMD = 6 -const TOK_COMMENT = 7 -const TOK_STRING = 8 -const TOK_DATA = 9 -const TOK_PUNCTUATION = 11 -const TOK_COLON = 15 - -const STATE_BEGIN = 1 -const STATE_METACMD = 3 -const STATE_WORD = 4 -const STATE_COMMENT = 5 -const STATE_STRING = 6 -const STATE_DATA = 7 -const STATE_NEWLINE = 12 -const STATE_NEWLINE_WIN = 13 - -type token_t - t as long 'TOK_ type - c as string 'Content - uc as string 'Content in UPPERCASE for comparisons - spaces as string 'Any whitespace characters detected before the content -end type -dim shared token as token_t - -redim shared prefix_keywords$(1) 'Stored without the prefix -redim shared prefix_colors$(0) -redim shared include_queue$(0) -dim shared exedir$ -dim shared input_content$, current_include -dim shared line_count, column_count -dim shared next_chr_idx, tk_state -dim shared noprefix_detected -dim shared in_udt, in_declare_library - -exedir$ = _cwd$ -chdir _startdir$ +CONST FALSE = 0, TRUE = -1 + +CONST ASCII_TAB = 9 +CONST ASCII_LF = 10 +CONST ASCII_VTAB = 11 +CONST ASCII_FF = 12 +CONST ASCII_CR = 13 +CONST ASCII_EOF = 0 'Prefer NUL over ^Z for this purpose as some people embed ^Z in their programs +CONST ASCII_QUOTE = 34 + +CONST TOK_EOF = 1 +CONST TOK_NEWLINE = 2 +CONST TOK_WORD = 3 +CONST TOK_METACMD = 6 +CONST TOK_COMMENT = 7 +CONST TOK_STRING = 8 +CONST TOK_DATA = 9 +CONST TOK_PUNCTUATION = 11 +CONST TOK_COLON = 15 + +CONST STATE_BEGIN = 1 +CONST STATE_METACMD = 3 +CONST STATE_WORD = 4 +CONST STATE_COMMENT = 5 +CONST STATE_STRING = 6 +CONST STATE_DATA = 7 +CONST STATE_NEWLINE = 12 +CONST STATE_NEWLINE_WIN = 13 + +TYPE token_t + t AS LONG 'TOK_ type + c AS STRING 'Content + uc AS STRING 'Content in UPPERCASE for comparisons + spaces AS STRING 'Any whitespace characters detected before the content +END TYPE +DIM SHARED token AS token_t + +REDIM SHARED prefix_keywords$(1) 'Stored without the prefix +REDIM SHARED prefix_colors$(0) +REDIM SHARED include_queue$(0) +DIM SHARED exedir$ +DIM SHARED input_content$, current_include +DIM SHARED line_count, column_count +DIM SHARED next_chr_idx, tk_state +DIM SHARED noprefix_detected +DIM SHARED in_udt, in_declare_library + +exedir$ = _CWD$ +CHDIR _STARTDIR$ build_keyword_list -if _commandcount = 0 then - _screenshow - print "$NOPREFIX remover" - print "Files will be backed up before conversion." - print "Run this program with a file as a command-line argument or enter a file now" - print "File name: "; - line input include_queue$(0) -else - _dest _console - include_queue$(0) = command$(1) -end if - -do +IF _COMMANDCOUNT = 0 THEN + _SCREENSHOW + PRINT "$NOPREFIX remover" + PRINT "Files will be backed up before conversion." + PRINT "Run this program with a file as a command-line argument or enter a file now" + PRINT "File name: "; + LINE INPUT include_queue$(0) +ELSE + _DEST _CONSOLE + include_queue$(0) = COMMAND$(1) +END IF + +DO load_prepass_file include_queue$(current_include) prepass current_include = current_include + 1 -loop while current_include <= ubound(include_queue$) -if not noprefix_detected then - print "Program does not use $NOPREFIX, no changes made" - if _commandcount = 0 then end else system -end if +LOOP WHILE current_include <= UBOUND(include_queue$) +IF NOT noprefix_detected THEN + PRINT "Program does not use $NOPREFIX, no changes made" + IF _COMMANDCOUNT = 0 THEN END ELSE SYSTEM +END IF -print "Found"; ubound(include_queue$); "$INCLUDE file(s)" +PRINT "Found"; UBOUND(include_queue$); "$INCLUDE file(s)" current_include = 0 -do +DO load_file include_queue$(current_include) - do + DO process_logical_line - loop while token.t <> TOK_EOF - close #2 + LOOP WHILE token.t <> TOK_EOF + CLOSE #2 current_include = current_include + 1 -loop while current_include <= ubound(include_queue$) -print "Conversion complete" -if _commandcount = 0 then end else system +LOOP WHILE current_include <= UBOUND(include_queue$) +PRINT "Conversion complete" +IF _COMMANDCOUNT = 0 THEN END ELSE SYSTEM -sub load_prepass_file (filename$) - print "Analysing " + filename$ - input_content$ = _readfile$(filename$) + chr$(ASCII_EOF) +SUB load_prepass_file (filename$) + PRINT "Analysing " + filename$ + input_content$ = _READFILE$(filename$) + CHR$(ASCII_EOF) rewind -end sub +END SUB -sub prepass - do +SUB prepass + DO next_token_raw - select case token.t - case TOK_METACMD - select case token.uc - case "$NOPREFIX" - noprefix_detected = TRUE - case "$COLOR:0" - build_color0_list - case "$COLOR:32" - build_color32_list - end select - case TOK_WORD - select case token.uc - case "DATA" - tk_state = STATE_DATA - case "REM" - tk_state = STATE_COMMENT - end select - case TOK_COMMENT - process_maybe_include - case TOK_NEWLINE - line_count = line_count + 1 - column_count = 0 - case TOK_EOF - exit do - end select - loop -end sub - -sub load_file (filename$) - dim ext, backup$ - ext = _instrrev(filename$, ".") - if ext > 0 then - backup$ = left$(filename$, ext - 1) + "-noprefix" + mid$(filename$, ext) - else + SELECT CASE token.t + CASE TOK_METACMD + SELECT CASE token.uc + CASE "$NOPREFIX" + noprefix_detected = TRUE + CASE "$COLOR:0" + build_color0_list + CASE "$COLOR:32" + build_color32_list + END SELECT + CASE TOK_WORD + SELECT CASE token.uc + CASE "DATA" + tk_state = STATE_DATA + CASE "REM" + tk_state = STATE_COMMENT + END SELECT + CASE TOK_COMMENT + process_maybe_include + CASE TOK_NEWLINE + line_count = line_count + 1 + column_count = 0 + CASE TOK_EOF + EXIT DO + END SELECT + LOOP +END SUB + +SUB load_file (filename$) + DIM ext, backup$ + ext = _INSTRREV(filename$, ".") + IF ext > 0 THEN + backup$ = LEFT$(filename$, ext - 1) + "-noprefix" + MID$(filename$, ext) + ELSE backup$ = filename$ + "-noprefix" - end if - name filename$ as backup$ - print "Moved " + filename$ + " to backup " + backup$ - print "Converting " + filename$ - input_content$ = _readfile$(backup$) + chr$(ASCII_EOF) - open filename$ for binary as #2 + END IF + NAME filename$ AS backup$ + PRINT "Moved " + filename$ + " to backup " + backup$ + PRINT "Converting " + filename$ + input_content$ = _READFILE$(backup$) + CHR$(ASCII_EOF) + OPEN filename$ FOR BINARY AS #2 rewind -end sub +END SUB -sub process_maybe_include - dim s$, path$, open_quote, close_quote +SUB process_maybe_include + DIM s$, path$, open_quote, close_quote s$ = token.c - if left$(s$, 1) = "'" then s$ = mid$(s$, 2) - s$ = ltrim$(s$) - if ucase$(left$(s$, 8)) <> "$INCLUDE" then exit sub - open_quote = instr(s$, "'") - close_quote = instr(open_quote + 1, s$, "'") - path$ = mid$(s$, open_quote + 1, close_quote - open_quote - 1) + IF LEFT$(s$, 1) = "'" THEN s$ = MID$(s$, 2) + s$ = LTRIM$(s$) + IF UCASE$(LEFT$(s$, 8)) <> "$INCLUDE" THEN EXIT SUB + open_quote = INSTR(s$, "'") + close_quote = INSTR(open_quote + 1, s$, "'") + path$ = MID$(s$, open_quote + 1, close_quote - open_quote - 1) queue_include path$ -end sub - -sub queue_include (given_path$) - dim current_path$, path$, i - if is_absolute_path(given_path$) then - if not _fileexists(given_path$) then - print "WARNING: cannot locate included file '" + given_path$ + "'" - exit sub - end if +END SUB + +SUB queue_include (given_path$) + DIM current_path$, path$, i + IF is_absolute_path(given_path$) THEN + IF NOT _FILEEXISTS(given_path$) THEN + PRINT "WARNING: cannot locate included file '" + given_path$ + "'" + EXIT SUB + END IF path$ = given_path$ - else + ELSE current_path$ = dir_name$(include_queue$(current_include)) 'First check relative to path of current file - if _fileexists(current_path$ + "/" + given_path$) then + IF _FILEEXISTS(current_path$ + "/" + given_path$) THEN path$ = current_path$ + "/" + given_path$ - 'Next try relative to converter TODO: Change to relative to compiler - elseif _fileexists(exedir$ + "/" + given_path$) then + 'Next try relative to converter TODO: Change to relative to compiler + ELSEIF _FILEEXISTS(exedir$ + "/" + given_path$) THEN path$ = exedir$ + "/" + given_path$ - else - print "WARNING: cannot locate included file '" + given_path$ + "'" - exit sub - end if - end if - for i = 0 to ubound(include_queue$) - if include_queue$(i) = path$ then exit sub - next i - i = ubound(include_queue$) - redim _preserve include_queue$(i + 1) + ELSE + PRINT "WARNING: cannot locate included file '" + given_path$ + "'" + EXIT SUB + END IF + END IF + FOR i = 0 TO UBOUND(include_queue$) + IF include_queue$(i) = path$ THEN EXIT SUB + NEXT i + i = UBOUND(include_queue$) + REDIM _PRESERVE include_queue$(i + 1) include_queue$(i + 1) = path$ -end sub +END SUB -sub rewind +SUB rewind line_count = 1 column_count = 0 next_chr_idx = 1 @@ -240,546 +240,547 @@ sub rewind token.t = 0 token.c = "" token.uc = "" -end sub +END SUB -sub build_keyword_list - dim i, j, keyword$ +SUB build_keyword_list + DIM i, j, keyword$ i = 1 - for j = 1 to len(KEYWORDS) - if asc(KEYWORDS, j) = asc("@") then - if asc(keyword$) = asc("_") then - if i > ubound(prefix_keywords$) then redim _preserve prefix_keywords$(ubound(prefix_keywords$) * 2) - prefix_keywords$(i) = mid$(keyword$, 2) - if i > 1 and _strcmp(prefix_keywords$(i), prefix_keywords$(i - 1)) <> 1 then - print "Internal error: " + keyword$ + " out of order" - end - end if + FOR j = 1 TO LEN(KEYWORDS) + IF ASC(KEYWORDS, j) = ASC("@") THEN + IF ASC(keyword$) = ASC("_") THEN + IF i > UBOUND(prefix_keywords$) THEN REDIM _PRESERVE prefix_keywords$(UBOUND(prefix_keywords$) * 2) + prefix_keywords$(i) = MID$(keyword$, 2) + IF i > 1 AND _STRCMP(prefix_keywords$(i), prefix_keywords$(i - 1)) <> 1 THEN + PRINT "Internal error: " + keyword$ + " out of order" + END + END IF i = i + 1 - end if + END IF keyword$ = "" - else - keyword$ = keyword$ + mid$(KEYWORDS, j, 1) - end if - next j - redim _preserve prefix_keywords$(i - 1) -end sub - -sub build_color0_list - redim prefix_colors$(4) + ELSE + keyword$ = keyword$ + MID$(KEYWORDS, j, 1) + END IF + NEXT j + REDIM _PRESERVE prefix_keywords$(i - 1) +END SUB + +SUB build_color0_list + REDIM prefix_colors$(4) prefix_colors$(1) = "NP_BLUE" prefix_colors$(2) = "NP_GREEN" prefix_colors$(3) = "NP_RED" prefix_colors$(4) = "NP_BLINK" -end sub +END SUB -sub build_color32_list - redim prefix_colors$(3) +SUB build_color32_list + REDIM prefix_colors$(3) prefix_colors$(1) = "NP_BLUE" prefix_colors$(2) = "NP_GREEN" prefix_colors$(3) = "NP_RED" -end sub +END SUB -sub process_logical_line +SUB process_logical_line next_token - select case token.t - case TOK_METACMD - select case token.uc - case "$NOPREFIX" - 'Keep remenant of $noprefix so line numbers are not changed - token.c = "'" + token.c + " removed here" - end select - case TOK_WORD - if in_udt and token.uc = "END" then - in_udt = FALSE - in_declare_library = FALSE - elseif in_udt then - 'In a UDT definition the field name is never a keyword - next_token - else - select case token.uc - case "SUB", "FUNCTION" - if in_declare_library then process_declare_library_def - case "TYPE" - in_udt = TRUE - case "DATA" - tk_state = STATE_DATA - case "DECLARE" - process_declare - case "PUT" - process_put - case "SCREENMOVE", "_SCREENMOVE" - process_screenmove - case "OPTION" - process_option - case "FULLSCREEN", "_FULLSCREEN" - process_fullscreen - case "ALLOWFULLSCREEN", "_ALLOWFULLSCREEN" - process_allowfullscreen - case "RESIZE", "_RESIZE" - process_resize - case "GLRENDER", "_GLRENDER" - process_glrender - case "DISPLAYORDER", "_DISPLAYORDER" - process_displayorder - case "EXIT" - next_token 'in statement position this is EXIT SUB etc. - case "FPS", "_FPS" - process_fps - case "CLEARCOLOR", "_CLEARCOLOR" - process_clearcolor - case "MAPTRIANGLE", "_MAPTRIANGLE" - process_maptriangle - case "DEPTHBUFFER", "_DEPTHBUFFER" - process_depthbuffer - case "WIDTH" - next_token 'in statement position this is the set-columns command - case "SHELL" - process_shell - case "CAPSLOCK", "_CAPSLOCK", "SCROLLLOCK", "_SCROLLLOCK", "NUMLOCK", "_NUMLOCK" - process_keylock - case "CONSOLECURSOR", "_CONSOLECURSOR" - process_consolecursor - end select - end if - end select + SELECT CASE token.t + CASE TOK_METACMD + SELECT CASE token.uc + CASE "$NOPREFIX" + 'Keep remenant of $noprefix so line numbers are not changed + token.c = "'" + token.c + " removed here" + END SELECT + CASE TOK_WORD + IF in_udt AND token.uc = "END" THEN + in_udt = FALSE + in_declare_library = FALSE + ELSEIF in_udt THEN + 'In a UDT definition the field name is never a keyword + next_token + ELSE + SELECT CASE token.uc + CASE "SUB", "FUNCTION" + IF in_declare_library THEN process_declare_library_def + CASE "TYPE" + in_udt = TRUE + CASE "DATA" + tk_state = STATE_DATA + CASE "DECLARE" + process_declare + CASE "PUT" + process_put + CASE "SCREENMOVE", "_SCREENMOVE" + process_screenmove + CASE "OPTION" + process_option + CASE "FULLSCREEN", "_FULLSCREEN" + process_fullscreen + CASE "ALLOWFULLSCREEN", "_ALLOWFULLSCREEN" + process_allowfullscreen + CASE "RESIZE", "_RESIZE" + process_resize + CASE "GLRENDER", "_GLRENDER" + process_glrender + CASE "DISPLAYORDER", "_DISPLAYORDER" + process_displayorder + CASE "EXIT" + next_token 'in statement position this is EXIT SUB etc. + CASE "FPS", "_FPS" + process_fps + CASE "CLEARCOLOR", "_CLEARCOLOR" + process_clearcolor + CASE "MAPTRIANGLE", "_MAPTRIANGLE" + process_maptriangle + CASE "DEPTHBUFFER", "_DEPTHBUFFER" + process_depthbuffer + CASE "WIDTH" + next_token 'in statement position this is the set-columns command + CASE "SHELL" + process_shell + CASE "CAPSLOCK", "_CAPSLOCK", "SCROLLLOCK", "_SCROLLLOCK", "NUMLOCK", "_NUMLOCK" + process_keylock + CASE "CONSOLECURSOR", "_CONSOLECURSOR" + process_consolecursor + END SELECT + END IF + END SELECT process_rest_of_line -end sub +END SUB -sub process_declare +SUB process_declare next_token - if token.uc = "SUB" or token.uc = "FUNCTION" then - while not line_end + IF token.uc = "SUB" OR token.uc = "FUNCTION" THEN + WHILE NOT line_end next_token - wend - elseif token.uc = "LIBRARY" then + WEND + ELSEIF token.uc = "LIBRARY" THEN in_declare_library = TRUE - end if -end sub + END IF +END SUB -sub process_declare_library_def +SUB process_declare_library_def next_token - while token.uc <> "(" and not line_end + WHILE token.uc <> "(" AND NOT line_end next_token - wend - while token.uc <> ")" and not line_end + WEND + WHILE token.uc <> ")" AND NOT line_end next_token - if token.uc = "BYVAL" then next_token + IF token.uc = "BYVAL" THEN next_token next_token 'Skip argument name skip_expr - wend -end sub + WEND +END SUB -sub process_put +SUB process_put next_token - if token.uc = "STEP" then next_token - if token.c = "(" then + IF token.uc = "STEP" THEN next_token + IF token.c = "(" THEN skip_parens 'Coordinates next_token ' , next_token 'Array name - if line_end then exit sub + IF line_end THEN EXIT SUB skip_parens 'Array index - if line_end then exit sub + IF line_end THEN EXIT SUB next_token ' , - if line_end then exit sub - if token.uc = "CLIP" then add_prefix - end if -end sub + IF line_end THEN EXIT SUB + IF token.uc = "CLIP" THEN add_prefix + END IF +END SUB -sub process_screenmove +SUB process_screenmove add_prefix next_token - if line_end then exit sub - if token.uc = "MIDDLE" then add_prefix -end sub + IF line_end THEN EXIT SUB + IF token.uc = "MIDDLE" THEN add_prefix +END SUB -sub process_option +SUB process_option next_token - if token.uc = "EXPLICITARRAY" then add_prefix -end sub + IF token.uc = "EXPLICITARRAY" THEN add_prefix +END SUB -sub process_fullscreen +SUB process_fullscreen add_prefix next_token - if line_end then exit sub - if token.c <> "," then + IF line_end THEN EXIT SUB + IF token.c <> "," THEN add_prefix next_token - if line_end then exit sub - end if + IF line_end THEN EXIT SUB + END IF next_token ' , add_prefix -end sub +END SUB -sub process_allowfullscreen +SUB process_allowfullscreen add_prefix next_token - if line_end then exit sub - if token.c <> "," then + IF line_end THEN EXIT SUB + IF token.c <> "," THEN add_prefix next_token - if line_end then exit sub - end if + IF line_end THEN EXIT SUB + END IF next_token ' , add_prefix -end sub +END SUB -sub process_resize +SUB process_resize add_prefix next_token - if token.c = "(" or line_end then exit sub - if token.c <> "," then next_token - if line_end then exit sub + IF token.c = "(" OR line_end THEN EXIT SUB + IF token.c <> "," THEN next_token + IF line_end THEN EXIT SUB next_token add_prefix -end sub +END SUB -sub process_glrender +SUB process_glrender add_prefix next_token add_prefix -end sub +END SUB -sub process_displayorder +SUB process_displayorder add_prefix next_token - while not line_end - if token.c <> "," then add_prefix + WHILE NOT line_end + IF token.c <> "," THEN add_prefix next_token - wend -end sub + WEND +END SUB -sub process_fps +SUB process_fps add_prefix next_token - if token.uc = "AUTO" then add_prefix -end sub + IF token.uc = "AUTO" THEN add_prefix +END SUB -sub process_clearcolor +SUB process_clearcolor add_prefix next_token - if token.uc = "NONE" then add_prefix -end sub + IF token.uc = "NONE" THEN add_prefix +END SUB -sub process_maptriangle +SUB process_maptriangle add_prefix next_token - if token.uc = "CLOCKWISE" or token.uc = "ANTICLOCKWISE" then add_prefix - if token.uc = "_CLOCKWISE" or token.uc = "_ANTICLOCKWISE" then next_token - if token.uc = "SEAMLESS" then add_prefix - if token.uc = "_SEAMLESS" then next_token - do + IF token.uc = "CLOCKWISE" OR token.uc = "ANTICLOCKWISE" THEN add_prefix + IF token.uc = "_CLOCKWISE" OR token.uc = "_ANTICLOCKWISE" THEN next_token + IF token.uc = "SEAMLESS" THEN add_prefix + IF token.uc = "_SEAMLESS" THEN next_token + DO maybe_add_prefix next_token - loop while token.uc <> "TO" + LOOP WHILE token.uc <> "TO" next_token skip_parens next_token ' - skip_parens next_token ' - skip_parens - if line_end then exit sub + IF line_end THEN EXIT SUB next_token ' , skip_expr - if line_end then exit sub + IF line_end THEN EXIT SUB next_token ' , add_prefix -end sub +END SUB -sub process_depthbuffer +SUB process_depthbuffer add_prefix next_token - if token.uc = "CLEAR" then add_prefix -end sub + IF token.uc = "CLEAR" THEN add_prefix +END SUB -sub process_shell +SUB process_shell next_token - if line_end then exit sub - if token.uc = "DONTWAIT" or token.uc = "HIDE" then + IF line_end THEN EXIT SUB + IF token.uc = "DONTWAIT" OR token.uc = "HIDE" THEN add_prefix next_token - end if - if line_end then exit sub - if token.uc = "DONTWAIT" or token.uc = "HIDE" then add_prefix -end sub + END IF + IF line_end THEN EXIT SUB + IF token.uc = "DONTWAIT" OR token.uc = "HIDE" THEN add_prefix +END SUB -sub process_keylock +SUB process_keylock add_prefix next_token - if token.uc = "TOGGLE" then add_prefix -end sub + IF token.uc = "TOGGLE" THEN add_prefix +END SUB -sub process_consolecursor +SUB process_consolecursor add_prefix next_token - if line_end then exit sub - if token.uc = "SHOW" or token.uc = "HIDE" then add_prefix -end sub - -sub skip_parens - dim balance - do - if token.c = "(" then balance = balance + 1 - if token.c = ")" then balance = balance - 1 + IF line_end THEN EXIT SUB + IF token.uc = "SHOW" OR token.uc = "HIDE" THEN add_prefix +END SUB + +SUB skip_parens + DIM balance + DO + IF token.c = "(" THEN balance = balance + 1 + IF token.c = ")" THEN balance = balance - 1 maybe_add_prefix next_token - loop until balance = 0 -end sub - -sub skip_expr - dim balance - do until balance <= 0 and (token.c = "," or line_end) - if token.c = "(" then balance = balance + 1 - if token.c = ")" then balance = balance - 1 + LOOP UNTIL balance = 0 +END SUB + +SUB skip_expr + DIM balance + DO UNTIL balance <= 0 AND (token.c = "," OR line_end) + IF token.c = "(" THEN balance = balance + 1 + IF token.c = ")" THEN balance = balance - 1 maybe_add_prefix next_token - loop -end sub + LOOP +END SUB -sub add_prefix - if asc(token.c) <> asc("_") then +SUB add_prefix + IF ASC(token.c) <> ASC("_") THEN token.c = "_" + token.c token.uc = "_" + token.uc - end if -end sub + END IF +END SUB -sub maybe_add_prefix - if noprefix_detected and token.t = TOK_WORD and asc(token.uc) <> asc("_") _andalso is_underscored(token.c) then add_prefix -end sub +SUB maybe_add_prefix + IF noprefix_detected AND token.t = TOK_WORD AND ASC(token.uc) <> ASC("_") _ANDALSO is_underscored(token.c) THEN add_prefix +END SUB -function line_end - select case token.t - case TOK_WORD +FUNCTION line_end + SELECT CASE token.t + CASE TOK_WORD line_end = (token.uc = "REM") - case TOK_COLON, TOK_COMMENT, TOK_NEWLINE + CASE TOK_COLON, TOK_COMMENT, TOK_NEWLINE line_end = TRUE - end select -end function + END SELECT +END FUNCTION -function is_underscored(s$) - dim i - for i = 1 to ubound(prefix_keywords$) - if token.uc = prefix_keywords$(i) then +FUNCTION is_underscored (s$) + DIM i + FOR i = 1 TO UBOUND(prefix_keywords$) + IF token.uc = prefix_keywords$(i) THEN is_underscored = TRUE - exit function - end if - next i -end function - -sub process_rest_of_line - dim i, base_word$ - do - select case token.t - case TOK_WORD - select case token.uc - case "REM" - tk_state = STATE_COMMENT - case "THEN" - exit sub - case else - if noprefix_detected and left$(token.uc, 3) = "NP_" then - base_word$ = make_base_word$(token.uc) - for i = 1 to ubound(prefix_colors$) - if base_word$ = prefix_colors$(i) then - token.c = mid$(token.c, 4) - token.uc = mid$(token.uc, 4) - exit for - end if - next i - exit select - end if - maybe_add_prefix - end select - case TOK_COLON - exit sub - case TOK_NEWLINE - line_count = line_count + 1 - column_count = 0 - exit sub - case TOK_EOF - put_out - exit sub - case else - end select + EXIT FUNCTION + END IF + NEXT i +END FUNCTION + +SUB process_rest_of_line + DIM i, base_word$ + DO + SELECT CASE token.t + CASE TOK_WORD + SELECT CASE token.uc + CASE "REM" + tk_state = STATE_COMMENT + CASE "THEN" + EXIT SUB + CASE ELSE + IF noprefix_detected AND LEFT$(token.uc, 3) = "NP_" THEN + base_word$ = make_base_word$(token.uc) + FOR i = 1 TO UBOUND(prefix_colors$) + IF base_word$ = prefix_colors$(i) THEN + token.c = MID$(token.c, 4) + token.uc = MID$(token.uc, 4) + EXIT FOR + END IF + NEXT i + EXIT SELECT + END IF + maybe_add_prefix + END SELECT + CASE TOK_COLON + EXIT SUB + CASE TOK_NEWLINE + line_count = line_count + 1 + column_count = 0 + EXIT SUB + CASE TOK_EOF + put_out + EXIT SUB + CASE ELSE + END SELECT next_token - loop -end sub - -sub put_out - put #2, , token.spaces - put #2, , token.c -end sub - -function make_base_word$(s$) - dim i - for i = 1 to len(s$) - select case asc(s$, i) - case asc("A") to asc("Z"), asc("a") to asc("z"), asc("0") to asc("9"), asc("_") - case else - exit for - end select - next i - make_base_word$ = left$(s$, i - 1) -end function - -sub next_token - if token.t > 0 then put_out + LOOP +END SUB + +SUB put_out + PUT #2, , token.spaces + PUT #2, , token.c +END SUB + +FUNCTION make_base_word$ (s$) + DIM i + FOR i = 1 TO LEN(s$) + SELECT CASE ASC(s$, i) + CASE ASC("A") TO ASC("Z"), ASC("a") TO ASC("z"), ASC("0") TO ASC("9"), ASC("_") + CASE ELSE + EXIT FOR + END SELECT + NEXT i + make_base_word$ = LEFT$(s$, i - 1) +END FUNCTION + +SUB next_token + IF token.t > 0 THEN put_out next_token_raw - while token.t = TOK_WORD and token.c = "_" + WHILE token.t = TOK_WORD AND token.c = "_" put_out next_token_raw - if token.t <> TOK_NEWLINE then exit sub + IF token.t <> TOK_NEWLINE THEN EXIT SUB line_count = line_count + 1 column_count = 0 put_out next_token_raw - wend -end sub + WEND +END SUB -sub next_token_raw - dim c, return_token, token_content$, spaces$, unread - do - c = asc(input_content$, next_chr_idx) +SUB next_token_raw + DIM c, return_token, token_content$, spaces$, unread + DO + c = ASC(input_content$, next_chr_idx) next_chr_idx = next_chr_idx + 1 column_count = column_count + 1 - select case tk_state - case STATE_BEGIN - select case c + SELECT CASE tk_state + CASE STATE_BEGIN + SELECT CASE c case asc("A") to asc("Z"), asc("a") to asc("z"), asc("_"), asc("0") to asc("9"), _ asc("&"), asc("."), asc("?") - tk_state = STATE_WORD - case asc("$") - tk_state = STATE_METACMD - case asc(":") - return_token = TOK_COLON + tk_state = STATE_WORD + CASE ASC("$") + tk_state = STATE_METACMD + CASE ASC(":") + return_token = TOK_COLON case asc("^"), asc("*"), asc("-"), asc("+"), asc("="), asc("\"), asc("#"), _ asc(";"), asc("<"), asc(">"), asc("/"), asc("("), asc(")"), asc(",") - return_token = TOK_PUNCTUATION - case ASCII_QUOTE - tk_state = STATE_STRING - case asc("'") - tk_state = STATE_COMMENT - case asc(" "), ASCII_TAB, ASCII_VTAB - spaces$ = spaces$ + chr$(c) - _continue - case ASCII_CR, ASCII_LF, ASCII_EOF - tk_state = STATE_NEWLINE - unread = TRUE - case else - 'Likely non-ascii special character - syntax_warning chr$(c) - tk_state = STATE_WORD - end select - case STATE_METACMD - select case c - case ASCII_CR, ASCII_LF, ASCII_EOF - tk_state = STATE_NEWLINE - return_token = TOK_METACMD - unread = TRUE - end select - case STATE_WORD - select case c + return_token = TOK_PUNCTUATION + CASE ASCII_QUOTE + tk_state = STATE_STRING + CASE ASC("'") + tk_state = STATE_COMMENT + CASE ASC(" "), ASCII_TAB, ASCII_VTAB + spaces$ = spaces$ + CHR$(c) + _CONTINUE + CASE ASCII_CR, ASCII_LF, ASCII_EOF + tk_state = STATE_NEWLINE + unread = TRUE + CASE ELSE + 'Likely non-ascii special character + syntax_warning CHR$(c) + tk_state = STATE_WORD + END SELECT + CASE STATE_METACMD + SELECT CASE c + CASE ASCII_CR, ASCII_LF, ASCII_EOF + tk_state = STATE_NEWLINE + return_token = TOK_METACMD + unread = TRUE + END SELECT + CASE STATE_WORD + SELECT CASE c case asc("A") to asc("Z"), asc("a") to asc("z"), asc("_"), asc("0") to asc("9"), _ asc("`"), asc("~"), asc("!"), asc("#"), asc("$"), asc("%"), asc("&"), asc("."), asc("?") - 'Continue - case else - tk_state = STATE_BEGIN - return_token = TOK_WORD - unread = TRUE - end select - case STATE_COMMENT - select case c - case ASCII_CR, ASCII_LF, ASCII_EOF - tk_state = STATE_NEWLINE - return_token = TOK_COMMENT - unread = TRUE - end select - case STATE_STRING - select case c - case ASCII_QUOTE - tk_state = STATE_BEGIN - return_token = TOK_STRING - case ASCII_CR, ASCII_LF, ASCII_EOF - tk_state = STATE_NEWLINE - return_token = TOK_STRING - unread = TRUE - end select - case STATE_DATA - select case c - case ASCII_CR, ASCII_LF, ASCII_EOF - tk_state = STATE_NEWLINE - return_token = TOK_DATA - unread = TRUE - end select - case STATE_NEWLINE - select case c - case ASCII_LF - tk_state = STATE_BEGIN - return_token = TOK_NEWLINE - case ASCII_CR - tk_state = STATE_NEWLINE_WIN - case ASCII_EOF - return_token = TOK_EOF - unread = TRUE 'Do not insert EOF character - case else - 'Should never happen - syntax_warning chr$(c) - tk_state = STATE_BEGIN - return_token = TOK_NEWLINE - unread = TRUE - end select - case STATE_NEWLINE_WIN - select case c - case ASCII_LF - tk_state = STATE_BEGIN - return_token = TOK_NEWLINE - case else - tk_state = STATE_BEGIN - return_token = TOK_NEWLINE - unread = TRUE - end select - end select - - if unread then + 'Continue + CASE ELSE + tk_state = STATE_BEGIN + return_token = TOK_WORD + unread = TRUE + END SELECT + CASE STATE_COMMENT + SELECT CASE c + CASE ASCII_CR, ASCII_LF, ASCII_EOF + tk_state = STATE_NEWLINE + return_token = TOK_COMMENT + unread = TRUE + END SELECT + CASE STATE_STRING + SELECT CASE c + CASE ASCII_QUOTE + tk_state = STATE_BEGIN + return_token = TOK_STRING + CASE ASCII_CR, ASCII_LF, ASCII_EOF + tk_state = STATE_NEWLINE + return_token = TOK_STRING + unread = TRUE + END SELECT + CASE STATE_DATA + SELECT CASE c + CASE ASCII_CR, ASCII_LF, ASCII_EOF + tk_state = STATE_NEWLINE + return_token = TOK_DATA + unread = TRUE + END SELECT + CASE STATE_NEWLINE + SELECT CASE c + CASE ASCII_LF + tk_state = STATE_BEGIN + return_token = TOK_NEWLINE + CASE ASCII_CR + tk_state = STATE_NEWLINE_WIN + CASE ASCII_EOF + return_token = TOK_EOF + unread = TRUE 'Do not insert EOF character + CASE ELSE + 'Should never happen + syntax_warning CHR$(c) + tk_state = STATE_BEGIN + return_token = TOK_NEWLINE + unread = TRUE + END SELECT + CASE STATE_NEWLINE_WIN + SELECT CASE c + CASE ASCII_LF + tk_state = STATE_BEGIN + return_token = TOK_NEWLINE + CASE ELSE + tk_state = STATE_BEGIN + return_token = TOK_NEWLINE + unread = TRUE + END SELECT + END SELECT + + IF unread THEN next_chr_idx = next_chr_idx - 1 unread = FALSE - else - token_content$ = token_content$ + chr$(c) - end if + ELSE + token_content$ = token_content$ + CHR$(c) + END IF - if return_token then + IF return_token THEN token.t = return_token token.c = token_content$ - token.uc = ucase$(token_content$) + token.uc = UCASE$(token_content$) token.spaces = spaces$ - exit function - end if - loop -end function + EXIT SUB + END IF + LOOP +END SUB -sub syntax_warning(unexpected$) - print "WARNING: Line"; line_count; "column"; column_count; - print "State"; tk_state; - print "Unexpected "; unexpected$ -end sub +SUB syntax_warning (unexpected$) + PRINT "WARNING: Line"; line_count; "column"; column_count; + PRINT "State"; tk_state; + PRINT "Unexpected "; unexpected$ +END SUB 'Get the directory component of a path -function dir_name$(path$) - dim s1, s2 - s1 = _instrrev(path$, "/") - s2 = _instrrev(path$, "\") - if s1 > s2 then - dir_name$ = left$(path$, s1 - 1) - elseif s2 > s1 then - dir_name$ = left$(path$, s2 - 1) - else +FUNCTION dir_name$ (path$) + DIM s1, s2 + s1 = _INSTRREV(path$, "/") + s2 = _INSTRREV(path$, "\") + IF s1 > s2 THEN + dir_name$ = LEFT$(path$, s1 - 1) + ELSEIF s2 > s1 THEN + dir_name$ = LEFT$(path$, s2 - 1) + ELSE dir_name$ = "." - end if -end function - -function is_absolute_path(path$) - if instr(_os$, "WIN") then - is_absolute_path = (mid$(path$, 2, 1) = ":" or left$(path$, 1) = "\" or left$(path$, 1) = "/") - else - is_absolute_path = left$(path$, 1) = "/" - end if -end function + END IF +END FUNCTION + +FUNCTION is_absolute_path (path$) + IF INSTR(_OS$, "WIN") THEN + is_absolute_path = (MID$(path$, 2, 1) = ":" OR LEFT$(path$, 1) = "\" OR LEFT$(path$, 1) = "/") + ELSE + is_absolute_path = LEFT$(path$, 1) = "/" + END IF +END FUNCTION + diff --git a/internal/support/converter/QB45BIN.bas b/internal/support/converter/QB45BIN.bas index 46e0e80b6..7fdc80eb8 100644 --- a/internal/support/converter/QB45BIN.bas +++ b/internal/support/converter/QB45BIN.bas @@ -3228,3 +3228,4 @@ FUNCTION ValidateStackTag (RuleID AS INTEGER, TagTxt AS STRING, OffsetSP AS INTE END FUNCTION + diff --git a/internal/support/vwatch/vwatch.bm b/internal/support/vwatch/vwatch.bm index 81fe279e9..8de05dbaa 100644 --- a/internal/support/vwatch/vwatch.bm +++ b/internal/support/vwatch/vwatch.bm @@ -879,3 +879,4 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET) END SELECT RETURN END SUB + diff --git a/internal/support/vwatch/vwatch_stub.bm b/internal/support/vwatch/vwatch_stub.bm index f78094759..86a1a07bb 100644 --- a/internal/support/vwatch/vwatch_stub.bm +++ b/internal/support/vwatch/vwatch_stub.bm @@ -1,2 +1,3 @@ SUB vwatch () END SUB + diff --git a/source/ide/config/cfg_methods.bas b/source/ide/config/cfg_methods.bas index 9279ac6e4..2a15278ea 100644 --- a/source/ide/config/cfg_methods.bas +++ b/source/ide/config/cfg_methods.bas @@ -53,7 +53,7 @@ SUB CopyFromOther END IF 'copying autosave & undo file(s) makes not much sense ELSE - IF _MESSAGEBOX("QB64-PE IDE", "No qb64pe executable found, so that seems not to be a QB64-PE installation, select another folder?", "yesno", "warning" ) = 1 GOTO cfoAgain + IF _MESSAGEBOX("QB64-PE IDE", "No qb64pe executable found, so that seems not to be a QB64-PE installation, select another folder?", "yesno", "warning") = 1 GOTO cfoAgain END IF END IF QB64_uptime# = TIMER(0.001) 'reinit to avoid startup resize events going wild diff --git a/source/ide/file_converters.bas b/source/ide/file_converters.bas index 5aebcc9a1..7bc7fb9f2 100644 --- a/source/ide/file_converters.bas +++ b/source/ide/file_converters.bas @@ -104,7 +104,7 @@ FUNCTION BinaryFormatCheck% (pathToCheck$, pathSepToCheck$, fileToCheck$) END SELECT END FUNCTION -FUNCTION OfferNoprefixConversion(file$) +FUNCTION OfferNoprefixConversion% (file$) what$ = ideyesnobox("$NOPREFIX", "This program uses the $NOPREFIX directive which is unsupported.\n\nQB64PE can automatically convert this file and any included files to\nremove $NOPREFIX. Backups of all files will be made.\n\nConvert this program?") IF what$ <> "Y" THEN EXIT FUNCTION @@ -130,7 +130,7 @@ FUNCTION OfferNoprefixConversion(file$) convertLine$ = convertUtility$ + " " + QuotedFilename$(file$) IF _SHELLHIDE(convertLine$) = 0 _ANDALSO OpenFile$(file$) <> "C" THEN - OfferNoprefixConversion = -1 + OfferNoprefixConversion% = -1 ELSE clearStatusWindow 0 dummy = DarkenFGBG(0) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 9f6a0d017..d7379393e 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -45,7 +45,7 @@ FUNCTION ide (ignore) GetInput 'check for new input IF iCHANGED = 0 AND mB = 0 THEN indented$ = apply_layout_indent$(idecompiledline$) - IF len(indented$) _ANDALSO idecompiledline$ <> indented$ THEN idesetline idecompiledline, indented$ + IF LEN(indented$) _ANDALSO idecompiledline$ <> indented$ THEN idesetline idecompiledline, indented$ idecompiledline = idecompiledline + 1 idecompiledline$ = idegetline(idecompiledline) @@ -62,17 +62,17 @@ FUNCTION ide (ignore) status.progress$ = STRING$(3 - LEN(status.progress$), 32) + status.progress$ + "%" END IF IdeInfo = CHR$(0) + status.progress$ - 'ELSE - ' STATIC p AS _BYTE, lastUpdateDots# - ' IF TIMER(0.001) - lastUpdateDots# > 0.5# THEN - ' lastUpdateDots# = TIMER(0.001) - ' p = p + 1 - ' temp$ = STRING$(3, 250) '"..." - ' IF p > 3 THEN p = 1 - ' ASC(temp$, p) = 254 - ' COLOR 7, 1 - ' _PRINTSTRING (2, idewy - 3), temp$ 'compilation progress indicator - ' END IF + 'ELSE + ' STATIC p AS _BYTE, lastUpdateDots# + ' IF TIMER(0.001) - lastUpdateDots# > 0.5# THEN + ' lastUpdateDots# = TIMER(0.001) + ' p = p + 1 + ' temp$ = STRING$(3, 250) '"..." + ' IF p > 3 THEN p = 1 + ' ASC(temp$, p) = 254 + ' COLOR 7, 1 + ' _PRINTSTRING (2, idewy - 3), temp$ 'compilation progress indicator + ' END IF END IF UpdateIdeInfo @@ -189,7 +189,7 @@ FUNCTION ide2 (ignore) COLOR 15, 1 IF os$ = "WIN" THEN - _PRINTSTRING (2, idewy - 3), "Creating .EXE file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." + _PRINTSTRING (2, idewy - 3), "Creating .EXE file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." ELSE _PRINTSTRING (2, idewy - 3), "Creating executable file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." END IF @@ -789,7 +789,7 @@ FUNCTION ide2 (ignore) skipdisplay = 0 IdeSystem = 1 retval = 1 - END IF + END IF GOSUB redrawItAll idecompiling = 0 @@ -799,7 +799,7 @@ FUNCTION ide2 (ignore) DebugMode ExitDebugMode: IF WatchListToConsole THEN _CONSOLE OFF - UpdateMenuHelpLine "" + UpdateMenuHelpLine "" SELECT CASE IdeDebugMode CASE 1 'clean exit IdeDebugMode = 0 @@ -831,7 +831,7 @@ FUNCTION ide2 (ignore) END IF IF c$ = CHR$(13) THEN - IF ideFirstCompileFromDisk _ANDALSO OfferNoprefixConversion(idepath$ + idepathsep$ + ideprogname$) THEN + IF ideFirstCompileFromDisk _ANDALSO OfferNoprefixConversion%(idepath$ + idepathsep$ + ideprogname$) THEN IF ideerror > 1 THEN GOTO IDEerrorMessage 'A new compilation will be triggered ideunsaved = -1: idechangemade = 1: idelayoutallow = 2: ideundobase = 0: QuickNavTotal = 0: ModifyCOMMAND$ = "": idefocusline = 0: startPausedPending = 0 @@ -970,7 +970,7 @@ FUNCTION ide2 (ignore) _PALETTECOLOR 1, IDEBackgroundColor, 0 _PALETTECOLOR 2, _RGB32(84, 84, 84), 0 'dark gray - help system and interface details - _PALETTECOLOR 4, IDEErrorColor,0 + _PALETTECOLOR 4, IDEErrorColor, 0 _PALETTECOLOR 5, IDEBracketHighlightColor, 0 _PALETTECOLOR 6, IDEBackgroundColor2, 0 _PALETTECOLOR 7, IDEChromaColor, 0 @@ -1101,7 +1101,7 @@ FUNCTION ide2 (ignore) IF MID$(temp$, i, 1) = sp$ THEN MID$(temp$, i, 1) = " " NEXT temp$ = _TRIM$(temp$) - IF UCASE$(LEFT$(temp$,10)) = "SUB VWATCH" THEN temp$ = "End of Program" + IF UCASE$(LEFT$(temp$, 10)) = "SUB VWATCH" THEN temp$ = "End of Program" IF LEN(temp$) THEN y = y + 1: x = 1 temp$ = "Caused by (or after): " + CHR$(1) + temp$ @@ -1521,7 +1521,7 @@ FUNCTION ide2 (ignore) END IF END IF - IF mY = idewy + idesubwindow AND mX >= idewx - 20 AND mX =< idewx THEN + IF mY = idewy + idesubwindow AND mX >= idewx - 20 AND mX <= idewx THEN 'Highlight line number IF LineNumberHover = 0 THEN COLOR 13, 6 @@ -1778,7 +1778,7 @@ FUNCTION ide2 (ignore) nul& = SeekBuf&(ExtDepBuf, -32 - LEN(BufEolSeq$(ExtDepBuf)), SBM_BufCurrent) edCHG = -1: DeleteBufLine ExtDepBuf 'old hash ELSE - _CONTINUE + _CONTINUE END IF END IF WriteBufLine ExtDepBuf, edMD5$ 'new hash @@ -2724,7 +2724,7 @@ FUNCTION ide2 (ignore) Help_Back(Help_Back_Pos).cx = Help_cx Help_Back(Help_Back_Pos).cy = Help_cy - top = UBOUND(back$) + top = UBOUND(Back$) IF Help_Back_Pos < top THEN IF Back$(Help_Back_Pos + 1) = l$ THEN @@ -2835,7 +2835,7 @@ FUNCTION ide2 (ignore) Help_Back(Help_Back_Pos).cx = Help_cx Help_Back(Help_Back_Pos).cy = Help_cy - top = UBOUND(back$) + top = UBOUND(Back$) IF Back$(Help_Back_Pos) = lnk$ THEN Help_Back_Pos = Help_Back_Pos - 1: GOTO usenextentry2 @@ -2885,7 +2885,7 @@ FUNCTION ide2 (ignore) IdeSystem = 3 END IF - GOSUB redrawitall + GOSUB redrawItAll IF Help_LinkL THEN norep = 1: GOTO searchnext ELSE @@ -2936,7 +2936,7 @@ FUNCTION ide2 (ignore) ELSE n$ = a$ args$ = "" - cleanSubName n$ + cleanSubName n$ END IF backupn$ = n$ @@ -3135,7 +3135,7 @@ FUNCTION ide2 (ignore) _PRINTSTRING (2, idewy - 3), STRING$(3, 250) '"..." menu$(1, FileMenuExportAs) = "~#Export As... " + CHR$(16) ELSE - _PRINTSTRING (2, idewy - 3), "OK" 'report OK status + _PRINTSTRING (2, idewy - 3), "OK" 'report OK status IF IDEAutoLayout <> 0 THEN menu$(1, FileMenuExportAs) = "#Export As... " + CHR$(16) statusarealink = 0 IF totalWarnings > 0 THEN @@ -3200,7 +3200,7 @@ FUNCTION ide2 (ignore) IF AutoAddDebugCommand <> 0 OR vWatchOn <> 0 THEN ideselect = 0 idecytemp = mY - 2 + idesy - 1 - IF idecytemp =< iden THEN + IF idecytemp <= iden THEN idecy = idecytemp IF _KEYDOWN(100304) OR _KEYDOWN(100303) THEN GOTO toggleSkipLine @@ -3477,7 +3477,7 @@ FUNCTION ide2 (ignore) ProposedTitle$ = FindProposedTitle$ IF ProposedTitle$ = "" THEN ProposedTitle$ = "untitled" + tempfolderindexstr$ IF UseGuiDialogs THEN - a$ = Savefile$(ProposedTitle$ + ".bas") + a$ = SaveFile$(ProposedTitle$ + ".bas") ELSE a$ = idefiledialog$(ProposedTitle$ + ".bas", 2) END IF @@ -5534,7 +5534,7 @@ FUNCTION ide2 (ignore) retval$ = ideinputbox$("Math Evaluator", "#Enter expression", mathEvalExpr$, "", 60, 0, 0) result = 0 IF LEN(retval$) THEN - Dim num As ParseNum + DIM num AS ParseNum mathEvalExpr$ = retval$ retval$ = lineformat(retval$) @@ -6427,8 +6427,8 @@ FUNCTION ide2 (ignore) IF ideprogname = "" THEN ProposedTitle$ = FindProposedTitle$ IF ProposedTitle$ = "" THEN ProposedTitle$ = "untitled" + tempfolderindexstr$ - IF UseGuiDialogs Then - a$ = Savefile$ (ProposedTitle$ + ".bas") + IF UseGuiDialogs THEN + a$ = SaveFile$(ProposedTitle$ + ".bas") ELSE a$ = idefiledialog$(ProposedTitle$ + ".bas", 2) END IF @@ -6441,7 +6441,7 @@ FUNCTION ide2 (ignore) END IF '"Y" END IF 'unsaved IF UseGuiDialogs THEN - r$ = OpenFile$ (IdeOpenFile$) 'for new dialog file open routine. + r$ = OpenFile$(IdeOpenFile$) 'for new dialog file open routine. ELSE r$ = idefiledialog$("", 1) 'for old dialog file open routine. END IF @@ -6456,8 +6456,8 @@ FUNCTION ide2 (ignore) IF ideprogname = "" THEN ProposedTitle$ = FindProposedTitle$ IF ProposedTitle$ = "" THEN ProposedTitle$ = "untitled" + tempfolderindexstr$ - IF UseGuiDialogs Then - a$ = Savefile$ (ProposedTitle$ + ".bas") + IF UseGuiDialogs THEN + a$ = SaveFile$(ProposedTitle$ + ".bas") ELSE a$ = idefiledialog$(ProposedTitle$ + ".bas", 2) END IF @@ -6473,14 +6473,14 @@ FUNCTION ide2 (ignore) IF ideprogname = "" THEN ProposedTitle$ = FindProposedTitle$ IF ProposedTitle$ = "" THEN ProposedTitle$ = "untitled" + tempfolderindexstr$ - IF UseGuiDialogs Then - a$ = Savefile$ (ProposedTitle$ + ".bas") + IF UseGuiDialogs THEN + a$ = SaveFile$(ProposedTitle$ + ".bas") ELSE a$ = idefiledialog$(ProposedTitle$ + ".bas", 2) END IF ELSE - IF UseGuiDialogs Then - a$ = Savefile$ (ideprogname$) + IF UseGuiDialogs THEN + a$ = SaveFile$(ideprogname$) ELSE a$ = idefiledialog$(ideprogname$, 2) END IF @@ -6674,7 +6674,7 @@ FUNCTION ide2 (ignore) HelpAreaShowBackLinks: Back_Str$ = STRING$(1000, 0) Back_Str_I$ = STRING$(4000, 0) - top = UBOUND(back$) + top = UBOUND(Back$) FOR x = 1 TO top n$ = Back_Name$(x) IF x = Help_Back_Pos THEN p = LEN(Back_Str$) @@ -6770,23 +6770,23 @@ SUB DebugMode END TYPE DIM Button(1 TO 8) AS ui i = 0 - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" - i = i + 1: Button(i).Caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" + i = i + 1: Button(i).caption = "" y = (idewy - 4) + 2 x = 2 FOR i = 1 TO UBOUND(Button) Button(i).x = x Button(i).y = y - Button(i).w = LEN(Button(i).Caption) + Button(i).w = LEN(Button(i).caption) IF i < UBOUND(Button) THEN x = x + Button(i).w + 1 - IF x + LEN(Button(i + 1).Caption) > idewx - 1 THEN + IF x + LEN(Button(i + 1).caption) > idewx - 1 THEN y = y + 1 x = 2 END IF @@ -8053,7 +8053,7 @@ SUB DebugMode CASE "_FLOAT", "FLOAT": recvData$ = STR$(_CV(_FLOAT, recvData$)) CASE "_OFFSET", "OFFSET": recvData$ = STR$(_CV(_OFFSET, recvData$)) CASE "_UNSIGNED _OFFSET", "UNSIGNED OFFSET": recvData$ = STR$(_CV(_UNSIGNED _OFFSET, recvData$)) - 'CASE "STRING": 'no conversion required + 'CASE "STRING": 'no conversion required END SELECT vWatchReceivedData$(tempStorage&) = recvData$ IF PauseMode THEN GOSUB UpdateDisplay @@ -8204,7 +8204,7 @@ SUB DebugMode COLOR 13, 1 temp$ = " " END IF - _PRINTSTRING (Button(i).x, Button(i).y), Button(i).Caption + temp$ + _PRINTSTRING (Button(i).x, Button(i).y), Button(i).caption + temp$ NEXT PCOPY 3, 0 RETURN @@ -8272,11 +8272,11 @@ SUB DebugMode RETURN END SUB -Function map! (value!, minRange!, maxRange!, newMinRange!, newMaxRange!) +FUNCTION map! (value!, minRange!, maxRange!, newMinRange!, newMaxRange!) map! = ((value! - minRange!) / (maxRange! - minRange!)) * (newMaxRange! - newMinRange!) + newMinRange! -End Function +END FUNCTION -SUB showvWatchPanel (this AS vWatchPanelType, currentScope$, action as _BYTE) +SUB showvWatchPanel (this AS vWatchPanelType, currentScope$, action AS _BYTE) STATIC previousVariableWatchList$ STATIC longestVarName, totalVisibleVariables @@ -8529,7 +8529,7 @@ FUNCTION multiSearch (__fullText$, __searchString$) END IF END FUNCTION -FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction) +FUNCTION idevariablewatchbox$ (currentScope$, filter$, selectVar, returnAction) '-------- generic dialog box header -------- PCOPY 0, 2 @@ -9760,7 +9760,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction) RETURN END FUNCTION -FUNCTION ideelementwatchbox$(currentPath$, elementIndexes$, level, singleElementSelection, ok) +FUNCTION ideelementwatchbox$ (currentPath$, elementIndexes$, level, singleElementSelection, ok) '-------- generic dialog box header -------- PCOPY 4, 0 @@ -10122,7 +10122,7 @@ FUNCTION ideelementwatchbox$(currentPath$, elementIndexes$, level, singleElement RETURN END FUNCTION -FUNCTION formatRange$(__text$) +FUNCTION formatRange$ (__text$) '__text$ is a series of MKL$(values) concatenated temp$ = __text$ v1 = -1 @@ -10182,7 +10182,7 @@ FUNCTION expandArray$ (__indexes$, __path$) END IF END FUNCTION -FUNCTION parseRange$(__text$) +FUNCTION parseRange$ (__text$) '__text$ must contain a valid numeric string (####), 'a valid interval (####-####) or comma-separated values. 'Only positive values >= 0 considered. @@ -10396,7 +10396,7 @@ FUNCTION idecallstackbox _CONTINUE END IF - IF (focus = 1 AND K$ = CHR$(13)) OR (focus = 2 AND info <> 0)THEN + IF (focus = 1 AND K$ = CHR$(13)) OR (focus = 2 AND info <> 0) THEN setIDEcy: y = ABS(o(1).sel) IF y >= 1 AND y <= callStackLength THEN @@ -11306,7 +11306,7 @@ SUB idedrawpar (p AS idedbptype) END IF END SUB -FUNCTION idefileexists$(f$) +FUNCTION idefileexists$ (f$) l = LEN(f$) DO IF l < LEN(f$) THEN @@ -11873,7 +11873,7 @@ SUB ideinsline (i, text$) iden = iden + 1 END SUB -FUNCTION ideinputbox$(title$, caption$, initialvalue$, validinput$, boxwidth, maxlength, ok) +FUNCTION ideinputbox$ (title$, caption$, initialvalue$, validinput$, boxwidth, maxlength, ok) '-------- generic dialog box header -------- @@ -12059,20 +12059,20 @@ SUB idenewsf (sf AS STRING) END IF END SUB -FUNCTION idenewfolder$(thispath$) +FUNCTION idenewfolder$ (thispath$) newfolder$ = ideinputbox$("New Folder", "#Name", "", "", 60, 0, 0) IF LEN(newfolder$) THEN IF _DIREXISTS(thispath$ + idepathsep$ + newfolder$) THEN idenewfolder$ = newfolder$ - EXIT SUB + EXIT FUNCTION END IF ideerror = 5 MKDIR thispath$ + idepathsep$ + newfolder$ ideerror = 1 idenewfolder$ = newfolder$ END IF -END SUB +END FUNCTION FUNCTION idenewtxt (a$) @@ -12097,7 +12097,7 @@ SUB idenomatch (showFlags AS _BYTE) result = idemessagebox("Search complete", msg$, "") END SUB -FUNCTION idefiledialog$(programname$, mode AS _BYTE) +FUNCTION idefiledialog$ (programname$, mode AS _BYTE) STATIC AllFiles '-------- generic dialog box header -------- @@ -12535,7 +12535,7 @@ SUB idesave (f$) ideerror = 1 IF INSTR(_OS$, "WIN") THEN LineEnding$ = CHR$(13) + CHR$(10) ELSE LineEnding$ = CHR$(10) FOR i = 1 TO iden - outfile$ = idegetline(i) + LineEnding$ + outfile$ = idegetline(i) + LineEnding$ PUT #151, , outfile$ NEXT CLOSE #151 @@ -12574,7 +12574,7 @@ SUB ideshowtext IF ideshowtextBypassColorRestore = 0 THEN _PALETTECOLOR 1, IDEBackgroundColor, 0 _PALETTECOLOR 2, _RGB32(84, 84, 84), 0 'dark gray - help system and interface details - _PALETTECOLOR 4, IDEErrorColor,0 + _PALETTECOLOR 4, IDEErrorColor, 0 _PALETTECOLOR 5, IDEBracketHighlightColor, 0 _PALETTECOLOR 6, IDEBackgroundColor2, 0 _PALETTECOLOR 7, IDEChromaColor, 0 @@ -12756,8 +12756,8 @@ SUB ideshowtext END IF IF l <= iden THEN - DO UNTIL l < UBOUND(InValidLine) 'make certain we have enough InValidLine elements to cover us in case someone scrolls QB64 - REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BYTE ' to the end of a program before the IDE has finished + DO UNTIL l < UBOUND(InvalidLine) 'make certain we have enough InValidLine elements to cover us in case someone scrolls QB64 + REDIM _PRESERVE InvalidLine(UBOUND(InvalidLine) + 1000) AS _BYTE ' to the end of a program before the IDE has finished LOOP ' verifying the code and growing the array during the IDE passes. a$ = idegetline(l) @@ -12926,7 +12926,7 @@ SUB ideshowtext COLOR 13 - IF InValidLine(l) THEN COLOR 7: GOTO SkipSyntaxHighlighter + IF InvalidLine(l) THEN COLOR 7: GOTO SkipSyntaxHighlighter IF (LEN(oldChar$) > 0 OR m = 1) AND inquote = 0 AND isKeyword = 0 THEN IF INSTR(initialNum.char$, thisChar$) > 0 AND oldChar$ <> ")" AND (INSTR(char.sep$, oldChar$) > 0 OR oldChar$ = "?") THEN @@ -14904,21 +14904,21 @@ END FUNCTION FUNCTION idezgetroot$ 'note: does NOT including a trailing / or \ on the right - IF os$ = "WIN" THEN - SHELL _HIDE "cd >.\internal\temp\root.txt" - OPEN ".\internal\temp\root.txt" FOR INPUT AS #150 - LINE INPUT #150, a$ - idezgetroot$ = a$ - CLOSE #150 - EXIT FUNCTION - ELSE - SHELL _HIDE "pwd >./internal/temp/root.txt" - OPEN "./internal/temp/root.txt" FOR INPUT AS #150 - LINE INPUT #150, a$ - idezgetroot$ = a$ - CLOSE #150 - EXIT FUNCTION - END IF + IF os$ = "WIN" THEN + SHELL _HIDE "cd >.\internal\temp\root.txt" + OPEN ".\internal\temp\root.txt" FOR INPUT AS #150 + LINE INPUT #150, a$ + idezgetroot$ = a$ + CLOSE #150 + EXIT FUNCTION + ELSE + SHELL _HIDE "pwd >./internal/temp/root.txt" + OPEN "./internal/temp/root.txt" FOR INPUT AS #150 + LINE INPUT #150, a$ + idezgetroot$ = a$ + CLOSE #150 + EXIT FUNCTION + END IF END FUNCTION @@ -15546,7 +15546,7 @@ SUB ideSetTCPPortBox WriteConfigSetting debugSettingsSection$, "BaseTCPPort", str2$(idebaseTcpPort) END SUB -FUNCTION idegetlinenumberbox(title$, initialValue&) +FUNCTION idegetlinenumberbox (title$, initialValue&) a2$ = str2$(initialValue&) IF a2$ = "0" THEN a2$ = "" v$ = ideinputbox$(title$, "#Line", a2$, "0123456789", 30, 8, 0) @@ -16845,7 +16845,7 @@ FUNCTION idechoosecolorsbox _PALETTECOLOR 1, IDEBackgroundColor, 0 _PALETTECOLOR 2, _RGB32(84, 84, 84), 0 'dark gray - help system and interface details - _PALETTECOLOR 4, IDEErrorColor,0 + _PALETTECOLOR 4, IDEErrorColor, 0 _PALETTECOLOR 6, IDEBackgroundColor2, 0 _PALETTECOLOR 7, IDEChromaColor, 0 _PALETTECOLOR 8, IDENumbersColor, 0 @@ -17407,7 +17407,7 @@ FUNCTION idechoosecolorsbox END FUNCTION -FUNCTION GetCurrentColor~&(Selection AS INTEGER) +FUNCTION GetCurrentColor~& (Selection AS INTEGER) SELECT CASE Selection CASE 1: GetCurrentColor = IDETextColor CASE 2: GetCurrentColor = IDEKeywordColor @@ -18054,7 +18054,7 @@ END SUB SUB Help_ShowText STATIC setup - IF setup = 0 AND UBOUND(back$) = 1 THEN + IF setup = 0 AND UBOUND(Back$) = 1 THEN setup = 1 IF IdeContextHelpSF = 0 THEN a$ = Wiki$(Back$(1)) @@ -18172,7 +18172,7 @@ FUNCTION idesearchedbox$ p.x = idewx - 24 p.y = idewy - 6 - h IF p.y < 3 THEN - p.h = p.h - abs(3 - p.y) + p.h = p.h - ABS(3 - p.y) h = p.h p.y = 3 END IF @@ -19063,11 +19063,11 @@ SUB RetrieveSearchHistory (shArr$()) IF GetBufLen&(bh%) THEN REDIM shArr$(1 TO ideMaxSearch): lc% = 0 WHILE EndOfBuf%(bh%) = 0 AND lc% < ideMaxSearch - lc% = lc% + 1: shArr$(lc%) = ReadBufLine$(bh%) + lc% = lc% + 1: shArr$(lc%) = ReadBufLine$(bh%) WEND REDIM _PRESERVE shArr$(1 TO lc%) ELSE - REDIM shArr$(1 TO 1): shArr$(1) = "" + REDIM shArr$(1 TO 1): shArr$(1) = "" END IF DisposeBuf bh% END SUB @@ -19155,7 +19155,7 @@ FUNCTION ideupdatehelpbox CASE 4 FullMessage$(2) = "Building download queue..." CASE 5 - FullMessage$(1) = "Updating help content file " + str2$(n) + "/" + str2$(c) +"..." + FullMessage$(1) = "Updating help content file " + str2$(n) + "/" + str2$(c) + "..." END SELECT FOR i = 1 TO MessageLines @@ -19349,7 +19349,7 @@ FUNCTION ideupdatehelpbox LOOP END FUNCTION -FUNCTION ideASCIIbox$(relaunch) +FUNCTION ideASCIIbox$ (relaunch) '-------- generic dialog box header -------- PCOPY 0, 2 @@ -19441,7 +19441,7 @@ FUNCTION ideASCIIbox$(relaunch) IF mCLICK THEN Selected = i focus = 1 - IF timeElapsedSince#(lastClick#) <= 0.3# and lastClickOn = i THEN + IF timeElapsedSince#(lastClick#) <= 0.3# AND lastClickOn = i THEN 'double click on chart relaunch = -1 GOTO insertChar @@ -19938,9 +19938,9 @@ FUNCTION DarkenFGBG (Action AS _BYTE) TempDarkerIDEChromaColor~& = _RGB32(_RED32(IDEChromaColor) * .5, _GREEN32(IDEChromaColor) * .5, _BLUE32(IDEChromaColor) * .5) TempDarkerMetaColor~& = _RGB32(_RED32(IDEMetaCommandColor) * .5, _GREEN32(IDEMetaCommandColor) * .5, _BLUE32(IDEMetaCommandColor) * .5) TempDarkerQuoteColor~& = _RGB32(_RED32(IDEQuoteColor) * .5, _GREEN32(IDEQuoteColor) * .5, _BLUE32(IDEQuoteColor) * .5) - TempDarkerErrorColor~& = _RGB32(_RED32(IDEErrorColor) * .5, _GREEN32(IDEErrroColor) * .5, _BLUE32(IDEErrorColor) * .5) + TempDarkerErrorColor~& = _RGB32(_RED32(IDEErrorColor) * .5, _GREEN32(IDEErrroColor) * .5, _BLUE32(IDEErrorColor) * .5) _PALETTECOLOR 1, TempDarkerBGColor~&, 0 - _PALETTECOLOR 4, TempDarkerErrorColor~&,0 + _PALETTECOLOR 4, TempDarkerErrorColor~&, 0 _PALETTECOLOR 5, TempDarkerBGColor~&, 0 _PALETTECOLOR 6, TempDarkerBG2Color~&, 0 _PALETTECOLOR 7, TempDarkerIDEChromaColor~&, 0 @@ -19952,7 +19952,7 @@ FUNCTION DarkenFGBG (Action AS _BYTE) _PALETTECOLOR 14, TempDarkerQuoteColor~&, 0 ELSE _PALETTECOLOR 1, IDEBackgroundColor, 0 - _PALETTECOLOR 4, IDEErrorColor,0 + _PALETTECOLOR 4, IDEErrorColor, 0 _PALETTECOLOR 5, IDEBracketHighlightColor, 0 _PALETTECOLOR 6, IDEBackgroundColor2, 0 _PALETTECOLOR 7, IDEChromaColor, 0 @@ -19965,7 +19965,7 @@ FUNCTION DarkenFGBG (Action AS _BYTE) END IF DarkenFGBG = 0 -END SUB +END FUNCTION SUB HideBracketHighlight 'Restore the screen and hide any bracket highlights @@ -20079,7 +20079,7 @@ SUB cleanSubName (n$) x = INSTR(n$, " "): IF x THEN n$ = LEFT$(n$, x - 1) END SUB -SUB clearStatusWindow(whichLine) +SUB clearStatusWindow (whichLine) COLOR 7, 1 IF whichLine = 0 THEN FOR whichLine = 1 TO 3 @@ -20090,7 +20090,7 @@ SUB clearStatusWindow(whichLine) END IF END SUB -SUB setStatusMessage(row, text$, fg) +SUB setStatusMessage (row, text$, fg) COLOR fg _PRINTSTRING (2, (idewy - 4) + row), text$ PCOPY 3, 0 @@ -20137,7 +20137,7 @@ FUNCTION getWordAtCursor$ END IF END FUNCTION -FUNCTION getSelectedText$(multiline AS _BYTE) +FUNCTION getSelectedText$ (multiline AS _BYTE) IF ideselect THEN sy1 = ideselecty1 sy2 = idecy @@ -20210,7 +20210,7 @@ SUB insertAtCursor (tempk$) startPausedPending = 0 END SUB -FUNCTION findHelpTopic$(topic$, lnks, firstOnly AS _BYTE) +FUNCTION findHelpTopic$ (topic$, lnks, firstOnly AS _BYTE) 'check if topic$ is in help links ' - returns a list of help links separated by CHR$(0) ' - returns the total number of links found by changing 'lnks' @@ -20388,7 +20388,7 @@ SUB printWrapStatus (x AS INTEGER, y AS INTEGER, initialX AS INTEGER, __text$) RETURN END SUB -FUNCTION GetBytes$(__value$, numberOfBytes&) +FUNCTION GetBytes$ (__value$, numberOfBytes&) STATIC previousValue$, getBytesPosition& value$ = __value$ @@ -21198,4 +21198,4 @@ FUNCTION AnsiTextToUtf8Text$ (text$) AnsiTextToUtf8Text$ = utf$ END FUNCTION -'$INCLUDE: 'file_converters.bas' \ No newline at end of file +'$INCLUDE: 'file_converters.bas' diff --git a/source/ide/wiki/wiki_methods.bas b/source/ide/wiki/wiki_methods.bas index 2e2a777ae..2a6cc0acd 100644 --- a/source/ide/wiki/wiki_methods.bas +++ b/source/ide/wiki/wiki_methods.bas @@ -1158,8 +1158,8 @@ FUNCTION wikiDLPage$ (url$, timeout#) IF ch& = 0 AND LCASE$(LEFT$(wik$, 8)) = "https://" THEN IF _SHELLHIDE("curl --version >NUL") <> 0 THEN 'no external curl available (see notes below) - IF _MESSAGEBOX("QB64-PE Help", "Can't make secure connection (https:) to Wiki, shall the IDE use unsecure (http:) instead?", "yesno", "warning" ) = 1 THEN - IF _MESSAGEBOX("QB64-PE Help", "Do you wanna save your choice permanently for the future?", "yesno", "question" ) = 1 THEN + IF _MESSAGEBOX("QB64-PE Help", "Can't make secure connection (https:) to Wiki, shall the IDE use unsecure (http:) instead?", "yesno", "warning") = 1 THEN + IF _MESSAGEBOX("QB64-PE Help", "Do you wanna save your choice permanently for the future?", "yesno", "question") = 1 THEN wikiBaseAddress$ = "http://" + MID$(wikiBaseAddress$, 9) WriteConfigSetting generalSettingsSection$, "WikiBaseAddress", wikiBaseAddress$ END IF diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 723a62fb3..559c07d83 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -1,4112 +1,4119 @@ - -'special codes: - -'-1 Any numeric variable (will be made explicit by a C cast) -' Typically, these are used when multiple C functions exist - -'-2 Offset+Size(in bytes) -' Size is the largest safe memory block available from the offset -' used for: CALL INTERRUPT[X] - -'-3 Offset+Size(in bytes) -' Size is the largest safe memory block available from the offset -' *Like -2, but restrictions apply -' used for: GET/PUT(graphics) - -'-4 Offset+Size(in bytes) -' Size is the size of the element referenced -' used for: GET/PUT(file) -' -5 Offset only -' -6 Size only - -'-7 '_MEM' structure referring to the passed variable - -'special return codes: -'none - -'stubs for internally handled commands: -clearid -id.n = "Asc": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Asc": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "End": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "LSet": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "RSet": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Mid": id.subfunc = 2: id.callname = "sub_stub": id.musthave = "$": regid -clearid -id.n = "Print": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Option": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Swap": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "System": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Write": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Read": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Close": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Reset": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Input": id.subfunc = 2: id.callname = "sub_stub": regid -'stubs for unimplemented commands: -clearid -id.n = "TrOn": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "TrOff": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "List": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "Def": id.subfunc = 2: id.callname = "sub_stub": id.secondargcantbe = "SEG": regid -clearid -id.n = "IoCtl": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "IoCtl": id.subfunc = 1: id.callname = "func_stub": id.musthave = "$": id.args = 1: id.arg = MKL$(LONGTYPE - ISPOINTER): id.ret = STRINGTYPE - ISPOINTER: regid -clearid -id.n = "Fre": id.subfunc = 1: id.callname = "func_stub": id.args = 1: id.arg = MKL$(LONGTYPE - ISPOINTER): id.ret = LONGTYPE - ISPOINTER: regid -clearid -id.n = "SetMem": id.subfunc = 1: id.callname = "func_stub": id.args = 1: id.arg = MKL$(LONGTYPE - ISPOINTER): id.ret = LONGTYPE - ISPOINTER: regid -clearid -id.n = "FileAttr": id.subfunc = 1: id.callname = "func_stub": id.args = 2: id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER): id.ret = LONGTYPE - ISPOINTER: regid -clearid -id.n = "_MemGet": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "_MemPut": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "_MemFill": id.subfunc = 2: id.callname = "sub_stub": regid -clearid -id.n = "_Continue": id.subfunc = 2: id.callname = "sub_stub": regid - - -clearid -id.n = "_Resize" -id.subfunc = 2 -id.callname = "sub__resize" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{On|Off}][,{_Stretch|_Smooth}]" -id.hr_syntax = "_RESIZE [{ON|OFF}][, {_STRETCH|_SMOOTH}]" -regid - -clearid -id.n = "_Resize" -id.subfunc = 1 -id.callname = "func__resize" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_RESIZE" -regid - -clearid -id.n = "_ResizeWidth" -id.subfunc = 1 -id.callname = "func__resizewidth" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_RESIZEWIDTH" -regid - -clearid -id.n = "_ResizeHeight" -id.subfunc = 1 -id.callname = "func__resizeheight" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_RESIZEHEIGHT" -regid - -clearid -id.n = "_ScaledWidth" -id.subfunc = 1 -id.callname = "func__scaledwidth" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCALEDWIDTH" -regid - -clearid -id.n = "_ScaledHeight" -id.subfunc = 1 -id.callname = "func__scaledheight" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCALEDHEIGHT" -regid - - -clearid -id.n = "_GLRender" -id.subfunc = 2 -id.callname = "sub__glrender" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{_Behind|_OnTop|_Only}" -id.hr_syntax = "_GLRENDER {_Behind|_OnTop|_Only}" -regid - -clearid -id.n = "_DisplayOrder" -id.subfunc = 2 -id.callname = "sub__displayorder" -id.args = 4 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_Software|_Hardware|_Hardware1|_GLRender}[,{_Software|_Hardware|_Hardware1|_GLRender}[,{_Software|_Hardware|_Hardware1|_GLRender}[,{_Software|_Hardware|_Hardware1|_GLRender}]]]]" -id.hr_syntax = "_DISPLAYORDER {_Software|_Hardware|_Hardware1|_GLRender} (any combination/order)" -regid - -clearid -id.n = "_MemGet" -id.subfunc = 1 -id.callname = "func__memget" -id.args = 3 -id.arg = MKL$(UDTTYPE + (1)) + MKL$(OFFSETTYPE - ISPOINTER) + MKL$(-1) 'x = _MEMGET(block, offset, type) -id.ret = -1 -id.hr_syntax = "_MEMGET(block, offset, type)" -regid - -clearid -id.n = "_Mem" -id.subfunc = 1 -id.callname = "func__mem" -'id.args = 1 -'id.arg = MKL$(-7) -id.args = 2 -id.arg = MKL$(OFFSETTYPE - ISPOINTER) + MKL$(OFFSETTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined -id.hr_syntax = "_MEM(referenceVariable) or _MEM(offset, byteSize)" -regid -'---special case--- - -clearid -id.n = "_MemElement" -id.subfunc = 1 -id.callname = "func__mem" -id.args = 1 -id.arg = MKL$(-8) -id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined -id.hr_syntax = "_MEMELEMENT(referenceVariable)" -regid -'---special case--- - - - -clearid -id.n = "_MemFree" -id.subfunc = 2 -id.callname = "sub__memfree" -id.args = 1 -id.arg = MKL$(UDTTYPE + (1)) -id.hr_syntax = "_MEMFREE memoryVariable" -regid - -clearid -id.n = "_MemExists" -id.subfunc = 1 -id.callname = "func__memexists" -id.args = 1 -id.arg = MKL$(UDTTYPE + (1)) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_MEMEXISTS(memBlock)" -regid - -clearid -id.n = "_MemNew" -id.subfunc = 1 -id.callname = "func__memnew" -id.args = 1 -id.arg = MKL$(OFFSETTYPE - ISPOINTER) -id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined -id.hr_syntax = "_MEMNEW(byteSize)" -regid - -clearid -id.n = "_MemImage" -id.subfunc = 1 -id.callname = "func__memimage" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" 'dest is default -id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined -id.hr_syntax = "_MEMIMAGE or _MEMIMAGE(imageHandle)" -regid - -clearid -id.n = "_MemSound": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__memsound" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined -id.hr_syntax = "_MEMSOUND(soundHandle)" -regid - -clearid '_MEMCOPY a, aoffset, bytes TO b, boffset -id.n = "_MemCopy" -id.subfunc = 2 -id.callname = "sub__memcopy" -id.args = 5 -id.arg = MKL$(UDTTYPE + (1)) + MKL$(OFFSETTYPE - ISPOINTER) + MKL$(OFFSETTYPE - ISPOINTER) + MKL$(UDTTYPE + (1)) + MKL$(OFFSETTYPE - ISPOINTER) -id.specialformat = "?,?,?{To}?,?" 'dest is default -id.hr_syntax = "_MEMCOPY sourceBlock, sourceBlock.OFFSET, sourceBlock.SIZE TO destBlock, destBlock.OFFSET" -regid - -clearid -id.n = "_ConsoleTitle" -id.subfunc = 2 -id.callname = "sub__consoletitle" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "_CONSOLETITLE title$" -regid - -clearid -id.n = "_ScreenShow" -id.subfunc = 2 -id.callname = "sub__screenshow" -id.hr_syntax = "_SCREENSHOW" -regid - -clearid -id.n = "_ScreenHide" -id.subfunc = 2 -id.callname = "sub__screenhide" -id.hr_syntax = "_SCREENHIDE" -regid - -clearid -id.n = "_ScreenHide" -id.subfunc = 1 -id.callname = "func__screenhide" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCREENHIDE" -regid - - -clearid -id.n = "_Console" -id.subfunc = 1 -id.callname = "func__console" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CONSOLE" -regid - -clearid -id.n = "_Console" -id.subfunc = 2 -id.callname = "sub__console" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{On|Off}" -id.hr_syntax = "_CONSOLE {On|Off}" -regid - -clearid -id.n = "_ControlChr" -id.subfunc = 2 -id.callname = "sub__controlchr" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{On|Off}" -id.hr_syntax = "_CONTROLCHR {On|Off}" -regid - -clearid -id.n = "_Blink" -id.subfunc = 2 -id.callname = "sub__blink" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{On|Off}" -id.hr_syntax = "_BLINK {On|Off}" -regid - -clearid -id.n = "_Blink" -id.subfunc = 1 -id.callname = "func__blink" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_BLINK" -regid - -clearid -id.n = "_FileExists" -id.subfunc = 1 -id.callname = "func__fileexists" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FILEEXISTS(fileName$)" -regid - -clearid -id.n = "_DirExists" -id.subfunc = 1 -id.callname = "func__direxists" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_DIREXISTS(path$)" -regid - -'QB64 DEVICE interface - -clearid -id.n = "Stick": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func_stick" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "?[,?]" -id.hr_syntax = "STICK(direction%) or STICK(direction%, axis_number%)" -regid - -clearid -id.n = "Strig": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func_strig" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "?[,?]" -id.hr_syntax = "STRIG(button_function%) or STRIG(button_function%, device_number%)" -regid - -clearid -id.n = "Strig": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 2 -id.callname = "sub_strig" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[(?[,?])]{On|Off|Stop}" -'In previous versions of BASIC, the statement STRIG ON enables testing of the joystick triggers; STRIG OFF disables joystick trigger testing. QuickBASIC ignores STRIG ON and STRIG OFF statements--the statements are provided for compatibility with earlier versions. -id.hr_syntax = "STRIG(button%) {On|Off|Stop}" -regid - - - -clearid -id.n = "_Devices": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__devices" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_DEVICES" -regid - -clearid -id.n = "_Device": id.Dependency=DEPENDENCY_DEVICEINPUT -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__device" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_DEVICE$(device_number)" -regid - -clearid -id.n = "_DeviceInput": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__deviceinput" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_DEVICEINPUT or _DEVICEINPUT(device_number%)" -regid - -clearid -id.n = "_LastButton": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__lastbutton" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_LASTBUTTON(deviceNumber)" -regid - -clearid -id.n = "_LastAxis": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__lastaxis" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_LASTAXIS(deviceNumber)" -regid - -clearid -id.n = "_LastWheel": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__lastwheel" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_LASTWHEEL(deviceNumber)" -regid - -clearid -id.n = "_Button": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__button" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_BUTTON(button_number%)" -regid - -clearid -id.n = "_ButtonChange": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__buttonchange" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_BUTTONCHANGE(button_number%)" -regid - -clearid -id.n = "_Axis": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__axis" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_AXIS(axis_number%)" -regid - - -clearid -id.n = "_Wheel": id.Dependency=DEPENDENCY_DEVICEINPUT -id.subfunc = 1 -id.callname = "func__wheel" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_WHEEL(wheelNumber%)" -regid - - - - - - - - - - -clearid -id.n = "Key" -id.subfunc = 2 -id.callname = "sub_key" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "(?){On|Off|Stop}" -id.hr_syntax = "KEY(number) {On|Off|Stop}" -regid - -clearid -id.n = "_ScreenX" -id.subfunc = 1 -id.callname = "func__screenx" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCREENX" -regid - -clearid -id.n = "_ScreenY" -id.subfunc = 1 -id.callname = "func__screeny" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCREENY" -regid - -clearid -id.n = "_ScreenMove" -id.subfunc = 2 -id.callname = "sub__screenmove" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_Middle}][?,?]" -id.hr_syntax = "_SCREENMOVE x, y or _SCREENMOVE _Middle" -regid - -clearid -id.n = "_MouseMove" -id.subfunc = 2 -id.callname = "sub__mousemove" -id.args = 2 -id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) -id.hr_syntax = "_MOUSEMOVE x, y" -regid - -clearid -id.n = "_OS" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__os" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_OS$" -regid - -clearid -id.n = "_Title" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__title" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_TITLE$" -regid - -clearid -id.n = "_MapUnicode" -id.subfunc = 2 -id.callname = "sub__mapunicode" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?{To}?" -id.hr_syntax = "_MAPUNICODE unicode& TO asciiCode%" -regid - -clearid -id.n = "_MapUnicode" -id.subfunc = 1 -id.callname = "func__mapunicode" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_MAPUNICODE(asciiCode%)" -regid - -clearid -id.n = "_KeyDown" -id.subfunc = 1 -id.callname = "func__keydown" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_KEYDOWN(code&)" -regid - -clearid -id.n = "_KeyHit" -id.subfunc = 1 -id.callname = "func__keyhit" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_KEYHIT" -regid - -clearid -id.n = "_WindowHandle" -id.subfunc = 1 -id.callname = "func__handle" -id.ret = INTEGER64TYPE - ISPOINTER -id.hr_syntax = "_WINDOWHANDLE" -regid - -clearid -id.n = "Files" -id.subfunc = 2 -id.callname = "sub_files" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "FILES fileSpec$" -regid - -clearid -id.n = "_Files" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__files" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_FILES$([fileSpec$])" -regid - -clearid -id.n = "_FullPath" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__fullpath" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_FULLPATH$(pathName$)" -regid - -clearid -id.n = "_PrintImage": id.Dependency = DEPENDENCY_PRINTER -id.subfunc = 2 -id.callname = "sub__printimage" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -''proposed version: -''id.specialformat = "[_SQUAREPIXELS][?][,(?,?)-(?,?)]" -id.hr_syntax = "_PRINTIMAGE imageHandle&" -regid - -'remote desktop - -clearid -id.n = "_ScreenClick" -id.subfunc = 2 -id.callname = "sub__screenclick" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,?]" -id.hr_syntax = "_SCREENCLICK x, y[, button%]" -regid - -clearid -id.n = "_ScreenPrint" -id.subfunc = 2 -id.callname = "sub__screenprint" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "_SCREENPRINT text$" -regid - -clearid -id.n = "_ScreenImage": id.Dependency = DEPENDENCY_SCREENIMAGE -id.subfunc = 1 -id.callname = "func__screenimage" -id.args = 4 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?,?,?,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCREENIMAGE(column1, row1, column2, row2)" -regid - - - - - -clearid -id.n = "Lock" -id.subfunc = 2 -id.callname = "sub_lock" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) -id.specialformat = "[#]?[,[?][{To}?]]" -id.hr_syntax = "LOCK #fileNumber%, record& or LOCK #fileNumber% firstRecord& TO lastRecord&" -regid - -clearid -id.n = "Unlock" -id.subfunc = 2 -id.callname = "sub_unlock" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) -id.specialformat = "[#]?[,[?][{To}?]]" -id.hr_syntax = "UNLOCK #fileNumber%, record& or UNLOCK #fileNumber% firstRecord& TO lastRecord&" -regid - -clearid -id.n = "_FreeTimer" -id.subfunc = 1 -id.callname = "func__freetimer" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FREETIMER" -regid - -clearid -id.n = "Timer" -id.subfunc = 2 -id.callname = "sub_timer" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[(?)]{On|Off|Stop|Free}" -id.hr_syntax = "TIMER[(number%)] {On|Off|Stop|Free}" -regid - -clearid -id.n = "_FullScreen" -id.subfunc = 2 -id.callname = "sub__fullscreen" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_Off|_Stretch|_SquarePixels|Off}][,{_Smooth}]" -id.hr_syntax = "_FULLSCREEN [{_Off|_Stretch|_SquarePixels|Off}][,{_Smooth}]" -regid - -clearid -id.n = "_AllowFullScreen" -id.subfunc = 2 -id.callname = "sub__allowfullscreen" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_Stretch|_SquarePixels|_Off|_All|Off}][,{_Smooth|_Off|_All|Off}]" -id.hr_syntax = "_ALLOWFULLSCREEN [{_Stretch|_SquarePixels|_Off|_All|Off}][,{_Smooth|_Off|_All|Off}]" -regid - -clearid -id.n = "_FullScreen" -id.subfunc = 1 -id.callname = "func__fullscreen" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FULLSCREEN" -regid - -clearid -id.n = "_Smooth" -id.subfunc = 1 -id.callname = "func__fullscreensmooth" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SMOOTH" -regid - -clearid -id.n = "_WindowHasFocus" -id.subfunc = 1 -id.callname = "func__hasfocus" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_WINDOWHASFOCUS" -regid - -clearid -id.n = "_Clipboard" -id.musthave = "$" -id.subfunc = 2 -id.callname = "sub__clipboard" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "=?" -id.hr_syntax = "_CLIPBOARD$ = text$" -regid - -clearid -id.n = "_Clipboard" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__clipboard" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_CLIPBOARD$" -regid - -clearid -id.n = "_ClipboardImage": id.Dependency = DEPENDENCY_SCREENIMAGE -id.subfunc = 1 -id.callname = "func__clipboardimage" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CLIPBOARDIMAGE" -regid - -clearid -id.n = "_ClipboardImage": id.Dependency = DEPENDENCY_SCREENIMAGE -id.subfunc = 2 -id.callname = "sub__clipboardimage" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "=?" -id.hr_syntax = "_CLIPBOARDIMAGE = existingImageHandle&" -regid - -clearid -id.n = "_Exit" -id.subfunc = 1 -id.callname = "func__exit" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_EXIT" -regid - -clearid -id.n = "_OpenHost": id.Dependency = DEPENDENCY_SOCKETS -id.subfunc = 1 -id.callname = "func__openhost" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_OPENHOST(" + CHR$(34) + "TCP/IP:portNumber" + CHR$(34) + ")" -regid - -clearid -id.n = "_Connected" -id.subfunc = 1 -id.callname = "func__connected" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CONNECTED(connectionHandle&)" -regid - -clearid -id.n = "_ConnectionAddress" -id.mayhave = "$" -id.subfunc = 1 -id.callname = "func__connectionaddress" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_CONNECTIONADDRESS(connectionHandle&)" -regid - -clearid -id.n = "_OpenConnection" -id.subfunc = 1 -id.callname = "func__openconnection" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_OPENCONNECTION(hostHandle)" -regid - -clearid -id.n = "_OpenClient": id.Dependency = DEPENDENCY_SOCKETS -id.subfunc = 1 -id.callname = "func__openclient" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_OPENCLIENT(" + CHR$(34) + "TCP/IP:port:address" + CHR$(34) + ")" -regid - - -clearid -id.n = "_EnvironCount" -id.subfunc = 1 -id.callname = "func__environcount" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_ENVIRONCOUNT" -regid - -clearid -id.n = "Environ" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_environ" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "ENVIRON$(listIndex%) or ENVIRON$(systemID$)" -regid - -clearid -id.n = "Environ" -id.subfunc = 2 -id.callname = "sub_environ" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "ENVIRON stringExpression$" -regid - -clearid -id.n = "_ErrorLine" -id.subfunc = 1 -id.callname = "func__errorline" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_ERRORLINE" -regid - -clearid -id.n = "_InclErrorLine" -id.subfunc = 1 -id.callname = "func__inclerrorline" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_INCLERRORLINE" -regid - -clearid -id.n = "_ErrorMessage" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__errormessage" -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.args = 1 -id.specialformat = "[?]" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_ERRORMESSAGE$ or _ERRORMESSAGE$(errorCode%)" -regid - -clearid -id.n = "_Assert" -id.subfunc = 2 -id.callname = "sub__assert" -id.args = 2 -id.specialformat = "?[,?]" -id.arg = MKL$(INTEGERTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "_ASSERT condition[, errorMessage$]" -regid - -clearid -id.n = "_Display" -id.subfunc = 2 -id.callname = "sub__display" -id.hr_syntax = "_DISPLAY" -regid - -clearid -id.n = "_AutoDisplay" -id.subfunc = 2 -id.callname = "sub__autodisplay" -id.hr_syntax = "_AUTODISPLAY" -regid - -clearid -id.n = "_Limit" -id.subfunc = 2 -id.callname = "sub__limit" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.hr_syntax = "_LIMIT framesPerSecond!" -regid - -clearid -id.n = "_FPS" -id.subfunc = 2 -id.callname = "sub__fps" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.specialformat = "[{_Auto}][?]" -id.hr_syntax = "_FPS fps! or _FPS _Auto" -regid - -clearid -id.n = "_Delay" -id.subfunc = 2 -id.callname = "sub__delay" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.hr_syntax = "_DELAY seconds!" -regid - -clearid -id.n = "_Icon": id.Dependency = DEPENDENCY_ICON -id.subfunc = 2 -id.callname = "sub__icon" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?[,?]]" -id.hr_syntax = "_ICON [mainImageHandle&[, smallImageHandle&]]" -regid - -clearid -id.n = "_Title" -id.subfunc = 2 -id.callname = "sub__title" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "_TITLE text$" -regid - -clearid -id.n = "_Echo" -id.subfunc = 2 -id.callname = "sub__echo" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "_ECHO text$" -regid - -clearid -id.n = "_ReadFile" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__readfile" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_READFILE$(fileSpec$)" -regid - -clearid -id.n = "_WriteFile" -id.subfunc = 2 -id.callname = "sub__writefile" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "_WRITEFILE fileSpec$, contents$" -regid - -clearid -id.n = "_AcceptFileDrop" -id.subfunc = 2 -id.callname = "sub__filedrop" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{On|Off}]" -id.hr_syntax = "_ACCEPTFILEDROP [{On|Off}]" -regid - -clearid -id.n = "_AcceptFileDrop" -id.subfunc = 1 -id.callname = "func__filedrop" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_ACCEPTFILEDROP" -regid - -clearid -id.n = "_FinishDrop" -id.subfunc = 2 -id.callname = "sub__finishdrop" -id.hr_syntax = "_FINISHDROP" -regid - -clearid -id.n = "_TotalDroppedFiles" -id.subfunc = 1 -id.callname = "func__totaldroppedfiles" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_TOTALDROPPEDFILES" -regid - -clearid -id.n = "_DroppedFile" -id.mayhave = "$" -id.subfunc = 1 -id.callname = "func__droppedfile" -id.ret = STRINGTYPE - ISPOINTER -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "_DROPPEDFILE$ or _DROPPEDFILE$(index&)" -regid - -clearid -id.n = "Clear" -id.subfunc = 2 -id.callname = "sub_clear" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,?]]" -id.hr_syntax = "CLEAR" -regid - -'IMAGE CREATION/FREEING - -clearid -id.n = "_NewImage" -id.subfunc = 1 -id.callname = "func__newimage" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_NEWIMAGE(width&, height&, mode)" -regid - -clearid -id.n = "_LoadImage" -id.Dependency = DEPENDENCY_IMAGE_CODEC -id.subfunc = 1 -id.callname = "func__loadimage" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "?[,[?][,?]]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_LOADIMAGE(fileName$[, [mode&][, requirements$]])" -regid - -clearid -id.n = "_FreeImage" -id.subfunc = 2 -id.callname = "sub__freeimage" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "_FREEIMAGE handle&" -regid - -clearid -id.n = "_CopyImage" -id.subfunc = 1 -id.callname = "func__copyimage" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_COPYIMAGE(imageHandle&[, mode])" -regid - -clearid -id.n = "_SaveImage" -id.Dependency = DEPENDENCY_IMAGE_CODEC -id.subfunc = 2 -id.callname = "sub__saveimage" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "?[,[?][,?]]" -id.hr_syntax = "_SAVEIMAGE fileName$[, imageHandle&][, requirements$])" -regid - -'IMAGE SELECTION - -clearid -id.n = "_Source" -id.subfunc = 2 -id.callname = "sub__source" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?" -id.hr_syntax = "_SOURCE handle&" -regid - -clearid -id.n = "_Dest" -id.subfunc = 2 -id.callname = "sub__dest" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?" -id.hr_syntax = "_DEST imageHandle&" -regid - -clearid -id.n = "_Source" -id.subfunc = 1 -id.callname = "func__source" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SOURCE" -regid - -clearid -id.n = "_Dest" -id.subfunc = 1 -id.callname = "func__dest" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_DEST" -regid - -clearid -id.n = "_Display" -id.subfunc = 1 -id.callname = "func__display" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_DISPLAY" -regid - -'IMAGE SETTINGS - -clearid -id.n = "_Blend" -id.subfunc = 2 -id.callname = "sub__blend" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "_BLEND [imageHandle&]" -regid - -clearid -id.n = "_DontBlend" -id.subfunc = 2 -id.callname = "sub__dontblend" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "_DONTBLEND [imageHandle&]" -regid - -clearid -id.n = "_ClearColor" -id.subfunc = 2 -id.callname = "sub__clearcolor" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_None}][?][,?]" -id.hr_syntax = "_CLEARCOLOR {color&|_None}[,dest_handle&]" -regid - -'USING/CHANGING A SURFACE - -clearid -id.n = "_PutImage" -id.subfunc = 2 -id.callname = "sub__putimage" -id.args = 10 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) -id.specialformat = "[[{Step}](?,?)[-[{Step}](?,?)]][,[?][,[?][,[[{Step}](?,?)[-[{Step}](?,?)]][,{_Smooth}]]]]" -id.hr_syntax = "_PUTIMAGE [STEP] [(dx1, dy1)-[STEP][(dx2, dy2)]][, sourceHandle&][, destHandle&][, ][STEP][(sx1, sy1)[-STEP][(sx2, sy2)]][_SMOOTH]" -regid - -clearid -id.n = "_MapTriangle" -id.subfunc = 2 -id.callname = "sub__maptriangle" -id.args = 19 -id.arg = MKL$(LONGTYPE - ISPOINTER)+MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_Clockwise|_AntiClockwise}][{_Seamless}](?,?)-(?,?)-(?,?)[,?]{To}(?,?[,?])-(?,?[,?])-(?,?[,?])[,[?][,{_Smooth|_SmoothShrunk|_SmoothStretched}]]" -id.hr_syntax = "_MAPTRIANGLE [{_SEAMLESS}] (sx1, sy1)-(sx2, sy2)-(sx3, sy3), source& TO (dx1, dy1)-(dx2, dy2)-(dx3, dy3)[, destination&][{_SMOOTH|_SMOOTHSHRUNK|_SMOOTHSTRETCHED}]]" -regid - -clearid -id.n = "_DepthBuffer" -id.subfunc = 2 -id.callname = "sub__depthbuffer" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER)+MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{On|Off|Lock|_Clear}[,?]" -id.hr_syntax = "_DEPTHBUFFER {On|Off|Lock|_Clear}[,handle&]" -regid - -clearid -id.n = "_SetAlpha" -id.subfunc = 2 -id.callname = "sub__setalpha" -id.args = 4 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,[?[{To}?]][,?]]" -id.hr_syntax = "_SETALPHA alpha& or _SETALPHA color1& TO color2&[, imageHandle&]" -regid - -'IMAGE INFO - -clearid -id.n = "_Width" -id.subfunc = 1 -id.callname = "func__width" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_WIDTH(imageHandle&)" -regid - -clearid -id.n = "_Height" -id.subfunc = 1 -id.callname = "func__height" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_HEIGHT(imageHandle&)" -regid - -clearid -id.n = "_PixelSize" -id.subfunc = 1 -id.callname = "func__pixelsize" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_PIXELSIZE[(imageHandle&)]" -regid - -clearid -id.n = "_ClearColor" -id.subfunc = 1 -id.callname = "func__clearcolor" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CLEARCOLOR[(sourceHandle&)]" -regid - -clearid -id.n = "_Blend" -id.subfunc = 1 -id.callname = "func__blend" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_BLEND[(imageHandle&)]" -regid - -clearid -id.n = "_DefaultColor" -id.subfunc = 1 -id.callname = "func__defaultcolor" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_DEFAULTCOLOR[(imageHandle&)]" -regid - -clearid -id.n = "_BackgroundColor" -id.subfunc = 1 -id.callname = "func__backgroundcolor" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_BACKGROUNDCOLOR(imageHandle&)]" -regid - -'256 COLOR PALETTES - -clearid -id.n = "_PaletteColor" -id.subfunc = 1 -id.callname = "func__palettecolor" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_PALETTECOLOR(attributeNumber%, imgHandle&)" -regid - -clearid -id.n = "_PaletteColor" -id.subfunc = 2 -id.callname = "sub__palettecolor" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,?]" -id.hr_syntax = "_PALETTECOLOR attribute%, newColor&[, imgHandle&]" -regid - -clearid -id.n = "_CopyPalette" -id.subfunc = 2 -id.callname = "sub__copypalette" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,?]" -id.hr_syntax = "_COPYPALETTE [sourceImageHandle&[, destinationImageHandle&]]" -regid - -'FONT SUPPORT - -clearid -id.n = "_LoadFont": id.Dependency = DEPENDENCY_LOADFONT -id.subfunc = 1 -id.callname = "func__loadfont" -id.args = 4 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,[?][,[?]]]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_LOADFONT(fileName$, size&[, " + CHR$(34) + "{MONOSPACE|, UNICODE|, DONTBLEND|, MEMORY|, AUTOMONO}" + CHR$(34) + "][, fontIndex])" -regid - -clearid -id.n = "_Font" -id.subfunc = 2 -id.callname = "sub__font" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.hr_syntax = "_FONT fontHandle&[, imageHandle&]" -regid - -clearid -id.n = "_FontWidth" -id.subfunc = 1 -id.callname = "func__fontwidth" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FONTWIDTH or _FONTWIDTH(fontHandle&)" -regid - -clearid -id.n = "_FontHeight" -id.subfunc = 1 -id.callname = "func__fontheight" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FONTHEIGHT or _FONTHEIGHT(fontHandle&)" -regid - -clearid -id.n = "_Font" -id.subfunc = 1 -id.callname = "func__font" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FONT[(imageHandle&)]" -regid - -clearid -id.n = "_Md5" -id.Dependency=DEPENDENCY_LOADFONT -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__md5" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_MD5$(dataString$)" -regid - -clearid -id.n = "_PrintString" -id.subfunc = 2 -id.callname = "sub__printstring" -id.args = 4 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?),?[,?]" -id.hr_syntax = "_PRINTSTRING(x, y), text$[, imageHandle&]" -regid - -clearid -id.n = "_PrintWidth" -id.subfunc = 1 -id.callname = "func__printwidth" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_PRINTWIDTH(textToPrint$[, destinationHandle&])" -regid - -clearid -id.n = "_FreeFont" -id.subfunc = 2 -id.callname = "sub__freefont" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?" -id.hr_syntax = "_FREEFONT fontHandle&" -regid - -clearid -id.n = "_PrintMode" -id.subfunc = 2 -id.callname = "sub__printmode" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{_FillBackground|_KeepBackground|_OnlyBackground}[,?]" -id.hr_syntax = "_PRINTMODE {_FillBackground|_KeepBackground|_OnlyBackground}[, imageHandle&]" -regid - -clearid -id.n = "_PrintMode" -id.subfunc = 1 -id.callname = "func__printmode" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_PRINTMODE[(imageHandle&)]" -regid - -' a740g: Extended Font support -clearid -id.n = "_UFontHeight" -id.Dependency = DEPENDENCY_LOADFONT -id.subfunc = 1 -id.callname = "func__UFontHeight" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_UFONTHEIGHT&[(fontHandle&)]" -regid - -clearid -id.n = "_UPrintWidth" -id.Dependency = DEPENDENCY_LOADFONT -id.subfunc = 1 -id.callname = "func__UPrintWidth" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,[?][,?]]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_UPRINTWIDTH&(text$[, utfEncoding&][, fontHandle&])" -regid - -clearid -id.n = "_ULineSpacing" -id.Dependency = DEPENDENCY_LOADFONT -id.subfunc = 1 -id.callname = "func__ULineSpacing" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_ULINESPACING&[(fontHandle&)]" -regid - -clearid -id.n = "_UPrintString" -id.Dependency = DEPENDENCY_LOADFONT -id.subfunc = 2 -id.callname = "sub__UPrintString" -id.args = 7 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "(?,?),?[,[?][,[?][,[?][,?]]]]" -id.hr_syntax = "_UPRINTSTRING (x&, y&), text$[, maxWidth&][, utfEncoding&][, fontHandle&][, imageHandle&]" -regid - -clearid -id.n = "_UCharPos" -id.Dependency = DEPENDENCY_LOADFONT -id.subfunc = 1 -id.callname = "func__UCharPos" -id.args = 4 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) ' arg 2 has special handling code in evaluatefunc() -id.specialformat = "?[,[?][,[?][,?]]]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_UCHARPOS&(text$[, posArray&()][, utfEncoding&][, fontHandle&])" -regid - -'WORKING WITH COLORS - -clearid -id.n = "_RGBA" -id.subfunc = 1 -id.callname = "func__rgba" -id.args = 5 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?,?,?[,?]" -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_RGBA(red&, green&, blue&, alpha&[, imageHandle&])" -regid - -clearid -id.n = "_RGB" -id.subfunc = 1 -id.callname = "func__rgb" -id.args = 4 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?,?[,?]" -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_RGB(red&, green&, blue&[, imageHandle&])" -regid - -clearid -id.n = "_Red" -id.subfunc = 1 -id.callname = "func__red" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_RED(rgbaColorIndex&[, imageHandle&])" -regid - -clearid -id.n = "_Green" -id.subfunc = 1 -id.callname = "func__green" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_GREEN(rgbaColorIndex&[, imageHandle&])" -regid - -clearid -id.n = "_Blue" -id.subfunc = 1 -id.callname = "func__blue" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_BLUE(rgbaColorIndex&[, imageHandle&])" -regid - -clearid -id.n = "_Alpha" -id.subfunc = 1 -id.callname = "func__alpha" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_ALPHA(color~&[, imageHandle&])" -regid - -clearid -id.n = "_RGBA32" -id.subfunc = 1 -id.callname = "func__rgba32" -id.args = 4 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_RGBA32(red&, green&, blue&, alpha&)" -regid - -clearid -id.n = "_RGB32" -id.subfunc = 1 -id.callname = "func__rgb32" -id.overloaded = -1 -id.minargs = 1 -id.args = 4 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_RGB32(red&, green&, blue&[, alpha&]) or _RGB32(intensity&[, alpha&])" -regid - -clearid -id.n = "_Red32" -id.subfunc = 1 -id.callname = "func__red32" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_RED32(rgbaColor&)" -regid - -clearid -id.n = "_Green32" -id.subfunc = 1 -id.callname = "func__green32" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_GREEN32(rgbaColor&)" -regid - -clearid -id.n = "_Blue32" -id.subfunc = 1 -id.callname = "func__blue32" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_BLUE32(rgbaColor&)" -regid - -clearid -id.n = "_Alpha32" -id.subfunc = 1 -id.callname = "func__alpha32" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_ALPHA32(rgbaColor&)" -regid - - -clearid -id.n = "Draw" -id.subfunc = 2 -id.callname = "sub_draw" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "DRAW drawString$" -regid - -clearid -id.n = "Play": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub_play" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "PLAY commandString$" -regid - -clearid -id.n = "Play": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func_play" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "PLAY" -regid - -'QB64 MOUSE -clearid -id.n = "_MouseShow" -id.subfunc = 2 -id.callname = "sub__mouseshow" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "_MOUSESHOW [cursorShape$]" -regid - -clearid -id.n = "_MouseHide" -id.subfunc = 2 -id.callname = "sub__mousehide" -id.hr_syntax = "_MOUSEHIDE" -regid - -clearid -id.n = "_MouseHidden" -id.subfunc = 1 -id.callname = "func__mousehidden" -id.ret = LONGTYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEHIDDEN" -regid - -clearid -id.n = "_MouseInput" -id.subfunc = 1 -id.callname = "func__mouseinput" -id.ret = LONGTYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEINPUT" -regid - -clearid -id.n = "_MouseX" -id.subfunc = 1 -id.callname = "func__mousex" -id.ret = SINGLETYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEX" -regid - -clearid -id.n = "_MouseY" -id.subfunc = 1 -id.callname = "func__mousey" -id.ret = SINGLETYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEY" -regid - -clearid -id.n = "_MouseMovementX" -id.subfunc = 1 -id.callname = "func__mousemovementx" -id.ret = SINGLETYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEMOVEMENTX" -regid - -clearid -id.n = "_MouseMovementY" -id.subfunc = 1 -id.callname = "func__mousemovementy" -id.ret = SINGLETYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEMOVEMENTY" -regid - -clearid -id.n = "_MouseButton" -id.subfunc = 1 -id.callname = "func__mousebutton" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_MOUSEBUTTON(buttonNumber)" -regid - -clearid -id.n = "_MouseWheel" -id.subfunc = 1 -id.callname = "func__mousewheel" -id.ret = LONGTYPE - ISPOINTER -id.args = 0 -id.hr_syntax = "_MOUSEWHEEL" -regid - -clearid -id.n = "FreeFile" -id.subfunc = 1 -id.callname = "func_freefile" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_FREEFILE" -regid - -clearid -id.n = "Name" -id.subfunc = 2 -id.callname = "sub_name" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "?{As}?" -id.hr_syntax = "NAME oldFileOrFolderName$ AS newFileOrFolderName$" -regid - -clearid -id.n = "Kill" -id.subfunc = 2 -id.callname = "sub_kill" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "KILL fileSpec$" -regid - -clearid -id.n = "ChDir" -id.subfunc = 2 -id.callname = "sub_chdir" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "CHDIR path$" -regid - -clearid -id.n = "MkDir" -id.subfunc = 2 -id.callname = "sub_mkdir" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "MKDIR pathSpec$" -regid - -clearid -id.n = "RmDir" -id.subfunc = 2 -id.callname = "sub_rmdir" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "RMDIR path$" -regid - -clearid -id.n = "Chain" -id.subfunc = 2 -id.callname = "sub_chain" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "CHAIN moduleName$" -regid - - -clearid -id.n = "Shell" -id.subfunc = 2 -id.callname = "sub_shell2" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "{_Hide}[{_DontWait}][?]" -id.secondargmustbe = "_Hide" -id.hr_syntax = "SHELL [_DONTWAIT] [_HIDE] commandToRun$" -regid - -clearid -id.n = "Shell" -id.subfunc = 2 -id.callname = "sub_shell3" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "{_DontWait}[{_Hide}][?]" -id.secondargmustbe = "_DontWait" -id.hr_syntax = "SHELL [_DONTWAIT] [_HIDE] commandToRun$" -regid - -clearid -id.n = "Shell" -id.subfunc = 2 -id.callname = "sub_shell" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?]" -'id.secondargcantbe = "_HIDE" -id.hr_syntax = "SHELL [_DONTWAIT] [_HIDE] commandToRun$" -regid - -clearid -id.n = "Shell" -id.subfunc = 1 -id.callname = "func_shell" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = INTEGER64TYPE - ISPOINTER -id.hr_syntax = "SHELL(commandToRun$)" -regid - -clearid -id.n = "_ShellHide" -id.subfunc = 1 -id.callname = "func__shellhide" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = INTEGER64TYPE - ISPOINTER -id.hr_syntax = "_SHELLHIDE(commandToRun$)" -regid - -clearid -id.n = "Command" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_command" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "COMMAND$[(index%)]" -regid - -clearid -id.n = "_CommandCount" -id.subfunc = 1 -id.callname = "func__commandcount" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_COMMANDCOUNT" -regid - - -'QB64 AUDIO - -clearid -id.n = "_SndRate": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndrate" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SNDRATE" -regid - -clearid -id.n = "_SndRaw": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndraw" -id.args = 3 -id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,[?][,?]]" -id.hr_syntax = "_SNDRAW leftSample[, rightSample][, pipeHandle&]" -regid - -clearid -id.n = "_SndRawDone": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndrawdone" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "_SNDRAWDONE [pipeHandle&]" -regid - -clearid -id.n = "_SndOpenRaw": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndopenraw" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SNDOPENRAW" -regid - -clearid -id.n = "_SndRawLen": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndrawlen" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = DOUBLETYPE - ISPOINTER -id.hr_syntax = "_SNDRAWLEN [pipeHandle&]" -regid - -clearid -id.n = "_SndLen": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndlen" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.hr_syntax = "_SNDLEN(handle&)" -regid - -clearid -id.n = "_SndPaused": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndpaused" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SNDPAUSED(handle&)" -regid - -clearid -id.n = "_SndPlayFile": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndplayfile" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) -id.specialformat = "?[,[?][,?]]" -id.hr_syntax = "_SNDPLAYFILE fileName$[, , volume!]" -regid - -clearid -id.n = "_SndPlayCopy": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndplaycopy" -id.args = 5 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) -id.specialformat = "?[,[?][,[?][,[?][,[?]]]]]" -id.hr_syntax = "_SNDPLAYCOPY handle&[, volume!][, x!][, y!][, z!]" -regid - -clearid -id.n = "_SndStop": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndstop" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.hr_syntax = "_SNDSTOP handle&" -regid - -clearid -id.n = "_SndLoop": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndloop" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.hr_syntax = "_SNDLOOP handle&" -regid - -clearid -id.n = "_SndLimit": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndlimit" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) -id.hr_syntax = "_SNDLIMIT handle&, numberOfSeconds!" -regid - -clearid -id.n = "_SndOpen": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndopen" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_SNDOPEN(fileName$[, capabilities$])" -regid - -clearid -id.n = "_SndSetPos": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndsetpos" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) -id.hr_syntax = "_SNDSETPOS handle&, position!" -regid - -clearid -id.n = "_SndGetPos": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndgetpos" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.hr_syntax = "_SNDGETPOS(handle&)" -regid - -clearid -id.n = "_SndPlaying": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndplaying" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SNDPLAYING(handle&)" -regid - -clearid -id.n = "_SndPause": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndpause" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.hr_syntax = "_SNDPAUSE handle&" -regid - -clearid -id.n = "_SndBal": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndbal" -id.args = 5 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "?,[?][,[?][,[?][,[?]]]]" -id.hr_syntax = "_SNDBAL handle&[, x!][, y!][, z!][, channel&]" -regid - -clearid -id.n = "_SndVol": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndvol" -id.args = 2 -id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) -id.hr_syntax = "_SNDVOL handle&, volume!" -regid - -clearid -id.n = "_SndPlay": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndplay" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.hr_syntax = "_SNDPLAY handle&" -regid - -clearid -id.n = "_SndCopy": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndcopy" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_SNDCOPY(handle&)" -regid - -clearid -id.n = "_SndClose": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__sndclose" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.hr_syntax = "_SNDCLOSE handle&" -regid - -clearid -id.n = "_SndNew" -id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 1 -id.callname = "func__sndnew" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SNDNEW(frames&, channels&, bits&)" -regid - -clearid -id.n = "_MIDISoundBank" -id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub__midisoundbank" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.hr_syntax = "_MIDISOUNDBANK fileName$[, capabilities$]" -regid - -clearid -id.n = "Input" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_input" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "INPUT$(numberOfBytes%[, fileOrPortNumber])" -regid - -clearid -id.n = "Seek" -id.subfunc = 2 -id.callname = "sub_seek" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[#]?,?" -id.hr_syntax = "SEEK filenumber&, position" -regid - -clearid -id.n = "Seek" -id.subfunc = 1 -id.callname = "func_seek" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "SEEK(filenumber&)" -regid - -clearid -id.n = "Loc" -id.subfunc = 1 -id.callname = "func_loc" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "LOC(fileOrPortNumber%)" -regid - -clearid -id.n = "EOF" -id.subfunc = 1 -id.callname = "func_eof" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "EOF(fileNumber&)" -regid - -clearid -id.n = "LOF" -id.subfunc = 1 -id.callname = "func_lof" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "LOF(fileNumber&)" -regid - - -clearid -id.n = "Screen" -id.subfunc = 1 -id.callname = "func_screen" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,?]" -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "SCREEN(x, y[, colorflag%])" -regid - -clearid -id.n = "PMap" -id.subfunc = 1 -id.callname = "func_pmap" -id.args = 2 -id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.hr_syntax = "PMAP(coordinate, function_number%)" -regid - - -clearid -id.n = "Point" -id.subfunc = 1 -id.callname = "func_point" -id.args = 2 -id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = DOUBLETYPE - ISPOINTER -id.hr_syntax = "POINT(x, y) or POINT({0|1|2|3})" -regid - - -clearid -id.n = "Tab" -id.subfunc = 1 -id.callname = "func_tab" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "TAB(column%)" -regid - -clearid -id.n = "Spc" -id.subfunc = 1 -id.callname = "func_spc" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "SPC(count%)" -regid - - -clearid -id.n = "Wait" -id.subfunc = 2 -id.callname = "sub_wait" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,?]" -id.hr_syntax = "WAIT port%, andMask%[, xorMask%]" -regid - -clearid -id.n = "Inp" -id.subfunc = 1 -id.callname = "func_inp" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "INP(address)" -regid - -clearid -id.n = "Pos" -id.subfunc = 1 -id.callname = "func_pos" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "POS(0)" -regid - -clearid -id.n = "Sgn" -id.subfunc = 1 -id.callname = "func_sgn" -id.args = 1 -id.arg = MKL$(-1) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "SGN(value)" -regid - -clearid -id.n = "LBound" -id.subfunc = 1 -id.args = 2 -id.arg = MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "LBOUND(arrayName[, dimension%])" -regid - -clearid -id.n = "UBound" -id.subfunc = 1 -id.args = 2 -id.arg = MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "UBOUND(arrayName[, dimension%])" -regid - -clearid -id.n = "_Bin" -id.musthave = "$" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_BIN$(number)" -regid - -clearid -id.n = "Oct" -id.musthave = "$" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "OCT$(number)" -regid - -clearid -id.n = "Hex" -id.musthave = "$" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "HEX$(decimalNumber)" -regid - -clearid -id.n = "Sleep" -id.subfunc = 2 -id.callname = "sub_sleep" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.hr_syntax = "SLEEP seconds%" -regid - -clearid -id.n = "Exp" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = -1 -id.hr_syntax = "EXP(numericExpression)" -regid - -clearid -id.n = "Fix" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = -1 -id.hr_syntax = "FIX(expression)" -regid - -clearid -id.n = "Int" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = -1 -id.hr_syntax = "INT(expression)" -regid - -clearid -id.n = "CDbl" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = DOUBLETYPE - ISPOINTER -id.hr_syntax = "CDBL(expression)" -regid - -clearid -id.n = "CSng" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = SINGLETYPE - ISPOINTER -id.hr_syntax = "CSNG(expression)" -regid - -clearid -id.n = "_Round" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = INTEGER64TYPE - ISPOINTER -id.hr_syntax = "_ROUND(number)" -regid - -clearid -id.n = "CInt" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = INTEGERTYPE - ISPOINTER -id.hr_syntax = "CINT(expression)" -regid - -clearid -id.n = "CLng" -id.subfunc = 1 -id.args = 1 -id.arg = MKL$(-1) -id.ret = INTEGERTYPE - ISPOINTER -id.hr_syntax = "CLNG(expression)" -regid - - - -clearid -id.n = "Time" -id.musthave = "$" -id.subfunc = 2 -id.callname = "sub_time" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "=?" -id.hr_syntax = "TIME$ = timeToSet$" -regid - -clearid -id.n = "Time" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_time" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "TIME$" -regid - - - -clearid -id.n = "Date" -id.musthave = "$" -id.subfunc = 2 -id.callname = "sub_date" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "=?" -id.hr_syntax = "DATE$ = dateToSet$" -regid - -clearid -id.n = "Date" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_date" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "DATE$" -regid - -clearid -id.n = "CsrLin" -id.subfunc = 1 -id.callname = "func_csrlin" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "CSRLIN" -regid - - -clearid -id.n = "Paint" -id.subfunc = 2 -id.callname = "sub_paint" -id.args = 5 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?)[,[?][,[?][,?]]]" -'PAINT [STEP] (x!,y!)[,[paint] [,[bordercolor&] [,background$]]] -id.hr_syntax = "PAINT [STEP] (x!, y!)[,[fillColor&] [,[bordercolor&] [,pattern$]]]" -regid - -clearid -id.n = "Circle" -id.subfunc = 2 -id.callname = "sub_circle" -id.args = 7 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?),?[,[?][,[?][,[?][,?]]]]" -'CIRCLE [STEP] (x!,y!),radius![,[color&] [,[start!] [,[end!] [,aspect!]]]] -id.hr_syntax = "CIRCLE [STEP] (x!, y!), radius![, [color&] [, [start!] [, [end!] [, aspect!]]]]" -regid - -clearid -id.n = "BLoad" -id.subfunc = 2 -id.callname = "sub_bload" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.hr_syntax = "BLOAD fileName$, VARPTR(imageArray%(index))" -regid - -clearid -id.n = "BSave" -id.subfunc = 2 -id.callname = "sub_bsave" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.hr_syntax = "BSAVE saveFile$, VARPTR(array(index)), fileSize&" -regid - -'double definition -clearid -id.n = "Get" -id.subfunc = 2 -id.callname = "sub_graphics_get" -id.args = 6 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?)-[{Step}](?,?),?[,?]" -id.secondargmustbe = "Step" -id.hr_syntax = "GET [STEP] (column1, row1)-[STEP](column2, row2), array([index])[, offscreenColor]" -regid - -clearid -id.n = "Get" -id.subfunc = 2 -id.callname = "sub_graphics_get" -id.args = 6 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?)-[{Step}](?,?),?[,?]" -id.secondargmustbe = "(" -id.hr_syntax = "GET [STEP] (column1, row1)-[STEP](column2, row2), array([index])[, offscreenColor]" -regid - -'double definition -clearid -id.n = "Put" -id.subfunc = 2 -id.callname = "sub_graphics_put" -id.args = 5 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?),?[,[{_Clip}][{PSet|PReset|And|Or|Xor}][,?]]" -'PUT [STEP] (x!,y!),arrayname# [(indexes%)] [,actionverb] -'PUT (10, 10), myimage, _CLIP, 0 -id.secondargmustbe = "Step" -id.hr_syntax = "PUT [STEP](column, row), Array([index])[,] [_CLIP] [{PSET|PRESET|AND|OR|XOR}]][, omitcolor]" -regid -clearid -id.n = "Put" -id.subfunc = 2 -id.callname = "sub_graphics_put" -id.args = 5 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?),?[,[{_Clip}][{PSet|PReset|And|Or|Xor}][,?]]" -'PUT [STEP] (x!,y!),arrayname# [(indexes%)] [,actionverb] -'PUT (10, 10), myimage, _CLIP, 0 -id.secondargmustbe = "(" -id.hr_syntax = "PUT [STEP](column, row), Array([index])[,] [_CLIP] [{PSET|PRESET|AND|OR|XOR}]][, omitcolor]" -regid - -clearid -id.n = "Get" -id.subfunc = 2 -id.callname = "sub_get" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(-4) -'id.specialformat = "[#]?,[?],?" 'non field compliant definition -id.specialformat = "[#]?[,[?][,?]]" 'field compliant definition -id.hr_syntax = "GET #fileNumber&, [position][, targetVariable|targetArray()}]" -regid - -clearid -id.n = "Put" -id.subfunc = 2 -id.callname = "sub_put" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(-4) -'id.specialformat = "[#]?,[?],?" 'non field compliant definition -id.specialformat = "[#]?[,[?][,?]]" 'field compliant definition -id.hr_syntax = "PUT #filenumber&, [position][, {holdingvariable|holdingarray()}]" -regid - -clearid -id.n = "Open" -id.subfunc = 2 -id.callname = "sub_open" -id.args = 6 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?[{For Random|For Binary|For Input|For Output|For Append}][{Access Read Write|Access Read|Access Write}][{Shared|Lock Read Write|Lock Read|Lock Write}]{As}[#]?[{Len =}?]" -id.hr_syntax = "OPEN fileName$ [FOR mode] [ACCESS|LOCK|SHARED [{READ|WRITE}] AS [#]fileNumber& [LEN = recordLength]" -regid - -clearid -id.n = "Open" -id.subfunc = 2 -id.callname = "sub_open_gwbasic" -id.args = 4 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,[#]?,?[,?]" -id.hr_syntax = "OPEN modeLetter$, [#]fileNumber&, fileName$[, recordLength]" -regid - -clearid -id.n = "Val" -id.subfunc = 1 -id.callname = "func_val" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "VAL(string_value$)" -regid - -clearid -id.n = "MKSMBF" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_mksmbf" -id.args = 1 -id.arg = MKL$(SINGLETYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "MKSMBF$(value!)" -regid -clearid -id.n = "MKDMBF" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_mkdmbf" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "MKDMBF$(value#)" -regid - -clearid -id.n = "MKI" -id.musthave = "$" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(INTEGERTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "MKI$(integerVariableOrLiteral%)" -regid -clearid -id.n = "MKL" -id.musthave = "$" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "MKL$(longVariableOrLiteral&)" -regid -clearid -id.n = "MKS" -id.musthave = "$" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(SINGLETYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "MKS$(singlePrecisionVariableOrLiteral!)" -regid -clearid -id.n = "MKD" -id.musthave = "$" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "MKD$(doublePrecisionVariableOrLiteral#)" -regid -clearid -id.n = "_MK" -id.musthave = "$" -id.subfunc = 1 -id.callname = "" -id.args = 2 -id.arg = MKL$(-1) + MKL$(-1) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_MK$(numericalType, numericalValue)" -regid - -clearid -id.n = "CVSMBF" -id.subfunc = 1 -id.callname = "func_cvsmbf" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.hr_syntax = "CVSMBF(stringData$)" -regid -clearid -id.n = "CVDMBF" -id.subfunc = 1 -id.callname = "func_cvdmbf" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = DOUBLETYPE - ISPOINTER -id.hr_syntax = "CVDMBF(stringData$)" -regid - -clearid -id.n = "CVI" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = INTEGERTYPE - ISPOINTER -id.hr_syntax = "CVI(stringData$)" -regid -clearid -id.n = "CVL" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "CVL(stringData$)" -regid -clearid -id.n = "CVS" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.hr_syntax = "CVS(stringData$)" -regid -clearid -id.n = "CVD" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = DOUBLETYPE - ISPOINTER -id.hr_syntax = "CVD(stringData$)" -regid -clearid -id.n = "_CV" -id.subfunc = 1 -id.callname = "" -id.args = 2 -id.arg = MKL$(-1) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = -1 -id.hr_syntax = "_CV(numericalType, MKstringValue$)" -regid - -clearid -id.n = "String" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_string" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "STRING$(count&, {character$ | ASCIIcode%})" -regid - -clearid -id.n = "Space" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_space" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "SPACE$(count&)" -regid - -clearid -id.n = "InStr" -id.subfunc = 1 -id.callname = "func_instr" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?],?,?" 'checked! -id.hr_syntax = "INSTR([start%,] baseString$, searchString$)" -regid - -clearid -id.n = "_InStrRev" -id.subfunc = 1 -id.callname = "func__instrrev" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.specialformat = "[?],?,?" 'checked! -id.hr_syntax = "_INSTRREV([start%,] baseString$, searchString$)" -regid - -clearid -id.n = "Mid" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_mid" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.specialformat = "?,?,[?]" 'checked! -id.hr_syntax = "MID$(stringValue$, startPosition%[, bytes%])" -regid - -clearid -id.n = "SAdd" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "SADD(stringVariable$)" -regid - -clearid -id.n = "Cls" -id.subfunc = 2 -id.callname = "sub_clsDest" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,?]]" -id.hr_syntax = "CLS [method%] [, bgColor&] [, dest&]" -regid - -clearid -id.n = "Sqr" -id.subfunc = 1 -id.callname = "func_sqr" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "SQR(value)" -regid - -clearid -id.n = "Chr" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func_chr" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "CHR$(code%)" -regid - -clearid -id.n = "VarPtr" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function -id.ret = STRINGTYPE - ISPOINTER -id.musthave = "$" -id.hr_syntax = "VARPTR(variable_name[(reference_index%)])" -regid - -clearid -id.n = "VarPtr" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "VARPTR(variable_name[(reference_index%)])" -regid - -clearid -id.n = "_Offset" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function -id.ret = UOFFSETTYPE - ISPOINTER -id.hr_syntax = "_OFFSET(variable)" -regid - -clearid -id.n = "VarSeg" -id.subfunc = 1 -id.callname = "" -id.args = 1 -id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "VARSEG(variable_name[(start_index)])" -regid - -clearid -id.n = "Poke" -id.subfunc = 2 -id.callname = "sub_poke" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.hr_syntax = "POKE segment_offset, offset_value" -regid - -clearid -id.n = "Peek" -id.subfunc = 1 -id.callname = "func_peek" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "PEEK(segment_offset)" -regid - -clearid -id.n = "Def" -id.subfunc = 2 -id.callname = "sub_defseg" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{Seg}[=?]" 'checked! -id.secondargmustbe = "Seg" -id.hr_syntax = "DEF SEG [=][{segment|VARSEG(variable}]" -regid - -clearid -id.n = "Sin" -id.subfunc = 1 -id.callname = "std::sin" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "SIN(radian_angle!)" -regid - -clearid -id.n = "Cos" -id.subfunc = 1 -id.callname = "std::cos" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "COS(radian_angle!)" -regid - -clearid -id.n = "Tan" -id.subfunc = 1 -id.callname = "std::tan" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "TAN(radian_angle!)" -regid - -clearid -id.n = "Atn" -id.subfunc = 1 -id.callname = "std::atan" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "ATN(tangent!)" -regid - -clearid -id.n = "Log" -id.subfunc = 1 -id.callname = "func_log" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "LOG(value)" -regid - -clearid -id.n = "Abs" -id.subfunc = 1 -id.callname = "func_abs" -id.args = 1 -id.arg = MKL$(-1) 'takes anything numerical -id.ret = FLOATTYPE - ISPOINTER '***overridden by function evaluatefunc*** -id.hr_syntax = "ABS(numericalValue)" -regid - -clearid -id.n = "Erl" -id.subfunc = 1 -id.callname = "get_error_erl" -id.args = 0 -id.ret = DOUBLETYPE - ISPOINTER -id.hr_syntax = "ERL" -regid - -clearid -id.n = "Err" -id.subfunc = 1 -id.callname = "get_error_err" -id.args = 0 -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "ERR" -regid - -clearid -id.n = "Error" -id.subfunc = 2 -id.callname = "error" -id.args = 1 -id.arg = MKL$(ULONGTYPE - ISPOINTER) -id.hr_syntax = "ERROR codeNumber%" -regid - -clearid -id.n = "Line" -id.subfunc = 2 -id.callname = "sub_line" -id.args = 7 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[[{Step}](?,?)]-[{Step}](?,?)[,[?][,[{B|BF}][,?]]]" -id.hr_syntax = "LINE [STEP] [(column1, row1)]-[STEP] (column2, row2), color[, [{B|BF}], style%]" -regid - -clearid -id.n = "Sound": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub_sound" -id.args = 5 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "?,?[,[?][,[?][,?]]]" -id.hr_syntax = "SOUND frequency#, duration#[, volume#][, panning#][, waveform&]" -regid - -clearid -id.n = "Beep": id.Dependency = DEPENDENCY_MINIAUDIO -id.subfunc = 2 -id.callname = "sub_beep" -id.args = 0 -id.hr_syntax = "BEEP" -regid - -clearid -id.n = "Timer" -id.subfunc = 1 -id.callname = "func_timer" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "TIMER[(accuracy!)]" -regid - -clearid -id.n = "Rnd" -id.subfunc = 1 -id.callname = "func_rnd" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = SINGLETYPE - ISPOINTER -id.specialformat = "[?]" 'checked! -id.hr_syntax = "RND[(behavior)]" -regid - -clearid -id.n = "Randomize" -id.subfunc = 2 -id.callname = "sub_randomize" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.specialformat = "[[{Using}]?]" 'checked! -id.hr_syntax = "RANDOMIZE [USING] {seednumber|TIMER}" -regid - -clearid -id.n = "Out" -id.subfunc = 2 -id.callname = "sub_out" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.hr_syntax = "OUT registerAddress%, value%" -regid - -clearid -id.n = "PCopy" -id.subfunc = 2 -id.callname = "sub_pcopy" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.hr_syntax = "PCOPY sourcePage%, destinationPage%" -regid - -clearid -id.n = "View" -id.subfunc = 2 -id.callname = "qbg_sub_view" -id.args = 6 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[[{Screen}](?,?)-(?,?)[,[?][,?]]]" -id.secondargcantbe = "Print" -id.hr_syntax = "VIEW [SCREEN] (column1, row1)-(column2, row2)[, color][, border]" -regid - -clearid -id.n = "View" -id.subfunc = 2 -id.callname = "qbg_sub_view_print" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "{Print}[?{To}?]" 'new! -id.secondargmustbe = "Print" -id.hr_syntax = "VIEW PRINT [topRow% TO bottomRow%]" -regid - -clearid -id.n = "Window" -id.subfunc = 2 -id.callname = "qbg_sub_window" -id.args = 4 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) -id.specialformat = "[[{Screen}](?,?)-(?,?)]" -id.hr_syntax = "WINDOW [[SCREEN] (x1!, y1!) - (x2!, y2!)]" -regid - -clearid -id.n = "Locate" -id.subfunc = 2 -id.callname = "qbg_sub_locate" -id.args = 5 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,[?][,[?][,?]]]]" -id.hr_syntax = "LOCATE [row%][, column%] [, cursor%][, cursorStart%, cursorStop%]" -regid - -clearid -id.n = "Color" -id.subfunc = 2 -id.callname = "qbg_sub_color" -id.args = 3 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,?]]" -id.hr_syntax = "COLOR [foreground&][, background&]" -regid - -clearid -id.n = "Palette" -id.subfunc = 2 -id.callname = "qbg_palette" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?,?]" -id.hr_syntax = "PALETTE [attribute%, red% + (green% * 256) + (blue% * 65536)] or PALETTE [existingAttribute%, newAttribute%]" -regid - -clearid -id.n = "Width" -id.subfunc = 2 -id.callname = "qbsub_width" -id.args = 5 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{#|LPrint}][?][,[?][,[?][,[?]]]]" 'new! -'id.specialformat = "[{#|LPRINT}][?][,?]" 'new! -id.hr_syntax = "WIDTH [columns%][, rows%] or WIDTH {file_number|device}, columnwidth%" -regid - - -clearid -id.n = "Screen" -id.subfunc = 2 -id.callname = "qbg_screen" -id.args = 5 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -'id.specialformat = "[?][,[?][,[?][,?]]]" 'new! -'id.specialformat = "[?][,[?][,[?][,[?][,{_MANUALDISPLAY}]]]]" 'breaks compilation! -'id.specialformat = "[?][,[?][,[?][,[?][,[{_MANUALDISPLAY}]]]]]" <-pre-bulletproofing -id.specialformat = "[?][,[?][,[?][,[?][,[{_ManualDisplay}?]]]]]" 'a temp format for transition reasons" -id.hr_syntax = "SCREEN {mode%|imagehandle&} [, , active_page, visual_page]" -regid - -clearid -id.n = "PSet" -id.subfunc = 2 -id.callname = "sub_pset" -id.args = 3 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?)[,?]" -id.hr_syntax = "PSET [STEP](column%, row%)[, colorAttribute]" -regid - -clearid -id.n = "PReset" -id.subfunc = 2 -id.callname = "sub_preset" -id.args = 3 -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{Step}](?,?)[,?]" -id.hr_syntax = "PRESET [STEP](column%, row%)[, colorAttribute]" -regid - -clearid -id.n = "Asc" -id.subfunc = 1 -id.callname = "qbs_asc" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "ASC(text$[, position%])" -regid - -clearid -id.n = "Len" -id.subfunc = 1 -id.callname = "" 'callname is not used -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) 'note: LEN is a special case, any input is actually accepted -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "LEN(literalTextOrVariable$)" -regid - -clearid -id.n = "InKey" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_inkey" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "INKEY$" -regid - -clearid -id.n = "Str" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_str" -id.args = 1 -id.arg = MKL$(-1) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "STR$(number)" -regid - -clearid -id.n = "UCase" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_ucase" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "UCASE$(text$)" -regid - -clearid -id.n = "LCase" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_lcase" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "LCASE$(text$)" -regid - -clearid -id.n = "Left" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_left" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "LEFT$(stringValue$, numberOfCharacters%)" -regid - -clearid -id.n = "Right" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_right" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "RIGHT$(stringValue$, numberOfCharacters%)" -regid - -clearid -id.n = "LTrim" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_ltrim" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "LTRIM$(text$)" -regid - -clearid -id.n = "RTrim" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs_rtrim" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "RTRIM$(text$)" -regid - -clearid -id.n = "_Trim" -id.musthave = "$" -id.subfunc = 1 -id.callname = "qbs__trim" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_TRIM$(text$)" -regid - -clearid -id.n = "Print" -id.subfunc = 2 -id.callname = "qbs_print" 'not called directly -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "PRINT [expression] [{;|,] [expression...]" -regid - -clearid -id.n = "LPrint": id.Dependency = DEPENDENCY_PRINTER -id.subfunc = 2 -id.callname = "qbs_lprint" 'not called directly -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.hr_syntax = "LPRINT [expression] [{;|,}]" -regid - -clearid -id.n = "LPos": id.Dependency = DEPENDENCY_PRINTER -id.subfunc = 1 -id.callname = "func_lpos" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "LPOS(index%)" -regid - -'Get Current Working Directory -clearid -id.n = "_CWD" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__cwd" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_CWD$" -regid - -'Get the directory the program was started from (before the currenct directory is automatically changed to the executables directory) -clearid -id.n = "_StartDir" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__startdir" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_STARTDIR$" -regid - -'Return a path that best represents the context provided e.g. _DIR$("DESKTOP") -clearid -id.n = "_Dir" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__dir" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_DIR$(" + CHR$(34) + "folderspecification" + CHR$(34) + ")" -regid - -'Return the name of the included file in which the last error occurred -clearid -id.n = "_InclErrorFile" -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__inclerrorfile" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_INCLERRORFILE$" -regid - -clearid -id.n = "_KeyClear" -id.subfunc = 2 -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.callname = "sub__keyclear" -id.hr_syntax = "_KEYCLEAR buffer&" -regid - -clearid -id.n = "_D2R" -id.subfunc = 1 -id.callname = "func_deg2rad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_D2R(angleInDegrees!)" -regid - -clearid -id.n = "_D2G" -id.subfunc = 1 -id.callname = "func_deg2grad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_D2G(angleInDegrees!)" -regid - -clearid -id.n = "_R2D" -id.subfunc = 1 -id.callname = "func_rad2deg" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_R2D(angleInRadians!)" -regid - -clearid -id.n = "_R2G" -id.subfunc = 1 -id.callname = "func_rad2grad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_R2G(angleInRadians!)" -regid - -clearid -id.n = "_G2D" -id.subfunc = 1 -id.callname = "func_grad2deg" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_G2D(gradient!)" -regid - -clearid -id.n = "_G2R" -id.subfunc = 1 -id.callname = "func_grad2rad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_G2R(gradient!)" -regid - -clearid 'Clear the old id info so we set the slate for a new one -id.n = "_Atan2" 'The name of our new one -id.subfunc = 1 'And this is a function -id.callname = "std::atan2" 'The C name of the function -id.args = 2 'It takes 2 parameters to work -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 parameters from what I can tell -id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value -id.hr_syntax = "_ATAN2(y, x)" -regid 'and we're finished with ID registration - -clearid 'Clear the old id info so we set the slate for a new one -id.n = "_Hypot" 'The name of our new one -id.subfunc = 1 'And this is a function -id.callname = "std::hypot" 'The C name of the function -id.args = 2 'It takes 2 parameters to work -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 parameters from what I can tell -id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value -id.hr_syntax = "_HYPOT(x, y)" -regid 'and we're finished with ID registration - -clearid -id.n = "_Asin" -id.subfunc = 1 -id.callname = "std::asin" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ASIN(sine_value!)" -regid - -clearid -id.n = "_Acos" -id.subfunc = 1 -id.callname = "std::acos" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ACOS(cosine_value!)" -regid - -clearid -id.n = "_Sinh" -id.subfunc = 1 -id.callname = "std::sinh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_SINH(value)" -regid - -clearid -id.n = "_Cosh" -id.subfunc = 1 -id.callname = "std::cosh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_COSH(value)" -regid - -clearid -id.n = "_Tanh" -id.subfunc = 1 -id.callname = "std::tanh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_TANH(value)" -regid - -clearid -id.n = "_Asinh" -id.subfunc = 1 -id.callname = "std::asinh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ASINH(value)" -regid - -clearid -id.n = "_Acosh" -id.subfunc = 1 -id.callname = "std::acosh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ACOSH(value)" -regid - -clearid -id.n = "_Atanh" -id.subfunc = 1 -id.callname = "std::atanh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ATANH(value)" -regid - -clearid -id.n = "_Ceil" -id.subfunc = 1 -id.callname = "std::ceil" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_CEIL(expression)" -regid - -clearid -id.n = "_Pi" -id.subfunc = 1 -id.callname = "func_pi" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.ret = DOUBLETYPE - ISPOINTER -id.specialformat = "[?]" -id.hr_syntax = "_PI[(multiplier)]" -regid - -clearid -id.n = "_DesktopHeight" -id.subfunc = 1 -id.callname = "func_screenheight" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_DESKTOPHEIGHT" -regid - -clearid -id.n = "_DesktopWidth" -id.subfunc = 1 -id.callname = "func_screenwidth" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_DESKTOPWIDTH" -regid - -clearid -id.n = "_ScreenIcon" 'name change to from _ICONIFYWINDOW to _SCREENICON to match the screenshow and screenhide -id.subfunc = 2 -id.callname = "sub_screenicon" -id.hr_syntax = "_SCREENICON" -regid - -clearid -id.n = "_ScreenExists" -id.subfunc = 1 -id.callname = "func_windowexists" -id.hr_syntax = "_SCREENEXISTS" -regid - -clearid -id.n = "_ControlChr" -id.subfunc = 1 -id.callname = "func__controlchr" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CONTROLCHR" -regid - -clearid -id.n = "_StriCmp" -id.subfunc = 1 -id.callname = "func__str_nc_compare" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_STRICMP(string1$, string2$)" -regid - -clearid -id.n = "_StrCmp" -id.subfunc = 1 -id.callname = "func__str_compare" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_STRCMP(string1$, string2$)" -regid - -clearid -id.n = "_Arcsec" -id.subfunc = 1 -id.callname = "func_arcsec" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ARCSEC(value)" -regid - -clearid -id.n = "_Arccsc" -id.subfunc = 1 -id.callname = "func_arccsc" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ARCCSC(value)" -regid - -clearid -id.n = "_Arccot" -id.subfunc = 1 -id.callname = "func_arccot" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_ARCCOT(value)" -regid - -clearid -id.n = "_Sech" -id.subfunc = 1 -id.callname = "func_sech" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_SECH(value)" -regid - -clearid -id.n = "_Csch" -id.subfunc = 1 -id.callname = "func_csch" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_CSCH(value)" -regid - -clearid -id.n = "_Coth" -id.subfunc = 1 -id.callname = "func_coth" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_COTH(value)" -regid - -clearid -id.n = "_Sec" -id.subfunc = 1 -id.callname = "func_sec" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_SEC(value)" -regid - -clearid -id.n = "_Csc" -id.subfunc = 1 -id.callname = "func_csc" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_CSC(value)" -regid - -clearid -id.n = "_Cot" -id.subfunc = 1 -id.callname = "func_cot" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.hr_syntax = "_COT(value)" -regid - -clearid -id.n = "_ScreenIcon" -id.subfunc = 1 -id.callname = "func_screenicon" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCREENICON" -regid - -clearid -id.n = "_AutoDisplay" -id.subfunc = 1 -id.callname = "func__autodisplay" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_AUTODISPLAY" -regid - -clearid -id.n = "_ShR" ' a740g: Changed to camel case -id.subfunc = 1 -id.callname = "func__shr" -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = UINTEGER64TYPE - ISPOINTER -id.hr_syntax = "_SHR(numericalVariable, numericalValue)" -regid - -clearid -id.n = "_ShL" ' a740g: Changed to camel case -id.subfunc = 1 -id.callname = "func__shl" -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = UINTEGER64TYPE - ISPOINTER -id.hr_syntax = "_SHL(numericalVariable, numericalValue)" -regid - -' a740g: ROR & ROL additions -clearid -id.n = "_RoL" -id.subfunc = 1 -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) ' ***overridden by function evaluatefunc*** -id.ret = UINTEGER64TYPE - ISPOINTER ' ***overridden by function evaluatefunc*** -id.hr_syntax = "_ROL(numericalVariable, numericalValue)" -regid - -clearid -id.n = "_RoR" -id.subfunc = 1 -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) ' ***overridden by function evaluatefunc*** -id.ret = UINTEGER64TYPE - ISPOINTER ' ***overridden by function evaluatefunc*** -id.hr_syntax = "_ROR(numericalVariable, numericalValue)" -regid -' a740g: end of ROR & ROL additions - -clearid -id.n = "_Adler32" -id.Dependency=DEPENDENCY_ZLIB -id.subfunc = 1 -id.callname = "func__adler32" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_ADLER32(dataString$)" -regid - -clearid -id.n = "_Crc32" -id.Dependency=DEPENDENCY_ZLIB -id.subfunc = 1 -id.callname = "func__crc32" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = ULONGTYPE - ISPOINTER -id.hr_syntax = "_CRC32(dataString$)" -regid - -clearid -id.n = "_Deflate" -id.Dependency=DEPENDENCY_ZLIB -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__deflate" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_DEFLATE$(stringToCompress$)" -regid - -clearid -id.n = "_Inflate" -id.Dependency=DEPENDENCY_ZLIB -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__inflate" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) -id.specialformat = "?[,?]" -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_INFLATE$(stringToDecompress$[, originalSize&])" -regid - -clearid -id.n = "_Embedded" -id.Dependency=DEPENDENCY_EMBED -id.musthave = "$" -id.subfunc = 1 -id.callname = "func__embedded" -id.args = 1 -id.arg = MKL$(STRINGTYPE - ISPOINTER) -id.ret = STRINGTYPE - ISPOINTER -id.hr_syntax = "_EMBEDDED$(" + AddQuotes$("handle") + ")" -regid - -clearid -id.n = "_CInp" -id.subfunc = 1 -id.callname = "func__cinp" -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CINP" -regid - -clearid -id.n = "_CapsLock" -id.subfunc = 1 -id.callname = "func__capslock" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CAPSLOCK" -regid - -clearid -id.n = "_ScrollLock" -id.subfunc = 1 -id.callname = "func__scrolllock" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_SCROLLLOCK" -regid - -clearid -id.n = "_NumLock" -id.subfunc = 1 -id.callname = "func__numlock" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_NUMLOCK" -regid - -clearid -id.n = "_CapsLock" -id.subfunc = 2 -id.callname = "sub__capslock" -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.args = 1 -id.specialformat = "{On|Off|_Toggle}" -id.hr_syntax = "_CAPSLOCK {On|Off|_Toggle}" -regid - -clearid -id.n = "_Scrolllock" -id.subfunc = 2 -id.callname = "sub__scrolllock" -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.args = 1 -id.specialformat = "{On|Off|_Toggle}" -id.hr_syntax = "_SCROLLLOCK {On|Off|_Toggle}" -regid - -clearid -id.n = "_Numlock" -id.subfunc = 2 -id.callname = "sub__numlock" -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.args = 1 -id.specialformat = "{On|Off|_Toggle}" -id.hr_syntax = "_NUMLOCK {On|Off|_Toggle}" -regid - -clearid -id.n = "_ConsoleFont" -id.subfunc = 2 -id.callname = "sub__consolefont" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(INTEGERTYPE - ISPOINTER) -id.hr_syntax = "_CONSOLEFONT fontFile$" -regid - -clearid -id.n = "_ConsoleCursor" -id.subfunc = 2 -id.callname = "sub__console_cursor" -id.args = 2 -id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[{_Show|_Hide}][,?]" -id.hr_syntax = "_CONSOLECURSOR {_Show|_Hide}[, size%]" -regid - -clearid -id.n = "_ConsoleInput" -id.subfunc = 1 -id.callname = "func__getconsoleinput" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_CONSOLEINPUT" -regid - -clearid -id.n = "_ReadBit" -id.subfunc = 1 -id.callname = "func__readbit" -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = INTEGER64TYPE - ISPOINTER -id.hr_syntax = "_READBIT(numericalVariable, numericalValue)" -regid - -clearid -id.n = "_SetBit" -id.subfunc = 1 -id.callname = "func__setbit" -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = UINTEGER64TYPE - ISPOINTER -id.hr_syntax = "_SETBIT(numericalVariable, numericalValue)" -regid - -clearid -id.n = "_ResetBit" -id.subfunc = 1 -id.callname = "func__resetbit" -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = UINTEGER64TYPE - ISPOINTER -id.hr_syntax = "_RESETBIT(numericalVariable, numericalValue)" -regid - -clearid -id.n = "_ToggleBit" -id.subfunc = 1 -id.callname = "func__togglebit" -id.args = 2 -id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.ret = UINTEGER64TYPE - ISPOINTER -id.hr_syntax = "_TOGGLEBIT(numericalVariable, numericalValue)" -regid - -clearid -id.n = "_NotifyPopup" -id.subfunc = 2 ' 1 = function, 2 = sub -id.callname = "sub__guiNotifyPopup" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,?]]" -id.hr_syntax = "_NOTIFYPOPUP [title$][, message$][, iconType$]" - -regid -clearid -id.n = "_MessageBox" -id.subfunc = 2 ' 1 = function, 2 = sub -id.callname = "sub__guiMessageBox" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,?]]" -id.hr_syntax = "_MESSAGEBOX [title$][, message$][, iconType$]" -regid - -clearid -id.n = "_SelectFolderDialog" -id.musthave = "$" -id.subfunc = 1 ' 1 = function, 2 = sub -id.callname = "func__guiSelectFolderDialog" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?][,?]" -id.ret = STRINGTYPE - ISPOINTER ' return type for functions -id.hr_syntax = "_SELECTFOLDERDIALOG$([title$][, defaultPath$])" -regid - -clearid -id.n = "_ColorChooserDialog" -id.subfunc = 1 ' 1 = function, 2 = sub -id.callname = "func__guiColorChooserDialog" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) -id.specialformat = "[?][,?]" -id.ret = ULONGTYPE - ISPOINTER ' return type for functions -id.hr_syntax = "_COLORCHOOSERDIALOG&([title$][, defaultRGB&])" -regid - -clearid -id.n = "_MessageBox" -id.subfunc = 1 ' 1 = function, 2 = sub -id.callname = "func__guiMessageBox" -id.args = 5 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,[?][,[?][,?]]]]" -id.ret = LONGTYPE - ISPOINTER ' return type for functions -id.hr_syntax = "_MESSAGEBOX&([title$][, message$][, dialogType$][, iconType$][, defaultButton&])" -regid - -clearid -id.n = "_InputBox" -id.musthave = "$" -id.subfunc = 1 ' 1 = function, 2 = sub -id.callname = "func__guiInputBox" -id.args = 3 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,?]]" -id.ret = STRINGTYPE - ISPOINTER ' return type for functions -id.hr_syntax = "_INPUTBOX$([title$][, message$][, defaultInput$])" -regid - -clearid -id.n = "_OpenFileDialog" -id.musthave = "$" -id.subfunc = 1 ' 1 = function, 2 = sub -id.callname = "func__guiOpenFileDialog" -id.args = 5 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,[?][,[?][,?]]]]" -id.ret = STRINGTYPE - ISPOINTER ' return type for functions -id.hr_syntax = "_OPENFILEDIALOG$([title$][, defaultPathAndFile$][, filterPatterns$][, singleFilterDescription$][, allowMultipleSelects&])" -regid - -clearid -id.n = "_SaveFileDialog" -id.musthave = "$" -id.subfunc = 1 ' 1 = function, 2 = sub -id.callname = "func__guiSaveFileDialog" -id.args = 4 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.specialformat = "[?][,[?][,[?][,?]]]" -id.ret = STRINGTYPE - ISPOINTER ' return type for functions -id.hr_syntax = "_SAVEFILEDIALOG$([title$][, defaultPathAndFile$][, filterPatterns$][, singleFilterDescription$])" -regid +SUB reginternal + reginternalsubfunc = 1 + + 'special argument codes: + '----------------------- + '-1 Any numeric variable (will be made explicit by a C cast) + ' Typically, these are used when multiple C functions exist + + '-2 Offset+Size(in bytes) + ' Size is the largest safe memory block available from the offset + ' used for: CALL INTERRUPT[X] + + '-3 Offset+Size(in bytes) + ' Size is the largest safe memory block available from the offset + ' *Like -2, but restrictions apply + ' used for: GET/PUT(graphics) + + '-4 Offset+Size(in bytes) + ' Size is the size of the element referenced + ' used for: GET/PUT(file) + + '-5 Offset only + '-6 Size only + + '-7 '_MEM' structure referring to the passed variable + + 'special return codes: + '--------------------- + ' none yet + + 'stubs for internally handled commands: + clearid + id.n = "Asc": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Asc": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "End": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "LSet": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "RSet": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Mid": id.subfunc = 2: id.callname = "sub_stub": id.musthave = "$": regid + clearid + id.n = "Print": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Option": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Swap": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "System": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Write": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Read": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Close": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Reset": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Input": id.subfunc = 2: id.callname = "sub_stub": regid + 'stubs for unimplemented commands: + clearid + id.n = "TrOn": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "TrOff": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "List": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "Def": id.subfunc = 2: id.callname = "sub_stub": id.secondargcantbe = "SEG": regid + clearid + id.n = "IoCtl": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "IoCtl": id.subfunc = 1: id.callname = "func_stub": id.musthave = "$": id.args = 1: id.arg = MKL$(LONGTYPE - ISPOINTER): id.ret = STRINGTYPE - ISPOINTER: regid + clearid + id.n = "Fre": id.subfunc = 1: id.callname = "func_stub": id.args = 1: id.arg = MKL$(LONGTYPE - ISPOINTER): id.ret = LONGTYPE - ISPOINTER: regid + clearid + id.n = "SetMem": id.subfunc = 1: id.callname = "func_stub": id.args = 1: id.arg = MKL$(LONGTYPE - ISPOINTER): id.ret = LONGTYPE - ISPOINTER: regid + clearid + id.n = "FileAttr": id.subfunc = 1: id.callname = "func_stub": id.args = 2: id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER): id.ret = LONGTYPE - ISPOINTER: regid + clearid + id.n = "_MemGet": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "_MemPut": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "_MemFill": id.subfunc = 2: id.callname = "sub_stub": regid + clearid + id.n = "_Continue": id.subfunc = 2: id.callname = "sub_stub": regid + + + clearid + id.n = "_Resize" + id.subfunc = 2 + id.callname = "sub__resize" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{On|Off}][,{_Stretch|_Smooth}]" + id.hr_syntax = "_RESIZE [{ON|OFF}][, {_STRETCH|_SMOOTH}]" + regid + + clearid + id.n = "_Resize" + id.subfunc = 1 + id.callname = "func__resize" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_RESIZE" + regid + + clearid + id.n = "_ResizeWidth" + id.subfunc = 1 + id.callname = "func__resizewidth" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_RESIZEWIDTH" + regid + + clearid + id.n = "_ResizeHeight" + id.subfunc = 1 + id.callname = "func__resizeheight" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_RESIZEHEIGHT" + regid + + clearid + id.n = "_ScaledWidth" + id.subfunc = 1 + id.callname = "func__scaledwidth" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCALEDWIDTH" + regid + + clearid + id.n = "_ScaledHeight" + id.subfunc = 1 + id.callname = "func__scaledheight" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCALEDHEIGHT" + regid + + + clearid + id.n = "_GLRender" + id.subfunc = 2 + id.callname = "sub__glrender" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{_Behind|_OnTop|_Only}" + id.hr_syntax = "_GLRENDER {_Behind|_OnTop|_Only}" + regid + + clearid + id.n = "_DisplayOrder" + id.subfunc = 2 + id.callname = "sub__displayorder" + id.args = 4 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_Software|_Hardware|_Hardware1|_GLRender}[,{_Software|_Hardware|_Hardware1|_GLRender}[,{_Software|_Hardware|_Hardware1|_GLRender}[,{_Software|_Hardware|_Hardware1|_GLRender}]]]]" + id.hr_syntax = "_DISPLAYORDER {_Software|_Hardware|_Hardware1|_GLRender} (any combination/order)" + regid + + clearid + id.n = "_MemGet" + id.subfunc = 1 + id.callname = "func__memget" + id.args = 3 + id.arg = MKL$(UDTTYPE + (1)) + MKL$(OFFSETTYPE - ISPOINTER) + MKL$(-1) 'x = _MEMGET(block, offset, type) + id.ret = -1 + id.hr_syntax = "_MEMGET(block, offset, type)" + regid + + clearid + id.n = "_Mem" + id.subfunc = 1 + id.callname = "func__mem" + 'id.args = 1 + 'id.arg = MKL$(-7) + id.args = 2 + id.arg = MKL$(OFFSETTYPE - ISPOINTER) + MKL$(OFFSETTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined + id.hr_syntax = "_MEM(referenceVariable) or _MEM(offset, byteSize)" + regid + '---special case--- + + clearid + id.n = "_MemElement" + id.subfunc = 1 + id.callname = "func__mem" + id.args = 1 + id.arg = MKL$(-8) + id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined + id.hr_syntax = "_MEMELEMENT(referenceVariable)" + regid + '---special case--- + + + + clearid + id.n = "_MemFree" + id.subfunc = 2 + id.callname = "sub__memfree" + id.args = 1 + id.arg = MKL$(UDTTYPE + (1)) + id.hr_syntax = "_MEMFREE memoryVariable" + regid + + clearid + id.n = "_MemExists" + id.subfunc = 1 + id.callname = "func__memexists" + id.args = 1 + id.arg = MKL$(UDTTYPE + (1)) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_MEMEXISTS(memBlock)" + regid + + clearid + id.n = "_MemNew" + id.subfunc = 1 + id.callname = "func__memnew" + id.args = 1 + id.arg = MKL$(OFFSETTYPE - ISPOINTER) + id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined + id.hr_syntax = "_MEMNEW(byteSize)" + regid + + clearid + id.n = "_MemImage" + id.subfunc = 1 + id.callname = "func__memimage" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" 'dest is default + id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined + id.hr_syntax = "_MEMIMAGE or _MEMIMAGE(imageHandle)" + regid + + clearid + id.n = "_MemSound": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__memsound" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = ISUDT + (1) 'the _MEM type is the first TYPE defined + id.hr_syntax = "_MEMSOUND(soundHandle)" + regid + + clearid '_MEMCOPY a, aoffset, bytes TO b, boffset + id.n = "_MemCopy" + id.subfunc = 2 + id.callname = "sub__memcopy" + id.args = 5 + id.arg = MKL$(UDTTYPE + (1)) + MKL$(OFFSETTYPE - ISPOINTER) + MKL$(OFFSETTYPE - ISPOINTER) + MKL$(UDTTYPE + (1)) + MKL$(OFFSETTYPE - ISPOINTER) + id.specialformat = "?,?,?{To}?,?" 'dest is default + id.hr_syntax = "_MEMCOPY sourceBlock, sourceBlock.OFFSET, sourceBlock.SIZE TO destBlock, destBlock.OFFSET" + regid + + clearid + id.n = "_ConsoleTitle" + id.subfunc = 2 + id.callname = "sub__consoletitle" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "_CONSOLETITLE title$" + regid + + clearid + id.n = "_ScreenShow" + id.subfunc = 2 + id.callname = "sub__screenshow" + id.hr_syntax = "_SCREENSHOW" + regid + + clearid + id.n = "_ScreenHide" + id.subfunc = 2 + id.callname = "sub__screenhide" + id.hr_syntax = "_SCREENHIDE" + regid + + clearid + id.n = "_ScreenHide" + id.subfunc = 1 + id.callname = "func__screenhide" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCREENHIDE" + regid + + + clearid + id.n = "_Console" + id.subfunc = 1 + id.callname = "func__console" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CONSOLE" + regid + + clearid + id.n = "_Console" + id.subfunc = 2 + id.callname = "sub__console" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{On|Off}" + id.hr_syntax = "_CONSOLE {On|Off}" + regid + + clearid + id.n = "_ControlChr" + id.subfunc = 2 + id.callname = "sub__controlchr" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{On|Off}" + id.hr_syntax = "_CONTROLCHR {On|Off}" + regid + + clearid + id.n = "_Blink" + id.subfunc = 2 + id.callname = "sub__blink" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{On|Off}" + id.hr_syntax = "_BLINK {On|Off}" + regid + + clearid + id.n = "_Blink" + id.subfunc = 1 + id.callname = "func__blink" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_BLINK" + regid + + clearid + id.n = "_FileExists" + id.subfunc = 1 + id.callname = "func__fileexists" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FILEEXISTS(fileName$)" + regid + + clearid + id.n = "_DirExists" + id.subfunc = 1 + id.callname = "func__direxists" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_DIREXISTS(path$)" + regid + + 'QB64 DEVICE interface + + clearid + id.n = "Stick": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func_stick" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "?[,?]" + id.hr_syntax = "STICK(direction%) or STICK(direction%, axis_number%)" + regid + + clearid + id.n = "Strig": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func_strig" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "?[,?]" + id.hr_syntax = "STRIG(button_function%) or STRIG(button_function%, device_number%)" + regid + + clearid + id.n = "Strig": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 2 + id.callname = "sub_strig" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[(?[,?])]{On|Off|Stop}" + 'In previous versions of BASIC, the statement STRIG ON enables testing of the joystick triggers; STRIG OFF disables joystick trigger testing. QuickBASIC ignores STRIG ON and STRIG OFF statements--the statements are provided for compatibility with earlier versions. + id.hr_syntax = "STRIG(button%) {On|Off|Stop}" + regid + + + + clearid + id.n = "_Devices": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__devices" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_DEVICES" + regid + + clearid + id.n = "_Device": id.Dependency = DEPENDENCY_DEVICEINPUT + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__device" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_DEVICE$(device_number)" + regid + + clearid + id.n = "_DeviceInput": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__deviceinput" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_DEVICEINPUT or _DEVICEINPUT(device_number%)" + regid + + clearid + id.n = "_LastButton": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__lastbutton" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_LASTBUTTON(deviceNumber)" + regid + + clearid + id.n = "_LastAxis": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__lastaxis" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_LASTAXIS(deviceNumber)" + regid + + clearid + id.n = "_LastWheel": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__lastwheel" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_LASTWHEEL(deviceNumber)" + regid + + clearid + id.n = "_Button": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__button" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_BUTTON(button_number%)" + regid + + clearid + id.n = "_ButtonChange": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__buttonchange" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_BUTTONCHANGE(button_number%)" + regid + + clearid + id.n = "_Axis": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__axis" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_AXIS(axis_number%)" + regid + + + clearid + id.n = "_Wheel": id.Dependency = DEPENDENCY_DEVICEINPUT + id.subfunc = 1 + id.callname = "func__wheel" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_WHEEL(wheelNumber%)" + regid + + + + + + + + + + + clearid + id.n = "Key" + id.subfunc = 2 + id.callname = "sub_key" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "(?){On|Off|Stop}" + id.hr_syntax = "KEY(number) {On|Off|Stop}" + regid + + clearid + id.n = "_ScreenX" + id.subfunc = 1 + id.callname = "func__screenx" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCREENX" + regid + + clearid + id.n = "_ScreenY" + id.subfunc = 1 + id.callname = "func__screeny" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCREENY" + regid + + clearid + id.n = "_ScreenMove" + id.subfunc = 2 + id.callname = "sub__screenmove" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_Middle}][?,?]" + id.hr_syntax = "_SCREENMOVE x, y or _SCREENMOVE _Middle" + regid + + clearid + id.n = "_MouseMove" + id.subfunc = 2 + id.callname = "sub__mousemove" + id.args = 2 + id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + id.hr_syntax = "_MOUSEMOVE x, y" + regid + + clearid + id.n = "_OS" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__os" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_OS$" + regid + + clearid + id.n = "_Title" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__title" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_TITLE$" + regid + + clearid + id.n = "_MapUnicode" + id.subfunc = 2 + id.callname = "sub__mapunicode" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?{To}?" + id.hr_syntax = "_MAPUNICODE unicode& TO asciiCode%" + regid + + clearid + id.n = "_MapUnicode" + id.subfunc = 1 + id.callname = "func__mapunicode" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_MAPUNICODE(asciiCode%)" + regid + + clearid + id.n = "_KeyDown" + id.subfunc = 1 + id.callname = "func__keydown" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_KEYDOWN(code&)" + regid + + clearid + id.n = "_KeyHit" + id.subfunc = 1 + id.callname = "func__keyhit" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_KEYHIT" + regid + + clearid + id.n = "_WindowHandle" + id.subfunc = 1 + id.callname = "func__handle" + id.ret = INTEGER64TYPE - ISPOINTER + id.hr_syntax = "_WINDOWHANDLE" + regid + + clearid + id.n = "Files" + id.subfunc = 2 + id.callname = "sub_files" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "FILES fileSpec$" + regid + + clearid + id.n = "_Files" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__files" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_FILES$([fileSpec$])" + regid + + clearid + id.n = "_FullPath" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__fullpath" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_FULLPATH$(pathName$)" + regid + + clearid + id.n = "_PrintImage": id.Dependency = DEPENDENCY_PRINTER + id.subfunc = 2 + id.callname = "sub__printimage" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + ''proposed version: + ''id.specialformat = "[_SQUAREPIXELS][?][,(?,?)-(?,?)]" + id.hr_syntax = "_PRINTIMAGE imageHandle&" + regid + + 'remote desktop + + clearid + id.n = "_ScreenClick" + id.subfunc = 2 + id.callname = "sub__screenclick" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,?]" + id.hr_syntax = "_SCREENCLICK x, y[, button%]" + regid + + clearid + id.n = "_ScreenPrint" + id.subfunc = 2 + id.callname = "sub__screenprint" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "_SCREENPRINT text$" + regid + + clearid + id.n = "_ScreenImage": id.Dependency = DEPENDENCY_SCREENIMAGE + id.subfunc = 1 + id.callname = "func__screenimage" + id.args = 4 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?,?,?,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCREENIMAGE(column1, row1, column2, row2)" + regid + + + + + + clearid + id.n = "Lock" + id.subfunc = 2 + id.callname = "sub_lock" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + id.specialformat = "[#]?[,[?][{To}?]]" + id.hr_syntax = "LOCK #fileNumber%, record& or LOCK #fileNumber% firstRecord& TO lastRecord&" + regid + + clearid + id.n = "Unlock" + id.subfunc = 2 + id.callname = "sub_unlock" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + id.specialformat = "[#]?[,[?][{To}?]]" + id.hr_syntax = "UNLOCK #fileNumber%, record& or UNLOCK #fileNumber% firstRecord& TO lastRecord&" + regid + + clearid + id.n = "_FreeTimer" + id.subfunc = 1 + id.callname = "func__freetimer" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FREETIMER" + regid + + clearid + id.n = "Timer" + id.subfunc = 2 + id.callname = "sub_timer" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[(?)]{On|Off|Stop|Free}" + id.hr_syntax = "TIMER[(number%)] {On|Off|Stop|Free}" + regid + + clearid + id.n = "_FullScreen" + id.subfunc = 2 + id.callname = "sub__fullscreen" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_Off|_Stretch|_SquarePixels|Off}][,{_Smooth}]" + id.hr_syntax = "_FULLSCREEN [{_Off|_Stretch|_SquarePixels|Off}][,{_Smooth}]" + regid + + clearid + id.n = "_AllowFullScreen" + id.subfunc = 2 + id.callname = "sub__allowfullscreen" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_Stretch|_SquarePixels|_Off|_All|Off}][,{_Smooth|_Off|_All|Off}]" + id.hr_syntax = "_ALLOWFULLSCREEN [{_Stretch|_SquarePixels|_Off|_All|Off}][,{_Smooth|_Off|_All|Off}]" + regid + + clearid + id.n = "_FullScreen" + id.subfunc = 1 + id.callname = "func__fullscreen" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FULLSCREEN" + regid + + clearid + id.n = "_Smooth" + id.subfunc = 1 + id.callname = "func__fullscreensmooth" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SMOOTH" + regid + + clearid + id.n = "_WindowHasFocus" + id.subfunc = 1 + id.callname = "func__hasfocus" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_WINDOWHASFOCUS" + regid + + clearid + id.n = "_Clipboard" + id.musthave = "$" + id.subfunc = 2 + id.callname = "sub__clipboard" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "=?" + id.hr_syntax = "_CLIPBOARD$ = text$" + regid + + clearid + id.n = "_Clipboard" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__clipboard" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_CLIPBOARD$" + regid + + clearid + id.n = "_ClipboardImage": id.Dependency = DEPENDENCY_SCREENIMAGE + id.subfunc = 1 + id.callname = "func__clipboardimage" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CLIPBOARDIMAGE" + regid + + clearid + id.n = "_ClipboardImage": id.Dependency = DEPENDENCY_SCREENIMAGE + id.subfunc = 2 + id.callname = "sub__clipboardimage" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "=?" + id.hr_syntax = "_CLIPBOARDIMAGE = existingImageHandle&" + regid + + clearid + id.n = "_Exit" + id.subfunc = 1 + id.callname = "func__exit" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_EXIT" + regid + + clearid + id.n = "_OpenHost": id.Dependency = DEPENDENCY_SOCKETS + id.subfunc = 1 + id.callname = "func__openhost" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_OPENHOST(" + CHR$(34) + "TCP/IP:portNumber" + CHR$(34) + ")" + regid + + clearid + id.n = "_Connected" + id.subfunc = 1 + id.callname = "func__connected" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CONNECTED(connectionHandle&)" + regid + + clearid + id.n = "_ConnectionAddress" + id.mayhave = "$" + id.subfunc = 1 + id.callname = "func__connectionaddress" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_CONNECTIONADDRESS(connectionHandle&)" + regid + + clearid + id.n = "_OpenConnection" + id.subfunc = 1 + id.callname = "func__openconnection" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_OPENCONNECTION(hostHandle)" + regid + + clearid + id.n = "_OpenClient": id.Dependency = DEPENDENCY_SOCKETS + id.subfunc = 1 + id.callname = "func__openclient" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_OPENCLIENT(" + CHR$(34) + "TCP/IP:port:address" + CHR$(34) + ")" + regid + + + clearid + id.n = "_EnvironCount" + id.subfunc = 1 + id.callname = "func__environcount" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_ENVIRONCOUNT" + regid + + clearid + id.n = "Environ" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_environ" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "ENVIRON$(listIndex%) or ENVIRON$(systemID$)" + regid + + clearid + id.n = "Environ" + id.subfunc = 2 + id.callname = "sub_environ" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "ENVIRON stringExpression$" + regid + + clearid + id.n = "_ErrorLine" + id.subfunc = 1 + id.callname = "func__errorline" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_ERRORLINE" + regid + + clearid + id.n = "_InclErrorLine" + id.subfunc = 1 + id.callname = "func__inclerrorline" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_INCLERRORLINE" + regid + + clearid + id.n = "_ErrorMessage" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__errormessage" + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.args = 1 + id.specialformat = "[?]" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_ERRORMESSAGE$ or _ERRORMESSAGE$(errorCode%)" + regid + + clearid + id.n = "_Assert" + id.subfunc = 2 + id.callname = "sub__assert" + id.args = 2 + id.specialformat = "?[,?]" + id.arg = MKL$(INTEGERTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "_ASSERT condition[, errorMessage$]" + regid + + clearid + id.n = "_Display" + id.subfunc = 2 + id.callname = "sub__display" + id.hr_syntax = "_DISPLAY" + regid + + clearid + id.n = "_AutoDisplay" + id.subfunc = 2 + id.callname = "sub__autodisplay" + id.hr_syntax = "_AUTODISPLAY" + regid + + clearid + id.n = "_Limit" + id.subfunc = 2 + id.callname = "sub__limit" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.hr_syntax = "_LIMIT framesPerSecond!" + regid + + clearid + id.n = "_FPS" + id.subfunc = 2 + id.callname = "sub__fps" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.specialformat = "[{_Auto}][?]" + id.hr_syntax = "_FPS fps! or _FPS _Auto" + regid + + clearid + id.n = "_Delay" + id.subfunc = 2 + id.callname = "sub__delay" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.hr_syntax = "_DELAY seconds!" + regid + + clearid + id.n = "_Icon": id.Dependency = DEPENDENCY_ICON + id.subfunc = 2 + id.callname = "sub__icon" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?[,?]]" + id.hr_syntax = "_ICON [mainImageHandle&[, smallImageHandle&]]" + regid + + clearid + id.n = "_Title" + id.subfunc = 2 + id.callname = "sub__title" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "_TITLE text$" + regid + + clearid + id.n = "_Echo" + id.subfunc = 2 + id.callname = "sub__echo" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "_ECHO text$" + regid + + clearid + id.n = "_ReadFile" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__readfile" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_READFILE$(fileSpec$)" + regid + + clearid + id.n = "_WriteFile" + id.subfunc = 2 + id.callname = "sub__writefile" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "_WRITEFILE fileSpec$, contents$" + regid + + clearid + id.n = "_AcceptFileDrop" + id.subfunc = 2 + id.callname = "sub__filedrop" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{On|Off}]" + id.hr_syntax = "_ACCEPTFILEDROP [{On|Off}]" + regid + + clearid + id.n = "_AcceptFileDrop" + id.subfunc = 1 + id.callname = "func__filedrop" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_ACCEPTFILEDROP" + regid + + clearid + id.n = "_FinishDrop" + id.subfunc = 2 + id.callname = "sub__finishdrop" + id.hr_syntax = "_FINISHDROP" + regid + + clearid + id.n = "_TotalDroppedFiles" + id.subfunc = 1 + id.callname = "func__totaldroppedfiles" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_TOTALDROPPEDFILES" + regid + + clearid + id.n = "_DroppedFile" + id.mayhave = "$" + id.subfunc = 1 + id.callname = "func__droppedfile" + id.ret = STRINGTYPE - ISPOINTER + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "_DROPPEDFILE$ or _DROPPEDFILE$(index&)" + regid + + clearid + id.n = "Clear" + id.subfunc = 2 + id.callname = "sub_clear" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,?]]" + id.hr_syntax = "CLEAR" + regid + + 'IMAGE CREATION/FREEING + + clearid + id.n = "_NewImage" + id.subfunc = 1 + id.callname = "func__newimage" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_NEWIMAGE(width&, height&, mode)" + regid + + clearid + id.n = "_LoadImage" + id.Dependency = DEPENDENCY_IMAGE_CODEC + id.subfunc = 1 + id.callname = "func__loadimage" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "?[,[?][,?]]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_LOADIMAGE(fileName$[, [mode&][, requirements$]])" + regid + + clearid + id.n = "_FreeImage" + id.subfunc = 2 + id.callname = "sub__freeimage" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "_FREEIMAGE handle&" + regid + + clearid + id.n = "_CopyImage" + id.subfunc = 1 + id.callname = "func__copyimage" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_COPYIMAGE(imageHandle&[, mode])" + regid + + clearid + id.n = "_SaveImage" + id.Dependency = DEPENDENCY_IMAGE_CODEC + id.subfunc = 2 + id.callname = "sub__saveimage" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "?[,[?][,?]]" + id.hr_syntax = "_SAVEIMAGE fileName$[, imageHandle&][, requirements$])" + regid + + 'IMAGE SELECTION + + clearid + id.n = "_Source" + id.subfunc = 2 + id.callname = "sub__source" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?" + id.hr_syntax = "_SOURCE handle&" + regid + + clearid + id.n = "_Dest" + id.subfunc = 2 + id.callname = "sub__dest" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?" + id.hr_syntax = "_DEST imageHandle&" + regid + + clearid + id.n = "_Source" + id.subfunc = 1 + id.callname = "func__source" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SOURCE" + regid + + clearid + id.n = "_Dest" + id.subfunc = 1 + id.callname = "func__dest" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_DEST" + regid + + clearid + id.n = "_Display" + id.subfunc = 1 + id.callname = "func__display" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_DISPLAY" + regid + + 'IMAGE SETTINGS + + clearid + id.n = "_Blend" + id.subfunc = 2 + id.callname = "sub__blend" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "_BLEND [imageHandle&]" + regid + + clearid + id.n = "_DontBlend" + id.subfunc = 2 + id.callname = "sub__dontblend" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "_DONTBLEND [imageHandle&]" + regid + + clearid + id.n = "_ClearColor" + id.subfunc = 2 + id.callname = "sub__clearcolor" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_None}][?][,?]" + id.hr_syntax = "_CLEARCOLOR {color&|_None}[,dest_handle&]" + regid + + 'USING/CHANGING A SURFACE + + clearid + id.n = "_PutImage" + id.subfunc = 2 + id.callname = "sub__putimage" + id.args = 10 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + id.specialformat = "[[{Step}](?,?)[-[{Step}](?,?)]][,[?][,[?][,[[{Step}](?,?)[-[{Step}](?,?)]][,{_Smooth}]]]]" + id.hr_syntax = "_PUTIMAGE [STEP] [(dx1, dy1)-[STEP][(dx2, dy2)]][, sourceHandle&][, destHandle&][, ][STEP][(sx1, sy1)[-STEP][(sx2, sy2)]][_SMOOTH]" + regid + + clearid + id.n = "_MapTriangle" + id.subfunc = 2 + id.callname = "sub__maptriangle" + id.args = 19 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_Clockwise|_AntiClockwise}][{_Seamless}](?,?)-(?,?)-(?,?)[,?]{To}(?,?[,?])-(?,?[,?])-(?,?[,?])[,[?][,{_Smooth|_SmoothShrunk|_SmoothStretched}]]" + id.hr_syntax = "_MAPTRIANGLE [{_SEAMLESS}] (sx1, sy1)-(sx2, sy2)-(sx3, sy3), source& TO (dx1, dy1)-(dx2, dy2)-(dx3, dy3)[, destination&][{_SMOOTH|_SMOOTHSHRUNK|_SMOOTHSTRETCHED}]]" + regid + + clearid + id.n = "_DepthBuffer" + id.subfunc = 2 + id.callname = "sub__depthbuffer" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{On|Off|Lock|_Clear}[,?]" + id.hr_syntax = "_DEPTHBUFFER {On|Off|Lock|_Clear}[,handle&]" + regid + + clearid + id.n = "_SetAlpha" + id.subfunc = 2 + id.callname = "sub__setalpha" + id.args = 4 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,[?[{To}?]][,?]]" + id.hr_syntax = "_SETALPHA alpha& or _SETALPHA color1& TO color2&[, imageHandle&]" + regid + + 'IMAGE INFO + + clearid + id.n = "_Width" + id.subfunc = 1 + id.callname = "func__width" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_WIDTH(imageHandle&)" + regid + + clearid + id.n = "_Height" + id.subfunc = 1 + id.callname = "func__height" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_HEIGHT(imageHandle&)" + regid + + clearid + id.n = "_PixelSize" + id.subfunc = 1 + id.callname = "func__pixelsize" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_PIXELSIZE[(imageHandle&)]" + regid + + clearid + id.n = "_ClearColor" + id.subfunc = 1 + id.callname = "func__clearcolor" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CLEARCOLOR[(sourceHandle&)]" + regid + + clearid + id.n = "_Blend" + id.subfunc = 1 + id.callname = "func__blend" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_BLEND[(imageHandle&)]" + regid + + clearid + id.n = "_DefaultColor" + id.subfunc = 1 + id.callname = "func__defaultcolor" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_DEFAULTCOLOR[(imageHandle&)]" + regid + + clearid + id.n = "_BackgroundColor" + id.subfunc = 1 + id.callname = "func__backgroundcolor" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_BACKGROUNDCOLOR(imageHandle&)]" + regid + + '256 COLOR PALETTES + + clearid + id.n = "_PaletteColor" + id.subfunc = 1 + id.callname = "func__palettecolor" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_PALETTECOLOR(attributeNumber%, imgHandle&)" + regid + + clearid + id.n = "_PaletteColor" + id.subfunc = 2 + id.callname = "sub__palettecolor" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,?]" + id.hr_syntax = "_PALETTECOLOR attribute%, newColor&[, imgHandle&]" + regid + + clearid + id.n = "_CopyPalette" + id.subfunc = 2 + id.callname = "sub__copypalette" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,?]" + id.hr_syntax = "_COPYPALETTE [sourceImageHandle&[, destinationImageHandle&]]" + regid + + 'FONT SUPPORT + + clearid + id.n = "_LoadFont": id.Dependency = DEPENDENCY_LOADFONT + id.subfunc = 1 + id.callname = "func__loadfont" + id.args = 4 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,[?][,[?]]]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_LOADFONT(fileName$, size&[, " + CHR$(34) + "{MONOSPACE|, UNICODE|, DONTBLEND|, MEMORY|, AUTOMONO}" + CHR$(34) + "][, fontIndex])" + regid + + clearid + id.n = "_Font" + id.subfunc = 2 + id.callname = "sub__font" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.hr_syntax = "_FONT fontHandle&[, imageHandle&]" + regid + + clearid + id.n = "_FontWidth" + id.subfunc = 1 + id.callname = "func__fontwidth" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FONTWIDTH or _FONTWIDTH(fontHandle&)" + regid + + clearid + id.n = "_FontHeight" + id.subfunc = 1 + id.callname = "func__fontheight" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FONTHEIGHT or _FONTHEIGHT(fontHandle&)" + regid + + clearid + id.n = "_Font" + id.subfunc = 1 + id.callname = "func__font" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FONT[(imageHandle&)]" + regid + + clearid + id.n = "_Md5" + id.Dependency = DEPENDENCY_LOADFONT + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__md5" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_MD5$(dataString$)" + regid + + clearid + id.n = "_PrintString" + id.subfunc = 2 + id.callname = "sub__printstring" + id.args = 4 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?),?[,?]" + id.hr_syntax = "_PRINTSTRING(x, y), text$[, imageHandle&]" + regid + + clearid + id.n = "_PrintWidth" + id.subfunc = 1 + id.callname = "func__printwidth" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_PRINTWIDTH(textToPrint$[, destinationHandle&])" + regid + + clearid + id.n = "_FreeFont" + id.subfunc = 2 + id.callname = "sub__freefont" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?" + id.hr_syntax = "_FREEFONT fontHandle&" + regid + + clearid + id.n = "_PrintMode" + id.subfunc = 2 + id.callname = "sub__printmode" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{_FillBackground|_KeepBackground|_OnlyBackground}[,?]" + id.hr_syntax = "_PRINTMODE {_FillBackground|_KeepBackground|_OnlyBackground}[, imageHandle&]" + regid + + clearid + id.n = "_PrintMode" + id.subfunc = 1 + id.callname = "func__printmode" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_PRINTMODE[(imageHandle&)]" + regid + + ' a740g: Extended Font support + clearid + id.n = "_UFontHeight" + id.Dependency = DEPENDENCY_LOADFONT + id.subfunc = 1 + id.callname = "func__UFontHeight" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_UFONTHEIGHT&[(fontHandle&)]" + regid + + clearid + id.n = "_UPrintWidth" + id.Dependency = DEPENDENCY_LOADFONT + id.subfunc = 1 + id.callname = "func__UPrintWidth" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,[?][,?]]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_UPRINTWIDTH&(text$[, utfEncoding&][, fontHandle&])" + regid + + clearid + id.n = "_ULineSpacing" + id.Dependency = DEPENDENCY_LOADFONT + id.subfunc = 1 + id.callname = "func__ULineSpacing" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_ULINESPACING&[(fontHandle&)]" + regid + + clearid + id.n = "_UPrintString" + id.Dependency = DEPENDENCY_LOADFONT + id.subfunc = 2 + id.callname = "sub__UPrintString" + id.args = 7 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "(?,?),?[,[?][,[?][,[?][,?]]]]" + id.hr_syntax = "_UPRINTSTRING (x&, y&), text$[, maxWidth&][, utfEncoding&][, fontHandle&][, imageHandle&]" + regid + + clearid + id.n = "_UCharPos" + id.Dependency = DEPENDENCY_LOADFONT + id.subfunc = 1 + id.callname = "func__UCharPos" + id.args = 4 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) ' arg 2 has special handling code in evaluatefunc() + id.specialformat = "?[,[?][,[?][,?]]]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_UCHARPOS&(text$[, posArray&()][, utfEncoding&][, fontHandle&])" + regid + + 'WORKING WITH COLORS + + clearid + id.n = "_RGBA" + id.subfunc = 1 + id.callname = "func__rgba" + id.args = 5 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?,?,?[,?]" + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_RGBA(red&, green&, blue&, alpha&[, imageHandle&])" + regid + + clearid + id.n = "_RGB" + id.subfunc = 1 + id.callname = "func__rgb" + id.args = 4 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?,?[,?]" + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_RGB(red&, green&, blue&[, imageHandle&])" + regid + + clearid + id.n = "_Red" + id.subfunc = 1 + id.callname = "func__red" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_RED(rgbaColorIndex&[, imageHandle&])" + regid + + clearid + id.n = "_Green" + id.subfunc = 1 + id.callname = "func__green" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_GREEN(rgbaColorIndex&[, imageHandle&])" + regid + + clearid + id.n = "_Blue" + id.subfunc = 1 + id.callname = "func__blue" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_BLUE(rgbaColorIndex&[, imageHandle&])" + regid + + clearid + id.n = "_Alpha" + id.subfunc = 1 + id.callname = "func__alpha" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_ALPHA(color~&[, imageHandle&])" + regid + + clearid + id.n = "_RGBA32" + id.subfunc = 1 + id.callname = "func__rgba32" + id.args = 4 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_RGBA32(red&, green&, blue&, alpha&)" + regid + + clearid + id.n = "_RGB32" + id.subfunc = 1 + id.callname = "func__rgb32" + id.overloaded = -1 + id.minargs = 1 + id.args = 4 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_RGB32(red&, green&, blue&[, alpha&]) or _RGB32(intensity&[, alpha&])" + regid + + clearid + id.n = "_Red32" + id.subfunc = 1 + id.callname = "func__red32" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_RED32(rgbaColor&)" + regid + + clearid + id.n = "_Green32" + id.subfunc = 1 + id.callname = "func__green32" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_GREEN32(rgbaColor&)" + regid + + clearid + id.n = "_Blue32" + id.subfunc = 1 + id.callname = "func__blue32" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_BLUE32(rgbaColor&)" + regid + + clearid + id.n = "_Alpha32" + id.subfunc = 1 + id.callname = "func__alpha32" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_ALPHA32(rgbaColor&)" + regid + + + clearid + id.n = "Draw" + id.subfunc = 2 + id.callname = "sub_draw" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "DRAW drawString$" + regid + + clearid + id.n = "Play": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub_play" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "PLAY commandString$" + regid + + clearid + id.n = "Play": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func_play" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "PLAY" + regid + + 'QB64 MOUSE + clearid + id.n = "_MouseShow" + id.subfunc = 2 + id.callname = "sub__mouseshow" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "_MOUSESHOW [cursorShape$]" + regid + + clearid + id.n = "_MouseHide" + id.subfunc = 2 + id.callname = "sub__mousehide" + id.hr_syntax = "_MOUSEHIDE" + regid + + clearid + id.n = "_MouseHidden" + id.subfunc = 1 + id.callname = "func__mousehidden" + id.ret = LONGTYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEHIDDEN" + regid + + clearid + id.n = "_MouseInput" + id.subfunc = 1 + id.callname = "func__mouseinput" + id.ret = LONGTYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEINPUT" + regid + + clearid + id.n = "_MouseX" + id.subfunc = 1 + id.callname = "func__mousex" + id.ret = SINGLETYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEX" + regid + + clearid + id.n = "_MouseY" + id.subfunc = 1 + id.callname = "func__mousey" + id.ret = SINGLETYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEY" + regid + + clearid + id.n = "_MouseMovementX" + id.subfunc = 1 + id.callname = "func__mousemovementx" + id.ret = SINGLETYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEMOVEMENTX" + regid + + clearid + id.n = "_MouseMovementY" + id.subfunc = 1 + id.callname = "func__mousemovementy" + id.ret = SINGLETYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEMOVEMENTY" + regid + + clearid + id.n = "_MouseButton" + id.subfunc = 1 + id.callname = "func__mousebutton" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_MOUSEBUTTON(buttonNumber)" + regid + + clearid + id.n = "_MouseWheel" + id.subfunc = 1 + id.callname = "func__mousewheel" + id.ret = LONGTYPE - ISPOINTER + id.args = 0 + id.hr_syntax = "_MOUSEWHEEL" + regid + + clearid + id.n = "FreeFile" + id.subfunc = 1 + id.callname = "func_freefile" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_FREEFILE" + regid + + clearid + id.n = "Name" + id.subfunc = 2 + id.callname = "sub_name" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "?{As}?" + id.hr_syntax = "NAME oldFileOrFolderName$ AS newFileOrFolderName$" + regid + + clearid + id.n = "Kill" + id.subfunc = 2 + id.callname = "sub_kill" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "KILL fileSpec$" + regid + + clearid + id.n = "ChDir" + id.subfunc = 2 + id.callname = "sub_chdir" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "CHDIR path$" + regid + + clearid + id.n = "MkDir" + id.subfunc = 2 + id.callname = "sub_mkdir" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "MKDIR pathSpec$" + regid + + clearid + id.n = "RmDir" + id.subfunc = 2 + id.callname = "sub_rmdir" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "RMDIR path$" + regid + + clearid + id.n = "Chain" + id.subfunc = 2 + id.callname = "sub_chain" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "CHAIN moduleName$" + regid + + + clearid + id.n = "Shell" + id.subfunc = 2 + id.callname = "sub_shell2" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "{_Hide}[{_DontWait}][?]" + id.secondargmustbe = "_Hide" + id.hr_syntax = "SHELL [_DONTWAIT] [_HIDE] commandToRun$" + regid + + clearid + id.n = "Shell" + id.subfunc = 2 + id.callname = "sub_shell3" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "{_DontWait}[{_Hide}][?]" + id.secondargmustbe = "_DontWait" + id.hr_syntax = "SHELL [_DONTWAIT] [_HIDE] commandToRun$" + regid + + clearid + id.n = "Shell" + id.subfunc = 2 + id.callname = "sub_shell" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?]" + 'id.secondargcantbe = "_HIDE" + id.hr_syntax = "SHELL [_DONTWAIT] [_HIDE] commandToRun$" + regid + + clearid + id.n = "Shell" + id.subfunc = 1 + id.callname = "func_shell" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = INTEGER64TYPE - ISPOINTER + id.hr_syntax = "SHELL(commandToRun$)" + regid + + clearid + id.n = "_ShellHide" + id.subfunc = 1 + id.callname = "func__shellhide" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = INTEGER64TYPE - ISPOINTER + id.hr_syntax = "_SHELLHIDE(commandToRun$)" + regid + + clearid + id.n = "Command" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_command" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "COMMAND$[(index%)]" + regid + + clearid + id.n = "_CommandCount" + id.subfunc = 1 + id.callname = "func__commandcount" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_COMMANDCOUNT" + regid + + + 'QB64 AUDIO + + clearid + id.n = "_SndRate": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndrate" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SNDRATE" + regid + + clearid + id.n = "_SndRaw": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndraw" + id.args = 3 + id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,[?][,?]]" + id.hr_syntax = "_SNDRAW leftSample[, rightSample][, pipeHandle&]" + regid + + clearid + id.n = "_SndRawDone": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndrawdone" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "_SNDRAWDONE [pipeHandle&]" + regid + + clearid + id.n = "_SndOpenRaw": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndopenraw" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SNDOPENRAW" + regid + + clearid + id.n = "_SndRawLen": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndrawlen" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = DOUBLETYPE - ISPOINTER + id.hr_syntax = "_SNDRAWLEN [pipeHandle&]" + regid + + clearid + id.n = "_SndLen": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndlen" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.hr_syntax = "_SNDLEN(handle&)" + regid + + clearid + id.n = "_SndPaused": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndpaused" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SNDPAUSED(handle&)" + regid + + clearid + id.n = "_SndPlayFile": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndplayfile" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + id.specialformat = "?[,[?][,?]]" + id.hr_syntax = "_SNDPLAYFILE fileName$[, , volume!]" + regid + + clearid + id.n = "_SndPlayCopy": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndplaycopy" + id.args = 5 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + id.specialformat = "?[,[?][,[?][,[?][,[?]]]]]" + id.hr_syntax = "_SNDPLAYCOPY handle&[, volume!][, x!][, y!][, z!]" + regid + + clearid + id.n = "_SndStop": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndstop" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.hr_syntax = "_SNDSTOP handle&" + regid + + clearid + id.n = "_SndLoop": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndloop" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.hr_syntax = "_SNDLOOP handle&" + regid + + clearid + id.n = "_SndLimit": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndlimit" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + id.hr_syntax = "_SNDLIMIT handle&, numberOfSeconds!" + regid + + clearid + id.n = "_SndOpen": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndopen" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_SNDOPEN(fileName$[, capabilities$])" + regid + + clearid + id.n = "_SndSetPos": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndsetpos" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + id.hr_syntax = "_SNDSETPOS handle&, position!" + regid + + clearid + id.n = "_SndGetPos": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndgetpos" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.hr_syntax = "_SNDGETPOS(handle&)" + regid + + clearid + id.n = "_SndPlaying": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndplaying" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SNDPLAYING(handle&)" + regid + + clearid + id.n = "_SndPause": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndpause" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.hr_syntax = "_SNDPAUSE handle&" + regid + + clearid + id.n = "_SndBal": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndbal" + id.args = 5 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "?,[?][,[?][,[?][,[?]]]]" + id.hr_syntax = "_SNDBAL handle&[, x!][, y!][, z!][, channel&]" + regid + + clearid + id.n = "_SndVol": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndvol" + id.args = 2 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + id.hr_syntax = "_SNDVOL handle&, volume!" + regid + + clearid + id.n = "_SndPlay": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndplay" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.hr_syntax = "_SNDPLAY handle&" + regid + + clearid + id.n = "_SndCopy": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndcopy" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_SNDCOPY(handle&)" + regid + + clearid + id.n = "_SndClose": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__sndclose" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.hr_syntax = "_SNDCLOSE handle&" + regid + + clearid + id.n = "_SndNew" + id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 1 + id.callname = "func__sndnew" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SNDNEW(frames&, channels&, bits&)" + regid + + clearid + id.n = "_MIDISoundBank" + id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub__midisoundbank" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.hr_syntax = "_MIDISOUNDBANK fileName$[, capabilities$]" + regid + + clearid + id.n = "Input" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_input" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "INPUT$(numberOfBytes%[, fileOrPortNumber])" + regid + + clearid + id.n = "Seek" + id.subfunc = 2 + id.callname = "sub_seek" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[#]?,?" + id.hr_syntax = "SEEK filenumber&, position" + regid + + clearid + id.n = "Seek" + id.subfunc = 1 + id.callname = "func_seek" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "SEEK(filenumber&)" + regid + + clearid + id.n = "Loc" + id.subfunc = 1 + id.callname = "func_loc" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "LOC(fileOrPortNumber%)" + regid + + clearid + id.n = "EOF" + id.subfunc = 1 + id.callname = "func_eof" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "EOF(fileNumber&)" + regid + + clearid + id.n = "LOF" + id.subfunc = 1 + id.callname = "func_lof" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "LOF(fileNumber&)" + regid + + + clearid + id.n = "Screen" + id.subfunc = 1 + id.callname = "func_screen" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,?]" + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "SCREEN(x, y[, colorflag%])" + regid + + clearid + id.n = "PMap" + id.subfunc = 1 + id.callname = "func_pmap" + id.args = 2 + id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.hr_syntax = "PMAP(coordinate, function_number%)" + regid + + + clearid + id.n = "Point" + id.subfunc = 1 + id.callname = "func_point" + id.args = 2 + id.arg = MKL$(SINGLETYPE - ISPOINTER) + MKL$(SINGLETYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = DOUBLETYPE - ISPOINTER + id.hr_syntax = "POINT(x, y) or POINT({0|1|2|3})" + regid + + + clearid + id.n = "Tab" + id.subfunc = 1 + id.callname = "func_tab" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "TAB(column%)" + regid + + clearid + id.n = "Spc" + id.subfunc = 1 + id.callname = "func_spc" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "SPC(count%)" + regid + + + clearid + id.n = "Wait" + id.subfunc = 2 + id.callname = "sub_wait" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,?]" + id.hr_syntax = "WAIT port%, andMask%[, xorMask%]" + regid + + clearid + id.n = "Inp" + id.subfunc = 1 + id.callname = "func_inp" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "INP(address)" + regid + + clearid + id.n = "Pos" + id.subfunc = 1 + id.callname = "func_pos" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "POS(0)" + regid + + clearid + id.n = "Sgn" + id.subfunc = 1 + id.callname = "func_sgn" + id.args = 1 + id.arg = MKL$(-1) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "SGN(value)" + regid + + clearid + id.n = "LBound" + id.subfunc = 1 + id.args = 2 + id.arg = MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "LBOUND(arrayName[, dimension%])" + regid + + clearid + id.n = "UBound" + id.subfunc = 1 + id.args = 2 + id.arg = MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "UBOUND(arrayName[, dimension%])" + regid + + clearid + id.n = "_Bin" + id.musthave = "$" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_BIN$(number)" + regid + + clearid + id.n = "Oct" + id.musthave = "$" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "OCT$(number)" + regid + + clearid + id.n = "Hex" + id.musthave = "$" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "HEX$(decimalNumber)" + regid + + clearid + id.n = "Sleep" + id.subfunc = 2 + id.callname = "sub_sleep" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.hr_syntax = "SLEEP seconds%" + regid + + clearid + id.n = "Exp" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = -1 + id.hr_syntax = "EXP(numericExpression)" + regid + + clearid + id.n = "Fix" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = -1 + id.hr_syntax = "FIX(expression)" + regid + + clearid + id.n = "Int" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = -1 + id.hr_syntax = "INT(expression)" + regid + + clearid + id.n = "CDbl" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = DOUBLETYPE - ISPOINTER + id.hr_syntax = "CDBL(expression)" + regid + + clearid + id.n = "CSng" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = SINGLETYPE - ISPOINTER + id.hr_syntax = "CSNG(expression)" + regid + + clearid + id.n = "_Round" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = INTEGER64TYPE - ISPOINTER + id.hr_syntax = "_ROUND(number)" + regid + + clearid + id.n = "CInt" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = INTEGERTYPE - ISPOINTER + id.hr_syntax = "CINT(expression)" + regid + + clearid + id.n = "CLng" + id.subfunc = 1 + id.args = 1 + id.arg = MKL$(-1) + id.ret = INTEGERTYPE - ISPOINTER + id.hr_syntax = "CLNG(expression)" + regid + + + + clearid + id.n = "Time" + id.musthave = "$" + id.subfunc = 2 + id.callname = "sub_time" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "=?" + id.hr_syntax = "TIME$ = timeToSet$" + regid + + clearid + id.n = "Time" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_time" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "TIME$" + regid + + + + clearid + id.n = "Date" + id.musthave = "$" + id.subfunc = 2 + id.callname = "sub_date" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "=?" + id.hr_syntax = "DATE$ = dateToSet$" + regid + + clearid + id.n = "Date" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_date" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "DATE$" + regid + + clearid + id.n = "CsrLin" + id.subfunc = 1 + id.callname = "func_csrlin" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "CSRLIN" + regid + + + clearid + id.n = "Paint" + id.subfunc = 2 + id.callname = "sub_paint" + id.args = 5 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?)[,[?][,[?][,?]]]" + 'PAINT [STEP] (x!,y!)[,[paint] [,[bordercolor&] [,background$]]] + id.hr_syntax = "PAINT [STEP] (x!, y!)[,[fillColor&] [,[bordercolor&] [,pattern$]]]" + regid + + clearid + id.n = "Circle" + id.subfunc = 2 + id.callname = "sub_circle" + id.args = 7 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?),?[,[?][,[?][,[?][,?]]]]" + 'CIRCLE [STEP] (x!,y!),radius![,[color&] [,[start!] [,[end!] [,aspect!]]]] + id.hr_syntax = "CIRCLE [STEP] (x!, y!), radius![, [color&] [, [start!] [, [end!] [, aspect!]]]]" + regid + + clearid + id.n = "BLoad" + id.subfunc = 2 + id.callname = "sub_bload" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.hr_syntax = "BLOAD fileName$, VARPTR(imageArray%(index))" + regid + + clearid + id.n = "BSave" + id.subfunc = 2 + id.callname = "sub_bsave" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.hr_syntax = "BSAVE saveFile$, VARPTR(array(index)), fileSize&" + regid + + 'double definition + clearid + id.n = "Get" + id.subfunc = 2 + id.callname = "sub_graphics_get" + id.args = 6 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?)-[{Step}](?,?),?[,?]" + id.secondargmustbe = "Step" + id.hr_syntax = "GET [STEP] (column1, row1)-[STEP](column2, row2), array([index])[, offscreenColor]" + regid + + clearid + id.n = "Get" + id.subfunc = 2 + id.callname = "sub_graphics_get" + id.args = 6 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?)-[{Step}](?,?),?[,?]" + id.secondargmustbe = "(" + id.hr_syntax = "GET [STEP] (column1, row1)-[STEP](column2, row2), array([index])[, offscreenColor]" + regid + + 'double definition + clearid + id.n = "Put" + id.subfunc = 2 + id.callname = "sub_graphics_put" + id.args = 5 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?),?[,[{_Clip}][{PSet|PReset|And|Or|Xor}][,?]]" + 'PUT [STEP] (x!,y!),arrayname# [(indexes%)] [,actionverb] + 'PUT (10, 10), myimage, _CLIP, 0 + id.secondargmustbe = "Step" + id.hr_syntax = "PUT [STEP](column, row), Array([index])[,] [_CLIP] [{PSET|PRESET|AND|OR|XOR}]][, omitcolor]" + regid + clearid + id.n = "Put" + id.subfunc = 2 + id.callname = "sub_graphics_put" + id.args = 5 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(-3) + MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?),?[,[{_Clip}][{PSet|PReset|And|Or|Xor}][,?]]" + 'PUT [STEP] (x!,y!),arrayname# [(indexes%)] [,actionverb] + 'PUT (10, 10), myimage, _CLIP, 0 + id.secondargmustbe = "(" + id.hr_syntax = "PUT [STEP](column, row), Array([index])[,] [_CLIP] [{PSET|PRESET|AND|OR|XOR}]][, omitcolor]" + regid + + clearid + id.n = "Get" + id.subfunc = 2 + id.callname = "sub_get" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(-4) + 'id.specialformat = "[#]?,[?],?" 'non field compliant definition + id.specialformat = "[#]?[,[?][,?]]" 'field compliant definition + id.hr_syntax = "GET #fileNumber&, [position][, targetVariable|targetArray()}]" + regid + + clearid + id.n = "Put" + id.subfunc = 2 + id.callname = "sub_put" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(-4) + 'id.specialformat = "[#]?,[?],?" 'non field compliant definition + id.specialformat = "[#]?[,[?][,?]]" 'field compliant definition + id.hr_syntax = "PUT #filenumber&, [position][, {holdingvariable|holdingarray()}]" + regid + + clearid + id.n = "Open" + id.subfunc = 2 + id.callname = "sub_open" + id.args = 6 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?[{For Random|For Binary|For Input|For Output|For Append}][{Access Read Write|Access Read|Access Write}][{Shared|Lock Read Write|Lock Read|Lock Write}]{As}[#]?[{Len =}?]" + id.hr_syntax = "OPEN fileName$ [FOR mode] [ACCESS|LOCK|SHARED [{READ|WRITE}] AS [#]fileNumber& [LEN = recordLength]" + regid + + clearid + id.n = "Open" + id.subfunc = 2 + id.callname = "sub_open_gwbasic" + id.args = 4 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,[#]?,?[,?]" + id.hr_syntax = "OPEN modeLetter$, [#]fileNumber&, fileName$[, recordLength]" + regid + + clearid + id.n = "Val" + id.subfunc = 1 + id.callname = "func_val" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "VAL(string_value$)" + regid + + clearid + id.n = "MKSMBF" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_mksmbf" + id.args = 1 + id.arg = MKL$(SINGLETYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "MKSMBF$(value!)" + regid + clearid + id.n = "MKDMBF" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_mkdmbf" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "MKDMBF$(value#)" + regid + + clearid + id.n = "MKI" + id.musthave = "$" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(INTEGERTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "MKI$(integerVariableOrLiteral%)" + regid + clearid + id.n = "MKL" + id.musthave = "$" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "MKL$(longVariableOrLiteral&)" + regid + clearid + id.n = "MKS" + id.musthave = "$" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(SINGLETYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "MKS$(singlePrecisionVariableOrLiteral!)" + regid + clearid + id.n = "MKD" + id.musthave = "$" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "MKD$(doublePrecisionVariableOrLiteral#)" + regid + clearid + id.n = "_MK" + id.musthave = "$" + id.subfunc = 1 + id.callname = "" + id.args = 2 + id.arg = MKL$(-1) + MKL$(-1) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_MK$(numericalType, numericalValue)" + regid + + clearid + id.n = "CVSMBF" + id.subfunc = 1 + id.callname = "func_cvsmbf" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.hr_syntax = "CVSMBF(stringData$)" + regid + clearid + id.n = "CVDMBF" + id.subfunc = 1 + id.callname = "func_cvdmbf" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = DOUBLETYPE - ISPOINTER + id.hr_syntax = "CVDMBF(stringData$)" + regid + + clearid + id.n = "CVI" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = INTEGERTYPE - ISPOINTER + id.hr_syntax = "CVI(stringData$)" + regid + clearid + id.n = "CVL" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "CVL(stringData$)" + regid + clearid + id.n = "CVS" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.hr_syntax = "CVS(stringData$)" + regid + clearid + id.n = "CVD" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = DOUBLETYPE - ISPOINTER + id.hr_syntax = "CVD(stringData$)" + regid + clearid + id.n = "_CV" + id.subfunc = 1 + id.callname = "" + id.args = 2 + id.arg = MKL$(-1) + MKL$(STRINGTYPE - ISPOINTER) + id.ret = -1 + id.hr_syntax = "_CV(numericalType, MKstringValue$)" + regid + + clearid + id.n = "String" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_string" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "STRING$(count&, {character$ | ASCIIcode%})" + regid + + clearid + id.n = "Space" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_space" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "SPACE$(count&)" + regid + + clearid + id.n = "InStr" + id.subfunc = 1 + id.callname = "func_instr" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?],?,?" 'checked! + id.hr_syntax = "INSTR([start%,] baseString$, searchString$)" + regid + + clearid + id.n = "_InStrRev" + id.subfunc = 1 + id.callname = "func__instrrev" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.specialformat = "[?],?,?" 'checked! + id.hr_syntax = "_INSTRREV([start%,] baseString$, searchString$)" + regid + + clearid + id.n = "Mid" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_mid" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.specialformat = "?,?,[?]" 'checked! + id.hr_syntax = "MID$(stringValue$, startPosition%[, bytes%])" + regid + + clearid + id.n = "SAdd" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "SADD(stringVariable$)" + regid + + clearid + id.n = "Cls" + id.subfunc = 2 + id.callname = "sub_clsDest" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,?]]" + id.hr_syntax = "CLS [method%] [, bgColor&] [, dest&]" + regid + + clearid + id.n = "Sqr" + id.subfunc = 1 + id.callname = "func_sqr" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "SQR(value)" + regid + + clearid + id.n = "Chr" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func_chr" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "CHR$(code%)" + regid + + clearid + id.n = "VarPtr" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function + id.ret = STRINGTYPE - ISPOINTER + id.musthave = "$" + id.hr_syntax = "VARPTR(variable_name[(reference_index%)])" + regid + + clearid + id.n = "VarPtr" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "VARPTR(variable_name[(reference_index%)])" + regid + + clearid + id.n = "_Offset" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function + id.ret = UOFFSETTYPE - ISPOINTER + id.hr_syntax = "_OFFSET(variable)" + regid + + clearid + id.n = "VarSeg" + id.subfunc = 1 + id.callname = "" + id.args = 1 + id.arg = MKL$(-1) '!this value is ignored, the qb64 compiler handles this function + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "VARSEG(variable_name[(start_index)])" + regid + + clearid + id.n = "Poke" + id.subfunc = 2 + id.callname = "sub_poke" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.hr_syntax = "POKE segment_offset, offset_value" + regid + + clearid + id.n = "Peek" + id.subfunc = 1 + id.callname = "func_peek" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "PEEK(segment_offset)" + regid + + clearid + id.n = "Def" + id.subfunc = 2 + id.callname = "sub_defseg" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{Seg}[=?]" 'checked! + id.secondargmustbe = "Seg" + id.hr_syntax = "DEF SEG [=][{segment|VARSEG(variable}]" + regid + + clearid + id.n = "Sin" + id.subfunc = 1 + id.callname = "std::sin" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "SIN(radian_angle!)" + regid + + clearid + id.n = "Cos" + id.subfunc = 1 + id.callname = "std::cos" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "COS(radian_angle!)" + regid + + clearid + id.n = "Tan" + id.subfunc = 1 + id.callname = "std::tan" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "TAN(radian_angle!)" + regid + + clearid + id.n = "Atn" + id.subfunc = 1 + id.callname = "std::atan" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "ATN(tangent!)" + regid + + clearid + id.n = "Log" + id.subfunc = 1 + id.callname = "func_log" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "LOG(value)" + regid + + clearid + id.n = "Abs" + id.subfunc = 1 + id.callname = "func_abs" + id.args = 1 + id.arg = MKL$(-1) 'takes anything numerical + id.ret = FLOATTYPE - ISPOINTER '***overridden by function evaluatefunc*** + id.hr_syntax = "ABS(numericalValue)" + regid + + clearid + id.n = "Erl" + id.subfunc = 1 + id.callname = "get_error_erl" + id.args = 0 + id.ret = DOUBLETYPE - ISPOINTER + id.hr_syntax = "ERL" + regid + + clearid + id.n = "Err" + id.subfunc = 1 + id.callname = "get_error_err" + id.args = 0 + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "ERR" + regid + + clearid + id.n = "Error" + id.subfunc = 2 + id.callname = "error" + id.args = 1 + id.arg = MKL$(ULONGTYPE - ISPOINTER) + id.hr_syntax = "ERROR codeNumber%" + regid + + clearid + id.n = "Line" + id.subfunc = 2 + id.callname = "sub_line" + id.args = 7 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[[{Step}](?,?)]-[{Step}](?,?)[,[?][,[{B|BF}][,?]]]" + id.hr_syntax = "LINE [STEP] [(column1, row1)]-[STEP] (column2, row2), color[, [{B|BF}], style%]" + regid + + clearid + id.n = "Sound": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub_sound" + id.args = 5 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(DOUBLETYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "?,?[,[?][,[?][,?]]]" + id.hr_syntax = "SOUND frequency#, duration#[, volume#][, panning#][, waveform&]" + regid + + clearid + id.n = "Beep": id.Dependency = DEPENDENCY_MINIAUDIO + id.subfunc = 2 + id.callname = "sub_beep" + id.args = 0 + id.hr_syntax = "BEEP" + regid + + clearid + id.n = "Timer" + id.subfunc = 1 + id.callname = "func_timer" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "TIMER[(accuracy!)]" + regid + + clearid + id.n = "Rnd" + id.subfunc = 1 + id.callname = "func_rnd" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = SINGLETYPE - ISPOINTER + id.specialformat = "[?]" 'checked! + id.hr_syntax = "RND[(behavior)]" + regid + + clearid + id.n = "Randomize" + id.subfunc = 2 + id.callname = "sub_randomize" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.specialformat = "[[{Using}]?]" 'checked! + id.hr_syntax = "RANDOMIZE [USING] {seednumber|TIMER}" + regid + + clearid + id.n = "Out" + id.subfunc = 2 + id.callname = "sub_out" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.hr_syntax = "OUT registerAddress%, value%" + regid + + clearid + id.n = "PCopy" + id.subfunc = 2 + id.callname = "sub_pcopy" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.hr_syntax = "PCOPY sourcePage%, destinationPage%" + regid + + clearid + id.n = "View" + id.subfunc = 2 + id.callname = "qbg_sub_view" + id.args = 6 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[[{Screen}](?,?)-(?,?)[,[?][,?]]]" + id.secondargcantbe = "Print" + id.hr_syntax = "VIEW [SCREEN] (column1, row1)-(column2, row2)[, color][, border]" + regid + + clearid + id.n = "View" + id.subfunc = 2 + id.callname = "qbg_sub_view_print" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "{Print}[?{To}?]" 'new! + id.secondargmustbe = "Print" + id.hr_syntax = "VIEW PRINT [topRow% TO bottomRow%]" + regid + + clearid + id.n = "Window" + id.subfunc = 2 + id.callname = "qbg_sub_window" + id.args = 4 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + id.specialformat = "[[{Screen}](?,?)-(?,?)]" + id.hr_syntax = "WINDOW [[SCREEN] (x1!, y1!) - (x2!, y2!)]" + regid + + clearid + id.n = "Locate" + id.subfunc = 2 + id.callname = "qbg_sub_locate" + id.args = 5 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,[?][,[?][,?]]]]" + id.hr_syntax = "LOCATE [row%][, column%] [, cursor%][, cursorStart%, cursorStop%]" + regid + + clearid + id.n = "Color" + id.subfunc = 2 + id.callname = "qbg_sub_color" + id.args = 3 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,?]]" + id.hr_syntax = "COLOR [foreground&][, background&]" + regid + + clearid + id.n = "Palette" + id.subfunc = 2 + id.callname = "qbg_palette" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?,?]" + id.hr_syntax = "PALETTE [attribute%, red% + (green% * 256) + (blue% * 65536)] or PALETTE [existingAttribute%, newAttribute%]" + regid + + clearid + id.n = "Width" + id.subfunc = 2 + id.callname = "qbsub_width" + id.args = 5 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{#|LPrint}][?][,[?][,[?][,[?]]]]" 'new! + 'id.specialformat = "[{#|LPRINT}][?][,?]" 'new! + id.hr_syntax = "WIDTH [columns%][, rows%] or WIDTH {file_number|device}, columnwidth%" + regid + + + clearid + id.n = "Screen" + id.subfunc = 2 + id.callname = "qbg_screen" + id.args = 5 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + 'id.specialformat = "[?][,[?][,[?][,?]]]" 'new! + 'id.specialformat = "[?][,[?][,[?][,[?][,{_MANUALDISPLAY}]]]]" 'breaks compilation! + 'id.specialformat = "[?][,[?][,[?][,[?][,[{_MANUALDISPLAY}]]]]]" <-pre-bulletproofing + id.specialformat = "[?][,[?][,[?][,[?][,[{_ManualDisplay}?]]]]]" 'a temp format for transition reasons" + id.hr_syntax = "SCREEN {mode%|imagehandle&} [, , active_page, visual_page]" + regid + + clearid + id.n = "PSet" + id.subfunc = 2 + id.callname = "sub_pset" + id.args = 3 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?)[,?]" + id.hr_syntax = "PSET [STEP](column%, row%)[, colorAttribute]" + regid + + clearid + id.n = "PReset" + id.subfunc = 2 + id.callname = "sub_preset" + id.args = 3 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{Step}](?,?)[,?]" + id.hr_syntax = "PRESET [STEP](column%, row%)[, colorAttribute]" + regid + + clearid + id.n = "Asc" + id.subfunc = 1 + id.callname = "qbs_asc" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "ASC(text$[, position%])" + regid + + clearid + id.n = "Len" + id.subfunc = 1 + id.callname = "" 'callname is not used + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) 'note: LEN is a special case, any input is actually accepted + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "LEN(literalTextOrVariable$)" + regid + + clearid + id.n = "InKey" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_inkey" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "INKEY$" + regid + + clearid + id.n = "Str" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_str" + id.args = 1 + id.arg = MKL$(-1) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "STR$(number)" + regid + + clearid + id.n = "UCase" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_ucase" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "UCASE$(text$)" + regid + + clearid + id.n = "LCase" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_lcase" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "LCASE$(text$)" + regid + + clearid + id.n = "Left" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_left" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "LEFT$(stringValue$, numberOfCharacters%)" + regid + + clearid + id.n = "Right" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_right" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "RIGHT$(stringValue$, numberOfCharacters%)" + regid + + clearid + id.n = "LTrim" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_ltrim" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "LTRIM$(text$)" + regid + + clearid + id.n = "RTrim" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs_rtrim" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "RTRIM$(text$)" + regid + + clearid + id.n = "_Trim" + id.musthave = "$" + id.subfunc = 1 + id.callname = "qbs__trim" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_TRIM$(text$)" + regid + + clearid + id.n = "Print" + id.subfunc = 2 + id.callname = "qbs_print" 'not called directly + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "PRINT [expression] [{;|,] [expression...]" + regid + + clearid + id.n = "LPrint": id.Dependency = DEPENDENCY_PRINTER + id.subfunc = 2 + id.callname = "qbs_lprint" 'not called directly + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.hr_syntax = "LPRINT [expression] [{;|,}]" + regid + + clearid + id.n = "LPos": id.Dependency = DEPENDENCY_PRINTER + id.subfunc = 1 + id.callname = "func_lpos" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "LPOS(index%)" + regid + + 'Get Current Working Directory + clearid + id.n = "_CWD" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__cwd" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_CWD$" + regid + + 'Get the directory the program was started from (before the currenct directory is automatically changed to the executables directory) + clearid + id.n = "_StartDir" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__startdir" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_STARTDIR$" + regid + + 'Return a path that best represents the context provided e.g. _DIR$("DESKTOP") + clearid + id.n = "_Dir" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__dir" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_DIR$(" + CHR$(34) + "folderspecification" + CHR$(34) + ")" + regid + + 'Return the name of the included file in which the last error occurred + clearid + id.n = "_InclErrorFile" + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__inclerrorfile" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_INCLERRORFILE$" + regid + + clearid + id.n = "_KeyClear" + id.subfunc = 2 + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.callname = "sub__keyclear" + id.hr_syntax = "_KEYCLEAR buffer&" + regid + + clearid + id.n = "_D2R" + id.subfunc = 1 + id.callname = "func_deg2rad" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_D2R(angleInDegrees!)" + regid + + clearid + id.n = "_D2G" + id.subfunc = 1 + id.callname = "func_deg2grad" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_D2G(angleInDegrees!)" + regid + + clearid + id.n = "_R2D" + id.subfunc = 1 + id.callname = "func_rad2deg" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_R2D(angleInRadians!)" + regid + + clearid + id.n = "_R2G" + id.subfunc = 1 + id.callname = "func_rad2grad" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_R2G(angleInRadians!)" + regid + + clearid + id.n = "_G2D" + id.subfunc = 1 + id.callname = "func_grad2deg" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_G2D(gradient!)" + regid + + clearid + id.n = "_G2R" + id.subfunc = 1 + id.callname = "func_grad2rad" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_G2R(gradient!)" + regid + + clearid 'Clear the old id info so we set the slate for a new one + id.n = "_Atan2" 'The name of our new one + id.subfunc = 1 'And this is a function + id.callname = "std::atan2" 'The C name of the function + id.args = 2 'It takes 2 parameters to work + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 parameters from what I can tell + id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value + id.hr_syntax = "_ATAN2(y, x)" + regid 'and we're finished with ID registration + + clearid 'Clear the old id info so we set the slate for a new one + id.n = "_Hypot" 'The name of our new one + id.subfunc = 1 'And this is a function + id.callname = "std::hypot" 'The C name of the function + id.args = 2 'It takes 2 parameters to work + id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 parameters from what I can tell + id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value + id.hr_syntax = "_HYPOT(x, y)" + regid 'and we're finished with ID registration + + clearid + id.n = "_Asin" + id.subfunc = 1 + id.callname = "std::asin" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ASIN(sine_value!)" + regid + + clearid + id.n = "_Acos" + id.subfunc = 1 + id.callname = "std::acos" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ACOS(cosine_value!)" + regid + + clearid + id.n = "_Sinh" + id.subfunc = 1 + id.callname = "std::sinh" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_SINH(value)" + regid + + clearid + id.n = "_Cosh" + id.subfunc = 1 + id.callname = "std::cosh" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_COSH(value)" + regid + + clearid + id.n = "_Tanh" + id.subfunc = 1 + id.callname = "std::tanh" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_TANH(value)" + regid + + clearid + id.n = "_Asinh" + id.subfunc = 1 + id.callname = "std::asinh" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ASINH(value)" + regid + + clearid + id.n = "_Acosh" + id.subfunc = 1 + id.callname = "std::acosh" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ACOSH(value)" + regid + + clearid + id.n = "_Atanh" + id.subfunc = 1 + id.callname = "std::atanh" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ATANH(value)" + regid + + clearid + id.n = "_Ceil" + id.subfunc = 1 + id.callname = "std::ceil" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_CEIL(expression)" + regid + + clearid + id.n = "_Pi" + id.subfunc = 1 + id.callname = "func_pi" + id.args = 1 + id.arg = MKL$(DOUBLETYPE - ISPOINTER) + id.ret = DOUBLETYPE - ISPOINTER + id.specialformat = "[?]" + id.hr_syntax = "_PI[(multiplier)]" + regid + + clearid + id.n = "_DesktopHeight" + id.subfunc = 1 + id.callname = "func_screenheight" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_DESKTOPHEIGHT" + regid + + clearid + id.n = "_DesktopWidth" + id.subfunc = 1 + id.callname = "func_screenwidth" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_DESKTOPWIDTH" + regid + + clearid + id.n = "_ScreenIcon" 'name change to from _ICONIFYWINDOW to _SCREENICON to match the screenshow and screenhide + id.subfunc = 2 + id.callname = "sub_screenicon" + id.hr_syntax = "_SCREENICON" + regid + + clearid + id.n = "_ScreenExists" + id.subfunc = 1 + id.callname = "func_windowexists" + id.hr_syntax = "_SCREENEXISTS" + regid + + clearid + id.n = "_ControlChr" + id.subfunc = 1 + id.callname = "func__controlchr" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CONTROLCHR" + regid + + clearid + id.n = "_StriCmp" + id.subfunc = 1 + id.callname = "func__str_nc_compare" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_STRICMP(string1$, string2$)" + regid + + clearid + id.n = "_StrCmp" + id.subfunc = 1 + id.callname = "func__str_compare" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_STRCMP(string1$, string2$)" + regid + + clearid + id.n = "_Arcsec" + id.subfunc = 1 + id.callname = "func_arcsec" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ARCSEC(value)" + regid + + clearid + id.n = "_Arccsc" + id.subfunc = 1 + id.callname = "func_arccsc" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ARCCSC(value)" + regid + + clearid + id.n = "_Arccot" + id.subfunc = 1 + id.callname = "func_arccot" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_ARCCOT(value)" + regid + + clearid + id.n = "_Sech" + id.subfunc = 1 + id.callname = "func_sech" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_SECH(value)" + regid + + clearid + id.n = "_Csch" + id.subfunc = 1 + id.callname = "func_csch" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_CSCH(value)" + regid + + clearid + id.n = "_Coth" + id.subfunc = 1 + id.callname = "func_coth" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_COTH(value)" + regid + + clearid + id.n = "_Sec" + id.subfunc = 1 + id.callname = "func_sec" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_SEC(value)" + regid + + clearid + id.n = "_Csc" + id.subfunc = 1 + id.callname = "func_csc" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_CSC(value)" + regid + + clearid + id.n = "_Cot" + id.subfunc = 1 + id.callname = "func_cot" + id.args = 1 + id.arg = MKL$(FLOATTYPE - ISPOINTER) + id.ret = FLOATTYPE - ISPOINTER + id.hr_syntax = "_COT(value)" + regid + + clearid + id.n = "_ScreenIcon" + id.subfunc = 1 + id.callname = "func_screenicon" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCREENICON" + regid + + clearid + id.n = "_AutoDisplay" + id.subfunc = 1 + id.callname = "func__autodisplay" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_AUTODISPLAY" + regid + + clearid + id.n = "_ShR" ' a740g: Changed to camel case + id.subfunc = 1 + id.callname = "func__shr" + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = UINTEGER64TYPE - ISPOINTER + id.hr_syntax = "_SHR(numericalVariable, numericalValue)" + regid + + clearid + id.n = "_ShL" ' a740g: Changed to camel case + id.subfunc = 1 + id.callname = "func__shl" + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = UINTEGER64TYPE - ISPOINTER + id.hr_syntax = "_SHL(numericalVariable, numericalValue)" + regid + + ' a740g: ROR & ROL additions + clearid + id.n = "_RoL" + id.subfunc = 1 + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) ' ***overridden by function evaluatefunc*** + id.ret = UINTEGER64TYPE - ISPOINTER ' ***overridden by function evaluatefunc*** + id.hr_syntax = "_ROL(numericalVariable, numericalValue)" + regid + + clearid + id.n = "_RoR" + id.subfunc = 1 + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) ' ***overridden by function evaluatefunc*** + id.ret = UINTEGER64TYPE - ISPOINTER ' ***overridden by function evaluatefunc*** + id.hr_syntax = "_ROR(numericalVariable, numericalValue)" + regid + ' a740g: end of ROR & ROL additions + + clearid + id.n = "_Adler32" + id.Dependency = DEPENDENCY_ZLIB + id.subfunc = 1 + id.callname = "func__adler32" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_ADLER32(dataString$)" + regid + + clearid + id.n = "_Crc32" + id.Dependency = DEPENDENCY_ZLIB + id.subfunc = 1 + id.callname = "func__crc32" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = ULONGTYPE - ISPOINTER + id.hr_syntax = "_CRC32(dataString$)" + regid + + clearid + id.n = "_Deflate" + id.Dependency = DEPENDENCY_ZLIB + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__deflate" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_DEFLATE$(stringToCompress$)" + regid + + clearid + id.n = "_Inflate" + id.Dependency = DEPENDENCY_ZLIB + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__inflate" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(INTEGER64TYPE - ISPOINTER) + id.specialformat = "?[,?]" + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_INFLATE$(stringToDecompress$[, originalSize&])" + regid + + clearid + id.n = "_Embedded" + id.Dependency = DEPENDENCY_EMBED + id.musthave = "$" + id.subfunc = 1 + id.callname = "func__embedded" + id.args = 1 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + id.ret = STRINGTYPE - ISPOINTER + id.hr_syntax = "_EMBEDDED$(" + AddQuotes$("handle") + ")" + regid + + clearid + id.n = "_CInp" + id.subfunc = 1 + id.callname = "func__cinp" + id.args = 1 + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?]" + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CINP" + regid + + clearid + id.n = "_CapsLock" + id.subfunc = 1 + id.callname = "func__capslock" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CAPSLOCK" + regid + + clearid + id.n = "_ScrollLock" + id.subfunc = 1 + id.callname = "func__scrolllock" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_SCROLLLOCK" + regid + + clearid + id.n = "_NumLock" + id.subfunc = 1 + id.callname = "func__numlock" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_NUMLOCK" + regid + + clearid + id.n = "_CapsLock" + id.subfunc = 2 + id.callname = "sub__capslock" + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.args = 1 + id.specialformat = "{On|Off|_Toggle}" + id.hr_syntax = "_CAPSLOCK {On|Off|_Toggle}" + regid + + clearid + id.n = "_Scrolllock" + id.subfunc = 2 + id.callname = "sub__scrolllock" + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.args = 1 + id.specialformat = "{On|Off|_Toggle}" + id.hr_syntax = "_SCROLLLOCK {On|Off|_Toggle}" + regid + + clearid + id.n = "_Numlock" + id.subfunc = 2 + id.callname = "sub__numlock" + id.arg = MKL$(LONGTYPE - ISPOINTER) + id.args = 1 + id.specialformat = "{On|Off|_Toggle}" + id.hr_syntax = "_NUMLOCK {On|Off|_Toggle}" + regid + + clearid + id.n = "_ConsoleFont" + id.subfunc = 2 + id.callname = "sub__consolefont" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(INTEGERTYPE - ISPOINTER) + id.hr_syntax = "_CONSOLEFONT fontFile$" + regid + + clearid + id.n = "_ConsoleCursor" + id.subfunc = 2 + id.callname = "sub__console_cursor" + id.args = 2 + id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[{_Show|_Hide}][,?]" + id.hr_syntax = "_CONSOLECURSOR {_Show|_Hide}[, size%]" + regid + + clearid + id.n = "_ConsoleInput" + id.subfunc = 1 + id.callname = "func__getconsoleinput" + id.args = 0 + id.ret = LONGTYPE - ISPOINTER + id.hr_syntax = "_CONSOLEINPUT" + regid + + clearid + id.n = "_ReadBit" + id.subfunc = 1 + id.callname = "func__readbit" + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = INTEGER64TYPE - ISPOINTER + id.hr_syntax = "_READBIT(numericalVariable, numericalValue)" + regid + + clearid + id.n = "_SetBit" + id.subfunc = 1 + id.callname = "func__setbit" + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = UINTEGER64TYPE - ISPOINTER + id.hr_syntax = "_SETBIT(numericalVariable, numericalValue)" + regid + + clearid + id.n = "_ResetBit" + id.subfunc = 1 + id.callname = "func__resetbit" + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = UINTEGER64TYPE - ISPOINTER + id.hr_syntax = "_RESETBIT(numericalVariable, numericalValue)" + regid + + clearid + id.n = "_ToggleBit" + id.subfunc = 1 + id.callname = "func__togglebit" + id.args = 2 + id.arg = MKL$(UINTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.ret = UINTEGER64TYPE - ISPOINTER + id.hr_syntax = "_TOGGLEBIT(numericalVariable, numericalValue)" + regid + + clearid + id.n = "_NotifyPopup" + id.subfunc = 2 ' 1 = function, 2 = sub + id.callname = "sub__guiNotifyPopup" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,?]]" + id.hr_syntax = "_NOTIFYPOPUP [title$][, message$][, iconType$]" + + regid + clearid + id.n = "_MessageBox" + id.subfunc = 2 ' 1 = function, 2 = sub + id.callname = "sub__guiMessageBox" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,?]]" + id.hr_syntax = "_MESSAGEBOX [title$][, message$][, iconType$]" + regid + + clearid + id.n = "_SelectFolderDialog" + id.musthave = "$" + id.subfunc = 1 ' 1 = function, 2 = sub + id.callname = "func__guiSelectFolderDialog" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?][,?]" + id.ret = STRINGTYPE - ISPOINTER ' return type for functions + id.hr_syntax = "_SELECTFOLDERDIALOG$([title$][, defaultPath$])" + regid + + clearid + id.n = "_ColorChooserDialog" + id.subfunc = 1 ' 1 = function, 2 = sub + id.callname = "func__guiColorChooserDialog" + id.args = 2 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + id.specialformat = "[?][,?]" + id.ret = ULONGTYPE - ISPOINTER ' return type for functions + id.hr_syntax = "_COLORCHOOSERDIALOG&([title$][, defaultRGB&])" + regid + + clearid + id.n = "_MessageBox" + id.subfunc = 1 ' 1 = function, 2 = sub + id.callname = "func__guiMessageBox" + id.args = 5 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,[?][,[?][,?]]]]" + id.ret = LONGTYPE - ISPOINTER ' return type for functions + id.hr_syntax = "_MESSAGEBOX&([title$][, message$][, dialogType$][, iconType$][, defaultButton&])" + regid + + clearid + id.n = "_InputBox" + id.musthave = "$" + id.subfunc = 1 ' 1 = function, 2 = sub + id.callname = "func__guiInputBox" + id.args = 3 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,?]]" + id.ret = STRINGTYPE - ISPOINTER ' return type for functions + id.hr_syntax = "_INPUTBOX$([title$][, message$][, defaultInput$])" + regid + + clearid + id.n = "_OpenFileDialog" + id.musthave = "$" + id.subfunc = 1 ' 1 = function, 2 = sub + id.callname = "func__guiOpenFileDialog" + id.args = 5 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,[?][,[?][,?]]]]" + id.ret = STRINGTYPE - ISPOINTER ' return type for functions + id.hr_syntax = "_OPENFILEDIALOG$([title$][, defaultPathAndFile$][, filterPatterns$][, singleFilterDescription$][, allowMultipleSelects&])" + regid + + clearid + id.n = "_SaveFileDialog" + id.musthave = "$" + id.subfunc = 1 ' 1 = function, 2 = sub + id.callname = "func__guiSaveFileDialog" + id.args = 4 + id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + id.specialformat = "[?][,[?][,[?][,?]]]" + id.ret = STRINGTYPE - ISPOINTER ' return type for functions + id.hr_syntax = "_SAVEFILEDIALOG$([title$][, defaultPathAndFile$][, filterPatterns$][, singleFilterDescription$])" + regid + + reginternalsubfunc = 0 +END SUB diff --git a/source/utilities/build.bas b/source/utilities/build.bas index 9ef5f17ff..75663e00a 100644 --- a/source/utilities/build.bas +++ b/source/utilities/build.bas @@ -27,8 +27,8 @@ FUNCTION GetMakeExecutable$ () END IF END FUNCTION -FUNCTION MakeNMOutputFilename$ (libfile AS STRING, dynamic As Long) - If dynamic Then dyn$ = "_dynamic" Else dyn$ = "" +FUNCTION MakeNMOutputFilename$ (libfile AS STRING, dynamic AS LONG) + IF dynamic THEN dyn$ = "_dynamic" ELSE dyn$ = "" MakeNMOutputFilename$ = tmpdir$ + "nm_output_" + StrReplace$(StrReplace$(libfile, pathsep$, "."), ":", ".") + dyn$ + ".txt" END FUNCTION diff --git a/source/utilities/const_eval.bas b/source/utilities/const_eval.bas index 099f4a17a..b140623b0 100644 --- a/source/utilities/const_eval.bas +++ b/source/utilities/const_eval.bas @@ -13,16 +13,16 @@ FUNCTION Evaluate_Expression$ (e$, num AS ParseNum) PreParse t$ - IF CONST_EVAL_DEBUG THEN _Echo "t$: " + t$ + IF CONST_EVAL_DEBUG THEN _ECHO "t$: " + t$ IF LEFT$(t$, 5) = "ERROR" THEN Evaluate_Expression$ = t$: EXIT FUNCTION 'Deal with brackets first exp$ = "(" + sp + t$ + sp + ")" 'Starting and finishing brackets for our parse routine. - IF CONST_EVAL_DEBUG THEN _Echo "exp$: " + exp$ + IF CONST_EVAL_DEBUG THEN _ECHO "exp$: " + exp$ DIM Eval_E AS LONG, c AS LONG DO - FindInnerParens exp$, C, Eval_E + FindInnerParens exp$, c, Eval_E IF Eval_E > 0 THEN IF c = 0 THEN Evaluate_Expression$ = "ERROR - BAD () Count": EXIT FUNCTION @@ -43,7 +43,7 @@ FUNCTION Evaluate_Expression$ (e$, num AS ParseNum) c = c - 1 END IF - IF CONST_EVAL_DEBUG THEN _Echo "eval$: " + eval$ + IF CONST_EVAL_DEBUG THEN _ECHO "eval$: " + eval$ leftele$ = getelements$(exp$, 1, c - 1) rightele$ = getelements$(exp$, Eval_E + 1, numelements(exp$)) @@ -54,7 +54,7 @@ FUNCTION Evaluate_Expression$ (e$, num AS ParseNum) END IF LOOP UNTIL Eval_E = 0 - IF CONST_EVAL_DEBUG THEN _Echo "resulting exp$: " + exp$ + ", numelements: " + str$(numelements(exp$)) + IF CONST_EVAL_DEBUG THEN _ECHO "resulting exp$: " + exp$ + ", numelements: " + STR$(numelements(exp$)) IF numelements(exp$) <> 1 THEN Evaluate_Expression$ = "ERROR - Invalid characters in expression": EXIT FUNCTION END IF @@ -156,14 +156,14 @@ END SUB ' ' PreParse via parenthesis insertion ' exponent := numeric '^' unary ' | numeric 'ROOT' unary -' | numeric +' | numeric ' ' numeric := NUMBER | CONST_VAR ' ' string := STRING | CONST_VAR -FUNCTION CommaExpression&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "CommaExpression" +FUNCTION CommaExpression& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "CommaExpression" DO ele$ = peeknextelement$(exp$, state.index, state.strIndex) @@ -204,7 +204,7 @@ FUNCTION CommaExpression&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION StrExpression&(exp$, state AS ParserState) +FUNCTION StrExpression& (exp$, state AS ParserState) IF ParseString&(exp$, state) = 0 THEN EXIT FUNCTION DIM s AS STRING @@ -225,8 +225,8 @@ FUNCTION StrExpression&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION ParseString&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "ParseString" +FUNCTION ParseString& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "ParseString" ele$ = peeknextelement$(exp$, state.index, state.strIndex) IF elementIsString(ele$) THEN @@ -248,12 +248,12 @@ FUNCTION ParseString&(exp$, state AS ParserState) END IF END FUNCTION -FUNCTION NumericExpression&(exp$, state AS ParserState) +FUNCTION NumericExpression& (exp$, state AS ParserState) NumericExpression& = LogicalImp&(exp$, state) END FUNCTION -FUNCTION LogicalImp&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "LogicalImp" +FUNCTION LogicalImp& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "LogicalImp" IF LogicalEqv&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -278,8 +278,8 @@ FUNCTION LogicalImp&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION LogicalEqv&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "LogicalEqv" +FUNCTION LogicalEqv& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "LogicalEqv" IF LogicalXor&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -304,8 +304,8 @@ FUNCTION LogicalEqv&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION LogicalXor&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "LogicalXor" +FUNCTION LogicalXor& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "LogicalXor" IF LogicalOr&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -330,8 +330,8 @@ FUNCTION LogicalXor&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION LogicalOr&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "LogicalOr" +FUNCTION LogicalOr& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "LogicalOr" IF LogicalAnd&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -356,8 +356,8 @@ FUNCTION LogicalOr&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION LogicalAnd&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "LogicalAnd" +FUNCTION LogicalAnd& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "LogicalAnd" IF LogicalNot&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -382,14 +382,14 @@ FUNCTION LogicalAnd&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION LogicalNot&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "LogicalNot" +FUNCTION LogicalNot& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "LogicalNot" ele$ = peeknextelement$(exp$, state.index, state.strIndex) IF ele$ = "NOT" THEN ele$ = getnextelement$(exp$, state.index, state.strIndex) IF Relation&(exp$, state) = 0 THEN FixupErrorMessage state, "NOT": EXIT FUNCTION - IF ele$ = "NOT" THEN + IF ele$ = "NOT" THEN IF (num.typ AND ISUNSIGNED) OR (state.num.typ AND ISUNSIGNED) THEN ParseNumSetUI state.num, UINTEGER64TYPE - ISPOINTER, NOT state.num.ui ELSE @@ -400,8 +400,8 @@ FUNCTION LogicalNot&(exp$, state AS ParserState) LogicalNot& = -1 END FUNCTION -FUNCTION Relation&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "Relation" +FUNCTION Relation& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "Relation" IF Term&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -483,8 +483,8 @@ FUNCTION Relation&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION Term&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "Term" +FUNCTION Term& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "Term" IF ParseMod&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -522,8 +522,8 @@ FUNCTION Term&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION ParseMod&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "ParseMod" +FUNCTION ParseMod& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "ParseMod" IF IntDiv&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -541,16 +541,16 @@ FUNCTION ParseMod&(exp$, state AS ParserState) ParseNumSetI num, INTEGER64TYPE - ISPOINTER, num.i MOD state.num.i END IF ELSE - IF CONST_EVAL_DEBUG THEN _Echo "ParseMod done!" + IF CONST_EVAL_DEBUG THEN _ECHO "ParseMod done!" state.num = num ParseMod& = -1 EXIT FUNCTION END IF LOOP -END FUNCTIOn +END FUNCTION -FUNCTION IntDiv&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "IntDiv" +FUNCTION IntDiv& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "IntDiv" IF Factor&(exp$, state) = 0 THEN EXIT FUNCTION DIM num AS ParseNum @@ -568,7 +568,7 @@ FUNCTION IntDiv&(exp$, state AS ParserState) ParseNumSetI num, INTEGER64TYPE - ISPOINTER, num.i \ state.num.i END IF ELSE - IF CONST_EVAL_DEBUG THEN _Echo "IntDiv done!" + IF CONST_EVAL_DEBUG THEN _ECHO "IntDiv done!" state.num = num IntDiv& = -1 EXIT FUNCTION @@ -576,11 +576,11 @@ FUNCTION IntDiv&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION Factor&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "Factor" +FUNCTION Factor& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "Factor" IF Unary&(exp$, state) = 0 THEN EXIT FUNCTION - DIM num As ParseNum + DIM num AS ParseNum num = state.num DO @@ -603,7 +603,7 @@ FUNCTION Factor&(exp$, state AS ParserState) ' Regular division is always done as floating-point ParseNumSetF num, FLOATTYPE - ISPOINTER, num.f / state.num.f ELSE - IF CONST_EVAL_DEBUG THEN _Echo "Factor done!" + IF CONST_EVAL_DEBUG THEN _ECHO "Factor done!" state.num = num Factor& = -1 EXIT FUNCTION @@ -611,8 +611,8 @@ FUNCTION Factor&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION Unary&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "Unary" +FUNCTION Unary& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "Unary" ele$ = peeknextelement$(exp$, state.index, state.strIndex) IF ele$ = "-" THEN ele$ = getnextelement$(exp$, state.index, state.strIndex) @@ -620,20 +620,20 @@ FUNCTION Unary&(exp$, state AS ParserState) IF ele$ = "-" THEN ParseNumSetI state.num, INTEGER64TYPE - ISPOINTER, -state.num.i Unary& = -1 - IF CONST_EVAL_DEBUG THEN _Echo "Unary done!" + IF CONST_EVAL_DEBUG THEN _ECHO "Unary done!" END FUNCTION -FUNCTION Exponent&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "Exponent" +FUNCTION Exponent& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "Exponent" IF Numeric&(exp$, state) = 0 THEN EXIT FUNCTION - IF CONST_EVAL_DEBUG THEN _Echo "Check exponent" + IF CONST_EVAL_DEBUG THEN _ECHO "Check exponent" DIM num AS ParseNum num = state.num DO ele$ = peeknextelement$(exp$, state.index, state.strIndex) - IF CONST_EVAL_DEBUG THEN _Echo "Exponent ele! " + ele$ + IF CONST_EVAL_DEBUG THEN _ECHO "Exponent ele! " + ele$ IF ele$ = "^" THEN ele$ = getnextelement$(exp$, state.index, state.strIndex) @@ -665,7 +665,7 @@ FUNCTION Exponent&(exp$, state AS ParserState) ParseNumSetF num, FLOATTYPE - ISPOINTER, sig * (num.f ^ expon##) ELSE - IF CONST_EVAL_DEBUG THEN _Echo "Exponent done!" + IF CONST_EVAL_DEBUG THEN _ECHO "Exponent done!" state.num = num Exponent& = -1 EXIT FUNCTION @@ -673,10 +673,10 @@ FUNCTION Exponent&(exp$, state AS ParserState) LOOP END FUNCTION -FUNCTION Numeric&(exp$, state AS ParserState) - IF CONST_EVAL_DEBUG THEN _Echo "Numeric" +FUNCTION Numeric& (exp$, state AS ParserState) + IF CONST_EVAL_DEBUG THEN _ECHO "Numeric" ele$ = peeknextelement$(exp$, state.index, state.strIndex) - IF CONST_EVAL_DEBUG THEN _Echo "Numeric peek ele: " + ele$ + IF CONST_EVAL_DEBUG THEN _ECHO "Numeric peek ele: " + ele$ IF elementIsNumber(ele$) THEN ele$ = getnextelement$(exp$, state.index, state.strIndex) @@ -695,7 +695,7 @@ FUNCTION Numeric&(exp$, state AS ParserState) IF state.num.typ AND ISSTRING THEN state.errStr = "ERROR - String can not be in numeric operation": EXIT FUNCTION ele$ = getnextelement$(exp$, state.index, state.strIndex) - IF CONST_EVAL_DEBUG THEN _Echo "Consumed ele: " + ele$ + IF CONST_EVAL_DEBUG THEN _ECHO "Consumed ele: " + ele$ Numeric& = -1 EXIT FUNCTION END IF @@ -705,7 +705,7 @@ FUNCTION Numeric&(exp$, state AS ParserState) END IF END FUNCTION -FUNCTION ParseNumHashLookup&(ele$, state AS ParserState) +FUNCTION ParseNumHashLookup& (ele$, state AS ParserState) ' Attempt hash lookup of existing CONST name ' CONST can be global or belong to the current sub/function hashfound = 0 @@ -713,8 +713,8 @@ FUNCTION ParseNumHashLookup&(ele$, state AS ParserState) hashname$ = ele$ unusedSymbol$ = tryRemoveSymbol$(hashname$) - IF CONST_EVAL_DEBUG THEN _Echo "hash lookup: " + hashname$ - IF CONST_EVAL_DEBUG THEN _Echo "unused symbol: " + hashname$ + IF CONST_EVAL_DEBUG THEN _ECHO "hash lookup: " + hashname$ + IF CONST_EVAL_DEBUG THEN _ECHO "unused symbol: " + hashname$ hashchkflags = HASHFLAG_CONSTANT hashres = HashFindRev(hashname$, hashchkflags, hashresflags, hashresref) DO WHILE hashres @@ -727,9 +727,9 @@ FUNCTION ParseNumHashLookup&(ele$, state AS ParserState) IF hashres <> 1 THEN hashres = HashFindCont(hashresflags, hashresref) ELSE hashres = 0 LOOP - IF CONST_EVAL_DEBUG THEN _Echo "Hashfound: " + str$(hashfound) + IF CONST_EVAL_DEBUG THEN _ECHO "Hashfound: " + STR$(hashfound) IF hashfound THEN - IF CONST_EVAL_DEBUG THEN _Echo "is string: " + str$(consttype(hashresref) AND ISSTRING) + IF CONST_EVAL_DEBUG THEN _ECHO "is string: " + STR$(consttype(hashresref) AND ISSTRING) IF consttype(hashresref) AND ISSTRING THEN ParseNumSetS state.num, conststring(hashresref) @@ -739,11 +739,11 @@ FUNCTION ParseNumHashLookup&(ele$, state AS ParserState) IF consttype(hashresref) AND ISUNSIGNED THEN ParseNumSetUI state.num, consttype(hashresref), constuinteger(hashresref) ELSE - ParseNumSetI state.num, consttype(hashresref), constinteger(hashresref) + ParseNumSetI state.num, consttype(hashresref), constinteger(hashresref) END IF END IF - IF CONST_EVAL_DEBUG THEN _Echo "Found! value: " + str$(state.num.f) + state.num.s + IF CONST_EVAL_DEBUG THEN _ECHO "Found! value: " + STR$(state.num.f) + state.num.s ParseNumHashLookup& = -1 EXIT FUNCTION @@ -795,9 +795,9 @@ SUB ParseExpression2 (exp$) state.result = "" res& = CommaExpression&(exp$, state) - IF CONST_EVAL_DEBUG THEN _Echo "res: " + STR$(res&) - IF CONST_EVAL_DEBUG THEN _Echo "resulting string: " + state.result - IF CONST_EVAL_DEBUG THEN _Echo "resulting err: " + state.errStr + IF CONST_EVAL_DEBUG THEN _ECHO "res: " + STR$(res&) + IF CONST_EVAL_DEBUG THEN _ECHO "resulting string: " + state.result + IF CONST_EVAL_DEBUG THEN _ECHO "resulting err: " + state.errStr IF res& = 0 THEN exp$ = state.errStr @@ -866,23 +866,23 @@ END SUB ' Each argument should be a single element FUNCTION EvaluateFunction$ (p, args AS STRING) DIM n1 AS _FLOAT, nstr AS STRING - Dim argCount As Long, args(5) As ParseNum, origArgs(5) As String + DIM argCount AS LONG, args(5) AS ParseNum, origArgs(5) AS STRING argCount = countFunctionElements(args) - IF CONST_EVAL_DEBUG THEN _Echo "argCount: " + str$(argCount) + IF CONST_EVAL_DEBUG THEN _ECHO "argCount: " + STR$(argCount) IF ConstFuncs(p).ArgCount > 0 AND argCount <> ConstFuncs(p).ArgCount THEN EvaluateFunction$ = "ERROR - Wrong number of arguments provided to " + ConstFuncs(p).nam + "!" EXIT FUNCTION END IF - FOR i = 1 to argCount + FOR i = 1 TO argCount ele$ = getelement$(args, 1 + (i - 1) * 2) origArgs(i) = ele$ - IF CONST_EVAL_DEBUG THEN _Echo "arg is string: " + STR$(elementIsString(ele$)) + ", argCount: " + STR$(ConstFuncs(p).ArgCount) + IF CONST_EVAL_DEBUG THEN _ECHO "arg is string: " + STR$(elementIsString(ele$)) + ", argCount: " + STR$(ConstFuncs(p).ArgCount) IF elementIsNumber(ele$) THEN ' skip the commas @@ -894,7 +894,7 @@ FUNCTION EvaluateFunction$ (p, args AS STRING) EXIT FUNCTION END IF - IF CONST_EVAL_DEBUG THEN _Echo "Argument: " + str$(args(i).f) + ", str: " + getelement$(args, 1 + (i - 1) * 2) + IF CONST_EVAL_DEBUG THEN _ECHO "Argument: " + STR$(args(i).f) + ", str: " + getelement$(args, 1 + (i - 1) * 2) NEXT ' Default type, some functions return different types @@ -1084,7 +1084,7 @@ SUB PreParse (e$) 'ERROR CHECK by counting our brackets count = numelements(t$) - FOR l = 1 to count + FOR l = 1 TO count ele$ = getelement$(t$, l) IF ele$ = "(" THEN c = c + 1 IF ele$ = ")" THEN c = c - 1 @@ -1094,10 +1094,10 @@ SUB PreParse (e$) IF c <> 0 THEN e$ = "ERROR - Bad Parenthesis": EXIT SUB 'Modify so that NOT will process properly - FOR l = 1 to numelements(t$) + FOR l = 1 TO numelements(t$) 'FIXME: This doesn't account for `x ^ NOT y + 2`, where it evaluates as `x ^ (NOT y) + 2` IF getelement$(t$, l) = "NOT" THEN - FOR l2 = l to numelements(t$) + FOR l2 = l TO numelements(t$) ele$ = getelement$(t$, l2) IF ele$ = "AND" OR ele$ = "OR" OR ele$ = "XOR" OR ele$ = "EQV" OR ele$ = "IMP" OR ele$ = ")" THEN EXIT FOR @@ -1116,7 +1116,7 @@ END SUB ' Returns 0 if given element is not the name of a function ' If it is a function, the ConstFuncs() array index of the function is returned -FUNCTION IsFunctionIdentifier&(ele$) +FUNCTION IsFunctionIdentifier& (ele$) FOR i = 1 TO UBOUND(ConstFuncs) IF ele$ = ConstFuncs(i).nam THEN IsFunctionIdentifier& = i diff --git a/source/utilities/elements.bas b/source/utilities/elements.bas index 062d1db0c..1653c7441 100644 --- a/source/utilities/elements.bas +++ b/source/utilities/elements.bas @@ -67,8 +67,8 @@ END SUB FUNCTION getprevelement$ (a$, index AS LONG, strIndex AS LONG) DIM i AS LONG - IF strIndex = 0 THEN strIndex = LEN(a$): Index = numelements(a$) + 1 - IF strIndex = -1 THEN Index = -1: EXIT FUNCTION + IF strIndex = 0 THEN strIndex = LEN(a$): index = numelements(a$) + 1 + IF strIndex = -1 THEN index = -1: EXIT FUNCTION IF strIndex > 0 THEN i = _INSTRREV(strIndex, a$, sp) @@ -437,8 +437,8 @@ END FUNCTION ' ' The actual value is given back as floating point, integer, and unsigned integer. ' -FUNCTION elementGetNumericValue&(ele$, floating AS _FLOAT, integral AS _INTEGER64, uintegral AS _UNSIGNED _INTEGER64) - Dim num$, typ&, e$, x As Long +FUNCTION elementGetNumericValue& (ele$, floating AS _FLOAT, integral AS _INTEGER64, uintegral AS _UNSIGNED _INTEGER64) + DIM num$, typ&, e$, x AS LONG num$ = ele$ typ& = 0 @@ -508,7 +508,7 @@ FUNCTION elementGetNumericValue&(ele$, floating AS _FLOAT, integral AS _INTEGER6 elementGetNumericValue& = INTEGER64TYPE - ISPOINTER e$ = "" -handleInteger: + handleInteger: num$ = LEFT$(num$, LEN(num$) - LEN(e$)) integral = VAL(num$) uintegral = integral @@ -519,7 +519,7 @@ END FUNCTION ' Returns whether the given element is a number ' ' Note that it allows numbers to have a negative sign. -FUNCTION elementIsNumber&(oele$) +FUNCTION elementIsNumber& (oele$) DIM ele$, res& IF oele$ = "" THEN EXIT FUNCTION ele$ = oele$ @@ -534,13 +534,13 @@ FUNCTION elementIsNumber&(oele$) elementIsNumber& = res& END FUNCTION -FUNCTION elementIsString&(ele$) +FUNCTION elementIsString& (ele$) ' String elements are always surrounded by quotes elementIsString& = INSTR(ele$, CHR$(34)) <> 0 END FUNCTION -FUNCTION elementGetStringValue&(ele$, value AS STRING) - Dim rawString$, res$, i AS LONG +FUNCTION elementGetStringValue& (ele$, value AS STRING) + DIM rawString$, res$, i AS LONG ' We have to invert the escaping done by createElementString ' ' Note this does not handle all possible C escaping, just the specific @@ -570,8 +570,8 @@ END FUNCTION ' s$ should be all the data making up the string, with no quotes around it ' ' The string data will have C escape sequences in it if necessary -FUNCTION createElementString$(s$) - Dim ele$, o$, p1 As Long, c2 As Long, i As Long +FUNCTION createElementString$ (s$) + DIM ele$, o$, p1 AS LONG, c2 AS LONG, i AS LONG ele$ = CHR$(34) p1 = 1 @@ -599,7 +599,7 @@ FUNCTION createElementString$(s$) createElementString$ = ele$ END FUNCTION -FUNCTION elementStringConcat$(os1$, os2$) +FUNCTION elementStringConcat$ (os1$, os2$) DIM s1$, s2$, s1size AS LONG, s2size AS LONG 'concat strings s1$ = MID$(os1$, 2, _INSTRREV(os1$, CHR$(34)) - 2) diff --git a/source/utilities/file.bas b/source/utilities/file.bas index a4a1ea66b..9b4e196a6 100644 --- a/source/utilities/file.bas +++ b/source/utilities/file.bas @@ -96,7 +96,7 @@ FUNCTION GetEscapedPath$ (path_name AS STRING) END FUNCTION ' Returns a path/file with single slashes only, effectively unescaping "\" -FUNCTION RemoveDoubleSlashes$(f2$) +FUNCTION RemoveDoubleSlashes$ (f2$) f$ = f2$ 'avoid arg side effects DO 'sp% = 0 at function entry diff --git a/source/utilities/format.bas b/source/utilities/format.bas index 0d47cc490..3abf7fb4b 100644 --- a/source/utilities/format.bas +++ b/source/utilities/format.bas @@ -1,5 +1,5 @@ 'Apply indentation to layout$ as per settings and remove control characters. -FUNCTION apply_layout_indent$(original$) +FUNCTION apply_layout_indent$ (original$) layout2$ = layout$ 'previous line was OK, so use layout if available IF IDEAutoLayout <> 0 OR IDEAutoIndent <> 0 THEN @@ -70,4 +70,4 @@ FUNCTION apply_layout_indent$(original$) END IF END IF 'len(layout2$) END IF 'using layout/indent -END SUB +END FUNCTION diff --git a/source/utilities/s-buffer/sb_qb64pe_extension.bm b/source/utilities/s-buffer/sb_qb64pe_extension.bm index 1fc92f2d5..8bc2b178f 100644 --- a/source/utilities/s-buffer/sb_qb64pe_extension.bm +++ b/source/utilities/s-buffer/sb_qb64pe_extension.bm @@ -11,43 +11,43 @@ '--- Modes names can be short, only the first character is checked. '--------------------------------------------------------------------- FUNCTION OpenBuffer% (sbMode$, sbName$) -'--- option _explicit requirements --- -DIM buf%, nul& -'--- buffer already existing? --- -FOR buf% = 0 TO UBOUND(SBufN) - IF SBufN(buf%) = sbName$ THEN EXIT FOR -NEXT buf% -'--- simulate file modes --- -SELECT CASE UCASE$(LEFT$(sbMode$, 1)) - CASE "A" 'append - IF buf% > UBOUND(SBufN) THEN GOSUB newBuf - nul& = SeekBuf&(buf%, 0, SBM_BufEnd) - CASE "B" 'binary - IF buf% > UBOUND(SBufN) THEN GOSUB newBuf - nul& = SeekBuf&(buf%, 0, SBM_BufStart) - CASE "I" 'input (try to load from file, if yet unknown) - IF buf% > UBOUND(SBufN) THEN GOSUB loadBuf - nul& = SeekBuf&(buf%, 0, SBM_BufStart) - CASE "O" 'output - IF buf% <= UBOUND(SBufN) THEN DisposeBuf buf%: SBufN(buf%) = "" - GOSUB newBuf - CASE ELSE 'random or unknown mode - buf% = SBE_NoMoreBuffers 'not supported -END SELECT -OpenBuffer% = buf% -EXIT FUNCTION -'---------- -newBuf: -buf% = CreateBuf% -IF buf% > UBOUND(SBufN) THEN REDIM _PRESERVE SBufN(0 TO buf% + 99) AS STRING 'extend by 100 buffers -SBufN(buf%) = sbName$ -RETURN -'---------- -loadBuf: -buf% = FileToBuf%(sbName$) -IF buf% > UBOUND(SBufN) THEN REDIM _PRESERVE SBufN(0 TO buf% + 99) AS STRING 'extend by 100 buffers -SBufN(buf%) = sbName$ -RETURN + '--- option _explicit requirements --- + DIM buf%, nul& + '--- buffer already existing? --- + FOR buf% = 0 TO UBOUND(SBufN) + IF SBufN(buf%) = sbName$ THEN EXIT FOR + NEXT buf% + '--- simulate file modes --- + SELECT CASE UCASE$(LEFT$(sbMode$, 1)) + CASE "A" 'append + IF buf% > UBOUND(SBufN) THEN GOSUB newBuf + nul& = SeekBuf&(buf%, 0, SBM_BufEnd) + CASE "B" 'binary + IF buf% > UBOUND(SBufN) THEN GOSUB newBuf + nul& = SeekBuf&(buf%, 0, SBM_BufStart) + CASE "I" 'input (try to load from file, if yet unknown) + IF buf% > UBOUND(SBufN) THEN GOSUB loadBuf + nul& = SeekBuf&(buf%, 0, SBM_BufStart) + CASE "O" 'output + IF buf% <= UBOUND(SBufN) THEN DisposeBuf buf%: SBufN(buf%) = "" + GOSUB newBuf + CASE ELSE 'random or unknown mode + buf% = SBE_NoMoreBuffers 'not supported + END SELECT + OpenBuffer% = buf% + EXIT FUNCTION + '---------- + newBuf: + buf% = CreateBuf% + IF buf% > UBOUND(SBufN) THEN REDIM _PRESERVE SBufN(0 TO buf% + 99) AS STRING 'extend by 100 buffers + SBufN(buf%) = sbName$ + RETURN + '---------- + loadBuf: + buf% = FileToBuf%(sbName$) + IF buf% > UBOUND(SBufN) THEN REDIM _PRESERVE SBufN(0 TO buf% + 99) AS STRING 'extend by 100 buffers + SBufN(buf%) = sbName$ + RETURN END FUNCTION '--- This subroutine will clear the given buffer or ALL buffers, if the @@ -58,20 +58,20 @@ END FUNCTION '--- given at the respective OpenBuffer%() call. '--------------------------------------------------------------------- SUB ClearBuffers (sbName$) -'--- option _explicit requirements --- -DIM buf% -'--- clear/dispose buffer(s) --- -IF sbName$ <> "" THEN - FOR buf% = 0 TO UBOUND(SBufN) - IF SBufN(buf%) = sbName$ THEN EXIT FOR 'buffer found - NEXT buf% - IF buf% > UBOUND(SBufN) THEN EXIT SUB 'buffer doesn't exist - DisposeBuf buf%: SBufN(buf%) = "" -ELSE - FOR buf% = 0 TO UBOUND(SBufN) - IF SBufN(buf%) <> "" THEN DisposeBuf buf%: SBufN(buf%) = "" - NEXT buf% -END IF + '--- option _explicit requirements --- + DIM buf% + '--- clear/dispose buffer(s) --- + IF sbName$ <> "" THEN + FOR buf% = 0 TO UBOUND(SBufN) + IF SBufN(buf%) = sbName$ THEN EXIT FOR 'buffer found + NEXT buf% + IF buf% > UBOUND(SBufN) THEN EXIT SUB 'buffer doesn't exist + DisposeBuf buf%: SBufN(buf%) = "" + ELSE + FOR buf% = 0 TO UBOUND(SBufN) + IF SBufN(buf%) <> "" THEN DisposeBuf buf%: SBufN(buf%) = "" + NEXT buf% + END IF END SUB '--- This subroutine will write the current contents of the given buffer @@ -84,20 +84,20 @@ END SUB '--- given at the respective OpenBuffer%() call. '--------------------------------------------------------------------- SUB WriteBuffers (sbName$) -'--- option _explicit requirements --- -DIM buf% -'--- write buffer(s) --- -IF sbName$ <> "" THEN - FOR buf% = 0 TO UBOUND(SBufN) - IF SBufN(buf%) = sbName$ THEN EXIT FOR 'buffer found - NEXT buf% - IF buf% > UBOUND(SBufN) THEN EXIT SUB 'buffer doesn't exist - IF IsBufChanged%(buf%) THEN BufToFile buf%, SBufN(buf%) -ELSE - FOR buf% = 0 TO UBOUND(SBufN) - IF SBufN(buf%) <> "" THEN - IF IsBufChanged%(buf%) THEN BufToFile buf%, SBufN(buf%) - END IF - NEXT buf% -END IF + '--- option _explicit requirements --- + DIM buf% + '--- write buffer(s) --- + IF sbName$ <> "" THEN + FOR buf% = 0 TO UBOUND(SBufN) + IF SBufN(buf%) = sbName$ THEN EXIT FOR 'buffer found + NEXT buf% + IF buf% > UBOUND(SBufN) THEN EXIT SUB 'buffer doesn't exist + IF IsBufChanged%(buf%) THEN BufToFile buf%, SBufN(buf%) + ELSE + FOR buf% = 0 TO UBOUND(SBufN) + IF SBufN(buf%) <> "" THEN + IF IsBufChanged%(buf%) THEN BufToFile buf%, SBufN(buf%) + END IF + NEXT buf% + END IF END SUB diff --git a/source/utilities/s-buffer/simplebuffer.bm b/source/utilities/s-buffer/simplebuffer.bm index 62a40e733..f2cd44f59 100644 --- a/source/utilities/s-buffer/simplebuffer.bm +++ b/source/utilities/s-buffer/simplebuffer.bm @@ -21,971 +21,971 @@ '--- docs\CreateBuf.html '--------------------------------------------------------------------- FUNCTION CreateBuf% -'--- option _explicit requirements --- -DIM aub&, buf&, idx% -'--- find next free handle --- -aub& = UBOUND(simplebuffer_array$) -buf& = 0: CreateBuf% = SBE_NoMoreBuffers -WHILE buf& < aub& - IF simplebuffer_array$(buf& + 1) = "" THEN EXIT WHILE - buf& = buf& + 106 - IF buf& >= 3473090 THEN EXIT FUNCTION '=> allow max. 32765 buffers -WEND -'--- expand array, if necessary --- -IF aub& < buf& + 105 THEN REDIM _PRESERVE simplebuffer_array$(0 TO buf& + 10599) '=> add 100 more buffers -'--- init buffer --- -simplebuffer_array$(buf& + 0) = SPACE$(16384) ' => the actual buffer (will grow as needed) -simplebuffer_array$(buf& + 1) = MKL$(1) + MKL$(0) + "EolU" + MKL$(-1) '=> cursor position + buffer length + EOL mode + change state -simplebuffer_array$(buf& + 2) = "BM|" + SPACE$(404) ' => space for 100 +1 bookmarks -simplebuffer_array$(buf& + 3) = "FP|" + SPACE$(404) ' => space for 100 +1 found at positions -simplebuffer_array$(buf& + 4) = "FL|" + SPACE$(404) ' => space for 100 +1 find data lenghts -FOR idx% = 1 TO 101 - MID$(simplebuffer_array$(buf& + 2), idx% * 4, 4) = MKL$(&HCAFEBABE) - MID$(simplebuffer_array$(buf& + 3), idx% * 4, 4) = MKL$(&HCAFEBABE) - MID$(simplebuffer_array$(buf& + 4), idx% * 4, 4) = MKL$(&HCAFEBABE) - simplebuffer_array$(buf& + idx% + 4) = "" ' => space for 100 +1 find data copies (5-104/105) -NEXT idx% ' => note the +1/105 is reserved for internal use -'--- return new handle --- -CreateBuf% = buf& \ 106 + '--- option _explicit requirements --- + DIM aub&, buf&, idx% + '--- find next free handle --- + aub& = UBOUND(simplebuffer_array$) + buf& = 0: CreateBuf% = SBE_NoMoreBuffers + WHILE buf& < aub& + IF simplebuffer_array$(buf& + 1) = "" THEN EXIT WHILE + buf& = buf& + 106 + IF buf& >= 3473090 THEN EXIT FUNCTION '=> allow max. 32765 buffers + WEND + '--- expand array, if necessary --- + IF aub& < buf& + 105 THEN REDIM _PRESERVE simplebuffer_array$(0 TO buf& + 10599) '=> add 100 more buffers + '--- init buffer --- + simplebuffer_array$(buf& + 0) = SPACE$(16384) ' => the actual buffer (will grow as needed) + simplebuffer_array$(buf& + 1) = MKL$(1) + MKL$(0) + "EolU" + MKL$(-1) '=> cursor position + buffer length + EOL mode + change state + simplebuffer_array$(buf& + 2) = "BM|" + SPACE$(404) ' => space for 100 +1 bookmarks + simplebuffer_array$(buf& + 3) = "FP|" + SPACE$(404) ' => space for 100 +1 found at positions + simplebuffer_array$(buf& + 4) = "FL|" + SPACE$(404) ' => space for 100 +1 find data lenghts + FOR idx% = 1 TO 101 + MID$(simplebuffer_array$(buf& + 2), idx% * 4, 4) = MKL$(&HCAFEBABE) + MID$(simplebuffer_array$(buf& + 3), idx% * 4, 4) = MKL$(&HCAFEBABE) + MID$(simplebuffer_array$(buf& + 4), idx% * 4, 4) = MKL$(&HCAFEBABE) + simplebuffer_array$(buf& + idx% + 4) = "" ' => space for 100 +1 find data copies (5-104/105) + NEXT idx% ' => note the +1/105 is reserved for internal use + '--- return new handle --- + CreateBuf% = buf& \ 106 END FUNCTION '--- docs\DisposeBuf.html '--------------------------------------------------------------------- SUB DisposeBuf (handle%) -'--- option _explicit requirements --- -DIM buf&, idx%, aub&, oub& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- erase buffer data --- -FOR idx% = 0 TO 105 - simplebuffer_array$(buf& + idx%) = "" -NEXT idx% -'--- shrink array, if worth 10+ buffers --- -aub& = UBOUND(simplebuffer_array$): oub& = aub& -buf& = aub& - 105 -WHILE buf& >= 1060 - IF simplebuffer_array$(buf& + 1) <> "" THEN EXIT WHILE - buf& = buf& - 106 -WEND -WHILE aub& - 1059 > buf& + 105: aub& = aub& - 1060: WEND -IF aub& < oub& THEN REDIM _PRESERVE simplebuffer_array$(0 TO aub&) + '--- option _explicit requirements --- + DIM buf&, idx%, aub&, oub& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- erase buffer data --- + FOR idx% = 0 TO 105 + simplebuffer_array$(buf& + idx%) = "" + NEXT idx% + '--- shrink array, if worth 10+ buffers --- + aub& = UBOUND(simplebuffer_array$): oub& = aub& + buf& = aub& - 105 + WHILE buf& >= 1060 + IF simplebuffer_array$(buf& + 1) <> "" THEN EXIT WHILE + buf& = buf& - 106 + WEND + WHILE aub& - 1059 > buf& + 105: aub& = aub& - 1060: WEND + IF aub& < oub& THEN REDIM _PRESERVE simplebuffer_array$(0 TO aub&) END SUB '--- docs\FileToBuf.html '--------------------------------------------------------------------- FUNCTION FileToBuf% (fileSpec$) -'--- option _explicit requirements --- -DIM han%, buf&, ff%, fl&&, ext& -'--- create a new buffer --- -han% = CreateBuf% -buf& = han% * 106 -'--- on success, open file --- -IF han% >= 0 THEN - ff% = FREEFILE - OPEN fileSpec$ FOR BINARY LOCK WRITE AS ff% - fl&& = LOF(ff%): ext& = fl&& MOD 16384 - '--- check file length --- - IF fl&& > &H40000000&& THEN - ERROR 7 'buffer overflow (file too big, >1GiB) - 'If the program is continued from here regardless of the error, - 'then the returned buffer will be empty, but ready to use. - ELSE - '--- load file into buffer & adjust length --- - simplebuffer_array$(buf& + 0) = SPACE$(fl&&) - GET ff%, , simplebuffer_array$(buf& + 0) - IF ext& > 0 THEN - simplebuffer_array$(buf& + 0) = simplebuffer_array$(buf& + 0) + SPACE$(16384 - ext&) + '--- option _explicit requirements --- + DIM han%, buf&, ff%, fl&&, ext& + '--- create a new buffer --- + han% = CreateBuf% + buf& = han% * 106 + '--- on success, open file --- + IF han% >= 0 THEN + ff% = FREEFILE + OPEN fileSpec$ FOR BINARY LOCK WRITE AS ff% + fl&& = LOF(ff%): ext& = fl&& MOD 16384 + '--- check file length --- + IF fl&& > &H40000000&& THEN + ERROR 7 'buffer overflow (file too big, >1GiB) + 'If the program is continued from here regardless of the error, + 'then the returned buffer will be empty, but ready to use. + ELSE + '--- load file into buffer & adjust length --- + simplebuffer_array$(buf& + 0) = SPACE$(fl&&) + GET ff%, , simplebuffer_array$(buf& + 0) + IF ext& > 0 THEN + simplebuffer_array$(buf& + 0) = simplebuffer_array$(buf& + 0) + SPACE$(16384 - ext&) + END IF + '--- set cursor, buffer length & change state --- + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(1) + MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(fl&&) + MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(0) END IF - '--- set cursor, buffer length & change state --- - MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(1) - MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(fl&&) - MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(0) + CLOSE ff% END IF - CLOSE ff% -END IF -'--- return new handle --- -FileToBuf% = han% + '--- return new handle --- + FileToBuf% = han% END FUNCTION '--- docs\BufToFile.html '--------------------------------------------------------------------- SUB BufToFile (handle%, fileSpec$) -'--- option _explicit requirements --- -DIM buf&, ff%, dat$ -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- write file (overwrite existing !!!) --- -ff% = FREEFILE: dat$ = LEFT$(simplebuffer_array$(buf& + 0), GetBufLen&(handle%)) -OPEN fileSpec$ FOR OUTPUT LOCK WRITE AS ff%: CLOSE ff% -OPEN fileSpec$ FOR BINARY LOCK WRITE AS ff% -PUT ff%, , dat$ -CLOSE ff% -'--- reset change state --- -MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(0) + '--- option _explicit requirements --- + DIM buf&, ff%, dat$ + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- write file (overwrite existing !!!) --- + ff% = FREEFILE: dat$ = LEFT$(simplebuffer_array$(buf& + 0), GetBufLen&(handle%)) + OPEN fileSpec$ FOR OUTPUT LOCK WRITE AS ff%: CLOSE ff% + OPEN fileSpec$ FOR BINARY LOCK WRITE AS ff% + PUT ff%, , dat$ + CLOSE ff% + '--- reset change state --- + MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(0) END SUB '--- docs\CloneBuf.html '--------------------------------------------------------------------- FUNCTION CloneBuf% (handle%) -'--- option _explicit requirements --- -DIM buf&, dhan%, dbuf&, idx% -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- create a new buffer --- -dhan% = CreateBuf% -dbuf& = dhan% * 106 -'--- on success, copy buffer values --- -IF dhan% >= 0 THEN - FOR idx% = 0 TO 105 - simplebuffer_array$(dbuf& + idx%) = simplebuffer_array$(buf& + idx%) - NEXT idx% -END IF -'--- return new handle --- -CloneBuf% = dhan% + '--- option _explicit requirements --- + DIM buf&, dhan%, dbuf&, idx% + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- create a new buffer --- + dhan% = CreateBuf% + dbuf& = dhan% * 106 + '--- on success, copy buffer values --- + IF dhan% >= 0 THEN + FOR idx% = 0 TO 105 + simplebuffer_array$(dbuf& + idx%) = simplebuffer_array$(buf& + idx%) + NEXT idx% + END IF + '--- return new handle --- + CloneBuf% = dhan% END FUNCTION '--- docs\BufInsertFile.html '--------------------------------------------------------------------- SUB BufInsertFile (handle%, fileSpec$) -'--- option _explicit requirements --- -DIM than% -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -'--- load file into a temp buffer --- -than% = FileToBuf%(fileSpec$) -'--- on success, insert into buffer --- -IF than% >= 0 THEN - BufInsertBuf handle%, than% - DisposeBuf than% -END IF + '--- option _explicit requirements --- + DIM than% + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + '--- load file into a temp buffer --- + than% = FileToBuf%(fileSpec$) + '--- on success, insert into buffer --- + IF than% >= 0 THEN + BufInsertBuf handle%, than% + DisposeBuf than% + END IF END SUB '--- docs\BufInsertBuf.html '--------------------------------------------------------------------- SUB BufInsertBuf (handle%, fromHandle%) -'--- option _explicit requirements --- -DIM fbuf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -IF NOT CheckHandle%(fromHandle%) THEN ERROR 258: STOP 'invalid fromHandle -fbuf& = fromHandle% * 106 -'--- insert data of another buffer --- -WriteBufRawData handle%, LEFT$(simplebuffer_array$(fbuf& + 0), GetBufLen&(fromHandle%)) + '--- option _explicit requirements --- + DIM fbuf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + IF NOT CheckHandle%(fromHandle%) THEN ERROR 258: STOP 'invalid fromHandle + fbuf& = fromHandle% * 106 + '--- insert data of another buffer --- + WriteBufRawData handle%, LEFT$(simplebuffer_array$(fbuf& + 0), GetBufLen&(fromHandle%)) END SUB '--- docs\ReadBufLine.html '--------------------------------------------------------------------- FUNCTION ReadBufLine$ (handle%) -'--- option _explicit requirements --- -DIM buf&, cur&, cbl&&, brc$, brl%, eol& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%): cbl&& = GetBufLen&(handle%) -brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) -'--- find next line break --- -eol& = INSTR(cur&, simplebuffer_array$(buf& + 0), brc$) -IF eol& = 0 OR eol& > cbl&& THEN eol& = cbl&& + 1: brl% = 0 -'--- read from buffer --- -ReadBufLine$ = MID$(simplebuffer_array$(buf& + 0), cur&, eol& - cur&) -MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(eol& + brl%) + '--- option _explicit requirements --- + DIM buf&, cur&, cbl&&, brc$, brl%, eol& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%): cbl&& = GetBufLen&(handle%) + brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) + '--- find next line break --- + eol& = INSTR(cur&, simplebuffer_array$(buf& + 0), brc$) + IF eol& = 0 OR eol& > cbl&& THEN eol& = cbl&& + 1: brl% = 0 + '--- read from buffer --- + ReadBufLine$ = MID$(simplebuffer_array$(buf& + 0), cur&, eol& - cur&) + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(eol& + brl%) END FUNCTION '--- docs\WriteBufLine.html '--------------------------------------------------------------------- SUB WriteBufLine (handle%, text$) -'--- option _explicit requirements --- -DIM buf&, cur&, txl&, brc$, brl%, cbl&&, chg&, bsz&, ext& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%): txl& = LEN(text$) -brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) -cbl&& = GetBufLen&(handle%): chg& = txl& + brl% -'--- check buffer length --- -IF cbl&& + chg& > &H40000000&& THEN - ERROR 7 'buffer overflow (text$ too long) - 'If the program is continued from here regardless of the error, - 'then the given text was not written into the buffer. -ELSE - '--- adjust buffer length --- - bsz& = LEN(simplebuffer_array$(buf& + 0)): ext& = 0 - WHILE cbl&& + chg& > bsz& + ext&: ext& = ext& + 16384: WEND - IF ext& > 0 THEN - simplebuffer_array$(buf& + 0) = simplebuffer_array$(buf& + 0) + SPACE$(ext&) - END IF - '--- write into buffer --- - MID$(simplebuffer_array$(buf& + 0), cur&) = text$ + brc$ + MID$(simplebuffer_array$(buf& + 0), cur&, cbl&& - cur& + 1) - MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cur& + chg&) - MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& + chg&) - IF txl& > 0 THEN - IF (INSTR(text$, CHR$(10)) > 0) OR (INSTR(text$, CHR$(13)) > 0) THEN - 'this buffer write could compromise the defined EOL mode - MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolU" 'reset to unknown + '--- option _explicit requirements --- + DIM buf&, cur&, txl&, brc$, brl%, cbl&&, chg&, bsz&, ext& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%): txl& = LEN(text$) + brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) + cbl&& = GetBufLen&(handle%): chg& = txl& + brl% + '--- check buffer length --- + IF cbl&& + chg& > &H40000000&& THEN + ERROR 7 'buffer overflow (text$ too long) + 'If the program is continued from here regardless of the error, + 'then the given text was not written into the buffer. + ELSE + '--- adjust buffer length --- + bsz& = LEN(simplebuffer_array$(buf& + 0)): ext& = 0 + WHILE cbl&& + chg& > bsz& + ext&: ext& = ext& + 16384: WEND + IF ext& > 0 THEN + simplebuffer_array$(buf& + 0) = simplebuffer_array$(buf& + 0) + SPACE$(ext&) + END IF + '--- write into buffer --- + MID$(simplebuffer_array$(buf& + 0), cur&) = text$ + brc$ + MID$(simplebuffer_array$(buf& + 0), cur&, cbl&& - cur& + 1) + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cur& + chg&) + MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& + chg&) + IF txl& > 0 THEN + IF (INSTR(text$, CHR$(10)) > 0) OR (INSTR(text$, CHR$(13)) > 0) THEN + 'this buffer write could compromise the defined EOL mode + MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolU" 'reset to unknown + END IF END IF + MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) + '--- adjust bookmarks & find positions --- + RecalcMarks handle%, cur&, chg& + RecalcFinds handle%, cur&, chg& END IF - MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) - '--- adjust bookmarks & find positions --- - RecalcMarks handle%, cur&, chg& - RecalcFinds handle%, cur&, chg& -END IF END SUB '--- docs\DeleteBufLine.html '--------------------------------------------------------------------- SUB DeleteBufLine (handle%) -'--- option _explicit requirements --- -DIM buf&, cur&, cbl&&, brc$, brl%, eol&, chg&, ext&, fsz& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%): cbl&& = GetBufLen&(handle%) -brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) -'--- find next line break --- -eol& = INSTR(cur&, simplebuffer_array$(buf& + 0), brc$) -IF eol& = 0 OR eol& > cbl&& THEN eol& = cbl&& + 1: brl% = 0 -chg& = (eol& + brl%) - cur& -'--- delete from buffer --- -MID$(simplebuffer_array$(buf& + 0), cur&) = MID$(simplebuffer_array$(buf& + 0), eol& + brl%, cbl&& - (eol& + brl%) + 1) -MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& - chg&) -IF chg& > 0 THEN - MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) - '--- shrink buffer, if worth 1/4th+ --- - ext& = (((cbl&& - chg& + 1) + 16383) AND -16384) '+1 = avoid zero case - fsz& = LEN(simplebuffer_array$(buf& + 0)) - ext& - IF fsz& >= LEN(simplebuffer_array$(buf& + 0)) \ 4 THEN - simplebuffer_array$(buf& + 0) = LEFT$(simplebuffer_array$(buf& + 0), ext&) + '--- option _explicit requirements --- + DIM buf&, cur&, cbl&&, brc$, brl%, eol&, chg&, ext&, fsz& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%): cbl&& = GetBufLen&(handle%) + brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) + '--- find next line break --- + eol& = INSTR(cur&, simplebuffer_array$(buf& + 0), brc$) + IF eol& = 0 OR eol& > cbl&& THEN eol& = cbl&& + 1: brl% = 0 + chg& = (eol& + brl%) - cur& + '--- delete from buffer --- + MID$(simplebuffer_array$(buf& + 0), cur&) = MID$(simplebuffer_array$(buf& + 0), eol& + brl%, cbl&& - (eol& + brl%) + 1) + MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& - chg&) + IF chg& > 0 THEN + MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) + '--- shrink buffer, if worth 1/4th+ --- + ext& = (((cbl&& - chg& + 1) + 16383) AND -16384) '+1 = avoid zero case + fsz& = LEN(simplebuffer_array$(buf& + 0)) - ext& + IF fsz& >= LEN(simplebuffer_array$(buf& + 0)) \ 4 THEN + simplebuffer_array$(buf& + 0) = LEFT$(simplebuffer_array$(buf& + 0), ext&) + END IF END IF -END IF -'--- adjust bookmarks & find positions --- -RecalcMarks handle%, cur&, -chg& -RecalcFinds handle%, cur&, -chg& + '--- adjust bookmarks & find positions --- + RecalcMarks handle%, cur&, -chg& + RecalcFinds handle%, cur&, -chg& END SUB '--- docs\ReadBufRawData.html '--------------------------------------------------------------------- FUNCTION ReadBufRawData$ (handle%, size&) 'size change intended -'--- option _explicit requirements --- -DIM buf&, cur&, eob& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 -IF size& > eob& - cur& THEN size& = eob& - cur& -'--- read from buffer --- -ReadBufRawData$ = MID$(simplebuffer_array$(buf& + 0), cur&, size&) -MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cur& + size&) + '--- option _explicit requirements --- + DIM buf&, cur&, eob& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 + IF size& > eob& - cur& THEN size& = eob& - cur& + '--- read from buffer --- + ReadBufRawData$ = MID$(simplebuffer_array$(buf& + 0), cur&, size&) + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cur& + size&) END FUNCTION '--- docs\WriteBufRawData.html '--------------------------------------------------------------------- SUB WriteBufRawData (handle%, rawData$) -'--- option _explicit requirements --- -DIM buf&, cur&, rdl&, cbl&&, bsz&, ext& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%): rdl& = LEN(rawData$) -cbl&& = GetBufLen&(handle%) -'--- check buffer length --- -IF cbl&& + rdl& > &H40000000&& THEN - ERROR 7 'buffer overflow (rawData$ too long) - 'If the program is continued from here regardless of the error, - 'then the given raw data were not written into the buffer. -ELSE - '--- adjust buffer length --- - bsz& = LEN(simplebuffer_array$(buf& + 0)): ext& = 0 - WHILE cbl&& + rdl& > bsz& + ext&: ext& = ext& + 16384: WEND - IF ext& > 0 THEN - simplebuffer_array$(buf& + 0) = simplebuffer_array$(buf& + 0) + SPACE$(ext&) - END IF - '--- write into buffer --- - MID$(simplebuffer_array$(buf& + 0), cur&) = rawData$ + MID$(simplebuffer_array$(buf& + 0), cur&, cbl&& - cur& + 1) - MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cur& + rdl&) - MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& + rdl&) - IF rdl& > 0 THEN - IF (INSTR(rawData$, CHR$(10)) > 0) OR (INSTR(rawData$, CHR$(13)) > 0) THEN - 'this buffer write could compromise the defined EOL mode - MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolU" 'reset to unknown + '--- option _explicit requirements --- + DIM buf&, cur&, rdl&, cbl&&, bsz&, ext& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%): rdl& = LEN(rawData$) + cbl&& = GetBufLen&(handle%) + '--- check buffer length --- + IF cbl&& + rdl& > &H40000000&& THEN + ERROR 7 'buffer overflow (rawData$ too long) + 'If the program is continued from here regardless of the error, + 'then the given raw data were not written into the buffer. + ELSE + '--- adjust buffer length --- + bsz& = LEN(simplebuffer_array$(buf& + 0)): ext& = 0 + WHILE cbl&& + rdl& > bsz& + ext&: ext& = ext& + 16384: WEND + IF ext& > 0 THEN + simplebuffer_array$(buf& + 0) = simplebuffer_array$(buf& + 0) + SPACE$(ext&) END IF - MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) + '--- write into buffer --- + MID$(simplebuffer_array$(buf& + 0), cur&) = rawData$ + MID$(simplebuffer_array$(buf& + 0), cur&, cbl&& - cur& + 1) + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cur& + rdl&) + MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& + rdl&) + IF rdl& > 0 THEN + IF (INSTR(rawData$, CHR$(10)) > 0) OR (INSTR(rawData$, CHR$(13)) > 0) THEN + 'this buffer write could compromise the defined EOL mode + MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolU" 'reset to unknown + END IF + MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) + END IF + '--- adjust bookmarks & find positions --- + RecalcMarks handle%, cur&, rdl& + RecalcFinds handle%, cur&, rdl& END IF - '--- adjust bookmarks & find positions --- - RecalcMarks handle%, cur&, rdl& - RecalcFinds handle%, cur&, rdl& -END IF END SUB '--- docs\DeleteBufRawData.html '--------------------------------------------------------------------- SUB DeleteBufRawData (handle%, size&) 'size change intended -'--- option _explicit requirements --- -DIM buf&, cur&, cbl&&, eob&, ext&, fsz& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%) -cbl&& = GetBufLen&(handle%): eob& = cbl&& + 1 -IF size& > eob& - cur& THEN size& = eob& - cur& -'--- delete from buffer --- -MID$(simplebuffer_array$(buf& + 0), cur&) = MID$(simplebuffer_array$(buf& + 0), cur& + size&, cbl&& - (cur& + size&) + 1) -MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& - size&) -IF size& > 0 THEN - MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) - '--- shrink buffer, if worth 1/4th+ --- - ext& = (((cbl&& - size& + 1) + 16383) AND -16384) '+1 = avoid zero case - fsz& = LEN(simplebuffer_array$(buf& + 0)) - ext& - IF fsz& >= LEN(simplebuffer_array$(buf& + 0)) \ 4 THEN - simplebuffer_array$(buf& + 0) = LEFT$(simplebuffer_array$(buf& + 0), ext&) + '--- option _explicit requirements --- + DIM buf&, cur&, cbl&&, eob&, ext&, fsz& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%) + cbl&& = GetBufLen&(handle%): eob& = cbl&& + 1 + IF size& > eob& - cur& THEN size& = eob& - cur& + '--- delete from buffer --- + MID$(simplebuffer_array$(buf& + 0), cur&) = MID$(simplebuffer_array$(buf& + 0), cur& + size&, cbl&& - (cur& + size&) + 1) + MID$(simplebuffer_array$(buf& + 1), 5, 4) = MKL$(cbl&& - size&) + IF size& > 0 THEN + MID$(simplebuffer_array$(buf& + 1), 13, 4) = MKL$(-1) + '--- shrink buffer, if worth 1/4th+ --- + ext& = (((cbl&& - size& + 1) + 16383) AND -16384) '+1 = avoid zero case + fsz& = LEN(simplebuffer_array$(buf& + 0)) - ext& + IF fsz& >= LEN(simplebuffer_array$(buf& + 0)) \ 4 THEN + simplebuffer_array$(buf& + 0) = LEFT$(simplebuffer_array$(buf& + 0), ext&) + END IF END IF -END IF -'--- adjust bookmarks & find positions --- -RecalcMarks handle%, cur&, -size& -RecalcFinds handle%, cur&, -size& + '--- adjust bookmarks & find positions --- + RecalcMarks handle%, cur&, -size& + RecalcFinds handle%, cur&, -size& END SUB '--- docs\GetBufMemData.html '--------------------------------------------------------------------- SUB GetBufMemData (handle%, memData AS _MEM) -'--- option _explicit requirements --- -DIM size&&, temp&, datStr$ -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -'--- get memory data size --- -DIM sizeRef AS _MEM -sizeRef = _MEM(memData.SIZE) -IF INSTR(_OS$, "[64BIT]") > 0 THEN - _MEMGET sizeRef, sizeRef.OFFSET, size&& -ELSE - _MEMGET sizeRef, sizeRef.OFFSET, temp& - size&& = temp& -END IF -_MEMFREE sizeRef -'--- read amount of data from buffer --- -datStr$ = ReadBufRawData$(handle%, size&&) -'--- then copy into the memory block --- -_MEMPUT memData, memData.OFFSET, datStr$ + '--- option _explicit requirements --- + DIM size&&, temp&, datStr$ + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + '--- get memory data size --- + DIM sizeRef AS _MEM + sizeRef = _MEM(memData.SIZE) + IF INSTR(_OS$, "[64BIT]") > 0 THEN + _MEMGET sizeRef, sizeRef.OFFSET, size&& + ELSE + _MEMGET sizeRef, sizeRef.OFFSET, temp& + size&& = temp& + END IF + _MEMFREE sizeRef + '--- read amount of data from buffer --- + datStr$ = ReadBufRawData$(handle%, size&&) + '--- then copy into the memory block --- + _MEMPUT memData, memData.OFFSET, datStr$ END SUB '--- docs\PutBufMemData.html '--------------------------------------------------------------------- SUB PutBufMemData (handle%, memData AS _MEM) -'--- option _explicit requirements --- -DIM size&&, temp&, datStr$ -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -'--- get memory data size --- -DIM sizeRef AS _MEM -sizeRef = _MEM(memData.SIZE) -IF INSTR(_OS$, "[64BIT]") > 0 THEN - _MEMGET sizeRef, sizeRef.OFFSET, size&& -ELSE - _MEMGET sizeRef, sizeRef.OFFSET, temp& - size&& = temp& -END IF -_MEMFREE sizeRef -'--- read out the memory block --- -datStr$ = SPACE$(size&&) -_MEMGET memData, memData.OFFSET, datStr$ -'--- then write it into the buffer --- -WriteBufRawData handle%, datStr$ + '--- option _explicit requirements --- + DIM size&&, temp&, datStr$ + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + '--- get memory data size --- + DIM sizeRef AS _MEM + sizeRef = _MEM(memData.SIZE) + IF INSTR(_OS$, "[64BIT]") > 0 THEN + _MEMGET sizeRef, sizeRef.OFFSET, size&& + ELSE + _MEMGET sizeRef, sizeRef.OFFSET, temp& + size&& = temp& + END IF + _MEMFREE sizeRef + '--- read out the memory block --- + datStr$ = SPACE$(size&&) + _MEMGET memData, memData.OFFSET, datStr$ + '--- then write it into the buffer --- + WriteBufRawData handle%, datStr$ END SUB '--- docs\SetBufMark.html '--------------------------------------------------------------------- FUNCTION SetBufMark% (handle%) -'--- option _explicit requirements --- -DIM buf&, fid% -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- get new ID, set bookmark on success --- -fid% = FreeID%(handle%, 2) -IF fid% > 0 THEN MID$(simplebuffer_array$(buf& + 2), fid% * 4, 4) = MID$(simplebuffer_array$(buf& + 1), 1, 4) -'--- return ID --- -SetBufMark% = fid% + '--- option _explicit requirements --- + DIM buf&, fid% + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- get new ID, set bookmark on success --- + fid% = FreeID%(handle%, 2) + IF fid% > 0 THEN MID$(simplebuffer_array$(buf& + 2), fid% * 4, 4) = MID$(simplebuffer_array$(buf& + 1), 1, 4) + '--- return ID --- + SetBufMark% = fid% END FUNCTION '--- docs\RemoveBufMark.html '--------------------------------------------------------------------- FUNCTION RemoveBufMark% (handle%, markID%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check ID range --- -RemoveBufMark% = SBE_BadIDNumber -IF (markID% < 1 OR markID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION -'--- remove (unset) bookmark --- -MID$(simplebuffer_array$(buf& + 2), markID% * 4, 4) = MKL$(&HCAFEBABE) -RemoveBufMark% = 0 + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check ID range --- + RemoveBufMark% = SBE_BadIDNumber + IF (markID% < 1 OR markID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION + '--- remove (unset) bookmark --- + MID$(simplebuffer_array$(buf& + 2), markID% * 4, 4) = MKL$(&HCAFEBABE) + RemoveBufMark% = 0 END FUNCTION '--- docs\GetBufMark.html '--------------------------------------------------------------------- FUNCTION GetBufMark& (handle%, markID%) -'--- option _explicit requirements --- -DIM buf&, markPos& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check ID range --- -GetBufMark& = SBE_BadIDNumber -IF (markID% < 1 OR markID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION -'--- return bookmark position, if set --- -markPos& = CVL(MID$(simplebuffer_array$(buf& + 2), markID% * 4, 4)) -SELECT CASE markPos& - CASE &HCAFEBABE: GetBufMark& = SBE_UnusedID - CASE &HDEADBEEF: GetBufMark& = SBE_ClearedID - CASE ELSE: GetBufMark& = markPos& -END SELECT + '--- option _explicit requirements --- + DIM buf&, markPos& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check ID range --- + GetBufMark& = SBE_BadIDNumber + IF (markID% < 1 OR markID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION + '--- return bookmark position, if set --- + markPos& = CVL(MID$(simplebuffer_array$(buf& + 2), markID% * 4, 4)) + SELECT CASE markPos& + CASE &HCAFEBABE: GetBufMark& = SBE_UnusedID + CASE &HDEADBEEF: GetBufMark& = SBE_ClearedID + CASE ELSE: GetBufMark& = markPos& + END SELECT END FUNCTION '--- docs\GotoBufMark.html '--------------------------------------------------------------------- FUNCTION GotoBufMark% (handle%, markID%) -'--- option _explicit requirements --- -DIM buf&, markPos& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- goto bookmark, if valid --- -markPos& = GetBufMark&(handle%, markID%) -IF markPos& > 0 THEN - MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(markPos&) - GotoBufMark% = 0 -ELSE - GotoBufMark% = markPos& -END IF + '--- option _explicit requirements --- + DIM buf&, markPos& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- goto bookmark, if valid --- + markPos& = GetBufMark&(handle%, markID%) + IF markPos& > 0 THEN + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(markPos&) + GotoBufMark% = 0 + ELSE + GotoBufMark% = markPos& + END IF END FUNCTION '--- docs\SetBufFind.html '--------------------------------------------------------------------- FUNCTION SetBufFind% (handle%, find$) -'--- option _explicit requirements --- -DIM buf&, fid% -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check search criteria --- -SetBufFind% = SBE_EmptyFind: IF find$ = "" THEN EXIT FUNCTION -'--- get new ID, set find data on success --- -fid% = FreeID%(handle%, 4) -IF fid% > 0 THEN - MID$(simplebuffer_array$(buf& + 4), fid% * 4, 4) = MKL$(LEN(find$)) - simplebuffer_array$(buf& + fid% + 4) = find$ -END IF -'--- return ID --- -SetBufFind% = fid% + '--- option _explicit requirements --- + DIM buf&, fid% + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check search criteria --- + SetBufFind% = SBE_EmptyFind: IF find$ = "" THEN EXIT FUNCTION + '--- get new ID, set find data on success --- + fid% = FreeID%(handle%, 4) + IF fid% > 0 THEN + MID$(simplebuffer_array$(buf& + 4), fid% * 4, 4) = MKL$(LEN(find$)) + simplebuffer_array$(buf& + fid% + 4) = find$ + END IF + '--- return ID --- + SetBufFind% = fid% END FUNCTION '--- docs\RemoveBufFind.html '--------------------------------------------------------------------- FUNCTION RemoveBufFind% (handle%, sbFindID%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check ID range --- -RemoveBufFind% = SBE_BadIDNumber -IF (sbFindID% < 1 OR sbFindID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION -'--- remove find data --- -MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4) = MKL$(&HCAFEBABE) -MID$(simplebuffer_array$(buf& + 4), sbFindID% * 4, 4) = MKL$(&HCAFEBABE) -simplebuffer_array$(buf& + sbFindID% + 4) = "" -RemoveBufFind% = 0 + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check ID range --- + RemoveBufFind% = SBE_BadIDNumber + IF (sbFindID% < 1 OR sbFindID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION + '--- remove find data --- + MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4) = MKL$(&HCAFEBABE) + MID$(simplebuffer_array$(buf& + 4), sbFindID% * 4, 4) = MKL$(&HCAFEBABE) + simplebuffer_array$(buf& + sbFindID% + 4) = "" + RemoveBufFind% = 0 END FUNCTION '--- docs\FindBufFR.html '--------------------------------------------------------------------- FUNCTION FindBufFwd& (handle%, sbFindID%, method%, treat%) -'--- option _explicit requirements --- -DIM buf&, cPos&, eob&, fPos&, fLen&, find$, ch&, bPos&, chv% -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check ID range --- -FindBufFwd& = SBE_BadIDNumber -IF (sbFindID% < 1 OR sbFindID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION -'--- prepare & check values --- -cPos& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 -fPos& = CVL(MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4)) -fLen& = CVL(MID$(simplebuffer_array$(buf& + 4), sbFindID% * 4, 4)) -IF fPos& > 0 AND fPos& < eob& AND cPos& = fPos& THEN cPos& = cPos& + 1 -FindBufFwd& = SBE_UnusedID: IF fLen& = &HCAFEBABE THEN EXIT FUNCTION -'--- perform forward search --- -IF treat% = 0 THEN - find$ = simplebuffer_array$(buf& + sbFindID% + 4) - WHILE cPos& < eob& - SELECT CASE method% - CASE IS < 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) = 0 THEN EXIT WHILE - CASE IS > 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) > 0 THEN EXIT WHILE - CASE ELSE - FOR ch& = 1 TO fLen& - bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR - IF ASC(simplebuffer_array$(buf& + 0), bPos&) <> ASC(find$, ch&) THEN EXIT FOR - NEXT ch& - IF ch& > fLen& THEN EXIT WHILE - END SELECT - cPos& = cPos& + 1 - WEND -ELSE - find$ = UCASE$(simplebuffer_array$(buf& + sbFindID% + 4)) - WHILE cPos& < eob& - SELECT CASE method% - CASE IS < 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) = 0 THEN EXIT WHILE - CASE IS > 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) > 0 THEN EXIT WHILE - CASE ELSE - FOR ch& = 1 TO fLen& - bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR - chv% = ASC(simplebuffer_array$(buf& + 0), bPos&) - IF chv% >= 97 AND chv% <= 122 THEN chv% = chv% - 32 - IF chv% <> ASC(find$, ch&) THEN EXIT FOR - NEXT ch& - IF ch& > fLen& THEN EXIT WHILE - END SELECT - cPos& = cPos& + 1 - WEND -END IF -'--- set & return result --- -IF cPos& < eob& THEN MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cPos&): ELSE cPos& = 0 -MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4) = MKL$(cPos&) -FindBufFwd& = cPos& + '--- option _explicit requirements --- + DIM buf&, cPos&, eob&, fPos&, fLen&, find$, ch&, bPos&, chv% + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check ID range --- + FindBufFwd& = SBE_BadIDNumber + IF (sbFindID% < 1 OR sbFindID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION + '--- prepare & check values --- + cPos& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 + fPos& = CVL(MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4)) + fLen& = CVL(MID$(simplebuffer_array$(buf& + 4), sbFindID% * 4, 4)) + IF fPos& > 0 AND fPos& < eob& AND cPos& = fPos& THEN cPos& = cPos& + 1 + FindBufFwd& = SBE_UnusedID: IF fLen& = &HCAFEBABE THEN EXIT FUNCTION + '--- perform forward search --- + IF treat% = 0 THEN + find$ = simplebuffer_array$(buf& + sbFindID% + 4) + WHILE cPos& < eob& + SELECT CASE method% + CASE IS < 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) = 0 THEN EXIT WHILE + CASE IS > 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) > 0 THEN EXIT WHILE + CASE ELSE + FOR ch& = 1 TO fLen& + bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR + IF ASC(simplebuffer_array$(buf& + 0), bPos&) <> ASC(find$, ch&) THEN EXIT FOR + NEXT ch& + IF ch& > fLen& THEN EXIT WHILE + END SELECT + cPos& = cPos& + 1 + WEND + ELSE + find$ = UCASE$(simplebuffer_array$(buf& + sbFindID% + 4)) + WHILE cPos& < eob& + SELECT CASE method% + CASE IS < 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) = 0 THEN EXIT WHILE + CASE IS > 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) > 0 THEN EXIT WHILE + CASE ELSE + FOR ch& = 1 TO fLen& + bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR + chv% = ASC(simplebuffer_array$(buf& + 0), bPos&) + IF chv% >= 97 AND chv% <= 122 THEN chv% = chv% - 32 + IF chv% <> ASC(find$, ch&) THEN EXIT FOR + NEXT ch& + IF ch& > fLen& THEN EXIT WHILE + END SELECT + cPos& = cPos& + 1 + WEND + END IF + '--- set & return result --- + IF cPos& < eob& THEN MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cPos&): ELSE cPos& = 0 + MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4) = MKL$(cPos&) + FindBufFwd& = cPos& END FUNCTION '--- docs\FindBufFR.html '--------------------------------------------------------------------- FUNCTION FindBufRev& (handle%, sbFindID%, method%, treat%) -'--- option _explicit requirements --- -DIM buf&, cPos&, eob&, fPos&, fLen&, find$, ch&, bPos&, chv% -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check ID range --- -FindBufRev& = SBE_BadIDNumber -IF (sbFindID% < 1 OR sbFindID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION -'--- prepare & check values --- -cPos& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 -fPos& = CVL(MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4)) -fLen& = CVL(MID$(simplebuffer_array$(buf& + 4), sbFindID% * 4, 4)) -IF fPos& > 0 AND fPos& < eob& AND cPos& = fPos& THEN cPos& = cPos& - 1 -FindBufRev& = SBE_UnusedID: IF fLen& = &HCAFEBABE THEN EXIT FUNCTION -'--- perform reverse search --- -IF treat% = 0 THEN - find$ = simplebuffer_array$(buf& + sbFindID% + 4) - WHILE cPos& > 0 - SELECT CASE method% - CASE IS < 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) = 0 THEN EXIT WHILE - CASE IS > 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) > 0 THEN EXIT WHILE - CASE ELSE - FOR ch& = 1 TO fLen& - bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR - IF ASC(simplebuffer_array$(buf& + 0), bPos&) <> ASC(find$, ch&) THEN EXIT FOR - NEXT ch& - IF ch& > fLen& THEN EXIT WHILE - END SELECT - cPos& = cPos& - 1 - WEND -ELSE - find$ = UCASE$(simplebuffer_array$(buf& + sbFindID% + 4)) - WHILE cPos& > 0 - SELECT CASE method% - CASE IS < 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) = 0 THEN EXIT WHILE - CASE IS > 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) > 0 THEN EXIT WHILE - CASE ELSE - FOR ch& = 1 TO fLen& - bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR - chv% = ASC(simplebuffer_array$(buf& + 0), bPos&) - IF chv% >= 97 AND chv% <= 122 THEN chv% = chv% - 32 - IF chv% <> ASC(find$, ch&) THEN EXIT FOR - NEXT ch& - IF ch& > fLen& THEN EXIT WHILE - END SELECT - cPos& = cPos& - 1 - WEND -END IF -'--- set & return result --- -IF cPos& > 0 THEN MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cPos&) -MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4) = MKL$(cPos&) -FindBufRev& = cPos& + '--- option _explicit requirements --- + DIM buf&, cPos&, eob&, fPos&, fLen&, find$, ch&, bPos&, chv% + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check ID range --- + FindBufRev& = SBE_BadIDNumber + IF (sbFindID% < 1 OR sbFindID% > 100) AND (LEN(simplebuffer_array$(buf& + 1)) = 16) THEN EXIT FUNCTION + '--- prepare & check values --- + cPos& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 + fPos& = CVL(MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4)) + fLen& = CVL(MID$(simplebuffer_array$(buf& + 4), sbFindID% * 4, 4)) + IF fPos& > 0 AND fPos& < eob& AND cPos& = fPos& THEN cPos& = cPos& - 1 + FindBufRev& = SBE_UnusedID: IF fLen& = &HCAFEBABE THEN EXIT FUNCTION + '--- perform reverse search --- + IF treat% = 0 THEN + find$ = simplebuffer_array$(buf& + sbFindID% + 4) + WHILE cPos& > 0 + SELECT CASE method% + CASE IS < 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) = 0 THEN EXIT WHILE + CASE IS > 0: IF INSTR(find$, CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&))) > 0 THEN EXIT WHILE + CASE ELSE + FOR ch& = 1 TO fLen& + bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR + IF ASC(simplebuffer_array$(buf& + 0), bPos&) <> ASC(find$, ch&) THEN EXIT FOR + NEXT ch& + IF ch& > fLen& THEN EXIT WHILE + END SELECT + cPos& = cPos& - 1 + WEND + ELSE + find$ = UCASE$(simplebuffer_array$(buf& + sbFindID% + 4)) + WHILE cPos& > 0 + SELECT CASE method% + CASE IS < 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) = 0 THEN EXIT WHILE + CASE IS > 0: IF INSTR(find$, UCASE$(CHR$(ASC(simplebuffer_array$(buf& + 0), cPos&)))) > 0 THEN EXIT WHILE + CASE ELSE + FOR ch& = 1 TO fLen& + bPos& = cPos& + ch& - 1: IF bPos& >= eob& THEN EXIT FOR + chv% = ASC(simplebuffer_array$(buf& + 0), bPos&) + IF chv% >= 97 AND chv% <= 122 THEN chv% = chv% - 32 + IF chv% <> ASC(find$, ch&) THEN EXIT FOR + NEXT ch& + IF ch& > fLen& THEN EXIT WHILE + END SELECT + cPos& = cPos& - 1 + WEND + END IF + '--- set & return result --- + IF cPos& > 0 THEN MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(cPos&) + MID$(simplebuffer_array$(buf& + 3), sbFindID% * 4, 4) = MKL$(cPos&) + FindBufRev& = cPos& END FUNCTION '--- docs\CopyBufBlock.html '--------------------------------------------------------------------- FUNCTION CopyBufBlock% (handle%, bound&) -'--- option _explicit requirements --- -DIM buf&, sPo&, ePo& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- get & check positions --- -CopyBufBlock% = SBE_OutOfBounds -IF bound& < 1 OR bound& > GetBufLen&(handle%) + 1 THEN EXIT FUNCTION -sPo& = bound&: ePo& = GetBufPos&(handle%) -IF ePo& < sPo& THEN SWAP sPo&, ePo& -'--- copy block to clip --- -_CLIPBOARD$ = MID$(simplebuffer_array$(buf& + 0), sPo&, ePo& - sPo&) -CopyBufBlock% = 0 + '--- option _explicit requirements --- + DIM buf&, sPo&, ePo& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- get & check positions --- + CopyBufBlock% = SBE_OutOfBounds + IF bound& < 1 OR bound& > GetBufLen&(handle%) + 1 THEN EXIT FUNCTION + sPo& = bound&: ePo& = GetBufPos&(handle%) + IF ePo& < sPo& THEN SWAP sPo&, ePo& + '--- copy block to clip --- + _CLIPBOARD$ = MID$(simplebuffer_array$(buf& + 0), sPo&, ePo& - sPo&) + CopyBufBlock% = 0 END FUNCTION '--- docs\CutBufBlock.html '--------------------------------------------------------------------- FUNCTION CutBufBlock% (handle%, bound&) -'--- option _explicit requirements --- -DIM buf&, sPo&, ePo&, old& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- get & check positions --- -CutBufBlock% = SBE_OutOfBounds -IF bound& < 1 OR bound& > GetBufLen&(handle%) + 1 THEN EXIT FUNCTION -sPo& = bound&: ePo& = GetBufPos&(handle%) -IF ePo& < sPo& THEN SWAP sPo&, ePo& -'--- copy block to clip --- -_CLIPBOARD$ = MID$(simplebuffer_array$(buf& + 0), sPo&, ePo& - sPo&) -'--- then delete block --- -old& = SeekBuf&(handle%, sPo&, SBM_PosRestore) -DeleteBufRawData handle%, ePo& - sPo& -CutBufBlock% = 0 -END FUNCTION - -'--- docs\PasteBufBlock.html -'--------------------------------------------------------------------- -FUNCTION PasteBufBlock% (handle%, bound&) -'--- option _explicit requirements --- -DIM sPo&, ePo&, old& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -'--- replace check --- -IF bound& <> 0 THEN + '--- option _explicit requirements --- + DIM buf&, sPo&, ePo&, old& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 '--- get & check positions --- - PasteBufBlock% = SBE_OutOfBounds + CutBufBlock% = SBE_OutOfBounds IF bound& < 1 OR bound& > GetBufLen&(handle%) + 1 THEN EXIT FUNCTION sPo& = bound&: ePo& = GetBufPos&(handle%) IF ePo& < sPo& THEN SWAP sPo&, ePo& - '--- delete old block --- + '--- copy block to clip --- + _CLIPBOARD$ = MID$(simplebuffer_array$(buf& + 0), sPo&, ePo& - sPo&) + '--- then delete block --- old& = SeekBuf&(handle%, sPo&, SBM_PosRestore) DeleteBufRawData handle%, ePo& - sPo& -END IF -'--- finally paste block from clip --- -WriteBufRawData handle%, _CLIPBOARD$ -PasteBufBlock% = 0 + CutBufBlock% = 0 +END FUNCTION + +'--- docs\PasteBufBlock.html +'--------------------------------------------------------------------- +FUNCTION PasteBufBlock% (handle%, bound&) + '--- option _explicit requirements --- + DIM sPo&, ePo&, old& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + '--- replace check --- + IF bound& <> 0 THEN + '--- get & check positions --- + PasteBufBlock% = SBE_OutOfBounds + IF bound& < 1 OR bound& > GetBufLen&(handle%) + 1 THEN EXIT FUNCTION + sPo& = bound&: ePo& = GetBufPos&(handle%) + IF ePo& < sPo& THEN SWAP sPo&, ePo& + '--- delete old block --- + old& = SeekBuf&(handle%, sPo&, SBM_PosRestore) + DeleteBufRawData handle%, ePo& - sPo& + END IF + '--- finally paste block from clip --- + WriteBufRawData handle%, _CLIPBOARD$ + PasteBufBlock% = 0 END FUNCTION '--- docs\SeekBuf.html '--------------------------------------------------------------------- FUNCTION SeekBuf& (handle%, displace&, mode%) -'--- option _explicit requirements --- -DIM buf&, cur&, eob&, brc$, brl%, origin&, newPos& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- prepare values --- -cur& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 -brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) -'--- select origin --- -SELECT CASE mode% - CASE SBM_PosRestore: origin& = 0 - CASE SBM_BufStart: origin& = 1 - CASE SBM_BufCurrent: origin& = cur& - CASE SBM_BufEnd: origin& = eob& - CASE SBM_LineStart - origin& = cur& - IF cur& > 1 AND cur& < eob& THEN - IF brl% = 2 AND ASC(simplebuffer_array$(buf& + 0), cur& - 1) = 13 AND ASC(simplebuffer_array$(buf& + 0), cur&) = 10 THEN - origin& = cur& - 1 - END IF - END IF - WHILE origin& > 1 - IF MID$(simplebuffer_array$(buf& + 0), origin& - 1, brl%) = brc$ THEN - IF brl% = 2 THEN origin& = origin& + 1 - EXIT WHILE + '--- option _explicit requirements --- + DIM buf&, cur&, eob&, brc$, brl%, origin&, newPos& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- prepare values --- + cur& = GetBufPos&(handle%): eob& = GetBufLen&(handle%) + 1 + brc$ = BufEolSeq$(handle%): brl% = LEN(brc$) + '--- select origin --- + SELECT CASE mode% + CASE SBM_PosRestore: origin& = 0 + CASE SBM_BufStart: origin& = 1 + CASE SBM_BufCurrent: origin& = cur& + CASE SBM_BufEnd: origin& = eob& + CASE SBM_LineStart + origin& = cur& + IF cur& > 1 AND cur& < eob& THEN + IF brl% = 2 AND ASC(simplebuffer_array$(buf& + 0), cur& - 1) = 13 AND ASC(simplebuffer_array$(buf& + 0), cur&) = 10 THEN + origin& = cur& - 1 + END IF END IF - origin& = origin& - 1 - WEND - CASE SBM_LineEnd - origin& = cur& - IF cur& > 1 AND cur& < eob& THEN - IF brl% = 2 AND ASC(simplebuffer_array$(buf& + 0), cur& - 1) = 13 AND ASC(simplebuffer_array$(buf& + 0), cur&) = 10 THEN - origin& = cur& - 1 + WHILE origin& > 1 + IF MID$(simplebuffer_array$(buf& + 0), origin& - 1, brl%) = brc$ THEN + IF brl% = 2 THEN origin& = origin& + 1 + EXIT WHILE + END IF + origin& = origin& - 1 + WEND + CASE SBM_LineEnd + origin& = cur& + IF cur& > 1 AND cur& < eob& THEN + IF brl% = 2 AND ASC(simplebuffer_array$(buf& + 0), cur& - 1) = 13 AND ASC(simplebuffer_array$(buf& + 0), cur&) = 10 THEN + origin& = cur& - 1 + END IF END IF - END IF - origin& = INSTR(origin&, simplebuffer_array$(buf& + 0), brc$) - IF origin& = 0 THEN origin& = eob& - CASE IS > 0 'bookmarks mode - origin& = GetBufMark&(handle%, mode%) - IF origin& < 0 THEN SeekBuf& = origin&: EXIT FUNCTION - CASE ELSE - SeekBuf& = SBE_UnknownMode - EXIT FUNCTION -END SELECT -'--- seek to new position --- -newPos& = origin& + displace& -IF newPos& < 1 OR newPos& > eob& THEN - SeekBuf& = SBE_OutOfBounds -ELSE - MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(newPos&) - SeekBuf& = cur& 'return old position -END IF + origin& = INSTR(origin&, simplebuffer_array$(buf& + 0), brc$) + IF origin& = 0 THEN origin& = eob& + CASE IS > 0 'bookmarks mode + origin& = GetBufMark&(handle%, mode%) + IF origin& < 0 THEN SeekBuf& = origin&: EXIT FUNCTION + CASE ELSE + SeekBuf& = SBE_UnknownMode + EXIT FUNCTION + END SELECT + '--- seek to new position --- + newPos& = origin& + displace& + IF newPos& < 1 OR newPos& > eob& THEN + SeekBuf& = SBE_OutOfBounds + ELSE + MID$(simplebuffer_array$(buf& + 1), 1, 4) = MKL$(newPos&) + SeekBuf& = cur& 'return old position + END IF END FUNCTION '--- docs\GetBufPos.html '--------------------------------------------------------------------- FUNCTION GetBufPos& (handle%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- return cursor position in buffer --- -GetBufPos& = CVL(MID$(simplebuffer_array$(buf& + 1), 1, 4)) + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- return cursor position in buffer --- + GetBufPos& = CVL(MID$(simplebuffer_array$(buf& + 1), 1, 4)) END FUNCTION '--- docs\GetBufLen.html '--------------------------------------------------------------------- FUNCTION GetBufLen& (handle%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- return actual buffer length --- -GetBufLen& = CVL(MID$(simplebuffer_array$(buf& + 1), 5, 4)) + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- return actual buffer length --- + GetBufLen& = CVL(MID$(simplebuffer_array$(buf& + 1), 5, 4)) END FUNCTION '--- docs\EndOfBuf.html '--------------------------------------------------------------------- FUNCTION EndOfBuf% (handle%) -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -'--- return EndOfBuffer condition --- -EndOfBuf% = (GetBufPos&(handle%) > GetBufLen&(handle%)) + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + '--- return EndOfBuffer condition --- + EndOfBuf% = (GetBufPos&(handle%) > GetBufLen&(handle%)) END FUNCTION '--- docs\IsBufChanged.html '--------------------------------------------------------------------- FUNCTION IsBufChanged% (handle%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- return BufChanged condition --- -IsBufChanged% = CVL(MID$(simplebuffer_array$(buf& + 1), 13, 4)) + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- return BufChanged condition --- + IsBufChanged% = CVL(MID$(simplebuffer_array$(buf& + 1), 13, 4)) END FUNCTION '--- docs\BufEolSeq.html '--------------------------------------------------------------------- FUNCTION BufEolSeq$ (handle%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- return buffer specific EndOfLine sequence --- -SELECT CASE MID$(simplebuffer_array$(buf& + 1), 9, 4) - CASE "EolU", "EolN" 'unknown (maybe mixed) or OS-native EOL mode - BufEolSeq$ = CHR$(13) + CHR$(10) 'default is Windows - IF INSTR(_OS$, "[LINUX]") > 0 THEN BufEolSeq$ = CHR$(10) 'true for MacOSX too - CASE "EolL" 'forced Linux/MacOSX - BufEolSeq$ = CHR$(10) - CASE "EolW" 'forced Windows - BufEolSeq$ = CHR$(13) + CHR$(10) -END SELECT + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- return buffer specific EndOfLine sequence --- + SELECT CASE MID$(simplebuffer_array$(buf& + 1), 9, 4) + CASE "EolU", "EolN" 'unknown (maybe mixed) or OS-native EOL mode + BufEolSeq$ = CHR$(13) + CHR$(10) 'default is Windows + IF INSTR(_OS$, "[LINUX]") > 0 THEN BufEolSeq$ = CHR$(10) 'true for MacOSX too + CASE "EolL" 'forced Linux/MacOSX + BufEolSeq$ = CHR$(10) + CASE "EolW" 'forced Windows + BufEolSeq$ = CHR$(13) + CHR$(10) + END SELECT END FUNCTION '--- docs\ConvBufToAnyEol.html '--------------------------------------------------------------------- SUB ConvBufToNativeEol (handle%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- convert buffer to OS native EndOfLine sequence --- -IF INSTR(_OS$, "[LINUX]") > 0 THEN 'true for MacOSX too - ConvBufToLnxMacEol handle% -ELSE - ConvBufToWinEol handle% -END IF -MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolN" + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- convert buffer to OS native EndOfLine sequence --- + IF INSTR(_OS$, "[LINUX]") > 0 THEN 'true for MacOSX too + ConvBufToLnxMacEol handle% + ELSE + ConvBufToWinEol handle% + END IF + MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolN" END SUB '--- docs\ConvBufToAnyEol.html '--------------------------------------------------------------------- SUB ConvBufToLnxMacEol (handle%) -'--- option _explicit requirements --- -DIM buf&, res&, po& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check current EndOfLine sequence --- -IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolL" THEN EXIT SUB -IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolN" AND LEN(BufEolSeq$(handle%)) = 1 THEN EXIT SUB -'--- prepare values --- -simplebuffer_array$(buf& + 1) = simplebuffer_array$(buf& + 1) + CHR$(16) -IF MID$(simplebuffer_array$(buf& + 0), GetBufPos&(handle%), 2) = CHR$(13) + CHR$(10) THEN - res& = SeekBuf&(handle%, 1, SBM_BufCurrent) -END IF -MID$(simplebuffer_array$(buf& + 2), 101 * 4, 4) = MID$(simplebuffer_array$(buf& + 1), 1, 4) 'SetBufMark 101 -MID$(simplebuffer_array$(buf& + 4), 101 * 4, 4) = MKL$(2): simplebuffer_array$(buf& + 101 + 4) = CHR$(13) + CHR$(10) 'SetBufFind 101 -'--- search & convert --- -res& = SeekBuf&(handle%, 0, SBM_BufStart) -DO - po& = FindBufFwd&(handle%, 101, SBF_FullData, SBF_AsWritten) - IF po& > 0 THEN DeleteBufRawData handle%, 1 -LOOP UNTIL po& = 0 -MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolL" -'--- restore old position & cleanup --- -res& = SeekBuf&(handle%, 0, 101) -res& = RemoveBufFind%(handle%, 101) -res& = RemoveBufMark%(handle%, 101) -simplebuffer_array$(buf& + 1) = LEFT$(simplebuffer_array$(buf& + 1), 16) + '--- option _explicit requirements --- + DIM buf&, res&, po& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check current EndOfLine sequence --- + IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolL" THEN EXIT SUB + IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolN" AND LEN(BufEolSeq$(handle%)) = 1 THEN EXIT SUB + '--- prepare values --- + simplebuffer_array$(buf& + 1) = simplebuffer_array$(buf& + 1) + CHR$(16) + IF MID$(simplebuffer_array$(buf& + 0), GetBufPos&(handle%), 2) = CHR$(13) + CHR$(10) THEN + res& = SeekBuf&(handle%, 1, SBM_BufCurrent) + END IF + MID$(simplebuffer_array$(buf& + 2), 101 * 4, 4) = MID$(simplebuffer_array$(buf& + 1), 1, 4) 'SetBufMark 101 + MID$(simplebuffer_array$(buf& + 4), 101 * 4, 4) = MKL$(2): simplebuffer_array$(buf& + 101 + 4) = CHR$(13) + CHR$(10) 'SetBufFind 101 + '--- search & convert --- + res& = SeekBuf&(handle%, 0, SBM_BufStart) + DO + po& = FindBufFwd&(handle%, 101, SBF_FullData, SBF_AsWritten) + IF po& > 0 THEN DeleteBufRawData handle%, 1 + LOOP UNTIL po& = 0 + MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolL" + '--- restore old position & cleanup --- + res& = SeekBuf&(handle%, 0, 101) + res& = RemoveBufFind%(handle%, 101) + res& = RemoveBufMark%(handle%, 101) + simplebuffer_array$(buf& + 1) = LEFT$(simplebuffer_array$(buf& + 1), 16) END SUB '--- docs\ConvBufToAnyEol.html '--------------------------------------------------------------------- SUB ConvBufToWinEol (handle%) -'--- option _explicit requirements --- -DIM buf&, res&, po& -'--- check handle --- -IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle -buf& = handle% * 106 -'--- check current EndOfLine sequence --- -IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolW" THEN EXIT SUB -IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolN" AND LEN(BufEolSeq$(handle%)) = 2 THEN EXIT SUB -IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolU" THEN ConvBufToLnxMacEol handle% 'safety measure for unknown (maybe mixed) EOL mode -'--- prepare values --- -simplebuffer_array$(buf& + 1) = simplebuffer_array$(buf& + 1) + CHR$(16) -MID$(simplebuffer_array$(buf& + 2), 101 * 4, 4) = MID$(simplebuffer_array$(buf& + 1), 1, 4) 'SetBufMark 101 -MID$(simplebuffer_array$(buf& + 4), 101 * 4, 4) = MKL$(1): simplebuffer_array$(buf& + 101 + 4) = CHR$(10) 'SetBufFind 101 -'--- search & convert --- -res& = SeekBuf&(handle%, 0, SBM_BufStart) -DO - po& = FindBufFwd&(handle%, 101, SBF_FullData, SBF_AsWritten) - IF po& > 0 THEN WriteBufRawData handle%, CHR$(13) -LOOP UNTIL po& = 0 -MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolW" -'--- restore old position & cleanup --- -res& = SeekBuf&(handle%, 0, 101) -IF MID$(simplebuffer_array$(buf& + 0), GetBufPos&(handle%), 1) = CHR$(10) THEN - res& = SeekBuf&(handle%, 0, SBM_LineEnd) -END IF -res& = RemoveBufFind%(handle%, 101) -res& = RemoveBufMark%(handle%, 101) -simplebuffer_array$(buf& + 1) = LEFT$(simplebuffer_array$(buf& + 1), 16) + '--- option _explicit requirements --- + DIM buf&, res&, po& + '--- check handle --- + IF NOT CheckHandle%(handle%) THEN ERROR 258: STOP 'invalid handle + buf& = handle% * 106 + '--- check current EndOfLine sequence --- + IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolW" THEN EXIT SUB + IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolN" AND LEN(BufEolSeq$(handle%)) = 2 THEN EXIT SUB + IF MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolU" THEN ConvBufToLnxMacEol handle% 'safety measure for unknown (maybe mixed) EOL mode + '--- prepare values --- + simplebuffer_array$(buf& + 1) = simplebuffer_array$(buf& + 1) + CHR$(16) + MID$(simplebuffer_array$(buf& + 2), 101 * 4, 4) = MID$(simplebuffer_array$(buf& + 1), 1, 4) 'SetBufMark 101 + MID$(simplebuffer_array$(buf& + 4), 101 * 4, 4) = MKL$(1): simplebuffer_array$(buf& + 101 + 4) = CHR$(10) 'SetBufFind 101 + '--- search & convert --- + res& = SeekBuf&(handle%, 0, SBM_BufStart) + DO + po& = FindBufFwd&(handle%, 101, SBF_FullData, SBF_AsWritten) + IF po& > 0 THEN WriteBufRawData handle%, CHR$(13) + LOOP UNTIL po& = 0 + MID$(simplebuffer_array$(buf& + 1), 9, 4) = "EolW" + '--- restore old position & cleanup --- + res& = SeekBuf&(handle%, 0, 101) + IF MID$(simplebuffer_array$(buf& + 0), GetBufPos&(handle%), 1) = CHR$(10) THEN + res& = SeekBuf&(handle%, 0, SBM_LineEnd) + END IF + res& = RemoveBufFind%(handle%, 101) + res& = RemoveBufMark%(handle%, 101) + simplebuffer_array$(buf& + 1) = LEFT$(simplebuffer_array$(buf& + 1), 16) END SUB '--- undocumented - for internal use only '--------------------------------------------------------------------- FUNCTION CheckHandle% (handle%) -'--- option _explicit requirements --- -DIM buf& -'--- check handle --- -buf& = handle% * 106: CheckHandle% = 0 -IF buf& < 0 OR buf& > UBOUND(simplebuffer_array$) THEN EXIT FUNCTION -IF simplebuffer_array$(buf& + 1) = "" THEN EXIT FUNCTION -CheckHandle% = -1 + '--- option _explicit requirements --- + DIM buf& + '--- check handle --- + buf& = handle% * 106: CheckHandle% = 0 + IF buf& < 0 OR buf& > UBOUND(simplebuffer_array$) THEN EXIT FUNCTION + IF simplebuffer_array$(buf& + 1) = "" THEN EXIT FUNCTION + CheckHandle% = -1 END FUNCTION '--- undocumented - for internal use only '--------------------------------------------------------------------- FUNCTION FreeID% (handle%, slot%) -'--- option _explicit requirements --- -DIM buf&, idx% -'--- find a free ID --- -buf& = handle% * 106: FreeID% = SBE_NoMoreIDs -FOR idx% = 1 TO 100 - IF CVL(MID$(simplebuffer_array$(buf& + slot%), idx% * 4, 4)) = &HCAFEBABE THEN - FreeID% = idx%: EXIT FOR - END IF -NEXT idx% + '--- option _explicit requirements --- + DIM buf&, idx% + '--- find a free ID --- + buf& = handle% * 106: FreeID% = SBE_NoMoreIDs + FOR idx% = 1 TO 100 + IF CVL(MID$(simplebuffer_array$(buf& + slot%), idx% * 4, 4)) = &HCAFEBABE THEN + FreeID% = idx%: EXIT FOR + END IF + NEXT idx% END FUNCTION '--- undocumented - for internal use only '--------------------------------------------------------------------- SUB RecalcMarks (handle%, bufPos&, change&) -'--- option _explicit requirements --- -DIM buf&, idx%, mark&, absChg& -'--- check special case (no change) --- -IF change& = 0 THEN EXIT SUB -'--- recalc all used bookmarks --- -buf& = handle% * 106 -FOR idx% = 1 TO 101 - mark& = CVL(MID$(simplebuffer_array$(buf& + 2), idx% * 4, 4)) - IF mark& <> &HCAFEBABE AND mark& <> &HDEADBEEF THEN - SELECT CASE change& - CASE IS > 0 - IF bufPos& <= mark& THEN mark& = mark& + change& - CASE IS < 0 - IF bufPos& < mark& THEN - absChg& = ABS(change&) - IF absChg& <= (mark& - bufPos&) THEN - mark& = mark& - absChg& - ELSE + '--- option _explicit requirements --- + DIM buf&, idx%, mark&, absChg& + '--- check special case (no change) --- + IF change& = 0 THEN EXIT SUB + '--- recalc all used bookmarks --- + buf& = handle% * 106 + FOR idx% = 1 TO 101 + mark& = CVL(MID$(simplebuffer_array$(buf& + 2), idx% * 4, 4)) + IF mark& <> &HCAFEBABE AND mark& <> &HDEADBEEF THEN + SELECT CASE change& + CASE IS > 0 + IF bufPos& <= mark& THEN mark& = mark& + change& + CASE IS < 0 + IF bufPos& < mark& THEN + absChg& = ABS(change&) + IF absChg& <= (mark& - bufPos&) THEN + mark& = mark& - absChg& + ELSE + mark& = &HDEADBEEF + END IF + ELSEIF bufPos& = mark& THEN mark& = &HDEADBEEF END IF - ELSEIF bufPos& = mark& THEN - mark& = &HDEADBEEF - END IF - END SELECT - MID$(simplebuffer_array$(buf& + 2), idx% * 4, 4) = MKL$(mark&) - END IF -NEXT idx% + END SELECT + MID$(simplebuffer_array$(buf& + 2), idx% * 4, 4) = MKL$(mark&) + END IF + NEXT idx% END SUB '--- undocumented - for internal use only '--------------------------------------------------------------------- SUB RecalcFinds (handle%, bufPos&, change&) -'--- option _explicit requirements --- -DIM buf&, idx%, found&, length&, absChg& -'--- check special case (no change) --- -IF change& = 0 THEN EXIT SUB -'--- recalc all used found at positions --- -buf& = handle% * 106 -FOR idx% = 1 TO 101 - found& = CVL(MID$(simplebuffer_array$(buf& + 3), idx% * 4, 4)) - length& = CVL(MID$(simplebuffer_array$(buf& + 4), idx% * 4, 4)) - IF found& <> &HCAFEBABE AND found& <> &HDEADBEEF THEN - SELECT CASE change& - CASE IS > 0 - IF bufPos& <= found& THEN - found& = found& + change& - ELSEIF bufPos& > found& AND bufPos& < (found& + length&) THEN - found& = &HDEADBEEF - END IF - CASE IS < 0 - IF bufPos& < found& THEN - absChg& = ABS(change&) - IF absChg& <= (found& - bufPos&) THEN - found& = found& - absChg& - ELSE + '--- option _explicit requirements --- + DIM buf&, idx%, found&, length&, absChg& + '--- check special case (no change) --- + IF change& = 0 THEN EXIT SUB + '--- recalc all used found at positions --- + buf& = handle% * 106 + FOR idx% = 1 TO 101 + found& = CVL(MID$(simplebuffer_array$(buf& + 3), idx% * 4, 4)) + length& = CVL(MID$(simplebuffer_array$(buf& + 4), idx% * 4, 4)) + IF found& <> &HCAFEBABE AND found& <> &HDEADBEEF THEN + SELECT CASE change& + CASE IS > 0 + IF bufPos& <= found& THEN + found& = found& + change& + ELSEIF bufPos& > found& AND bufPos& < (found& + length&) THEN found& = &HDEADBEEF END IF - ELSEIF bufPos& >= found& AND bufPos& < (found& + length&) THEN - found& = &HDEADBEEF - END IF - END SELECT - MID$(simplebuffer_array$(buf& + 3), idx% * 4, 4) = MKL$(found&) - END IF -NEXT idx% + CASE IS < 0 + IF bufPos& < found& THEN + absChg& = ABS(change&) + IF absChg& <= (found& - bufPos&) THEN + found& = found& - absChg& + ELSE + found& = &HDEADBEEF + END IF + ELSEIF bufPos& >= found& AND bufPos& < (found& + length&) THEN + found& = &HDEADBEEF + END IF + END SELECT + MID$(simplebuffer_array$(buf& + 3), idx% * 4, 4) = MKL$(found&) + END IF + NEXT idx% END SUB '--- undocumented - for internal use only '--------------------------------------------------------------------- FUNCTION VersionSimplebuffer$ -VersionSimplebuffer$ = MID$("$VER: simplebuffer.bm 3.2 (18-Oct-2022) by RhoSigma :END$", 7, 45) + VersionSimplebuffer$ = MID$("$VER: simplebuffer.bm 3.2 (18-Oct-2022) by RhoSigma :END$", 7, 45) END FUNCTION '$INCLUDE: 'sb_qb64pe_extension.bm' diff --git a/source/utilities/type.bas b/source/utilities/type.bas index 508d9f2ac..fe4887680 100644 --- a/source/utilities/type.bas +++ b/source/utilities/type.bas @@ -562,7 +562,7 @@ FUNCTION removesymbol$ (varname$) varname$ = LEFT$(varname$, i - 1) END FUNCTION -' +' ' Does not report an error if the symbol is invalid or varname is blank ' FUNCTION tryRemoveSymbol$ (varname$)