Repository navigation
Run-time errors for the Strings module, page shortcuts, help add-in 1.1.0, and five defects queued - #248
Merged
Conversation
…ws the IDE's font size
… page (tb-defaults.mjs); try-help-addin keeps the user's
…olls to each match), and a setting for each page-side fix
…e raises A reader on Discord asked for what no VB or VBA reference gives: the errors a function, statement or operator can raise. The owner's decisions: data-driven error tables, measured in twinBASIC 32-bit and VB6 (64-bit too for operators and Math), scoped to Default, Core and Built-In, with the error prose already on pages moved into the tables. The file sets out what a page gets, the central error page, what the tooling (batch 0) must settle, what a session starting it must know and when it is done, and sixteen batches with their status. WIP.md's table points to it.
…d its gate errors/*.yml lists, per page, the cases that raise each error and the cases that must raise nothing. scripts/errors.mjs run builds one probe per runtime (twinBASIC exe via tbrun --exe, win64 on request, VB6 via runRepro), drops and rebuilds around a case a compiler refuses, and compares every case with the data; write writes each page's Errors section between markers. check_errors.mjs, the new test.bat and CI gate, keeps sections and data in step. Trial: Mid (three rows, measured limits of start and length), ReDim (VB6 differs on an upper bound below the lower: NOTE, bug pending), Len (raises nothing, no section). All 37 cases agree in twinBASIC BETA 1010 and VB6.
-2147467259 (`&H80004005`), 5 (`&H5`): in the table and in the VB6 NOTE. WIP.Errors.md records the owner's answers on the trial's open points.
…the sections linked to it
docs/Reference/Run-time-Errors.md lists every number from 1 to 65535 with a
message of its own (88, measured: twinBASIC 32-bit and VB6 agree on all of
them) and the HRESULTs the data names, each with its anchor, its message and
the pages whose Errors sections list it. errors.mjs write generates the index
between markers; check_errors.mjs verifies it. Each number in a section now
links to its anchor, and rows of a page that raise the same number share one
table row, their conditions joined with <br>.
errors/messages.yml takes { raised, error } where Err.Description and
Error$(n) differ; the new errors.mjs messages command measures the file in
both runtimes.
The heading write makes, the central page's references to the sections, the gate's probes, the tools' docs and WIP.Errors.md.
… 0 rows for what only VB6 raises
…p, Filter), and an invalid LCID refused on a zero-length string; ReDim entry moved below the header
…f typed arrays an extension
…ull; StrConv's East Asian conversions refuse an East Asian LCID on a Western system
…rors' anchors are the bare numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Common Errors section to the Strings module's pages and a central Run-time Errors page,
tb:page shortcuts and help add-in 1.1.0, and queues five twinBASIC defects found along the way.errors/*.yml: the cases that raise each error, and the cases that must raise nothing), measured in twinBASIC 32-bit and VB6 on BETA 1010. They are written into each page's Common Errors section as number (decimal and VB hexadecimal),Err.Descriptionand condition.scripts/errors.mjshasrun(builds a probe per runtime and compares every case with the data),write(writes the sections) andmessages(measureserrors/messages.ymlin both runtimes).check_errors.mjskeeps sections and data in step; it istest.bat's 29th step and runs in CI./Reference/Run-time-Errors, in the book, page baseline 1503): every number from 1 to 65535 with a message of its own (88; twinBASIC and VB6 agree on all) and the HRESULTs the data names. Each has an anchor and a generated list of the pages that raise it.ReDimand 28 of the 30 Strings pages, 339 cases, all agreeing in twinBASIC and VB6. Any error a Null argument raises is listed. A case where only VB6 raises (error: 0) is a NOTE only.JoinandFilterof aLongorDoublearray are documented as an extension. VBA text that twinBASIC and VB6 both contradict, such as thevbUseCompareOptionrows, is kept as<!-- VBA: -->comments.WIP.Errors.md: the decisions, the design and how a batch runs. Next is batch 3,Conversion.shortcut: <Name>in a page's front matter lets any page link to it as[5](tb:Errors#5), from any folder and with no../. The build writes the real URL. An unknown name, a name two pages claim and atb:image source fail the build, and inside code the link is left as written.Errorsis the first, and its anchors are the bare error numbers. Documented on the Authoring page.add-in/CHANGELOG.md; theHelp_Settingspictures are retaken.launchIdeanswersGetIDESettingwith "no saved value" in the page (tb-defaults.mjs).try-help-addinkeeps the user's.bugs/with a VB6 side.ReDimwith an upper bound below the lower raises -2147467259, Unspecified error; VB6 raises 9.vbDatabaseCompareraises no error inInStr,StrCompandFilter; VB6 raises 5.InStrraises 5 for an invalid LCID when string1 or string2 is zero-length; VB6 raises nothing.Stringwith a character ofNullraises 94; VB6 returnsNull.StrConvwithvbWide,vbNarrow,vbKatakanaorvbHiraganaand an East Asian LCID raises 5 on a system whose locale is not East Asian; VB6 converts.