Skip to content

Commit

Permalink
Export function fix
Browse files Browse the repository at this point in the history
- fix wrong wiki links in OPEN statements
- all OPEN related KWs link to the respective sections at the OPEN wiki page
- all other KWs involved in filename, filenumber or recordlength specification must link to their own wiki pages
  • Loading branch information
RhoSigma-QB64 committed Sep 11, 2024
1 parent a5e7830 commit be0914b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/ide/ide_methods.bas
Original file line number Diff line number Diff line change
Expand Up @@ -21023,11 +21023,15 @@ SUB ExportCodeAs (docFormat$)
IF me% THEN page$ = UCASE$(me$): ELSE page$ = UCASE$(kw$) 'Wiki pages are all caps
IF op% THEN
SELECT CASE page$
CASE "ACCESS", "LOCK", "SHARED", "READ", "WRITE": page$ = "OPEN#File_ACCESS_and_LOCK_Permissions"
CASE "FOR", "OUTPUT", "APPEND", "INPUT", "BINARY", "RANDOM": page$ = "OPEN#File_Access_Modes"
CASE ELSE: page$ = "OPEN"
CASE "OPEN", "AS": page$ = "OPEN": RETURN
CASE "LEN"
la$ = LTRIM$(StrReplace$(MID$(sTxt$, sPos&, 100), CHR$(9), " "))
IF LEFT$(la$, 1) <> "(" THEN page$ = "OPEN": RETURN
CASE "ACCESS", "LOCK", "SHARED", "READ", "WRITE": page$ = "OPEN#File_ACCESS_and_LOCK_Permissions": RETURN
CASE "FOR", "OUTPUT", "APPEND", "INPUT", "BINARY", "RANDOM": page$ = "OPEN#File_Access_Modes": RETURN
END SELECT
ELSEIF (fu% < 0) AND ((INSTR(fu$, "@" + page$ + "@") > 0) OR (np% AND INSTR(fu$, "@_" + page$ + "@") > 0)) THEN
END IF
IF (fu% < 0) AND ((INSTR(fu$, "@" + page$ + "@") > 0) OR (np% AND INSTR(fu$, "@_" + page$ + "@") > 0)) THEN
page$ = page$ + " (function)"
ELSEIF bo% AND INSTR(bo$, "@" + page$ + "@") > 0 THEN 'np% check omitted (legacy words only)
page$ = page$ + " (boolean)"
Expand Down

0 comments on commit be0914b

Please sign in to comment.